diff --git a/Cabal-syntax/Cabal-syntax.cabal b/Cabal-syntax/Cabal-syntax.cabal index d4e1a75f9fc..9d402b0c8d5 100644 --- a/Cabal-syntax/Cabal-syntax.cabal +++ b/Cabal-syntax/Cabal-syntax.cabal @@ -53,6 +53,9 @@ library if impl(ghc >= 8.0) && impl(ghc < 8.8) ghc-options: -Wnoncanonical-monadfail-instances + if impl(ghc >= 8.10) + ghc-options: -Wunused-packages + build-tool-depends: alex:alex exposed-modules: diff --git a/Cabal/Cabal.cabal b/Cabal/Cabal.cabal index 6f1586cffd0..42f0a298984 100644 --- a/Cabal/Cabal.cabal +++ b/Cabal/Cabal.cabal @@ -59,6 +59,9 @@ library if impl(ghc >= 8.0) && impl(ghc < 8.8) ghc-options: -Wnoncanonical-monadfail-instances + if impl(ghc >= 8.10) + ghc-options: -Wunused-packages + exposed-modules: Distribution.Backpack.Configure Distribution.Backpack.ComponentsGraph @@ -306,7 +309,6 @@ library -- See also https://github.com/ekmett/transformers-compat/issues/35 transformers (>= 0.3 && < 0.4) || (>=0.4.1.0 && <0.7), mtl >= 2.1 && < 2.4, - text (>= 1.2.3.0 && < 1.3) || (>= 2.0 && < 2.2), parsec >= 3.1.13.0 && < 3.2 other-modules: diff --git a/cabal-install-solver/cabal-install-solver.cabal b/cabal-install-solver/cabal-install-solver.cabal index 2f1e8d6bdf1..95cb28206ec 100644 --- a/cabal-install-solver/cabal-install-solver.cabal +++ b/cabal-install-solver/cabal-install-solver.cabal @@ -42,6 +42,7 @@ library if impl(ghc <8.8) ghc-options: -Wnoncanonical-monadfail-instances + if impl(ghc >=8.10) ghc-options: -Wunused-packages diff --git a/cabal-install/cabal-install.cabal b/cabal-install/cabal-install.cabal index 72764c89eb9..38401ed7adb 100644 --- a/cabal-install/cabal-install.cabal +++ b/cabal-install/cabal-install.cabal @@ -40,8 +40,10 @@ Flag lukko common warnings ghc-options: -Wall -Wcompat -Wnoncanonical-monad-instances -Wincomplete-uni-patterns -Wincomplete-record-updates + if impl(ghc < 8.8) ghc-options: -Wnoncanonical-monadfail-instances + if impl(ghc >=9.0) -- Warning: even though introduced with GHC 8.10, -Wunused-packages -- gives false positives with GHC 8.10.