Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- decode :: ByteString -> Either String Sexp
- decodeMany :: ByteString -> Either String [Sexp]
- encode :: Sexp -> ByteString
- format :: Sexp -> ByteString
- type Sexp = Fix SexpF
- pattern Atom :: Atom -> Sexp
- pattern Number :: Scientific -> Sexp
- pattern Symbol :: Text -> Sexp
- pattern String :: Text -> Sexp
- pattern ParenList :: [Sexp] -> Sexp
- pattern BracketList :: [Sexp] -> Sexp
- pattern BraceList :: [Sexp] -> Sexp
- pattern Modified :: Prefix -> Sexp -> Sexp
- data SexpF e
- = AtomF !Atom
- | ParenListF [e]
- | BracketListF [e]
- | BraceListF [e]
- | ModifiedF !Prefix e
- data Atom
- = AtomNumber !Scientific
- | AtomString !Text
- | AtomSymbol !Text
- data Prefix
Parse and print
decodeMany :: ByteString -> Either String [Sexp] Source #
Deserialise potentially multiple Sexp
from a string
Type
pattern Number :: Scientific -> Sexp Source #
pattern BracketList :: [Sexp] -> Sexp Source #
Internal types
S-expression functor
AtomF !Atom | |
ParenListF [e] | |
BracketListF [e] | |
BraceListF [e] | |
ModifiedF !Prefix e |
Instances
S-expression atom type
Instances
Eq Atom Source # | |
Ord Atom Source # | |
Show Atom Source # | |
Generic Atom Source # | |
NFData Atom Source # | |
Defined in Language.Sexp.Types | |
Pretty Atom # | |
Defined in Language.Sexp.Pretty | |
type Rep Atom Source # | |
Defined in Language.Sexp.Types type Rep Atom = D1 (MetaData "Atom" "Language.Sexp.Types" "sexp-grammar-2.0.1-mlr1oiuTYAJrcfHK2CqYr" False) (C1 (MetaCons "AtomNumber" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) SourceUnpack SourceStrict DecidedStrict) (Rec0 Scientific)) :+: (C1 (MetaCons "AtomString" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) SourceUnpack SourceStrict DecidedStrict) (Rec0 Text)) :+: C1 (MetaCons "AtomSymbol" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) SourceUnpack SourceStrict DecidedStrict) (Rec0 Text)))) |
S-expression quotation type
Instances
Eq Prefix Source # | |
Ord Prefix Source # | |
Show Prefix Source # | |
Generic Prefix Source # | |
NFData Prefix Source # | |
Defined in Language.Sexp.Types | |
type Rep Prefix Source # | |
Defined in Language.Sexp.Types type Rep Prefix = D1 (MetaData "Prefix" "Language.Sexp.Types" "sexp-grammar-2.0.1-mlr1oiuTYAJrcfHK2CqYr" False) ((C1 (MetaCons "Quote" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "Backtick" PrefixI False) (U1 :: * -> *)) :+: (C1 (MetaCons "Comma" PrefixI False) (U1 :: * -> *) :+: (C1 (MetaCons "CommaAt" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "Hash" PrefixI False) (U1 :: * -> *)))) |