Description
simple general-purpose s-expressions.
Description
this package provides general-purpose functionality for manipulating s-expressions. like:
a
Functor
instance that transforms the atomsa
Monad
instance that "expands" atoms into s-expressionsa
Foldable
instance that enumerates the atoms (leaves)IsList
andIsString
instances for literal syntax
the core type is:
data
Sexp
f a
= Atom a
| List [Sexp f a]
| Sexp f [Sexp f a]
which lets you provide your own custom function name that interprets its arguments.
e.g. TODO
for efficient parsing/printing, use: