forked from haskell-foundation/foundation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
foundation.cabal
355 lines (340 loc) · 13.9 KB
/
foundation.cabal
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
name: foundation
version: 0.0.10
synopsis: Alternative prelude with batteries and no dependencies
description:
A custom prelude with no dependencies apart from base.
.
This package has the following goals:
.
* provide a base like sets of modules that provide a consistent set of features and bugfixes across multiple versions of GHC (unlike base).
.
* provide a better and more efficient prelude than base's prelude.
.
* be self-sufficient: no external dependencies apart from base.
.
* provide better data-types: packed unicode string by default, arrays.
.
* Better numerical classes that better represent mathematical thing (No more all-in-one Num).
.
* Better I/O system with less Lazy IO
.
* Usual partial functions distinguished through type system
license: BSD3
license-file: LICENSE
copyright: 2015-2017 Vincent Hanquez <[email protected]>
2017 Foundation Maintainers
author: Vincent Hanquez <[email protected]>
maintainer: [email protected]
category: foundation
build-type: Simple
homepage: https://github.com/haskell-foundation/foundation
bug-reports: https://github.com/haskell-foundation/foundation/issues
cabal-version: >=1.10
tested-with: GHC==8.0.2, GHC==7.10.3, GHC==7.8.4
extra-source-files: cbits/*.h
extra-doc-files: README.md
CHANGELOG.md
source-repository head
type: git
location: https://github.com/haskell-foundation/foundation.git
flag experimental
description: Enable building experimental features, known as highly unstable or without good support cross-platform
default: False
manual: True
flag bench-all
description: Add some comparaison benchmarks against other haskell libraries
default: False
manual: True
flag minimal-deps
description: Build fully with minimal deps (no criterion, no quickcheck, no doctest)
default: False
manual: True
flag bounds-check
description: Add extra friendly boundary check for unsafe array operations
default: False
manual: True
flag doctest
description: Add extra friendly boundary check for unsafe array operations
default: False
manual: True
library
exposed-modules: Foundation
Foundation.Numerical
Foundation.Array
Foundation.Array.Internal
Foundation.Bits
Foundation.Class.Bifunctor
Foundation.Class.Storable
Foundation.Conduit
Foundation.Conduit.Textual
Foundation.Convertible
Foundation.String
Foundation.String.ASCII
Foundation.String.Read
Foundation.IO
Foundation.IO.FileMap
Foundation.IO.Terminal
Foundation.VFS
Foundation.VFS.Path
Foundation.VFS.FilePath
Foundation.VFS.URI
Foundation.Math.Trigonometry
Foundation.Hashing
Foundation.Foreign
Foundation.Collection
Foundation.Primitive
Foundation.Primitive.Block
Foundation.List.DList
Foundation.Monad
Foundation.Monad.Reader
Foundation.Monad.State
Foundation.Network.IPv4
Foundation.Network.IPv6
Foundation.System.Info
Foundation.Strict
Foundation.Parser
Foundation.Random
Foundation.Check
Foundation.Check.Main
Foundation.Timing
Foundation.Timing.Main
Foundation.Time.Types
Foundation.Time.Bindings
Foundation.Time.StopWatch
Foundation.UUID
Foundation.System.Entropy
Foundation.System.Bindings
other-modules: Foundation.Boot.Builder
Foundation.Boot.List
Foundation.String.Internal
Foundation.String.UTF8
Foundation.String.Encoding.Encoding
Foundation.String.Encoding.UTF16
Foundation.String.Encoding.UTF32
Foundation.String.Encoding.ASCII7
Foundation.String.Encoding.ISO_8859_1
Foundation.String.ModifiedUTF8
Foundation.Tuple
Foundation.Hashing.FNV
Foundation.Hashing.SipHash
Foundation.Hashing.Hasher
Foundation.Hashing.Hashable
Foundation.Check.Gen
Foundation.Check.Print
Foundation.Check.Arbitrary
Foundation.Check.Property
Foundation.Check.Config
Foundation.Check.Types
Foundation.Collection.Buildable
Foundation.Collection.List
Foundation.Collection.Element
Foundation.Collection.InnerFunctor
Foundation.Collection.Collection
Foundation.Collection.Copy
Foundation.Collection.Sequential
Foundation.Collection.Keyed
Foundation.Collection.Indexed
Foundation.Collection.Foldable
Foundation.Collection.Mutable
Foundation.Collection.Zippable
Foundation.Collection.Mappable
Foundation.Conduit.Internal
Foundation.Internal.Base
Foundation.Internal.ByteSwap
Foundation.Internal.CallStack
Foundation.Internal.Environment
Foundation.Primitive.Error
Foundation.Internal.Primitive
Foundation.Internal.IsList
Foundation.Internal.Identity
Foundation.Internal.Proxy
Foundation.Internal.PrimTypes
Foundation.Internal.MonadTrans
Foundation.Internal.Natural
Foundation.Internal.NumLiteral
Foundation.Internal.Typeable
Foundation.Numerical.Primitives
Foundation.Numerical.Number
Foundation.Numerical.Additive
Foundation.Numerical.Subtractive
Foundation.Numerical.Multiplicative
Foundation.Numerical.Floating
Foundation.IO.File
Foundation.Primitive.Base16
Foundation.Primitive.Block.Base
Foundation.Primitive.Block.Mutable
Foundation.Primitive.Endianness
Foundation.Primitive.Exception
Foundation.Primitive.Types
Foundation.Primitive.Types.OffsetSize
Foundation.Primitive.Types.Ptr
Foundation.Primitive.Monad
Foundation.Primitive.NormalForm
Foundation.Primitive.Utils
Foundation.Primitive.IntegralConv
Foundation.Primitive.Floating
Foundation.Primitive.FinalPtr
Foundation.Primitive.These
Foundation.Primitive.Show
Foundation.Primitive.UTF8.Table
Foundation.Primitive.UTF8.Helper
Foundation.Primitive.UTF8.Base
Foundation.Primitive.Runtime
Foundation.Primitive.Imports
Foundation.Monad.MonadIO
Foundation.Monad.Exception
Foundation.Monad.Transformer
Foundation.Monad.Identity
Foundation.Monad.Base
Foundation.Array.Chunked.Unboxed
Foundation.Array.Unboxed
Foundation.Array.Unboxed.Mutable
Foundation.Array.Unboxed.ByteArray
Foundation.Array.Boxed
Foundation.Array.Bitmap
Foundation.Foreign.Alloc
Foundation.Foreign.MemoryMap
Foundation.Foreign.MemoryMap.Types
Foundation.Partial
-- Foundation.Time.Bindings
Foundation.System.Entropy.Common
Foundation.System.Bindings.Network
Foundation.System.Bindings.Time
Foundation.System.Bindings.Hs
include-dirs: cbits
c-sources: cbits/foundation_random.c
cbits/foundation_network.c
cbits/foundation_mem.c
cbits/foundation_time.c
if flag(experimental)
exposed-modules: Foundation.Network.HostName
if os(windows)
exposed-modules: Foundation.System.Bindings.Windows
other-modules: Foundation.Foreign.MemoryMap.Windows
Foundation.System.Entropy.Windows
else
exposed-modules: Foundation.System.Bindings.Posix
Foundation.System.Bindings.PosixDef
other-modules: Foundation.Foreign.MemoryMap.Posix
Foundation.System.Entropy.Unix
if os(linux)
exposed-modules: Foundation.System.Bindings.Linux
if os(osx)
exposed-modules: Foundation.System.Bindings.Macos
if impl(ghc >= 7.10)
exposed-modules: Foundation.Tuple.Nth
Foundation.List.SList
Foundation.Primitive.Nat
default-extensions: NoImplicitPrelude
RebindableSyntax
TypeFamilies
BangPatterns
DeriveDataTypeable
build-depends: base >= 4.7 && < 5
, ghc-prim
-- FIXME add suport for armel mipsel
-- CPP-options: -DARCH_IS_LITTLE_ENDIAN
-- FIXME add support for powerpc powerpc64 armeb mipseb
-- CPP-options: -DARCH_IS_BIG_ENDIAN
if (arch(i386) || arch(x86_64))
cpp-options: -DARCH_IS_LITTLE_ENDIAN
else
cpp-options: -DARCH_IS_UNKNOWN_ENDIAN
if os(windows)
build-depends: Win32
ghc-options: -Wall -fwarn-tabs
default-language: Haskell2010
if impl(ghc >= 8.0)
ghc-options: -Wno-redundant-constraints
if flag(bounds-check)
cpp-options: -DFOUNDATION_BOUNDS_CHECK
test-suite test-foundation
type: exitcode-stdio-1.0
hs-source-dirs: tests
main-is: Tests.hs
other-modules: Test.Utils.Foreign
Test.Data.List
Test.Data.Network
Test.Data.Unicode
Test.Data.ASCII
Test.Foundation.Collection
Test.Foundation.Conduit
Test.Foundation.Bits
Test.Foundation.ChunkedUArray
Test.Foundation.Network.IPv4
Test.Foundation.Network.IPv6
Test.Foundation.Number
Test.Foundation.Encoding
Test.Foundation.Parser
Test.Foundation.Array
Test.Foundation.String
Test.Foundation.Storable
Test.Foundation.Misc
Imports
default-extensions: NoImplicitPrelude
RebindableSyntax
if flag(minimal-deps)
buildable: False
else
build-depends: base >= 3 && < 5
, mtl
, QuickCheck
, tasty
, tasty-quickcheck
, tasty-hunit
, foundation
ghc-options: -Wall -fno-warn-orphans -fno-warn-missing-signatures
default-language: Haskell2010
if impl(ghc >= 8.0)
ghc-options: -Wno-redundant-constraints
test-suite check-foundation
type: exitcode-stdio-1.0
hs-source-dirs: tests
main-is: Checks.hs
other-modules: Test.Checks.Property.Collection
Test.Foundation.Random
default-extensions: NoImplicitPrelude
RebindableSyntax
OverloadedStrings
build-depends: base >= 3 && < 5
, foundation
ghc-options: -Wall -fno-warn-orphans -fno-warn-missing-signatures
default-language: Haskell2010
if impl(ghc >= 8.0)
ghc-options: -Wno-redundant-constraints
test-suite doctest
type: exitcode-stdio-1.0
hs-source-dirs: tests
default-language: Haskell2010
main-is: DocTest.hs
default-extensions: NoImplicitPrelude
RebindableSyntax
if flag(minimal-deps)
-- TODO: for no, force unbuildable anyway
buildable: False
else
if flag(doctest)
build-depends: base >= 3 && < 5
, doctest >= 0.9
buildable: True
else
buildable: False
Benchmark bench
main-is: Main.hs
other-modules: BenchUtil.Common
BenchUtil.RefData
Sys
Fake.ByteString
Fake.Text
hs-source-dirs: benchs
default-language: Haskell2010
type: exitcode-stdio-1.0
default-extensions: NoImplicitPrelude
BangPatterns
if flag(minimal-deps) || impl(ghc < 7.10)
buildable: False
else
build-depends: base >= 4, criterion, foundation
if flag(bench-all)
cpp-options: -DBENCH_ALL
build-depends: text, attoparsec, vector, bytestring