diff --git a/plugins/hls-module-name-plugin/hls-module-name-plugin.cabal b/plugins/hls-module-name-plugin/hls-module-name-plugin.cabal index f251571e35..671e2af351 100644 --- a/plugins/hls-module-name-plugin/hls-module-name-plugin.cabal +++ b/plugins/hls-module-name-plugin/hls-module-name-plugin.cabal @@ -23,7 +23,11 @@ source-repository head type: git location: https://github.com/haskell/haskell-language-server.git +common warnings + ghc-options: -Wall -Wunused-packages + library + import: warnings exposed-modules: Ide.Plugin.ModuleName hs-source-dirs: src build-depends: @@ -37,11 +41,11 @@ library , lsp , text , transformers - , unordered-containers default-language: Haskell2010 test-suite tests + import: warnings type: exitcode-stdio-1.0 default-language: Haskell2010 hs-source-dirs: test diff --git a/plugins/hls-module-name-plugin/src/Ide/Plugin/ModuleName.hs b/plugins/hls-module-name-plugin/src/Ide/Plugin/ModuleName.hs index 2be69dcfcc..83f73ab4ff 100644 --- a/plugins/hls-module-name-plugin/src/Ide/Plugin/ModuleName.hs +++ b/plugins/hls-module-name-plugin/src/Ide/Plugin/ModuleName.hs @@ -2,7 +2,6 @@ {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE RecordWildCards #-} -{-# LANGUAGE TypeOperators #-} {-# LANGUAGE ViewPatterns #-} {-# OPTIONS_GHC -Wall -Wwarn -fno-warn-type-defaults #-} @@ -133,7 +132,7 @@ action recorder state uri = do | emptyModule -> let code = "module " <> bestName <> " where\n" in pure [Replace uri (Range (Position 0 0) (Position 0 0)) code code] - _ -> pure $ [] + _ -> pure [] -- | Possible module names, as derived by the position of the module in the -- source directories. There may be more than one possible name, if the source diff --git a/plugins/hls-module-name-plugin/test/Main.hs b/plugins/hls-module-name-plugin/test/Main.hs index ae5a87f0d5..de3e71d8be 100644 --- a/plugins/hls-module-name-plugin/test/Main.hs +++ b/plugins/hls-module-name-plugin/test/Main.hs @@ -55,7 +55,6 @@ tests = let edit = TextEdit (mkRange 1 0 1 0) "f =" _ <- applyEdit doc edit newLens <- getCodeLenses doc - txt <- documentContents doc liftIO $ newLens @?= oldLens closeDoc doc ] diff --git a/plugins/hls-overloaded-record-dot-plugin/hls-overloaded-record-dot-plugin.cabal b/plugins/hls-overloaded-record-dot-plugin/hls-overloaded-record-dot-plugin.cabal index a6c460c83d..4138cb87ec 100644 --- a/plugins/hls-overloaded-record-dot-plugin/hls-overloaded-record-dot-plugin.cabal +++ b/plugins/hls-overloaded-record-dot-plugin/hls-overloaded-record-dot-plugin.cabal @@ -19,7 +19,7 @@ source-repository head location: https://github.com/haskell/haskell-language-server common warnings - ghc-options: -Wall + ghc-options: -Wall -Wunused-packages library import: warnings @@ -35,8 +35,6 @@ library , text , syb , transformers - , ghc-boot-th - , unordered-containers , containers , deepseq hs-source-dirs: src @@ -51,13 +49,7 @@ test-suite tests build-depends: , base , filepath - , ghcide , text , hls-overloaded-record-dot-plugin - , hls-plugin-api - , lens - , lsp-test - , lsp-types - , row-types , hls-test-utils