Safe Haskell | None |
---|---|
Language | Haskell2010 |
Erlang term parser and pretty printer.
Synopsis
- parseErlTerm :: String -> Text -> Either String SimpleErlangTerm
- erlTermParser :: Parser SimpleErlangTerm
- renderErlTerm :: SimpleErlangTerm -> Text
- data SimpleErlangTerm
- arbitraryErlSimpleAtom :: Gen SimpleErlangTerm
- arbitraryErlString :: Gen SimpleErlangTerm
- arbitraryErlNumber :: Gen SimpleErlangTerm
- arbitraryErlNatural :: Gen SimpleErlangTerm
- arbitraryErlFloat :: Gen SimpleErlangTerm
- arbitraryErlNameChar :: Gen Char
Documentation
parseErlTerm :: String -> Text -> Either String SimpleErlangTerm Source #
Parse a subset of valid Erlang terms. It parses no maps and binaries are restricted to either empty binaries or binaries with a string. The input encoding must be restricted to ascii compatible 8-bit characters (e.g. latin-1 or UTF8).
renderErlTerm :: SimpleErlangTerm -> Text Source #
Convert an abstract Erlang term to a pretty byte string preserving the encoding.
data SimpleErlangTerm Source #
Simplified Erlang term representation.
ErlString String | |
ErlFloat Double | |
ErlNatural Integer | |
ErlAtom String | |
ErlChar Char | |
ErlBinary String | |
ErlList [SimpleErlangTerm] | |
ErlTuple [SimpleErlangTerm] |