b9-0.5.49: A tool and library for building virtual machine images.

Safe HaskellNone
LanguageHaskell2010

B9.Content.ErlTerms

Description

Erlang term parser and pretty printer.

Synopsis

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.

Instances

Eq SimpleErlangTerm Source # 
Data SimpleErlangTerm Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SimpleErlangTerm -> c SimpleErlangTerm #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SimpleErlangTerm #

toConstr :: SimpleErlangTerm -> Constr #

dataTypeOf :: SimpleErlangTerm -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c SimpleErlangTerm) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SimpleErlangTerm) #

gmapT :: (forall b. Data b => b -> b) -> SimpleErlangTerm -> SimpleErlangTerm #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SimpleErlangTerm -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SimpleErlangTerm -> r #

gmapQ :: (forall d. Data d => d -> u) -> SimpleErlangTerm -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> SimpleErlangTerm -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> SimpleErlangTerm -> m SimpleErlangTerm #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SimpleErlangTerm -> m SimpleErlangTerm #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SimpleErlangTerm -> m SimpleErlangTerm #

Ord SimpleErlangTerm Source # 
Read SimpleErlangTerm Source # 
Show SimpleErlangTerm Source # 
Generic SimpleErlangTerm Source # 
Arbitrary SimpleErlangTerm Source # 
Hashable SimpleErlangTerm Source # 
Binary SimpleErlangTerm Source # 
NFData SimpleErlangTerm Source # 

Methods

rnf :: SimpleErlangTerm -> () #

type Rep SimpleErlangTerm Source #