@hackage s-expression0.0.0

simple general-purpose s-expressions

this package provides general-purpose functionality for manipulating s-expressions. like:

  • a Functor instance that transforms the atoms

  • a Monad instance that "expands" atoms into s-expressions

  • a Foldable instance that enumerates the atoms (leaves)

  • IsList and IsString 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: