Avoid two-layers of pattern matchin in `union` (#537)
[packages/containers.git] / containers.cabal
1 name: containers
2 version: 0.5.11.0
3 license: BSD3
4 license-file: LICENSE
5 maintainer: libraries@haskell.org
6 bug-reports: https://github.com/haskell/containers/issues
7 synopsis: Assorted concrete container types
8 category: Data Structures
9 description:
10     .
11     This package contains efficient general-purpose implementations
12     of various immutable container types including sets, maps, sequences,
13     trees, and graphs.
14     .
15     For a walkthrough of what this package provides with examples of common
16     operations see the [containers
17     introduction](https://haskell-containers.readthedocs.io).
18     .
19     The declared cost of each operation is either worst-case or amortized, but
20     remains valid even if structures are shared.
21
22 build-type: Simple
23 cabal-version:  >=1.8
24 extra-source-files:
25     include/containers.h
26     tests/Makefile
27     tests/*.hs
28     benchmarks/Makefile
29     benchmarks/bench-cmp.pl
30     benchmarks/bench-cmp.sh
31     benchmarks/*.hs
32     benchmarks/SetOperations/Makefile
33     benchmarks/SetOperations/*.hs
34     benchmarks/LookupGE/Makefile
35     benchmarks/LookupGE/*.hs
36     changelog.md
37
38 source-repository head
39     type:     git
40     location: http://github.com/haskell/containers.git
41
42 Library
43     build-depends: base >= 4.3 && < 5, array, deepseq >= 1.2 && < 1.5
44     if impl(ghc)
45         build-depends: ghc-prim
46
47     ghc-options: -O2 -Wall
48
49     other-extensions: CPP, BangPatterns
50
51     exposed-modules:
52         Data.Containers.ListUtils
53         Data.IntMap
54         Data.IntMap.Lazy
55         Data.IntMap.Strict
56         Data.IntMap.Internal
57         Data.IntMap.Internal.Debug
58         Data.IntMap.Merge.Lazy
59         Data.IntMap.Merge.Strict
60         Data.IntSet.Internal
61         Data.IntSet
62         Data.Map
63         Data.Map.Lazy
64         Data.Map.Lazy.Merge
65         Data.Map.Merge.Lazy
66         Data.Map.Strict.Internal
67         Data.Map.Strict
68         Data.Map.Strict.Merge
69         Data.Map.Merge.Strict
70         Data.Map.Internal
71         Data.Map.Internal.Debug
72         Data.Set.Internal
73         Data.Set
74         Data.Graph
75         Data.Sequence
76         Data.Sequence.Internal
77         Data.Sequence.Internal.Sorting
78         Data.Tree
79         Utils.Containers.Internal.BitUtil
80         Utils.Containers.Internal.BitQueue
81         Utils.Containers.Internal.StrictPair
82
83     other-modules:
84         Utils.Containers.Internal.State
85         Utils.Containers.Internal.StrictFold
86         Utils.Containers.Internal.StrictMaybe
87         Utils.Containers.Internal.PtrEquality
88         Utils.Containers.Internal.Coercions
89         Data.Map.Internal.DeprecatedShowTree
90         Data.IntMap.Internal.DeprecatedDebug
91
92     include-dirs: include
93
94 -----------------------------
95 -- B E N C H M A R K I N G --
96 -----------------------------
97
98 benchmark intmap-benchmarks
99   type: exitcode-stdio-1.0
100   hs-source-dirs: benchmarks
101   main-is: IntMap.hs
102   ghc-options: -O2
103   build-depends:
104     base >= 4.2 && < 5,
105     containers,
106     criterion >= 0.4.0 && < 1.3,
107     deepseq >= 1.1.0.0 && < 1.5
108
109 benchmark intset-benchmarks
110   type: exitcode-stdio-1.0
111   hs-source-dirs: benchmarks
112   main-is: IntSet.hs
113   ghc-options: -O2
114   build-depends:
115     base >= 4.2 && < 5,
116     containers,
117     criterion >= 0.4.0 && < 1.3,
118     deepseq >= 1.1.0.0 && < 1.5
119
120 benchmark map-benchmarks
121   type: exitcode-stdio-1.0
122   hs-source-dirs: benchmarks
123   main-is: Map.hs
124   ghc-options: -O2
125   build-depends:
126     base >= 4.2 && < 5,
127     containers,
128     criterion >= 0.4.0 && < 1.3,
129     deepseq >= 1.1.0.0 && < 1.5,
130     transformers
131
132 benchmark sequence-benchmarks
133   type: exitcode-stdio-1.0
134   hs-source-dirs: benchmarks
135   main-is: Sequence.hs
136   ghc-options: -O2
137   build-depends:
138     base >= 4.2 && < 5,
139     containers,
140     criterion >= 0.4.0 && < 1.3,
141     deepseq >= 1.1.0.0 && < 1.5,
142     random < 1.2,
143     transformers
144
145 benchmark set-benchmarks
146   type: exitcode-stdio-1.0
147   hs-source-dirs: benchmarks
148   main-is: Set.hs
149   ghc-options: -O2
150   build-depends:
151     base >= 4.2 && < 5,
152     containers,
153     criterion >= 0.4.0 && < 1.3,
154     deepseq >= 1.1.0.0 && < 1.5
155
156 benchmark set-operations-intmap
157   type: exitcode-stdio-1.0
158   hs-source-dirs: benchmarks/SetOperations
159   main-is: SetOperations-IntMap.hs
160   other-modules: SetOperations
161   ghc-options: -O2
162   build-depends:
163     base >= 4.2 && < 5,
164     containers,
165     criterion >= 0.4.0 && < 1.3
166
167 benchmark set-operations-intset
168   type: exitcode-stdio-1.0
169   hs-source-dirs: benchmarks/SetOperations
170   main-is: SetOperations-IntSet.hs
171   other-modules: SetOperations
172   ghc-options: -O2
173   build-depends:
174     base >= 4.2 && < 5,
175     containers,
176     criterion >= 0.4.0 && < 1.3
177
178 benchmark set-operations-map
179   type: exitcode-stdio-1.0
180   hs-source-dirs: benchmarks/SetOperations
181   main-is: SetOperations-Map.hs
182   other-modules: SetOperations
183   ghc-options: -O2
184   build-depends:
185     base >= 4.2 && < 5,
186     containers,
187     criterion >= 0.4.0 && < 1.3
188
189 benchmark set-operations-set
190   type: exitcode-stdio-1.0
191   hs-source-dirs: benchmarks/SetOperations
192   main-is: SetOperations-Set.hs
193   other-modules: SetOperations
194   ghc-options: -O2
195   build-depends:
196     base >= 4.2 && < 5,
197     containers,
198     criterion >= 0.4.0 && < 1.3
199
200 benchmark lookupge-intmap
201   type: exitcode-stdio-1.0
202   hs-source-dirs: benchmarks/LookupGE, .
203   main-is: IntMap.hs
204   other-modules:
205       Data.IntMap
206       Data.IntMap.Internal.DeprecatedDebug
207       Data.IntMap.Lazy
208       Data.IntMap.Strict
209       Data.IntSet.Internal
210       LookupGE_IntMap
211       Utils.Containers.Internal.BitUtil
212       Utils.Containers.Internal.StrictFold
213       Utils.Containers.Internal.StrictPair
214   ghc-options: -O2
215   cpp-options: -DTESTING
216   other-modules:
217     Data.IntMap.Internal
218   build-depends:
219     base >= 4.2 && < 5,
220     containers,
221     criterion >= 0.4.0 && < 1.3,
222     deepseq >= 1.1.0.0 && < 1.5,
223     ghc-prim
224
225 benchmark lookupge-map
226   type: exitcode-stdio-1.0
227   hs-source-dirs: benchmarks/LookupGE, .
228   main-is: Map.hs
229   other-modules:
230       Data.Map
231       Data.Map.Internal.Debug
232       Data.Map.Internal.DeprecatedShowTree
233       Data.Map.Lazy
234       Data.Map.Strict
235       Data.Map.Strict.Internal
236       Data.Set.Internal
237       LookupGE_Map
238       Utils.Containers.Internal.BitQueue
239       Utils.Containers.Internal.BitUtil
240       Utils.Containers.Internal.PtrEquality
241       Utils.Containers.Internal.StrictFold
242       Utils.Containers.Internal.StrictMaybe
243       Utils.Containers.Internal.StrictPair
244   ghc-options: -O2
245   cpp-options: -DTESTING
246   other-modules:
247     Data.Map.Internal
248   build-depends:
249     base >= 4.2 && < 5,
250     containers,
251     criterion >= 0.4.0 && < 1.3,
252     deepseq >= 1.1.0.0 && < 1.5,
253     ghc-prim
254
255 -------------------
256 -- T E S T I N G --
257 -------------------
258
259 -- Every test-suite contains the build-depends and options of the library,
260 -- plus the testing stuff.
261
262 Test-suite map-lazy-properties
263     hs-source-dirs: tests, .
264     main-is: map-properties.hs
265     other-modules:
266         Data.Map.Internal
267         Data.Map.Internal.Debug
268         Data.Map.Internal.DeprecatedShowTree
269         Data.Map.Lazy
270         Data.Map.Merge.Lazy
271         Data.Set
272         Data.Set.Internal
273         Utils.Containers.Internal.BitQueue
274         Utils.Containers.Internal.BitUtil
275         Utils.Containers.Internal.PtrEquality
276         Utils.Containers.Internal.StrictFold
277         Utils.Containers.Internal.StrictMaybe
278         Utils.Containers.Internal.StrictPair
279     type: exitcode-stdio-1.0
280     cpp-options: -DTESTING
281
282     build-depends: base >= 4.3 && < 5, array, deepseq >= 1.2 && < 1.5, ghc-prim
283     ghc-options: -O2
284     other-extensions: CPP, BangPatterns
285     include-dirs: include
286
287     build-depends:
288         HUnit,
289         QuickCheck >= 2.7.1,
290         test-framework,
291         test-framework-hunit,
292         test-framework-quickcheck2,
293         transformers
294
295 Test-suite map-strict-properties
296     hs-source-dirs: tests, .
297     main-is: map-properties.hs
298     other-modules:
299         Data.Map.Internal
300         Data.Map.Internal.Debug
301         Data.Map.Internal.DeprecatedShowTree
302         Data.Map.Merge.Strict
303         Data.Map.Strict
304         Data.Map.Strict.Internal
305         Data.Set
306         Data.Set.Internal
307         Utils.Containers.Internal.BitQueue
308         Utils.Containers.Internal.BitUtil
309         Utils.Containers.Internal.PtrEquality
310         Utils.Containers.Internal.StrictFold
311         Utils.Containers.Internal.StrictMaybe
312         Utils.Containers.Internal.StrictPair
313     type: exitcode-stdio-1.0
314     cpp-options: -DTESTING -DSTRICT
315
316     build-depends: base >= 4.3 && < 5, array, deepseq >= 1.2 && < 1.5, ghc-prim
317     ghc-options: -O2
318     other-extensions: CPP, BangPatterns
319     include-dirs: include
320
321     build-depends:
322         HUnit,
323         QuickCheck >= 2.7.1,
324         test-framework,
325         test-framework-hunit,
326         test-framework-quickcheck2,
327         transformers
328
329 Test-suite bitqueue-properties
330     hs-source-dirs: tests, .
331     main-is: bitqueue-properties.hs
332     other-modules:
333         Utils.Containers.Internal.BitQueue
334         Utils.Containers.Internal.BitUtil
335     type: exitcode-stdio-1.0
336     cpp-options: -DTESTING
337
338     build-depends: base >= 4.3 && < 5, ghc-prim
339     ghc-options: -O2
340     other-extensions: CPP, BangPatterns
341     include-dirs: include
342
343     build-depends:
344         QuickCheck >= 2.7.1,
345         test-framework,
346         test-framework-quickcheck2
347
348 Test-suite set-properties
349     hs-source-dirs: tests, .
350     main-is: set-properties.hs
351     other-modules:
352         Data.IntSet
353         Data.IntSet.Internal
354         Data.Set
355         Data.Set.Internal
356         Utils.Containers.Internal.BitUtil
357         Utils.Containers.Internal.PtrEquality
358         Utils.Containers.Internal.StrictFold
359         Utils.Containers.Internal.StrictPair
360     type: exitcode-stdio-1.0
361     cpp-options: -DTESTING
362
363     build-depends: base >= 4.3 && < 5, array, deepseq >= 1.2 && < 1.5, ghc-prim
364     ghc-options: -O2
365     other-extensions: CPP, BangPatterns
366     include-dirs: include
367
368     build-depends:
369         HUnit,
370         QuickCheck >= 2.7.1,
371         test-framework,
372         test-framework-hunit,
373         test-framework-quickcheck2,
374         transformers
375
376 Test-suite intmap-lazy-properties
377     hs-source-dirs: tests, .
378     main-is: intmap-properties.hs
379     other-modules:
380         Data.IntMap.Internal
381         Data.IntMap.Internal.Debug
382         Data.IntMap.Internal.DeprecatedDebug
383         Data.IntMap.Lazy
384         Data.IntSet
385         Data.IntSet.Internal
386         IntMapValidity
387         Utils.Containers.Internal.BitUtil
388         Utils.Containers.Internal.StrictFold
389         Utils.Containers.Internal.StrictPair
390     type: exitcode-stdio-1.0
391     cpp-options: -DTESTING
392
393     build-depends: base >= 4.3 && < 5, array, deepseq >= 1.2 && < 1.5, ghc-prim
394     ghc-options: -O2
395     other-extensions: CPP, BangPatterns
396     include-dirs: include
397
398     build-depends:
399         HUnit,
400         QuickCheck >= 2.7.1,
401         test-framework,
402         test-framework-hunit,
403         test-framework-quickcheck2
404
405 Test-suite intmap-strict-properties
406     hs-source-dirs: tests, .
407     main-is: intmap-properties.hs
408     other-modules:
409         Data.IntMap.Internal
410         Data.IntMap.Internal.Debug
411         Data.IntMap.Internal.DeprecatedDebug
412         Data.IntMap.Strict
413         Data.IntSet
414         Data.IntSet.Internal
415         IntMapValidity
416         Utils.Containers.Internal.BitUtil
417         Utils.Containers.Internal.StrictFold
418         Utils.Containers.Internal.StrictPair
419     type: exitcode-stdio-1.0
420     cpp-options: -DTESTING -DSTRICT
421
422     build-depends: base >= 4.3 && < 5, array, deepseq >= 1.2 && < 1.5, ghc-prim
423     ghc-options: -O2
424     other-extensions: CPP, BangPatterns
425     include-dirs: include
426
427     build-depends:
428         HUnit,
429         QuickCheck >= 2.7.1,
430         test-framework,
431         test-framework-hunit,
432         test-framework-quickcheck2
433
434 Test-suite intset-properties
435     hs-source-dirs: tests, .
436     main-is: intset-properties.hs
437     other-modules:
438         Data.IntSet
439         Data.IntSet.Internal
440         Data.Set
441         Data.Set.Internal
442         IntSetValidity
443         Utils.Containers.Internal.BitUtil
444         Utils.Containers.Internal.PtrEquality
445         Utils.Containers.Internal.StrictFold
446         Utils.Containers.Internal.StrictPair
447     type: exitcode-stdio-1.0
448     cpp-options: -DTESTING
449
450     build-depends: base >= 4.3 && < 5, array, deepseq >= 1.2 && < 1.5, ghc-prim
451     ghc-options: -O2
452     other-extensions: CPP, BangPatterns
453     include-dirs: include
454
455     build-depends:
456         HUnit,
457         QuickCheck >= 2.7.1,
458         test-framework,
459         test-framework-hunit,
460         test-framework-quickcheck2
461
462 Test-suite deprecated-properties
463     hs-source-dirs: tests, .
464     main-is: deprecated-properties.hs
465     other-modules:
466         Data.IntMap
467         Data.IntMap.Internal
468         Data.IntMap.Internal.DeprecatedDebug
469         Data.IntMap.Lazy
470         Data.IntMap.Strict
471         Data.IntSet.Internal
472         Data.Map
473         Data.Map.Internal
474         Data.Map.Internal.Debug
475         Data.Map.Internal.DeprecatedShowTree
476         Data.Map.Lazy
477         Data.Map.Strict
478         Data.Map.Strict.Internal
479         Data.Set.Internal
480         Utils.Containers.Internal.BitQueue
481         Utils.Containers.Internal.BitUtil
482         Utils.Containers.Internal.PtrEquality
483         Utils.Containers.Internal.StrictFold
484         Utils.Containers.Internal.StrictMaybe
485         Utils.Containers.Internal.StrictPair
486     type: exitcode-stdio-1.0
487     cpp-options: -DTESTING
488
489     build-depends: base >= 4.3 && < 5, array, deepseq >= 1.2 && < 1.5, ghc-prim
490     ghc-options: -O2
491     other-extensions: CPP, BangPatterns
492     include-dirs: include
493
494     build-depends:
495         QuickCheck >= 2.7.1,
496         test-framework,
497         test-framework-quickcheck2
498
499 Test-suite seq-properties
500     hs-source-dirs: tests, .
501     main-is: seq-properties.hs
502     other-modules:
503         Data.Sequence
504         Data.Sequence.Internal
505         Utils.Containers.Internal.StrictPair
506     type: exitcode-stdio-1.0
507     cpp-options: -DTESTING
508
509     build-depends: base >= 4.3 && < 5, array, deepseq >= 1.2 && < 1.5, ghc-prim
510     ghc-options: -O2
511     other-extensions: CPP, BangPatterns
512     include-dirs: include
513
514     build-depends:
515         QuickCheck >= 2.7.1,
516         test-framework,
517         test-framework-quickcheck2,
518         transformers
519
520 Test-suite tree-properties
521     hs-source-dirs: tests, .
522     main-is: tree-properties.hs
523     other-modules:
524         Data.Tree
525     type: exitcode-stdio-1.0
526     cpp-options: -DTESTING
527
528     build-depends: base >= 4.3 && < 5, array, deepseq >= 1.2 && < 1.5, ghc-prim
529     ghc-options: -O2
530     other-extensions: CPP, BangPatterns
531     include-dirs: include
532
533     build-depends:
534         QuickCheck >= 2.7.1,
535         test-framework,
536         test-framework-quickcheck2,
537         transformers
538
539 test-suite map-strictness-properties
540   hs-source-dirs: tests, .
541   main-is: map-strictness.hs
542   other-modules:
543       Data.Map.Internal
544       Data.Map.Internal.Debug
545       Data.Map.Internal.DeprecatedShowTree
546       Data.Map.Strict
547       Data.Map.Strict.Internal
548       Data.Set.Internal
549       Utils.Containers.Internal.BitQueue
550       Utils.Containers.Internal.BitUtil
551       Utils.Containers.Internal.PtrEquality
552       Utils.Containers.Internal.StrictFold
553       Utils.Containers.Internal.StrictMaybe
554       Utils.Containers.Internal.StrictPair
555   type: exitcode-stdio-1.0
556
557   build-depends:
558     array,
559     base >= 4.3 && < 5,
560     ChasingBottoms,
561     deepseq >= 1.2 && < 1.5,
562     QuickCheck >= 2.7.1,
563     ghc-prim,
564     test-framework >= 0.3.3,
565     test-framework-quickcheck2 >= 0.2.9
566
567   ghc-options: -Wall
568   other-extensions: CPP, BangPatterns
569   include-dirs: include
570
571 test-suite intmap-strictness-properties
572   hs-source-dirs: tests, .
573   main-is: intmap-strictness.hs
574   other-modules:
575       Data.IntMap.Internal
576       Data.IntMap.Internal.DeprecatedDebug
577       Data.IntMap.Strict
578       Data.IntSet.Internal
579       Utils.Containers.Internal.BitUtil
580       Utils.Containers.Internal.StrictFold
581       Utils.Containers.Internal.StrictPair
582   type: exitcode-stdio-1.0
583   other-extensions: CPP, BangPatterns
584
585   build-depends:
586     array,
587     base >= 4.3 && < 5,
588     ChasingBottoms,
589     deepseq >= 1.2 && < 1.5,
590     QuickCheck >= 2.7.1,
591     ghc-prim,
592     test-framework >= 0.3.3,
593     test-framework-quickcheck2 >= 0.2.9
594
595   ghc-options: -Wall
596   include-dirs: include
597
598 test-suite intset-strictness-properties
599   hs-source-dirs: tests, .
600   main-is: intset-strictness.hs
601   other-modules:
602       Data.IntSet
603       Data.IntSet.Internal
604       Utils.Containers.Internal.BitUtil
605       Utils.Containers.Internal.StrictFold
606       Utils.Containers.Internal.StrictPair
607   type: exitcode-stdio-1.0
608   other-extensions: CPP, BangPatterns
609
610   build-depends:
611     array,
612     base >= 4.3 && < 5,
613     ChasingBottoms,
614     deepseq >= 1.2 && < 1.5,
615     QuickCheck >= 2.7.1,
616     ghc-prim,
617     test-framework >= 0.3.3,
618     test-framework-quickcheck2 >= 0.2.9
619
620   ghc-options: -Wall
621   include-dirs: include
622
623 test-suite listutils-properties
624   hs-source-dirs: tests, .
625   main-is: listutils-properties.hs
626   other-modules:
627       Data.Containers.ListUtils
628   type: exitcode-stdio-1.0
629
630   build-depends:
631     base >= 4.3 && < 5,
632     ChasingBottoms,
633     deepseq >= 1.2 && < 1.5,
634     QuickCheck >= 2.7.1,
635     ghc-prim,
636     test-framework >= 0.3.3,
637     test-framework-quickcheck2 >= 0.2.9
638
639   ghc-options: -Wall
640   include-dirs: include