Safe Haskell | None |
---|---|
Language | Haskell2010 |
- decode :: ByteString -> Either String Sexp
- encode :: Sexp -> ByteString
- parseSexp :: FilePath -> ByteString -> Either String Sexp
- parseSexps :: FilePath -> ByteString -> Either String [Sexp]
- parseSexp' :: Position -> ByteString -> Either String Sexp
- parseSexps' :: Position -> ByteString -> Either String [Sexp]
- prettySexp :: Sexp -> ByteString
- prettySexps :: [Sexp] -> ByteString
- data Sexp
- data Atom
- newtype Kw = Kw {}
- data Position = Position !FilePath !Int !Int
- dummyPos :: Position
- getPos :: Sexp -> Position
Parse and print
decode :: ByteString -> Either String Sexp Source
Quickly decode a ByteString-formatted S-expression into Sexp structure
encode :: Sexp -> ByteString Source
Quickly encode Sexp to non-indented ByteString
parseSexp :: FilePath -> ByteString -> Either String Sexp Source
Parse a ByteString-formatted S-expression into Sexp structure. Takes file name for better error messages.
parseSexps :: FilePath -> ByteString -> Either String [Sexp] Source
Parse a ByteString-formatted sequence of S-expressions into list of Sexp structures. Takes file name for better error messages.
parseSexp' :: Position -> ByteString -> Either String Sexp Source
Parse a ByteString-formatted S-expression into Sexp structure. Takes file name for better error messages.
parseSexps' :: Position -> ByteString -> Either String [Sexp] Source
Parse a ByteString-formatted sequence of S-expressions into list of Sexp structures. Takes file name for better error messages.
prettySexp :: Sexp -> ByteString Source
Pretty-print a Sexp to a ByteString
prettySexps :: [Sexp] -> ByteString Source
Pretty-print a list of Sexps as a sequence of S-expressions to a ByteString
Type
Sexp ADT
Sexp atom types
Keyword newtype wrapper to distinguish keywords from symbols
Position
File position