Description
simple general-purpose s-expressions.
Description
this package provides general-purpose functionality for manipulating s-expressions. like:
a
Functorinstance that transforms the atomsa
Monadinstance that "expands" atoms into s-expressionsa
Foldableinstance that enumerates the atoms (leaves)IsListandIsStringinstances 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: