on master help sign in
Update docs.
commitd537ee1e37fdef96500eefc2212a22ed609a9b44 authorPaweł Nowak <pawel834@gmail.com> dateThu 30 Oct 2014, 20:46 (12 years ago) parent156a969
2 files changed+11−6
Data/Syntax.hs+7−4 syntax.cabal+4−2
Data/Syntax.hs+7−4
@@ -60,14 +60,17 @@ packed = iso otoList fromList
6060-- > atom = _Var /$/ name
6161-- > /|/ parens expr
6262-- >
63+-- > --| Parses a list of applications.
64+-- > apps :: Syntax syn Text => syn AST
65+-- > apps = bifoldl1 (attemptAp_ _App) /$/ S.sepBy1 atom S.spaces1
66+-- >
6367-- > -- | An expression of our lambda calculus.
6468-- > expr :: Syntax syn Text => syn AST
65−-- > expr = _App /$/ atom /* S.spaces1 /*/ atom
66−-- > /|/ _Abs /$/ S.char '\\' /* S.spaces_
69+-- > expr = _Abs /$/ S.char '\\' /* S.spaces_
6770-- > */ name /* S.spaces
6871-- > /* S.string "->" /* S.spaces
69−-- > /*/ expr
70−-- > /|/ atom
72+-- > /*/ expr
73+-- > /|/ apps
7174--
7275-- Methods of this class try to mimic "Data.Attoparsec.Text" interface.
7376class ( SemiIsoAlternative syn
syntax.cabal+4−2
@@ -1,13 +1,15 @@
11name: syntax
22version: 0.1.1.0
33synopsis: Abstract syntax descriptions for parsing and pretty-printing.
4−description: Write single syntax description, get both parser and pretty-printer.
4+description: Abstract syntax descriptions for parsing and pretty-printing.
5+ Write a single syntax description, get both a parser and a pretty-printer.
56 .
67 Syntax descriptions are based on semi-isomorphisms from @semi-iso@ library.
78 .
89 The library is very young. There are lots of useful combinators that could be written.
910 .
10− See @syntax-example@ for an example.
11+ See @syntax-example@ for an example, @syntax-attoparsec@ and @syntax-pretty@ for
12+ a parser/printer implementation.
1113license: MIT
1214license-file: LICENSE
1315author: Paweł Nowak