Safe Haskell | None |
---|---|
Language | Haskell2010 |
- decode :: Text -> Either String Sexp
- encode :: Sexp -> ByteString
- parseSexp :: FilePath -> Text -> Either String Sexp
- parseSexps :: FilePath -> Text -> Either String [Sexp]
- parseSexp' :: Position -> Text -> Either String Sexp
- parseSexps' :: Position -> Text -> Either String [Sexp]
- prettySexp :: Sexp -> Text
- prettySexps :: [Sexp] -> Text
- data Sexp
- data Atom
- newtype Kw = Kw {}
- data Position = Position !FilePath !Int !Int
- dummyPos :: Position
- getPos :: Sexp -> Position
Parse and print
decode :: Text -> 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 -> Text -> Either String Sexp Source #
Parse a ByteString-formatted S-expression into Sexp structure. Takes file name for better error messages.
parseSexps :: FilePath -> Text -> 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 -> Text -> Either String Sexp Source #
Parse a ByteString-formatted S-expression into Sexp structure. Takes file name for better error messages.
parseSexps' :: Position -> Text -> 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 -> Text Source #
Pretty-print a Sexp to a Text
prettySexps :: [Sexp] -> Text 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