Skip to content

Commit 500aabc

Browse files
committed
.cabal: Reorganize constraints, allow base-4.16 in testsuite
The constraints have been reorganized according to these principles: - mention dependency on top-level if mentioned in all branches of a conditional - do not repeat constraints in test-suite that are inherited from library - order each dependency group alphabetically (but `base` and parent go first) - format with leading comma (harder to make mistakes) - align at >= and &&
1 parent 6719b84 commit 500aabc

File tree

1 file changed

+43
-33
lines changed

1 file changed

+43
-33
lines changed

HTTP.cabal

Lines changed: 43 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
Cabal-Version: >= 1.10
12
Name: HTTP
23
Version: 4000.3.16
34
x-revision: 1
4-
Cabal-Version: >= 1.10
55
Build-type: Simple
66
License: BSD3
77
License-file: LICENSE
@@ -57,7 +57,10 @@ Description:
5757

5858
Extra-Source-Files: CHANGES
5959

60-
tested-with: GHC==9.0.1, GHC==8.10.4, GHC==8.8.3, GHC==8.6.5, GHC==8.4.4, GHC==8.2.2, GHC==8.0.2, GHC==7.10.3, GHC==7.8.4, GHC==7.6.3, GHC==7.4.2, GHC==7.2.2, GHC==7.0.4
60+
tested-with:
61+
GHC==9.2.1, GHC==9.0.1,
62+
GHC==8.10.7, GHC==8.8.4, GHC==8.6.5, GHC==8.4.4, GHC==8.2.2, GHC==8.0.2,
63+
GHC==7.10.3, GHC==7.8.4, GHC==7.6.3, GHC==7.4.2, GHC==7.2.2, GHC==7.0.4
6164

6265
Source-Repository head
6366
type: git
@@ -110,23 +113,30 @@ Library
110113

111114
-- note the test harness constraints should be kept in sync with these
112115
-- where dependencies are shared
113-
Build-depends: base >= 4.3.0.0 && < 4.17, parsec >= 2.0 && < 3.2
114-
Build-depends: array >= 0.3.0.2 && < 0.6, bytestring >= 0.9.1.5 && < 0.12
115-
Build-depends: time >= 1.1.2.3 && < 1.13
116+
build-depends:
117+
base >= 4.3.0.0 && < 4.17
118+
, array >= 0.3.0.2 && < 0.6
119+
, bytestring >= 0.9.1.5 && < 0.12
120+
, parsec >= 2.0 && < 3.2
121+
, time >= 1.1.2.3 && < 1.13
122+
-- The following dependencies are refined by flags, but they should
123+
-- still be mentioned here on the top-level.
124+
, mtl >= 1.1.1.0 && < 2.3
125+
, network >= 2.4 && < 3.2
116126

117127
default-language: Haskell98
118128
default-extensions: FlexibleInstances
119129

120130
if flag(mtl1)
121-
Build-depends: mtl >= 1.1.1.0 && < 1.2
131+
Build-depends: mtl < 1.2
122132
CPP-Options: -DMTL1
123133
else
124-
Build-depends: mtl >= 2.0 && < 2.3
134+
Build-depends: mtl >= 2.0
125135

126136
if flag(network-uri)
127-
Build-depends: network-uri == 2.6.*, network >= 2.6 && < 3.2
137+
Build-depends: network-uri == 2.6.*, network >= 2.6
128138
else
129-
Build-depends: network >= 2.4 && < 2.6
139+
Build-depends: network < 2.6
130140

131141
if flag(warn-as-error)
132142
ghc-options: -Werror
@@ -147,37 +157,37 @@ Test-Suite test
147157

148158
ghc-options: -Wall
149159

150-
-- note: version constraints for dependencies shared with the library
151-
-- should be the same
152-
build-depends: HTTP,
153-
HUnit >= 1.2.0.1 && < 1.7,
154-
httpd-shed >= 0.4 && < 0.5,
155-
mtl >= 1.1.1.0 && < 2.3,
156-
bytestring >= 0.9.1.5 && < 0.12,
157-
deepseq >= 1.3.0.0 && < 1.5,
158-
pureMD5 >= 0.2.4 && < 2.2,
159-
base >= 4.3.0.0 && < 4.16,
160-
split >= 0.1.3 && < 0.3,
161-
test-framework >= 0.2.0 && < 0.9,
162-
test-framework-hunit >= 0.3.0 && <0.4
160+
build-depends:
161+
HTTP
162+
-- constraints inherited from HTTP
163+
, base
164+
, bytestring
165+
, mtl
166+
, network
167+
-- extra dependencies
168+
, deepseq >= 1.3.0.0 && < 1.5
169+
, httpd-shed >= 0.4 && < 0.5
170+
, HUnit >= 1.2.0.1 && < 1.7
171+
, pureMD5 >= 0.2.4 && < 2.2
172+
, split >= 0.1.3 && < 0.3
173+
, test-framework >= 0.2.0 && < 0.9
174+
, test-framework-hunit >= 0.3.0 && < 0.4
163175

164176
if flag(network-uri)
165-
Build-depends: network-uri == 2.6.*, network >= 2.6 && < 3.2
177+
Build-depends: network-uri == 2.6.*, network >= 2.6
166178
else
167-
Build-depends: network >= 2.3 && < 2.6
179+
Build-depends: network < 2.6
168180

169181
if flag(warp-tests)
170182
CPP-Options: -DWARP_TESTS
171183
build-depends:
172-
case-insensitive >= 0.4.0.1 && < 1.3,
173-
http-types >= 0.8.0 && < 1.0,
174-
wai >= 2.1.0 && < 3.3,
175-
warp >= 2.1.0 && < 3.4
184+
case-insensitive >= 0.4.0.1 && < 1.3
185+
, conduit >= 1.0.8 && < 1.4
186+
, http-types >= 0.8.0 && < 1.0
187+
, wai >= 2.1.0 && < 3.3
188+
, warp >= 2.1.0 && < 3.4
176189

177190
if flag(conduit10)
178-
build-depends:
179-
conduit >= 1.0.8 && < 1.1
191+
build-depends: conduit < 1.1
180192
else
181-
build-depends:
182-
conduit >= 1.1 && < 1.4,
183-
conduit-extra >= 1.1 && < 1.4
193+
build-depends: conduit >= 1.1, conduit-extra >= 1.1 && < 1.4

0 commit comments

Comments
 (0)