|
|
|
|
|
Description |
A Sexpr is an S-expressionin the style of Rivest's Canonical
S-expressions. Atoms may be of any type, but String and
ByteString have special support. Rivest's implementation of
S-expressions is unusual in supporting MIME type hints for each
atom. See http:people.csail.mit.edurivestSexp.txt
|
|
Synopsis |
|
|
|
|
Basics
|
|
|
Instances | |
|
|
|
A predicate for identifying atoms, whether or not they have
explicit hints.
|
|
|
A predicate for recognizing lists.
|
|
|
Construct an atom.
|
|
|
Construct a list.
|
|
|
Extract the content of an atom, discarding any MIME type hint.
|
|
|
Extract the sub-S-expressions of a List. If all you intend to do
is traverse or map over that list, the Functor instance of
S-expressions may work just fine.
|
|
Hinted Atoms
|
|
|
Construct an atom with a MIME type hint.
hintedAtom defaultHint == atom
|
|
|
Extract the hint of an atom. Lists do not have hints, but all
atoms have hints.
|
|
|
Any atom whose hint is not specified is assumed to be
text/plain; charset=iso-8859-1. This is that default value.
|
|
Character predicates to support encoding
|
|
|
Tokens may internally contain any of the characters legitimate to
begin tokens, or any numeral.
|
|
|
Tokens may begin with any alphabetic character or the characters
in -./_:*+= ;
|
|
|
Only token characters and spaces don't need to be escaped when
shown in the quoted syntax.
|
|
Transformations
|
|
|
fold f s applies f to each sub-S-expression of s, from each leaf
to the root. f need not preserve the shape of s, in contrast
to the shape-preserving Traversable instance.
|
|
String printers
|
|
|
|
|
|
|
|
ShowS printers
|
|
|
|
Doc pretty printers
|
|
|
|
|
|
Put binary printers
|
|
|
|
|
|
Parsers
|
|
|
Read a Sexpr a using the Read instance for a. The Sexpr
may be in any encoding: Canonical, Basic, or Advanced.
|
|
|
Read a Sexpr String in any encoding: Canonical, Basic, or Advanced.
|
|
|
Read a Sexpr String in canonical encoding.
|
|
|
|
|
For some applications it is wise to accept only very carefully
specified input. This is useful when you know you are receiving
exactly a Canonical S-Expression. It will read only a Canonical
S-expression (and optional terminating NUL), but not the Basic or
Advanced encodings.
|
|
Produced by Haddock version 2.4.2 |