summaryrefslogtreecommitdiff
path: root/bv-little.cabal
blob: 492997829a112b000b8ce8040d7ac7114c9c9588 (plain)
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
name:                bv-little
version:             1.1.1
synopsis:            Efficient little-endian bit vector library
category:            Data, Bit Vectors
license:             BSD3
license-file:        LICENSE
author:              Alex Washburn
maintainer:          hackage@recursion.ninja
homepage:            https://github.com/recursion-ninja/bv-little
bug-reports:         https://github.com/recursion-ninja/bv-little/issues
copyright:           (c) Alex Washburn 2018
description:
  .
  This package contains a time- and space- efficient implementation of /little-endian, immutable/ bit vectors. Provides implementations of applicable typeclasses and numeric conversions.
  .
  The declared cost of each operation is either worst-case or amortized.
  .
  For an implementation of /big-endian, immutable/ bit vectors use the <https://hackage.haskell.org/package/bv bv> package.
  .
  For an implementation of /little-endian, mutable/ bit vectors, use the <https://hackage.haskell.org/package/bitvec bitvec> package.          

build-type:          Simple
cabal-version:       >= 1.22

tested-with:         GHC == 8.8.1
                     GHC == 8.6.5
                     GHC == 8.4.4
                     GHC == 8.2.2
                     GHC == 8.0.2
                     GHC == 7.10.3

extra-source-files:  changelog.md
                     README.md
                     stack.yaml

source-repository head
  type:     git
  location: https://github.com/recursion-ninja/bv-little


library

  build-depends:      base                  >= 4.5.1 && < 5
                    , deepseq               >= 1.4.1.1
                    , hashable              >= 1.2.3.2
                    , integer-gmp           >= 1.0
                    , keys                  >= 3.10.1
                    , mono-traversable      >= 1.0.5.0
                    , mono-traversable-keys >= 0.1.0
                    , primitive             >= 0.6.4.0
                    , QuickCheck            >= 2.8
                    , text-show             >= 3.2.1

  if !impl(ghc >= 8.0)

    build-depends:    semigroups            >= 0.18  && < 1.0

  default-language: Haskell2010

  exposed-modules:  Data.BitVector.LittleEndian

  ghc-options:      -O2

                    -- Sanity check warnings
                    -Wall
                    -fwarn-dodgy-foreign-imports
                    -fwarn-incomplete-record-updates
                    -fwarn-incomplete-uni-patterns
                    -fwarn-overlapping-patterns

                    -fwarn-duplicate-exports
                    -fwarn-identities
                    -fwarn-incomplete-patterns
                    -fwarn-incomplete-record-updates
                    -fwarn-incomplete-uni-patterns
                    -fwarn-missing-fields
                    -fwarn-missing-signatures
                    -fwarn-overlapping-patterns
                    -fwarn-tabs
                    -fwarn-unused-binds
                    -fwarn-unused-do-bind
                    -fwarn-unused-imports
                    -fwarn-unused-matches
                    -fwarn-wrong-do-bind

  if impl(ghc >= 7.8)

    ghc-options:    -fwarn-empty-enumerations
                    -fwarn-overflowed-literals

  if impl(ghc >= 8.0)

    ghc-options:    -Wcompat
                    -fwarn-noncanonical-monoid-instances
                    -fwarn-redundant-constraints
                    -fwarn-semigroup
                    -fwarn-unrecognised-warning-flags
                    -fwarn-unused-foralls

  hs-source-dirs:   src


Test-Suite test-suite

  type:             exitcode-stdio-1.0

  main-is:          TestSuite.hs

  build-depends:      base                  >= 4.5.1 && < 5
                    , bv-little
                    , deepseq               >= 1.4.1.1
                    , hashable              >= 1.2.3.2
                    , mono-traversable      >= 1.0.5.0
                    , mono-traversable-keys >= 0.1.0
                    , QuickCheck            >= 2.8
                    , smallcheck            >= 1.1.5
                    , tasty
                    , tasty-hunit
                    , tasty-quickcheck
                    , tasty-smallcheck
                    , text-show             >= 3.2.1

  if !impl(ghc >= 8.0)

    build-depends:    semigroups       >= 0.18  && < 1.0
                    , transformers

  default-language: Haskell2010

  hs-source-dirs:   test, util

  other-modules:    Data.BitVector.Visual
                    Operator.Binary.Comparison
                    Operator.Binary.Logical
                    Operator.Unary.Logical
                    

benchmark benchmark-suite

  type:             exitcode-stdio-1.0

  main-is:          Benchmarks.hs

  build-depends:      base             >= 4.5.1 && < 5
                    , bv-little
                    , criterion
                    , deepseq          >= 1.4.1.1
                    , hashable         >= 1.2.3.2
                    , mono-traversable >= 1.0.5.0
                    , QuickCheck       >= 2.8
                    , smallcheck       >= 1.1.5

  if !impl(ghc >= 8.0)

    build-depends:    semigroups       >= 0.18  && < 1.0

  default-language: Haskell2010

  ghc-options:      -O2
                    -threaded
                    -fdicts-cheap
                    -fmax-simplifier-iterations=10
                    -fno-full-laziness
                    -fspec-constr-count=6

                    -- Sanity check warnings
                    -Wall
                    -fwarn-dodgy-foreign-imports
                    -fwarn-incomplete-record-updates
                    -fwarn-incomplete-uni-patterns
                    -fwarn-overlapping-patterns

                    -- Turn off type default warnings
                    -fno-warn-type-defaults

  hs-source-dirs:   bench, util

  other-modules:    Operator.Binary.Comparison
                    Operator.Binary.Logical
                    Operator.Unary.Logical
                    


benchmark benchmark-heap-stack

  type:             exitcode-stdio-1.0

  main-is:          HeapStack.hs

  build-depends:      base             >= 4.5.1 && < 5
                    , bv-little
                    , criterion
                    , deepseq          >= 1.4.1.1
                    , hashable         >= 1.2.3.2
                    , mono-traversable >= 1.0.5.0
                    , QuickCheck       >= 2.8
                    , smallcheck       >= 1.1.5

  if !impl(ghc >= 8.0)

    build-depends:    semigroups       >= 0.18  && < 1.0

  default-language: Haskell2010

  ghc-options:      -O2
--                    -ddump-simpl-stats
                    -threaded
                    -fdicts-cheap
                    -fmax-simplifier-iterations=10
                    -fno-full-laziness
                    -fspec-constr-count=6
                    -rtsopts
--                    -prof

                    -- Sanity check warnings
                    -Wall
                    -fwarn-dodgy-foreign-imports
                    -fwarn-incomplete-record-updates
                    -fwarn-incomplete-uni-patterns
                    -fwarn-overlapping-patterns

                    -- Turn off type default warnings
                    -fno-warn-type-defaults

  hs-source-dirs:   bench, util

  other-modules:    Operator.Binary.Comparison
                    Operator.Binary.Logical
                    Operator.Unary.Logical