Add test for #6.
[packages/parsec.git] / parsec.cabal
1 name:           parsec
2 version:        3.1.7
3 cabal-version: >= 1.8
4 license:        BSD3
5 license-file:   LICENSE
6 author:         Daan Leijen <daan@microsoft.com>, Paolo Martini <paolo@nemail.it>
7 maintainer:     Antoine Latter <aslatter@gmail.com>
8 homepage:       http://www.cs.uu.nl/~daan/parsec.html
9 bug-reports:    https://github.com/aslatter/parsec/issues
10 category:       Parsing
11 synopsis:       Monadic parser combinators
12 build-type: Simple
13 description:
14         Parsec is designed from scratch as an industrial-strength parser
15         library.  It is simple, safe, well documented (on the package
16         homepage), has extensive libraries and good error messages,
17         and is also fast.  It is defined as a monad transformer that can be
18         stacked on arbitrary monads, and it is also parametric in the
19         input stream type.
20 extra-source-files: CHANGES
21
22 source-repository head
23     type: git
24     location: https://github.com/aslatter/parsec
25
26 flag base4
27     Description: Use base-4.*
28     Default:    True
29
30 library    
31     exposed-modules:
32         Text.Parsec,
33         Text.Parsec.String,
34         Text.Parsec.ByteString,
35         Text.Parsec.ByteString.Lazy,
36         Text.Parsec.Text,
37         Text.Parsec.Text.Lazy,
38         Text.Parsec.Pos,
39         Text.Parsec.Error,
40         Text.Parsec.Prim,
41         Text.Parsec.Char,
42         Text.Parsec.Combinator,
43         Text.Parsec.Token,
44         Text.Parsec.Expr,
45         Text.Parsec.Language,
46         Text.Parsec.Perm,
47         Text.ParserCombinators.Parsec,
48         Text.ParserCombinators.Parsec.Char,
49         Text.ParserCombinators.Parsec.Combinator,
50         Text.ParserCombinators.Parsec.Error,
51         Text.ParserCombinators.Parsec.Expr,
52         Text.ParserCombinators.Parsec.Language,
53         Text.ParserCombinators.Parsec.Perm,
54         Text.ParserCombinators.Parsec.Pos,
55         Text.ParserCombinators.Parsec.Prim,
56         Text.ParserCombinators.Parsec.Token
57     if flag(base4)
58         build-depends: base >= 4 && < 5
59     else
60         build-depends: base >= 3.0.3 && < 4
61         cpp-options: -DBASE3
62
63     build-depends: mtl, bytestring, text >= 0.2 && < 1.3
64     extensions: ExistentialQuantification, PolymorphicComponents, MultiParamTypeClasses, FlexibleInstances, FlexibleContexts, DeriveDataTypeable, CPP
65     ghc-options:        -O2
66
67 Test-Suite tests
68     type:        exitcode-stdio-1.0
69     hs-source-dirs:  test
70     main-is:     Main.hs
71     other-modules:
72                  Bugs,
73                  Bugs.Bug2,
74                  Bugs.Bug6,
75                  Bugs.Bug9,
76                  Util
77     build-depends:
78        base,
79        parsec,
80        HUnit == 1.2.*,
81        test-framework >= 0.6 && < 0.9,
82        test-framework-hunit >= 0.2 && < 0.4