Skip to content

Commit f27373c

Browse files
committed
Minor package description refactoring
This makes use of `common` blocks to reduce the duplication resulting from three test-suite components sharing the very same settings. Also, this declares all `LANGUAGE` pragmas we expect the compiler to support so the cabal solver can honor this.
1 parent 1e7ec15 commit f27373c

File tree

1 file changed

+21
-31
lines changed

1 file changed

+21
-31
lines changed

cryptohash-sha512.cabal

Lines changed: 21 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cabal-version: 2.0
1+
cabal-version: 2.2
22
name: cryptohash-sha512
33
version: 0.11.103.0
44

@@ -45,7 +45,7 @@ a [clearly smaller footprint by almost 3 orders of magnitude](https://www.reddit
4545

4646
}
4747

48-
license: BSD3
48+
license: BSD-3-Clause
4949
license-file: LICENSE
5050
copyright: Vincent Hanquez, Herbert Valerio Riedel
5151
maintainer: Herbert Valerio Riedel <hvr@gnu.org>
@@ -77,22 +77,28 @@ source-repository head
7777

7878
library
7979
default-language: Haskell2010
80+
other-extensions: BangPatterns
81+
CApiFFI
82+
CPP
83+
Trustworthy
84+
Unsafe
8085
build-depends: base >= 4.5 && < 5
8186
, bytestring >= 0.9.2 && < 0.13
8287

8388
hs-source-dirs: src
8489
exposed-modules: Crypto.Hash.SHA512 Crypto.Hash.SHA512t Crypto.Hash.SHA384
8590
other-modules: Crypto.Hash.SHA512.FFI Compat
86-
ghc-options: -Wall -fno-cse -O2
91+
ghc-options: -Wall -fno-warn-deprecations -fno-cse -O2
8792
cc-options: -Wall
8893
include-dirs: cbits
8994

90-
test-suite test-sha512
95+
common test-defaults
9196
default-language: Haskell2010
92-
type: exitcode-stdio-1.0
93-
hs-source-dirs: src-tests
94-
main-is: test-sha512.hs
97+
other-extensions: OverloadedStrings
9598
ghc-options: -Wall -threaded
99+
100+
hs-source-dirs: src-tests
101+
96102
build-depends: cryptohash-sha512
97103
, base
98104
, bytestring
@@ -103,40 +109,24 @@ test-suite test-sha512
103109
, tasty-quickcheck >= 0.10 && < 1
104110
, tasty-hunit >= 0.10 && < 0.11
105111

112+
test-suite test-defaults
113+
import: test-defaults
114+
type: exitcode-stdio-1.0
115+
main-is: test-sha512.hs
116+
106117
test-suite test-sha512t
107-
default-language: Haskell2010
118+
import: test-defaults
108119
type: exitcode-stdio-1.0
109-
hs-source-dirs: src-tests
110120
main-is: test-sha512t.hs
111-
ghc-options: -Wall -threaded
112-
build-depends: cryptohash-sha512
113-
, base
114-
, bytestring
115-
116-
, base16-bytestring >= 1.0.1.0 && < 1.1
117-
, SHA >= 1.6.4 && < 1.7
118-
, tasty >= 1.4 && < 1.6
119-
, tasty-quickcheck >= 0.10 && < 1
120-
, tasty-hunit >= 0.10 && < 0.11
121121

122122
test-suite test-sha384
123-
default-language: Haskell2010
123+
import: test-defaults
124124
type: exitcode-stdio-1.0
125-
hs-source-dirs: src-tests
126125
main-is: test-sha384.hs
127-
ghc-options: -Wall -threaded
128-
build-depends: cryptohash-sha512
129-
, base
130-
, bytestring
131-
132-
, base16-bytestring >= 1.0.1.0 && < 1.1
133-
, SHA >= 1.6.4 && < 1.7
134-
, tasty >= 1.4 && < 1.6
135-
, tasty-quickcheck >= 0.10 && < 1
136-
, tasty-hunit >= 0.10 && < 0.11
137126

138127
benchmark bench-sha512
139128
default-language: Haskell2010
129+
other-extensions: BangPatterns
140130
type: exitcode-stdio-1.0
141131
main-is: bench-sha512.hs
142132
hs-source-dirs: src-bench

0 commit comments

Comments
 (0)