@@ -4,10 +4,9 @@ synopsis: Reversible parsing and pretty-printing.
4description:
4description:
5 "syntax" allows you to write a single syntax description and instantiate is both as a parser and a pretty printer.
5 "syntax" allows you to write a single syntax description and instantiate is both as a parser and a pretty printer.
7− Syntax descriptions are written in applicative or arrow style. The library uses a custom typeclass hierarchy, provided
7+ Syntax descriptions are written in applicative or arrow style. The library uses a custom hierarchy, provided by the
8− by the "semi-iso" package. Most of the time you will be using operators like '/$/', '/*/' and '/+/' (= '<|>'), just
8+ "semi-iso" package. Most of the time you will be using operators like '/$/' and '/*/', just like parser combinators.
9− like parser combinators. When more power is needed - e.g. when the syntax depends on the parsed or printed value -
9+ When more power is needed - e.g. when the syntax depends on the parsed or printed value - you turn to arrows.
12 Semi-isomorphisms from "semi-iso" are the basic building block of syntax descriptions. I recommend reading
11 Semi-isomorphisms from "semi-iso" are the basic building block of syntax descriptions. I recommend reading
13 the hackage page of "semi-iso" first, as it contains much more information.
12 the hackage page of "semi-iso" first, as it contains much more information.
@@ -20,10 +19,11 @@ description:
20 Advanced formatting and parsing (for example indentation, haskell layout rule) is implemented as category transformers
19 Advanced formatting and parsing (for example indentation, haskell layout rule) is implemented as category transformers
21 (similar to monad transformers). Currently only simple indentation is implemented (in "Data.Syntax.Indent") - basically
20 (similar to monad transformers). Currently only simple indentation is implemented (in "Data.Syntax.Indent") - basically
22 a reader category transformer that tracks current indentation level. I plan on implementing Haskell layout rule in the
21 a reader category transformer that tracks current indentation level. I plan on implementing Haskell layout rule in the
23− future.
22+ future (as a reusable transformer).
25− The library can work with both text and binary data. Alas, there are no binary combinators implemented yet.
24+ Note that the library can work with both text and binary data. There are no binary combinators implemented - yet.
25+ Alas, these are not only useful combinators missing! I will slowly but steadily implement them over time
26− I will implement them when i have the time (but these category transformers look so much more interesting for now ;).
26+ (but these category transformers look so much more interesting for now ;).
28 EXAMPLES! See @syntax-example@ and @syntax-example-json@ for examples.
28 EXAMPLES! See @syntax-example@ and @syntax-example-json@ for examples.