3synopsis: Syntax descriptions for unified parsing and pretty-printing.
5 'syntax' allows you to write a single syntax description and instantiate is both as a parser and a pretty printer.
7 The interface is based on a custom Functor\/Applicative\/Monad hierarchy, provided by the 'semi-iso' package. You fmap using
8 a semi-isomorphism instead of function. A semi-isomorphism is a isomorphism that can fail in both directions, with slightly
9 weakened laws. It is worth to note that @Iso@s and @Prism@s from 'lens' are valid semi-isomorphisms :)
11 Once you write a description you can, for example turn it into an Attoparsec parser.
13 See @syntax-example@ for an example, 'syntax-attoparsec' and 'syntax-pretty' for a parser/printer implementation.
15 The library was inspired by:
17 * Rendel, Tillmann, and Klaus Ostermann. "Invertible syntax descriptions: unifying parsing and pretty printing." ACM Sigplan Notices. Vol. 45. No. 11. ACM, 2010.
21 * a printer library based on Text/ByteString builders (wrapping 'pretty' is inefficient and doesn't use any features of it),
23 * try to implement indentation and Haskell layout rule,
25 * combinators for binary data formats, vectors,
27 * implementation of do notation for SemiIsoMonad with QuasiQuoters.
32maintainer: Paweł Nowak <pawel834@gmail.com>
33copyright: Paweł Nowak 2014
40 location: git@github.com:Pawel834/syntax.git
43 exposed-modules: Data.Syntax
45 Data.Syntax.Combinator
47 build-depends: base >= 4 && < 5, mono-traversable, lens >= 4, semi-iso >= 0.5.0, scientific >= 0.3, text
48 default-language: Haskell2010
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list