Skip to content

Commit bd83d47

Browse files
committed
Cleaned cabal files
The `{}` syntax is rather ugly, let's merge the `base` common stanza into `project-config`.
1 parent 00b926b commit bd83d47

File tree

13 files changed

+57
-95
lines changed

13 files changed

+57
-95
lines changed

bench/cardano-topology/cardano-topology.cabal

+2-3
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@ license-files: LICENSE
1010
NOTICE
1111
build-type: Simple
1212

13-
common base { build-depends: base >= 4.14 && < 4.15 }
14-
1513
common project-config
14+
build-depends: base >= 4.14 && < 4.15
1615
default-language: Haskell2010
1716
default-extensions: NoImplicitPrelude
1817
ghc-options: -Wall
@@ -24,7 +23,7 @@ common project-config
2423
-Wredundant-constraints
2524

2625
executable cardano-topology
27-
import: base, project-config
26+
import: project-config
2827
hs-source-dirs: .
2928
main-is: cardano-topology.hs
3029
ghc-options: -threaded

bench/locli/locli.cabal

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ license-files:
1111
NOTICE
1212
build-type: Simple
1313

14-
common base
14+
common project-config
1515
default-language: Haskell2010
1616
default-extensions: BangPatterns
1717
BlockArguments
@@ -52,7 +52,7 @@ common base
5252
buildable: False
5353

5454
library
55-
import: base
55+
import: project-config
5656
hs-source-dirs: src
5757

5858
exposed-modules: Data.Accum
@@ -137,7 +137,7 @@ library
137137
, cardano-strict-containers == 0.1.0.1
138138

139139
executable locli
140-
import: base
140+
import: project-config
141141

142142
hs-source-dirs: app
143143
main-is: locli.hs
@@ -156,7 +156,7 @@ executable locli
156156
, transformers-except
157157

158158
test-suite test-locli
159-
import: base
159+
import: project-config
160160

161161
hs-source-dirs: test
162162
main-is: test-locli.hs

bench/trace-analyzer/trace-analyzer.cabal

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,9 @@ build-type: Simple
1111
extra-doc-files: README.md
1212
CHANGELOG.md
1313

14-
common base { build-depends: base >= 4.14 && < 4.15 }
15-
1614
common project-config
1715
default-language: Haskell2010
16+
build-depends: base >= 4.14 && < 4.15
1817

1918
ghc-options: -Wall
2019
-Wcompat

cardano-api/cardano-api.cabal

+4-5
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,11 @@ license-files: LICENSE
1111
build-type: Simple
1212
extra-source-files: README.md, ChangeLog.md
1313

14-
common base { build-depends: base >= 4.14 && < 4.15 }
15-
1614
common project-config
1715
default-language: Haskell2010
1816
default-extensions: NoImplicitPrelude
1917
OverloadedStrings
18+
build-depends: base >= 4.14 && < 4.15
2019

2120
ghc-options: -Wall
2221
-Wcompat
@@ -31,7 +30,7 @@ common maybe-unix
3130
build-depends: unix
3231

3332
library
34-
import: base, project-config, maybe-unix
33+
import: project-config, maybe-unix
3534

3635
hs-source-dirs: src
3736

@@ -167,7 +166,7 @@ library
167166
, yaml
168167

169168
library gen
170-
import: base, project-config
169+
import: project-config
171170

172171
visibility: public
173172

@@ -198,7 +197,7 @@ library gen
198197
, text
199198

200199
test-suite cardano-api-test
201-
import: base, project-config
200+
import: project-config
202201
hs-source-dirs: test
203202
main-is: cardano-api-test.hs
204203
type: exitcode-stdio-1.0

cardano-cli/cardano-cli.cabal

+5-7
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,12 @@ Flag unexpected_thunks
1515
Description: Turn on unexpected thunks checks
1616
Default: False
1717

18-
common base
19-
build-depends: base >= 4.14 && < 4.15
20-
2118
common project-config
2219
default-language: Haskell2010
2320

2421
default-extensions: NoImplicitPrelude
2522
OverloadedStrings
23+
build-depends: base >= 4.14 && < 4.15
2624

2725
ghc-options: -Wall
2826
-Wcompat
@@ -41,7 +39,7 @@ common maybe-Win32
4139
build-depends: Win32
4240

4341
library
44-
import: base, project-config
42+
import: project-config
4543
, maybe-Win32
4644

4745
if flag(unexpected_thunks)
@@ -151,7 +149,7 @@ library
151149
, yaml
152150

153151
executable cardano-cli
154-
import: base, project-config
152+
import: project-config
155153
, maybe-unix
156154
hs-source-dirs: app
157155
main-is: cardano-cli.hs
@@ -164,7 +162,7 @@ executable cardano-cli
164162
, transformers-except
165163

166164
test-suite cardano-cli-test
167-
import: base, project-config
165+
import: project-config
168166

169167
hs-source-dirs: test
170168
main-is: cardano-cli-test.hs
@@ -209,7 +207,7 @@ test-suite cardano-cli-test
209207
ghc-options: -threaded -rtsopts -with-rtsopts=-N -with-rtsopts=-T
210208

211209
test-suite cardano-cli-golden
212-
import: base, project-config
210+
import: project-config
213211

214212
hs-source-dirs: test
215213
main-is: cardano-cli-golden.hs

cardano-client-demo/cardano-client-demo.cabal

+6-7
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,19 @@ license-files:
1616
NOTICE
1717
extra-source-files: CHANGELOG.md
1818

19-
common base { build-depends: base >= 4.14 && < 4.15 }
20-
2119
common project-config
2220
default-language: Haskell2010
21+
build-depends: base >= 4.14 && < 4.15
2322

2423
executable scan-blocks
25-
import: base, project-config
24+
import: project-config
2625
main-is: ScanBlocks.hs
2726
build-depends: cardano-api
2827
, filepath
2928
, time
3029

3130
executable scan-blocks-pipelined
32-
import: base, project-config
31+
import: project-config
3332
main-is: ScanBlocksPipelined.hs
3433
build-depends: cardano-api
3534
, cardano-ledger-byron ^>= 0.1
@@ -38,7 +37,7 @@ executable scan-blocks-pipelined
3837
, time
3938

4039
executable chain-sync-client-with-ledger-state
41-
import: base, project-config
40+
import: project-config
4241
main-is: ChainSyncClientWithLedgerState.hs
4342
build-depends: cardano-api
4443
, cardano-ledger-byron ^>= 0.1
@@ -53,7 +52,7 @@ executable chain-sync-client-with-ledger-state
5352
, transformers
5453

5554
executable ledger-state
56-
import: base, project-config
55+
import: project-config
5756
main-is: LedgerState.hs
5857
build-depends: aeson,
5958
base16-bytestring,
@@ -86,7 +85,7 @@ executable ledger-state
8685
typed-protocols,
8786

8887
executable stake-credential-history
89-
import: base, project-config
88+
import: project-config
9089
main-is: StakeCredentialHistory.hs
9190
ghc-options: -Wall
9291
-Wcompat

cardano-git-rev/cardano-git-rev.cabal

+2-3
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,10 @@ flag systemd
1515
default: True
1616
manual: False
1717

18-
common base { build-depends: base >= 4.14 && < 4.15 }
19-
2018
common project-config
2119
default-language: Haskell2010
2220
default-extensions: NoImplicitPrelude
21+
build-depends: base >= 4.14 && < 4.15
2322

2423
ghc-options: -Wall
2524
-Wcompat
@@ -30,7 +29,7 @@ common project-config
3029
-Wunused-packages
3130

3231
library
33-
import: base, project-config
32+
import: project-config
3433

3534
hs-source-dirs: src
3635

cardano-node-chairman/cardano-node-chairman.cabal

+5-5
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,13 @@ license-files: LICENSE
1010
NOTICE
1111
build-type: Simple
1212

13-
common base { build-depends: base >= 4.14 && < 4.15 }
1413

15-
if os(windows)
16-
buildable: False
1714

1815

1916
common project-config
2017
default-language: Haskell2010
2118
default-extensions: NoImplicitPrelude
19+
build-depends: base >= 4.14 && < 4.15
2220

2321
ghc-options: -Wall
2422
-Wcompat
@@ -28,9 +26,11 @@ common project-config
2826
-Wpartial-fields
2927
-Wredundant-constraints
3028
-Wunused-packages
29+
if os(windows)
30+
buildable: False
3131

3232
executable cardano-node-chairman
33-
import: base, project-config
33+
import: project-config
3434

3535
hs-source-dirs: app
3636
main-is: cardano-node-chairman.hs
@@ -57,7 +57,7 @@ executable cardano-node-chairman
5757
, time
5858

5959
test-suite chairman-tests
60-
import: base, project-config
60+
import: project-config
6161

6262
hs-source-dirs: test
6363

cardano-node/cardano-node.cabal

+4-5
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,12 @@ flag systemd
2020
default: True
2121
manual: False
2222

23-
common base { build-depends: base >= 4.14 && < 4.15 }
24-
2523
common project-config
2624
default-language: Haskell2010
2725

2826
default-extensions: NoImplicitPrelude
2927
OverloadedStrings
28+
build-depends: base >= 4.14 && < 4.15
3029

3130
ghc-options: -Wall
3231
-Wcompat
@@ -46,7 +45,7 @@ common maybe-unix
4645
build-depends: unix
4746

4847
library
49-
import: base, project-config
48+
import: project-config
5049
, maybe-unix
5150
, maybe-Win32
5251
if flag(unexpected_thunks)
@@ -189,7 +188,7 @@ library
189188
, yaml
190189

191190
executable cardano-node
192-
import: base, project-config
191+
import: project-config
193192
hs-source-dirs: app
194193
main-is: cardano-node.hs
195194
ghc-options: -threaded
@@ -209,7 +208,7 @@ executable cardano-node
209208
, text
210209

211210
test-suite cardano-node-test
212-
import: base, project-config
211+
import: project-config
213212
, maybe-unix
214213
hs-source-dirs: test
215214
main-is: cardano-node-test.hs

cardano-submit-api/cardano-submit-api.cabal

+6-34
Original file line numberDiff line numberDiff line change
@@ -15,37 +15,9 @@ category: Language
1515
build-type: Simple
1616
extra-source-files: CHANGELOG.md
1717

18-
common base { build-depends: base >= 4.14 && < 4.15 }
19-
20-
common cardano-api { build-depends: cardano-api }
21-
common cardano-submit-api { build-depends: cardano-submit-api }
22-
23-
common aeson { build-depends: aeson >= 2.1.0.0 }
24-
common async { build-depends: async >= 2.2.2 }
25-
common bytestring { build-depends: bytestring >= 0.10.8.2 }
26-
common cardano-binary { build-depends: cardano-binary >= 1.5.0 }
27-
common cardano-crypto-class { build-depends: cardano-crypto-class >= 2.0.0 }
28-
common cardano-ledger-byron { build-depends: cardano-ledger-byron >= 0.1.0.0 }
29-
common formatting { build-depends: formatting >= 6.3.7 }
30-
common http-media { build-depends: http-media >= 0.8.0.0 }
31-
common iohk-monitoring { build-depends: iohk-monitoring >= 0.1.10.1 }
32-
common mtl { build-depends: mtl >= 2.2.2 }
33-
common network { build-depends: network >= 3.1.2.1 }
34-
common optparse-applicative-fork { build-depends: optparse-applicative-fork >= 0.16.1.0 }
35-
common ouroboros-consensus-cardano { build-depends: ouroboros-consensus-cardano >= 0.1.0.0 }
36-
common ouroboros-network { build-depends: ouroboros-network >= 0.1.0.0 }
37-
common prometheus { build-depends: prometheus >= 2.2.2 }
38-
common protolude { build-depends: protolude >= 0.3.0 }
39-
common servant { build-depends: servant >= 0.18.2 }
40-
common servant-server { build-depends: servant-server >= 0.18.2 }
41-
common streaming-commons { build-depends: streaming-commons >= 0.2.2.1 }
42-
common text { build-depends: text >= 1.2.3.2 }
43-
common transformers-except { build-depends: transformers-except >= 0.1.1 }
44-
common warp { build-depends: warp >= 3.3.13 }
45-
common yaml { build-depends: yaml >= 0.11.5.0 }
46-
4718
common project-config
4819
default-language: Haskell2010
20+
build-depends: base >= 4.14 && < 4.15
4921

5022
ghc-options: -Wall
5123
-Wcompat
@@ -65,7 +37,7 @@ common project-config
6537
-fwarn-redundant-constraints
6638

6739
library
68-
import: base, project-config
40+
import: project-config
6941
build-depends: , aeson
7042
, async
7143
, bytestring
@@ -109,15 +81,15 @@ library
10981
, Cardano.TxSubmit.Web
11082

11183
executable cardano-submit-api
112-
import: base, project-config
113-
, cardano-submit-api
114-
, optparse-applicative-fork
84+
import: project-config
11585
main-is: Main.hs
11686
hs-source-dirs: app
11787
ghc-options: -threaded -rtsopts "-with-rtsopts=-T -I0"
88+
build-depends: optparse-applicative-fork >= 0.16.1.0
89+
, cardano-submit-api
11890

11991
test-suite unit
120-
import: base, project-config
92+
import: project-config
12193
type: exitcode-stdio-1.0
12294
main-is: test.hs
12395
hs-source-dirs: test

0 commit comments

Comments
 (0)