@@ -37,40 +37,8 @@ packed = iso otoList fromList
37-- This class can be implemented by both parsers and printers (and maybe more?).
37-- This class can be implemented by both parsers and printers (and maybe more?).
39-- The usual use is to write a polymorphic syntax description and instantiate it
39-- The usual use is to write a polymorphic syntax description and instantiate it
40−-- both as a parser and a printer. An example syntax description:
40+-- both as a parser and a printer. An example is available in the 'syntax-example'
42−-- > | A simple untyped lambda calculus.
43−-- > data AST = Var Text
48−-- > $(makePrisms ''AST)
50−-- > -- | A variable name.
51−-- > name :: Syntax syn Text => syn Text
52−-- > name = S.takeWhile1 isAlphaNum
54−-- > -- | Encloses a symbol in parentheses.
55−-- > parens :: Syntax syn Text => syn a -> syn a
56−-- > parens m = S.char '(' */ S.spaces_ */ m /* S.spaces_ /* S.char ')'
58−-- > -- | An atom is a variable or an expression in parentheses.
59−-- > atom :: Syntax syn Text => syn AST
60−-- > atom = _Var /$/ name
63−-- > --| Parses a list of applications.
64−-- > apps :: Syntax syn Text => syn AST
65−-- > apps = bifoldl1 (attemptAp_ _App) /$/ S.sepBy1 atom S.spaces1
67−-- > -- | An expression of our lambda calculus.
68−-- > expr :: Syntax syn Text => syn AST
69−-- > expr = _Abs /$/ S.char '\\' /* S.spaces_
70−-- > */ name /* S.spaces
71−-- > /* S.string "->" /* S.spaces
75-- Methods of this class try to mimic "Data.Attoparsec.Text" interface.
43-- Methods of this class try to mimic "Data.Attoparsec.Text" interface.
76class ( SemiIsoAlternative syn
44class ( SemiIsoAlternative syn