on master help sign in
Modernize GHC flags
059b123Mark Karpov
.github/workflows/ci.yaml+2
@@ -43,4 +43,6 @@ jobs:
43 - run: cabal build $CONFIG
43 - run: cabal build $CONFIG
44 - run: cabal test $CONFIG
44 - run: cabal test $CONFIG
45 - run: cabal haddock $CONFIG
45 - run: cabal haddock $CONFIG
46+ # Haddock fails to build, see https://github.com/haskell/cabal/issues/9060
47+ if: ${{ matrix.ghc != '9.2.7' }}
46 - run: cabal sdist
48 - run: cabal sdist
req.cabal+3−9
@@ -52,22 +52,16 @@ library
52 retry >=0.8 && <0.10,
52 retry >=0.8 && <0.10,
53 template-haskell >=2.14 && <2.20,
53 template-haskell >=2.14 && <2.20,
54 text >=0.2 && <2.1,
54 text >=0.2 && <2.1,
55− time >=1.2 && <1.13,
56 transformers >=0.5.3.0 && <0.7,
55 transformers >=0.5.3.0 && <0.7,
57 transformers-base,
56 transformers-base,
58 unliftio-core >=0.1.1 && <0.3
57 unliftio-core >=0.1.1 && <0.3
59
58
60 if flag(dev)
59 if flag(dev)
61− ghc-options: -O0 -Wall -Werror
60+ ghc-options: -Wall -Werror -Wpartial-fields -Wunused-packages
62
61
63 else
62 else
64 ghc-options: -O2 -Wall
63 ghc-options: -O2 -Wall
65
64
66− if flag(dev)
67− ghc-options:
68− -Wcompat -Wincomplete-record-updates -Wincomplete-uni-patterns
69− -Wnoncanonical-monad-instances
70−
71test-suite pure-tests
65test-suite pure-tests
72 type: exitcode-stdio-1.0
66 type: exitcode-stdio-1.0
73 main-is: Spec.hs
67 main-is: Spec.hs
@@ -96,7 +90,7 @@ test-suite pure-tests
96 time >=1.2 && <1.13
90 time >=1.2 && <1.13
97
91
98 if flag(dev)
92 if flag(dev)
99− ghc-options: -O0 -Wall -Werror
93+ ghc-options: -Wall -Werror
100
94
101 else
95 else
102 ghc-options: -O2 -Wall
96 ghc-options: -O2 -Wall
@@ -122,7 +116,7 @@ test-suite httpbun-tests
122 text >=0.2 && <2.1
116 text >=0.2 && <2.1
123
117
124 if flag(dev)
118 if flag(dev)
125− ghc-options: -O0 -Wall -Werror
119+ ghc-options: -Wall -Werror
126
120
127 else
121 else
128 ghc-options: -O2 -Wall
122 ghc-options: -O2 -Wall