Skip to content

Commit 160a017

Browse files
committed
clean uP
1 parent dcfdbfc commit 160a017

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

ghcide/src/Development/IDE/Plugin/Completions.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ getCompletionsLSP ide plId
146146
let compls = (fst <$> localCompls) <> (fst <$> nonLocalCompls) <> Just exportsCompls
147147
pure (opts, fmap (,pm,binds) compls, moduleExports)
148148
case compls of
149-
(Just (cci', parsedMod, bindMap)) -> do
149+
Just (cci', parsedMod, bindMap) -> do
150150
pfix <- VFS.getCompletionPrefix position cnts
151151
case (pfix, completionContext) of
152152
(Just (VFS.PosPrefixInfo _ "" _ _), Just CompletionContext { _triggerCharacter = Just "."})

ghcide/src/Development/IDE/Plugin/Completions/Logic.hs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ import Development.IDE.Spans.LocalBindings
5555
import Development.IDE.Types.Exports
5656
import Development.IDE.Types.HscEnvEq
5757
import Development.IDE.Types.Options
58-
import GhcPlugins (flLabel, unpackFS, lookupWithDefaultUFM)
58+
import GhcPlugins (flLabel, unpackFS)
5959
import Ide.PluginUtils (mkLspCommand)
6060
import Ide.Types (CommandId (..),
6161
PluginId)
@@ -65,7 +65,6 @@ import qualified Language.LSP.VFS as VFS
6565
import Outputable (Outputable)
6666
import TyCoRep
6767

68-
6968
-- From haskell-ide-engine/hie-plugin-api/Haskell/Ide/Engine/Context.hs
7069

7170
-- | A context of a declaration in the program
@@ -638,8 +637,7 @@ getCompletions plId ideOpts CC {allModNamesAsNS, anyQualCompls, unqualCompls, qu
638637
funcs = HM.findWithDefault [] (T.pack moduleName) exportsMap
639638
return (map (mkModuleFunctionImport (T.pack moduleName)) funcs)
640639
| "import " `T.isPrefixOf` fullLine
641-
-> do
642-
return filtImportCompls
640+
-> return filtImportCompls
643641
-- we leave this condition here to avoid duplications and return empty list
644642
-- since HLS implements this completion (#haskell-language-server/pull/662)
645643
| "{-# language" `T.isPrefixOf` T.toLower fullLine
@@ -669,7 +667,6 @@ uniqueCompl x y =
669667
then EQ
670668
else compare (insertText x) (insertText y)
671669
other -> other
672-
673670
-- ---------------------------------------------------------------------
674671
-- helper functions for pragmas
675672
-- ---------------------------------------------------------------------
@@ -830,3 +827,4 @@ getImportQual :: LImportDecl GhcPs -> Maybe T.Text
830827
getImportQual (L _ imp)
831828
| isQualifiedImport imp = Just $ T.pack $ moduleNameString $ maybe (unLoc $ ideclName imp) unLoc (ideclAs imp)
832829
| otherwise = Nothing
830+

0 commit comments

Comments
 (0)