Bump version to 0.10.8.1
[packages/bytestring.git] / bytestring.cabal
1 Name:                bytestring
2 Version:             0.10.8.1
3 Synopsis:            Fast, compact, strict and lazy byte strings with a list interface
4 Description:
5     An efficient compact, immutable byte string type (both strict and lazy)
6     suitable for binary or 8-bit character data.
7     .
8     The 'ByteString' type represents sequences of bytes or 8-bit characters.
9     It is suitable for high performance use, both in terms of large data
10     quantities, or high speed requirements. The 'ByteString' functions follow
11     the same style as Haskell\'s ordinary lists, so it is easy to convert code
12     from using 'String' to 'ByteString'.
13     .
14     Two 'ByteString' variants are provided:
15     .
16       * Strict 'ByteString's keep the string as a single large array. This
17         makes them convenient for passing data between C and Haskell.
18     .
19       * Lazy 'ByteString's use a lazy list of strict chunks which makes it
20         suitable for I\/O streaming tasks.
21     .
22     The @Char8@ modules provide a character-based view of the same
23     underlying 'ByteString' types. This makes it convenient to handle mixed
24     binary and 8-bit character content (which is common in many file formats
25     and network protocols).
26     .
27     The 'Builder' module provides an efficient way to build up 'ByteString's
28     in an ad-hoc way by repeated concatenation. This is ideal for fast
29     serialisation or pretty printing.
30     .
31     There is also a 'ShortByteString' type which has a lower memory overhead
32     and can can be converted to or from a 'ByteString', but supports very few
33     other operations. It is suitable for keeping many short strings in memory.
34     .
35     'ByteString's are not designed for Unicode. For Unicode strings you should
36     use the 'Text' type from the @text@ package.
37     .
38     These modules are intended to be imported qualified, to avoid name clashes
39     with "Prelude" functions, e.g.
40     .
41     > import qualified Data.ByteString as BS
42
43 License:             BSD3
44 License-file:        LICENSE
45 Category:            Data
46 Copyright:           Copyright (c) Don Stewart          2005-2009,
47                                (c) Duncan Coutts        2006-2015,
48                                (c) David Roundy         2003-2005,
49                                (c) Jasper Van der Jeugt 2010,
50                                (c) Simon Meier          2010-2013.
51
52 Author:              Don Stewart,
53                      Duncan Coutts
54 Maintainer:          Duncan Coutts <duncan@community.haskell.org>
55 Homepage:            https://github.com/haskell/bytestring
56 Bug-reports:         https://github.com/haskell/bytestring/issues
57 Tested-With:         GHC==7.10.1, GHC==7.8.4, GHC==7.6.3, GHC==7.4.2, GHC==6.12.3
58 Build-Type:          Simple
59 Cabal-Version:       >= 1.10
60 extra-source-files:  README.md Changelog.md
61
62 source-repository head
63   type:     git
64   location: https://github.com/haskell/bytestring
65
66 flag integer-simple
67   description: Use the simple integer library instead of GMP
68   default: False
69
70 library
71   build-depends:     base >= 4.2 && < 5, ghc-prim, deepseq
72
73   exposed-modules:   Data.ByteString
74                      Data.ByteString.Char8
75                      Data.ByteString.Unsafe
76                      Data.ByteString.Internal
77                      Data.ByteString.Lazy
78                      Data.ByteString.Lazy.Char8
79                      Data.ByteString.Lazy.Internal
80                      Data.ByteString.Short
81                      Data.ByteString.Short.Internal
82
83                      Data.ByteString.Builder
84                      Data.ByteString.Builder.Extra
85                      Data.ByteString.Builder.Prim
86
87                      -- perhaps only exposed temporarily
88                      Data.ByteString.Builder.Internal
89                      Data.ByteString.Builder.Prim.Internal
90
91                      -- sigh, we decided to rename shortly after making
92                      -- an initial release, so these are here for compat
93                      Data.ByteString.Lazy.Builder
94                      Data.ByteString.Lazy.Builder.Extras
95                      Data.ByteString.Lazy.Builder.ASCII
96   other-modules:
97                      Data.ByteString.Builder.ASCII
98                      Data.ByteString.Builder.Prim.Binary
99                      Data.ByteString.Builder.Prim.ASCII
100                      Data.ByteString.Builder.Prim.Internal.Floating
101                      Data.ByteString.Builder.Prim.Internal.UncheckedShifts
102                      Data.ByteString.Builder.Prim.Internal.Base16
103
104   default-language:  Haskell98
105   other-extensions:  CPP,
106                      ForeignFunctionInterface,
107                      BangPatterns
108                      UnliftedFFITypes,
109                      MagicHash,
110                      UnboxedTuples,
111                      DeriveDataTypeable
112                      ScopedTypeVariables
113                      RankNTypes
114                      NamedFieldPuns
115 --  if impl(ghc >= 7.2)
116 --    other-extensions: Trustworthy, Unsafe
117   -- older ghc had issues with language pragmas guarded by cpp
118   if impl(ghc < 7)
119     default-extensions: CPP, MagicHash, UnboxedTuples,
120                         DeriveDataTypeable, BangPatterns,
121                         NamedFieldPuns
122
123   ghc-options:      -Wall -fwarn-tabs
124                     -O2
125                     -fmax-simplifier-iterations=10
126                     -fdicts-cheap
127                     -fspec-constr-count=6
128
129   c-sources:         cbits/fpstring.c
130                      cbits/itoa.c
131   include-dirs:      include
132   includes:          fpstring.h
133   install-includes:  fpstring.h
134
135    -- flags for the decimal integer serialization code
136   if impl(ghc >= 6.11)
137     if !flag(integer-simple)
138       cpp-options: -DINTEGER_GMP
139       build-depends: integer-gmp >= 0.2
140
141   if impl(ghc >= 6.9) && impl(ghc < 6.11)
142     cpp-options: -DINTEGER_GMP
143     build-depends: integer >= 0.1 && < 0.2
144
145
146 -- QC properties, with GHC RULES disabled
147 test-suite prop-compiled
148   type:             exitcode-stdio-1.0
149   main-is:          Properties.hs
150   other-modules:    Rules
151                     QuickCheckUtils
152                     TestFramework
153   hs-source-dirs:   . tests
154   build-depends:    base, ghc-prim, deepseq, random, directory,
155                     test-framework, test-framework-quickcheck2,
156                     QuickCheck >= 2.3
157   c-sources:        cbits/fpstring.c
158   include-dirs:     include
159   ghc-options:      -fwarn-unused-binds
160                     -fno-enable-rewrite-rules
161                     -threaded -rtsopts
162   cpp-options:      -DHAVE_TEST_FRAMEWORK=1
163   default-language: Haskell98
164   -- older ghc had issues with language pragmas guarded by cpp
165   if impl(ghc < 7)
166     default-extensions: CPP, MagicHash, UnboxedTuples,
167                         DeriveDataTypeable, BangPatterns,
168                         NamedFieldPuns
169
170 test-suite regressions
171   -- temporarily disabled as it allocates too much memory
172   buildable:        False
173   type:             exitcode-stdio-1.0
174   main-is:          Regressions.hs
175   hs-source-dirs:   . tests
176   build-depends:    base, ghc-prim, deepseq, random, directory,
177                     test-framework, test-framework-hunit, HUnit
178   c-sources:        cbits/fpstring.c
179   include-dirs:     include
180   ghc-options:      -fwarn-unused-binds
181                     -fno-enable-rewrite-rules
182                     -threaded -rtsopts
183   default-language: Haskell98
184   -- older ghc had issues with language pragmas guarded by cpp
185   if impl(ghc < 7)
186     default-extensions: CPP, MagicHash, UnboxedTuples,
187                         DeriveDataTypeable, BangPatterns,
188                         NamedFieldPuns
189
190 test-suite test-builder
191   type:             exitcode-stdio-1.0
192   hs-source-dirs:   . tests tests/builder
193   main-is:          TestSuite.hs
194   other-modules:    Data.ByteString.Builder.Tests
195                     Data.ByteString.Builder.Prim.Tests
196                     Data.ByteString.Builder.Prim.TestUtils
197                     TestFramework
198
199   build-depends:    base, ghc-prim,
200                     deepseq,
201                     QuickCheck                 >= 2.4,
202                     byteorder                  == 1.0.*,
203                     dlist                      >= 0.5 && < 0.8,
204                     directory,
205                     mtl                        >= 2.0 && < 2.3,
206                     HUnit,
207                     test-framework,
208                     test-framework-hunit,
209                     test-framework-quickcheck2
210
211   ghc-options:      -Wall -fwarn-tabs -threaded -rtsopts
212   cpp-options:      -DHAVE_TEST_FRAMEWORK=1
213
214   default-language: Haskell98
215   -- older ghc had issues with language pragmas guarded by cpp
216   if impl(ghc < 7)
217     default-extensions: CPP, MagicHash, UnboxedTuples,
218                         DeriveDataTypeable, BangPatterns,
219                         NamedFieldPuns
220
221   c-sources:        cbits/fpstring.c
222                     cbits/itoa.c
223   include-dirs:     include
224   includes:         fpstring.h
225   install-includes: fpstring.h