attoparsec parser, get a DRY printer.
This library essentially defines two types:
Parser :: * -> * -> *, a wrapper around
Parser :: * -> *;
Printer :: * -> * -> *, a type which does the inverse of a parser;
and a type class
Attoparsec, instantiated by
attoparsec's core operations (including lookaheads!).
Programming polymorphically under an
Attoparsec p constraint yields a DRY
specification of both a parser and a printer.
Monadic and applicative composition can be used under a
ForallF Monad p constraint
ForallF Applicative p), meaning that for all types
x, the type
is an instance of
Applicative). These constraints are made
possible thanks to the
constraints package. The
(not yet available; see
provides convenient ways to work with them (
with or rebindable syntax).
Simply clone the repo' and build with stack:
stack install --test