forked from haskell-unordered-containers/hashable
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hashable.cabal
171 lines (147 loc) · 4.65 KB
/
hashable.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
Name: hashable
Version: 1.2.6.0
Synopsis: A class for types that can be converted to a hash value
Description: This package defines a class, 'Hashable', for types that
can be converted to a hash value. This class
exists for the benefit of hashing-based data
structures. The package provides instances for
basic types and a way to combine hash values.
Homepage: http://github.com/tibbe/hashable
License: BSD3
License-file: LICENSE
Author: Milan Straka <fox@ucw.cz>
Johan Tibell <johan.tibell@gmail.com>
Maintainer: johan.tibell@gmail.com
bug-reports: https://github.com/tibbe/hashable/issues
Stability: Provisional
Category: Data
Build-type: Simple
Cabal-version: >=1.8
-- tests/Properties.hs shouldn't have to go here, but the source files
-- for the test-suite stanzas don't get picked up by `cabal sdist`.
Extra-source-files:
CHANGES.md, README.md, tests/Properties.hs,
benchmarks/Benchmarks.hs, benchmarks/cbits/*.c, benchmarks/cbits/*.h
Flag integer-gmp
Description: Are we using integer-gmp to provide fast Integer instances?
Default: True
Flag sse2
Description: Do we want to assume that a target supports SSE 2?
Default: True
Manual: True
Flag sse41
Description: Do we want to assume that a target supports SSE 4.1?
Default: False
Manual: True
Flag examples
Description: Build example modules
Default: False
Manual: True
Library
Exposed-modules: Data.Hashable
Data.Hashable.Lifted
Other-modules: Data.Hashable.Class
Build-depends: base >= 4.4 && < 4.11,
bytestring >= 0.9 && < 0.11,
deepseq >= 1.3
if impl(ghc)
Build-depends: ghc-prim,
text >= 0.11.0.5
if impl(ghc) && flag(integer-gmp)
Build-depends: integer-gmp >= 0.2
if impl(ghc >= 7.2.1)
CPP-Options: -DGENERICS
Other-modules: Data.Hashable.Generic
C-sources:
cbits/fnv.c
Ghc-options: -Wall
if impl(ghc >= 6.8)
Ghc-options: -fwarn-tabs
else
c-sources: cbits/getRandomBytes.c
other-modules: Data.Hashable.RandomSource
if os(windows)
extra-libraries: advapi32
Test-suite tests
Type: exitcode-stdio-1.0
Hs-source-dirs: tests
Main-is: Main.hs
Other-modules: Properties Regress
Build-depends: base >= 4.0 && < 5.0,
bytestring,
ghc-prim,
hashable,
test-framework >= 0.3.3,
test-framework-hunit,
test-framework-quickcheck2 >= 0.2.9,
HUnit,
QuickCheck >= 2.4.0.1,
random >= 1.0 && < 1.2,
text >= 0.11.0.5
if !os(windows)
Build-depends: unix
CPP-options: -DHAVE_MMAP
Other-modules: Regress.Mmap
Ghc-options: -Wall -fno-warn-orphans
if impl(ghc >= 7.2.1)
CPP-Options: -DGENERICS
benchmark benchmarks
-- We cannot depend on the hashable library directly as that creates
-- a dependency cycle.
hs-source-dirs: . benchmarks
main-is: Benchmarks.hs
other-modules:
Data.Hashable
Data.Hashable.Class
Data.Hashable.RandomSource
Data.Hashable.SipHash
type: exitcode-stdio-1.0
build-depends:
base,
bytestring,
criterion >= 1.0,
ghc-prim,
siphash,
text
if impl(ghc)
Build-depends: ghc-prim,
text >= 0.11.0.5
if impl(ghc) && flag(integer-gmp)
Build-depends: integer-gmp >= 0.2
if impl(ghc >= 7.2.1)
CPP-Options: -DGENERICS
include-dirs:
benchmarks/cbits
includes:
siphash.h
c-sources:
benchmarks/cbits/inthash.c
benchmarks/cbits/siphash.c
benchmarks/cbits/wang.c
cbits/fnv.c
if (arch(i386) || arch(x86_64)) && flag(sse2)
cpp-options: -DHAVE_SSE2
c-sources:
benchmarks/cbits/siphash-sse2.c
if flag(sse41)
cpp-options: -DHAVE_SSE41
c-sources:
benchmarks/cbits/siphash-sse41.c
Ghc-options: -Wall -O2
if impl(ghc >= 6.8)
Ghc-options: -fwarn-tabs
else
c-sources: cbits/getRandomBytes.c
other-modules: Data.Hashable.RandomSource
if os(windows)
extra-libraries: advapi32
Executable hashable-examples
if flag(examples)
build-depends: base, hashable
else
buildable: False
hs-source-dirs: examples
main-is: Main.hs
source-repository head
type: git
location: https://github.com/tibbe/hashable.git