on 22894b4 help sign in
syntax/syntax.cabal
48 lines 2.0 kB history raw
1name: syntax
2version: 0.3.0.0
3synopsis: Syntax descriptions for unified parsing and pretty-printing.
4description:
5 'syntax' allows you to write a single syntax description and instantiate is both as a parser and a pretty printer.
6 .
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 :)
10 .
11 Once you write a description you can, for example turn it into an Attoparsec parser.
12 .
13 See @syntax-example@ for an example, 'syntax-attoparsec' and 'syntax-pretty' for a parser/printer implementation.
14 .
15 The library was inspired by:
16 .
17 * Rendel, Tillmann, and Klaus Ostermann. "Invertible syntax descriptions: unifying parsing and pretty printing." ACM Sigplan Notices. Vol. 45. No. 11. ACM, 2010.
18 .
19 TODO:
20 .
21 * a printer library based on Text/ByteString builders (wrapping 'pretty' is inefficient and doesn't use any features of it),
22 .
23 * try to implement indentation and Haskell layout rule,
24 .
25 * combinators for binary data formats, vectors,
26 .
27 * implementation of do notation for SemiIsoMonad with QuasiQuoters.
29license: MIT
30license-file: LICENSE
31author: Paweł Nowak
32maintainer: Paweł Nowak <pawel834@gmail.com>
33copyright: Paweł Nowak 2014
34category: Data
35build-type: Simple
36cabal-version: >=1.10
38source-repository head
39 type: git
40 location: git@github.com:Pawel834/syntax.git
42library
43 exposed-modules: Data.Syntax
44 Data.Syntax.Char
45 Data.Syntax.Combinator
46 Data.Syntax.Indent
47 build-depends: base >= 4 && < 5, mono-traversable, lens >= 4, semi-iso >= 0.5.0, scientific >= 0.3, text
48 default-language: Haskell2010