Skip to content

Commit 87995ec

Browse files
committed
Build exe:hackage-server with -Werror=unused-packages
This requires us to factor out a common exe-base from the common exe-defaults.
1 parent e80365d commit 87995ec

File tree

1 file changed

+39
-18
lines changed

1 file changed

+39
-18
lines changed

hackage-server.cabal

Lines changed: 39 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,28 @@ flag doctests
118118

119119
----------------------------------------------------------------------------
120120

121+
common language-defaults
122+
default-language:
123+
Haskell2010
124+
default-extensions:
125+
LambdaCase
126+
TupleSections
127+
other-extensions:
128+
CPP
129+
TemplateHaskell
130+
131+
ghc-options:
132+
-funbox-strict-fields
133+
-Wall
134+
-Wtabs
135+
-Wno-deprecated-flags
136+
-Wno-unused-do-bind
137+
-Wno-unused-record-wildcards
138+
-Werror=incomplete-patterns
139+
-Werror=missing-methods
140+
121141
common defaults
122-
default-language: Haskell2010
142+
import: language-defaults
123143

124144
-- version ranges of pre-installed packages for GHC
125145
--
@@ -157,19 +177,6 @@ common defaults
157177
, vector ^>= 0.12 || ^>= 0.13.0.0
158178
, zlib ^>= 0.6.2 || ^>= 0.7.0.0
159179

160-
ghc-options:
161-
-funbox-strict-fields
162-
-Wall
163-
-Wtabs
164-
-Wno-deprecated-flags
165-
-Wno-unused-do-bind
166-
-Wno-unused-record-wildcards
167-
-Werror=incomplete-patterns
168-
-Werror=missing-methods
169-
170-
default-extensions: LambdaCase, TupleSections
171-
other-extensions: CPP, TemplateHaskell
172-
173180

174181
library
175182
import: defaults
@@ -467,21 +474,35 @@ library
467474

468475
----------------------------------------------------------------------------
469476

470-
common exe-defaults
471-
import: defaults
477+
common exe-base
478+
import: language-defaults
472479

473-
build-depends: hackage-server
474480
hs-source-dirs: exes
475481
ghc-options: -threaded -rtsopts
476482

477483
other-modules: Paths_hackage_server
478484
autogen-modules: Paths_hackage_server
479485

486+
build-depends:
487+
, base
488+
, hackage-server
489+
490+
common exe-defaults
491+
import: defaults
492+
import: exe-base
480493

481494
executable hackage-server
482-
import: exe-defaults
495+
import: exe-base
483496

484497
main-is: Main.hs
498+
build-depends:
499+
, bytestring
500+
, Cabal
501+
, directory
502+
, filepath
503+
, network-uri
504+
, parsec
505+
, unix
485506

486507
ghc-options: -with-rtsopts=-I00
487508

0 commit comments

Comments
 (0)