Safe Haskell | None |
---|---|
Language | Haskell2010 |
Erlang term parser and pretty printer.
- parseErlTerm :: String -> ByteString -> Either String SimpleErlangTerm
- renderErlTerm :: SimpleErlangTerm -> ByteString
- data SimpleErlangTerm
- arbitraryErlSimpleAtom :: Gen SimpleErlangTerm
- arbitraryErlString :: Gen SimpleErlangTerm
- arbitraryErlNumber :: Gen SimpleErlangTerm
- arbitraryErlNatural :: Gen SimpleErlangTerm
- arbitraryErlFloat :: Gen SimpleErlangTerm
- arbitraryErlNameChar :: Gen Char
Documentation
parseErlTerm :: String -> ByteString -> 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 -> ByteString 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] |