Skip to content

Commit 4282bfe

Browse files
committed
Only enable -Wunused-packages when ghc >=9
1 parent ca2a6ad commit 4282bfe

File tree

5 files changed

+16
-8
lines changed

5 files changed

+16
-8
lines changed

Cabal-syntax/Cabal-syntax.cabal

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ library
5959
if impl(ghc >= 8.0) && impl(ghc < 8.8)
6060
ghc-options: -Wnoncanonical-monadfail-instances
6161

62-
if impl(ghc >= 8.10)
62+
-- Warning: even though introduced with GHC 8.10, -Wunused-packages gives
63+
-- false positives with GHC 8.10.
64+
if impl(ghc >= 9)
6365
ghc-options: -Wunused-packages
6466

6567
build-tool-depends: alex:alex

Cabal/Cabal.cabal

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ library
6565
if impl(ghc >= 8.0) && impl(ghc < 8.8)
6666
ghc-options: -Wnoncanonical-monadfail-instances
6767

68-
if impl(ghc >= 8.10)
68+
-- Warning: even though introduced with GHC 8.10, -Wunused-packages gives
69+
-- false positives with GHC 8.10.
70+
if impl(ghc >= 9)
6971
ghc-options: -Wunused-packages
7072

7173
exposed-modules:

cabal-install-solver/cabal-install-solver.cabal

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,12 @@ library
4040
-Wall -Wcompat -Wnoncanonical-monad-instances
4141
-fwarn-tabs -fwarn-incomplete-uni-patterns
4242

43-
if impl(ghc <8.8)
43+
if impl(ghc < 8.8)
4444
ghc-options: -Wnoncanonical-monadfail-instances
4545

46-
if impl(ghc >=8.10)
46+
-- Warning: even though introduced with GHC 8.10, -Wunused-packages gives
47+
-- false positives with GHC 8.10.
48+
if impl(ghc >= 9)
4749
ghc-options: -Wunused-packages
4850

4951
exposed-modules:

cabal-install/cabal-install.cabal

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ common warnings
5151
if impl(ghc < 8.8)
5252
ghc-options: -Wnoncanonical-monadfail-instances
5353

54-
if impl(ghc >=9.0)
55-
-- Warning: even though introduced with GHC 8.10, -Wunused-packages
56-
-- gives false positives with GHC 8.10.
54+
-- Warning: even though introduced with GHC 8.10, -Wunused-packages gives
55+
-- false positives with GHC 8.10.
56+
if impl(ghc >= 9)
5757
ghc-options: -Wunused-packages
5858

5959
common base-dep

project-cabal/ghc-options.config

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ program-options
33
-fno-ignore-asserts
44
-Werror
55

6-
if impl(ghc >= 8.10)
6+
-- Warning: even though introduced with GHC 8.10, -Wunused-packages gives false
7+
-- positives with GHC 8.10.
8+
if impl(ghc >= 9)
79
program-options
810
ghc-options: -Wunused-packages
911
package cabal-testsuite

0 commit comments

Comments
 (0)