Skip to content

Commit

Permalink
Add -Wunused-packages to the packages (haskell#9663)
Browse files Browse the repository at this point in the history
* Add -Wunused-packages to the packages

Cabal, Cabal-syntax, cabal-install, cabal-install-solver

* Remove unused text dependency

* remove unguarded warning

* Remove 8.10 condition for unused-packages

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
Kleidukos and mergify[bot] committed Feb 13, 2024
1 parent 0cc5925 commit 3d3622f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Cabal-syntax/Cabal-syntax.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 3 additions & 1 deletion Cabal/Cabal.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions cabal-install-solver/cabal-install-solver.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ library

if impl(ghc <8.8)
ghc-options: -Wnoncanonical-monadfail-instances

if impl(ghc >=8.10)
ghc-options: -Wunused-packages

Expand Down
2 changes: 2 additions & 0 deletions cabal-install/cabal-install.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 3d3622f

Please sign in to comment.