Skip to content

Commit a844fa0

Browse files
author
Ishmum Jawad Khan
committed
[refactor] unused values removed
1 parent 6fdb676 commit a844fa0

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

plugins/default/src/Ide/Plugin/Pragmas.hs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import Control.Applicative ((<|>))
1515
import qualified Data.HashMap.Strict as H
1616
import qualified Data.Text as T
1717
import Data.Maybe (listToMaybe, fromMaybe)
18-
import Data.List (findIndex)
1918
import Development.IDE as D
2019
import Ide.Types
2120
import Language.Haskell.LSP.Types
@@ -52,14 +51,13 @@ mkPragmaEdit uri pragmaName rng = res where
5251
-- | Offer to add a missing Language Pragma to the top of a file.
5352
-- Pragmas are defined by a curated list of known pragmas, see 'possiblePragmas'.
5453
codeActionProvider :: CodeActionProvider IdeState
55-
codeActionProvider lsp state _plId docId _ (J.CodeActionContext (J.List diags) _monly) = do
54+
codeActionProvider _ state _plId docId _ (J.CodeActionContext (J.List diags) _monly) = do
5655
let mFile = docId ^. J.uri & uriToFilePath <&> toNormalizedFilePath'
5756
pm <- fmap join $ runAction "addPragma" state $ getParsedModule `traverse` mFile
5857
let dflags = ms_hspp_opts . pm_mod_summary <$> pm
5958
-- Get all potential Pragmas for all diagnostics.
6059
pragmas = nubOrd $ concatMap (\d -> genPragma dflags (d ^. J.message)) diags
61-
somh = startOfModuleHeader pm
62-
loc = Position somh 0
60+
loc = Position (startOfModuleHeader pm) 0
6361
rng = Range loc loc
6462
cmds <- mapM (mkCodeAction rng) pragmas
6563
return $ Right $ List cmds

0 commit comments

Comments
 (0)