-
Notifications
You must be signed in to change notification settings - Fork 86
/
hashable.cabal
214 lines (181 loc) · 5.73 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
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
cabal-version: 2.2
name: hashable
version: 1.5.0.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.
.
'Hashable' is intended exclusively for use in in-memory data structures.
.
'Hashable' does /not/ have a fixed standard.
This allows it to improve over time.
.
Because it does not have a fixed standard, different computers or computers on different versions of the code will observe different hash values.
As such, 'hashable' is not recommended for use other than in-memory datastructures.
Specifically, 'hashable' is not intended for network use or in applications which persist hashed values.
For stable hashing use named hashes: sha256, crc32, xxhash etc.
homepage: http://github.com/haskell-unordered-containers/hashable
license: BSD-3-Clause
license-file: LICENSE
author:
Milan Straka <[email protected]>
Johan Tibell <[email protected]>
maintainer: Oleg Grenrus <[email protected]>
bug-reports:
https://github.com/haskell-unordered-containers/hashable/issues
stability: Provisional
category: Data
build-type: Simple
tested-with: GHC ==9.6.5 || ==9.8.2 || ==9.8.3 || ==9.10.1 || ==9.12.1
extra-source-files:
CHANGES.md
include/HsHashable.h
include/HsXXHash.h
README.md
xxHash-0.8.2/xxhash.h
flag arch-native
description:
Use @-march=native@ when compiling C sources.
Portable implementation is 15-50% slower.
Consider enabling this flag if hashing performance is important.
manual: True
default: False
flag random-initial-seed
description:
Randomly initialize the initial seed on each final executable invocation
This is useful for catching cases when you rely on (non-existent)
stability of hashable's hash functions.
This is not a security feature.
manual: True
default: False
library
exposed-modules:
Data.Hashable
Data.Hashable.Generic
Data.Hashable.Lifted
other-modules:
Data.Hashable.Class
Data.Hashable.FFI
Data.Hashable.Generic.Instances
Data.Hashable.Imports
Data.Hashable.LowLevel
Data.Hashable.Mix
Data.Hashable.XXH3
include-dirs: include xxHash-0.8.2
includes:
HsHashable.h
HsXXHash.h
xxhash.h
hs-source-dirs: src
build-depends:
, base >=4.18.0.0 && <4.22
, bytestring >=0.11.5.3 && <0.13
, containers >=0.6.7 && <0.8
, deepseq >=1.4.8.1 && <1.6
, ghc-prim
, text >=2.0.2 && <2.2
-- depend on os-string on newer GHCs only.
-- os-string has tight lower bound on bytestring, which prevents
-- using bundled version on older GHCs.
build-depends: os-string >=2.0.2 && <2.1
-- we also ensure that we can get filepath-1.5 only with GHC-9.2
-- therefore there is else-branch with stricter upper bound.
build-depends: filepath >=1.4.200.1 && <1.6
-- Integer internals
build-depends: ghc-bignum >=1.3 && <1.4
if (flag(random-initial-seed) && impl(ghc))
cpp-options: -DHASHABLE_RANDOM_SEED=1
if os(windows)
c-sources: cbits-win/init.c
else
c-sources: cbits-unix/init.c
default-language: Haskell2010
other-extensions:
BangPatterns
CPP
DeriveDataTypeable
FlexibleContexts
FlexibleInstances
GADTs
KindSignatures
MagicHash
MultiParamTypeClasses
QuantifiedConstraints
ScopedTypeVariables
Trustworthy
TypeOperators
UnliftedFFITypes
ghc-options: -Wall
if flag(arch-native)
-- Cabal doesn't pass cc-options to "ordinary" Haskell source compilation
-- https://github.com/haskell/cabal/issues/9801
ghc-options: -optc=-march=native -optc-mtune=native
if impl(ghc >=9.0)
-- these flags may abort compilation with GHC-8.10
-- https://gitlab.haskell.org/ghc/ghc/-/merge_requests/3295
ghc-options: -Winferred-safe-imports -Wmissing-safe-haskell-mode
test-suite hashable-tests
type: exitcode-stdio-1.0
hs-source-dirs: tests
main-is: Main.hs
other-modules:
Properties
Regress
build-depends:
, base
, bytestring
, filepath
, ghc-prim
, hashable
, HUnit
, QuickCheck >=2.15
, random >=1.0 && <1.3
, tasty ^>=1.5
, tasty-hunit ^>=0.10.1
, tasty-quickcheck ^>=0.10.3
, text >=0.11.0.5
if impl(ghc >=9.2)
build-depends: os-string
if !os(windows)
build-depends: unix
cpp-options: -DHAVE_MMAP
other-modules: Regress.Mmap
other-extensions: CApiFFI
ghc-options: -Wall -fno-warn-orphans
default-language: Haskell2010
test-suite xxhash-tests
type: exitcode-stdio-1.0
hs-source-dirs: tests src
main-is: xxhash-tests.hs
other-modules:
Data.Hashable.FFI
Data.Hashable.XXH3
default-language: Haskell2010
build-depends:
, base <5
, bytestring
, primitive ^>=0.9.0.0
, tasty ^>=1.5
, tasty-hunit ^>=0.10.1
, tasty-quickcheck ^>=0.10.3
include-dirs: include xxHash-0.8.2
includes:
HsXXHash.h
xxhash.h
if !impl(ghc >=9.4)
build-depends: data-array-byte >=0.1.0.1 && <0.2
test-suite hashable-examples
type: exitcode-stdio-1.0
build-depends:
, base
, ghc-prim
, hashable
hs-source-dirs: examples
main-is: Main.hs
default-language: Haskell2010
source-repository head
type: git
location:
https://github.com/haskell-unordered-containers/hashable.git