1cabal-version:       1.12
2Name:                cassava
3Version:             0.5.2.0
4x-revision: 4
5Synopsis:            A CSV parsing and encoding library
6Description: {
7
8@cassava@ is a library for parsing and encoding [RFC 4180](https://tools.ietf.org/html/rfc4180)
9compliant [comma-separated values (CSV)](https://en.wikipedia.org/wiki/Comma-separated_values) data,
10which is a textual line-oriented format commonly used for exchanging tabular data.
11.
12@cassava@'s API includes support for
13.
14- Index-based record-conversion
15- Name-based record-conversion
16- Typeclass directed conversion of fields and records
17- Built-in field-conversion instances for standard types
18- Customizable record-conversion instance derivation via GHC generics
19- Low-level [bytestring](https://hackage.haskell.org/package/bytestring) builders (see "Data.Csv.Builder")
20- Incremental decoding and encoding API (see "Data.Csv.Incremental")
21- Streaming API for constant-space decoding (see "Data.Csv.Streaming")
22.
23Moreover, this library is designed to be easy to use; for instance, here's a
24very simple example of encoding CSV data:
25.
26>>> Data.Csv.encode [("John",27),("Jane",28)]
27"John,27\r\nJane,28\r\n"
28.
29Please refer to the documentation in "Data.Csv" and the included [README](#readme) for more usage examples.
30
31}
32Homepage:            https://github.com/hvr/cassava
33License:             BSD3
34License-file:        LICENSE
35Bug-reports:         https://github.com/hvr/cassava/issues
36Copyright:           (c) 2012 Johan Tibell
37                     (c) 2012 Bryan O'Sullivan
38                     (c) 2011 MailRank, Inc.
39Author:              Johan Tibell
40Maintainer:          hvr@gnu.org
41Category:            Text, Web, CSV
42Build-type:          Simple
43Extra-source-files:  examples/*.hs,
44                     CHANGES.md,
45                     README.md
46Tested-with:         GHC==8.10.1, GHC==8.8.3, GHC==8.6.5, GHC==8.4.4, GHC ==8.2.2, GHC ==8.0.2, GHC ==7.10.3, GHC ==7.8.4, GHC ==7.6.3, GHC ==7.4.2
47
48----------------------------------------------------------------------------
49
50source-repository head
51  type:     git
52  location: https://github.com/hvr/cassava.git
53
54flag bytestring--LT-0_10_4
55  description: [bytestring](https://hackage.haskell.org/haskell/package/bytestring) < 0.10.4
56
57Library
58  default-language: Haskell2010
59  other-extensions:
60    BangPatterns
61    CPP
62    DataKinds
63    DefaultSignatures
64    DeriveFunctor
65    FlexibleContexts
66    FlexibleInstances
67    KindSignatures
68    MultiParamTypeClasses
69    OverloadedStrings
70    PolyKinds
71    Rank2Types
72    ScopedTypeVariables
73    TypeOperators
74    UndecidableInstances
75
76  if impl(ghc >= 8.0)
77    other-extensions:
78      DataKinds
79      PolyKinds
80
81  hs-source-dirs: src
82
83  Exposed-modules:
84    Data.Csv
85    Data.Csv.Builder
86    Data.Csv.Incremental
87    Data.Csv.Parser
88    Data.Csv.Streaming
89
90  Other-modules:
91    Data.Csv.Conversion
92    Data.Csv.Conversion.Internal
93    Data.Csv.Encoding
94    Data.Csv.Types
95    Data.Csv.Util
96
97  Build-depends:
98    array >= 0.4 && < 0.6,
99    attoparsec >= 0.11.3.0 && < 0.15,
100    base >= 4.5 && < 4.16,
101    bytestring >= 0.9.2 && < 0.12,
102    containers >= 0.4.2 && < 0.7,
103    deepseq >= 1.1 && < 1.5,
104    hashable < 1.4,
105    scientific >= 0.3.4.7 && < 0.4,
106    text < 1.3,
107    transformers >= 0.2 && < 0.6,
108    unordered-containers < 0.3,
109    vector >= 0.8 && < 0.13,
110    Only >= 0.1 && < 0.1.1
111
112  if flag(bytestring--LT-0_10_4)
113    build-depends: bytestring <  0.10.4
114                 , bytestring-builder >= 0.10.8 && < 0.11
115  else
116    build-depends: bytestring >= 0.10.4
117                 , text-short == 0.1.*
118
119  -- GHC.Generics lived in `ghc-prim` for GHC 7.2 & GHC 7.4 only
120  if impl(ghc < 7.6)
121    build-depends: ghc-prim == 0.2.*
122
123  -- For Numeric.Natural
124  if impl(ghc < 7.10)
125    build-depends: nats >= 1 && < 1.2
126
127  -- https://ghc.haskell.org/trac/ghc/wiki/Migration/8.0#Recommendationsforforward-compatibility
128  if impl(ghc >= 8.0)
129    ghc-options: -Wcompat -Wnoncanonical-monad-instances
130    if impl(ghc >= 8.8)
131      ghc-options: -Wno-star-is-type
132    else
133      ghc-options: -Wnoncanonical-monadfail-instances
134  else
135    -- provide/emulate `Control.Monad.Fail` and `Data.Semigroups` API for pre-GHC8
136    build-depends: fail == 4.9.*, semigroups >= 0.18.2 && <0.20
137
138  if impl(ghc >= 8.2)
139    ghc-options: -Wcpp-undef
140
141  ghc-options: -Wall -O2
142
143----------------------------------------------------------------------------
144
145Test-suite unit-tests
146  default-language: Haskell2010
147
148  Type: exitcode-stdio-1.0
149  Main-is: UnitTests.hs
150  -- dependencies with version constraints inherited via lib:cassava
151  Build-depends: attoparsec
152               , base
153               , bytestring
154               , cassava
155               , hashable
156               , scientific
157               , text
158               , unordered-containers
159               , vector
160  -- extra dependencies not already used by lib:cassava
161  build-depends: HUnit < 1.7
162               , QuickCheck >= 2.13 && < 2.15
163               , quickcheck-instances >= 0.3.12 && < 0.4
164               , test-framework == 0.8.*
165               , test-framework-hunit == 0.3.*
166               , test-framework-quickcheck2 == 0.3.*
167
168  hs-source-dirs: tests
169
170  -- GHC.Generics lived in `ghc-prim` for GHC 7.2 & GHC 7.4 only
171  if impl(ghc < 7.6)
172    build-depends: ghc-prim == 0.2.*
173
174  -- For Numeric.Natural
175  if impl(ghc < 7.10)
176    build-depends: nats
177
178  -- https://ghc.haskell.org/trac/ghc/wiki/Migration/8.0#Recommendationsforforward-compatibility
179  if impl(ghc >= 8.0)
180    ghc-options: -Wcompat -Wnoncanonical-monad-instances -Wnoncanonical-monadfail-instances
181  else
182    -- provide/emulate `Control.Monad.Fail` and `Data.Semigroups` API for pre-GHC8
183    build-depends: fail, semigroups
184
185  if impl(ghc >= 8.2)
186    ghc-options: -Wcpp-undef
187
188  ghc-options: -Wall
189