diff --git a/ghcide/ghcide.cabal b/ghcide/ghcide.cabal index ad9584e68b..54f417055e 100644 --- a/ghcide/ghcide.cabal +++ b/ghcide/ghcide.cabal @@ -71,7 +71,6 @@ library hiedb == 0.4.2.*, lsp-types ^>= 1.6.0.0, lsp ^>= 1.6.0.0 , - monoid-subclasses, mtl, optparse-applicative, parallel, @@ -230,6 +229,9 @@ library exposed-modules: Development.IDE.GHC.Compat.CPP + if impl(ghc >= 9) + ghc-options: -Wunused-packages + if flag(ekg) build-depends: ekg-wai, @@ -271,28 +273,15 @@ executable ghcide "-with-rtsopts=-I0 -A128M -T" main-is: Main.hs build-depends: - hiedb, - aeson, base == 4.*, data-default, - directory, extra, - filepath, gitrev, - safe-exceptions, - ghc, - hashable, lsp, lsp-types, - heapsize, - hie-bios, hls-plugin-api, ghcide, - lens, optparse-applicative, - hls-graph, - text, - unordered-containers, other-modules: Arguments Paths_ghcide @@ -322,6 +311,9 @@ executable ghcide ekg-wai, ekg-core, cpp-options: -DMONITORING_EKG + if impl(ghc >= 9) + ghc-options: -Wunused-packages + test-suite ghcide-tests type: exitcode-stdio-1.0 @@ -378,6 +370,8 @@ test-suite ghcide-tests record-hasfield if impl(ghc < 9.3) build-depends: ghc-typelits-knownnat + if impl(ghc >= 9) + ghc-options: -Wunused-packages hs-source-dirs: test/cabal test/exe test/src ghc-options: -threaded -Wall -Wno-name-shadowing -O0 -Wno-unticked-promoted-constructors main-is: Main.hs diff --git a/hls-graph/hls-graph.cabal b/hls-graph/hls-graph.cabal index b2f90f20f4..10c0cc4b32 100644 --- a/hls-graph/hls-graph.cabal +++ b/hls-graph/hls-graph.cabal @@ -76,7 +76,6 @@ library , js-flot , js-jquery , list-t - , primitive , stm , stm-containers , time @@ -91,7 +90,8 @@ library template-haskell if flag(stm-stats) cpp-options: -DSTM_STATS - + if impl(ghc >= 9) + ghc-options: -Wunused-packages ghc-options: -Wall -Wredundant-constraints -Wno-name-shadowing @@ -136,3 +136,5 @@ test-suite tests , text , unordered-containers build-tool-depends: hspec-discover:hspec-discover -any + if impl(ghc >= 9) + ghc-options: -Wunused-packages diff --git a/hls-plugin-api/hls-plugin-api.cabal b/hls-plugin-api/hls-plugin-api.cabal index 1e65328e77..4b451bda42 100644 --- a/hls-plugin-api/hls-plugin-api.cabal +++ b/hls-plugin-api/hls-plugin-api.cabal @@ -52,7 +52,6 @@ library , lsp ^>=1.6.0.0 , opentelemetry >=0.4 , optparse-applicative - , process , regex-tdfa >=1.3.1.0 , text , transformers @@ -70,6 +69,8 @@ library if flag(pedantic) ghc-options: -Werror + if impl(ghc >= 9) + ghc-options: -Wunused-packages default-language: Haskell2010 default-extensions: