Skip to content

Commit f96f6b4

Browse files
jhrcekjosephsumabat
authored andcommitted
Fix -Wunused-packages in hls-cabal-plugin (haskell#3977)
1 parent 7f4b1ae commit f96f6b4

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

Diff for: plugins/hls-cabal-plugin/hls-cabal-plugin.cabal

+1-4
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ extra-source-files:
2020
test/testdata/simple-cabal/simple-cabal.cabal
2121

2222
common warnings
23-
ghc-options: -Wall
23+
ghc-options: -Wall -Wunused-packages
2424

2525
library
2626
import: warnings
@@ -80,15 +80,12 @@ test-suite tests
8080
, base
8181
, bytestring
8282
, Cabal-syntax >= 3.7
83-
, directory
8483
, filepath
85-
, ghcide
8684
, hls-cabal-plugin
8785
, hls-test-utils == 2.6.0.0
8886
, lens
8987
, lsp
9088
, lsp-types
91-
, tasty-hunit
9289
, text
9390
, text-rope
9491
, transformers

Diff for: plugins/hls-cabal-plugin/src/Ide/Plugin/Cabal.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ completion recorder ide _ complParams = do
286286
(Just cnts, Just path) -> do
287287
pref <- VFS.getCompletionPrefix position cnts
288288
let res = result pref path cnts
289-
liftIO $ fmap (InL) res
289+
liftIO $ fmap InL res
290290
_ -> pure . InR $ InR Null
291291
where
292292
result :: Maybe VFS.PosPrefixInfo -> FilePath -> VFS.VirtualFile -> IO [CompletionItem]

Diff for: plugins/hls-cabal-plugin/test/Context.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ getContextTests =
7878
, testCase "Cabal version keyword - no value, many spaces" $ do
7979
-- on a file, where the "cabal-version:" keyword is already written
8080
-- the context should still be top level but the keyword should be recognized
81-
ctx <- callGetContext (Position 0 45) ("") ["cabal-version:" <> T.replicate 50 " "]
81+
ctx <- callGetContext (Position 0 45) "" ["cabal-version:" <> T.replicate 50 " "]
8282
ctx @?= (TopLevel, KeyWord "cabal-version:")
8383
, testCase "Cabal version keyword - keyword partly written" $ do
8484
-- in the first line of the file, if the keyword

0 commit comments

Comments
 (0)