Skip to content

Commit b0e4621

Browse files
committed
Strip qualifiers properly
1 parent 5baf6e5 commit b0e4621

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

ghcide/src/Development/IDE/Plugin/CodeAction/ExactPrint.hs

+2-7
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ import Language.Haskell.LSP.Types
3232
import OccName
3333
import Outputable (ppr, showSDocUnsafe)
3434
import Data.Generics (listify)
35-
import Development.IDE.Spans.Common (showNameWithoutUniques)
3635

3736
------------------------------------------------------------------------------
3837

@@ -214,9 +213,7 @@ extendImportTopLevel df idnetifier (L l it@ImportDecl {..})
214213
top <- uniqueSrcSpanT
215214
rdr <- liftParseAST df idnetifier
216215

217-
let alreadyImported =
218-
showNameWithoutUniques rdr `elem`
219-
map (showNameWithoutUniques @RdrName) (listify (const True) lies)
216+
let alreadyImported = occName (unLoc rdr) `elem` listify (const True) lies
220217
when alreadyImported $
221218
lift (Left $ idnetifier <> " already imported")
222219

@@ -266,9 +263,7 @@ extendImportViaParent df parent child (L l it@ImportDecl {..})
266263
srcChild <- uniqueSrcSpanT
267264
childRdr <- liftParseAST df child
268265

269-
let alreadyImported =
270-
showNameWithoutUniques childRdr `elem`
271-
map (showNameWithoutUniques @RdrName) (listify (const True) lies')
266+
let alreadyImported = occName (unLoc childRdr) `elem` listify (const True) lies'
272267
when alreadyImported $
273268
lift (Left $ child <> " already included in " <> parent <> " imports")
274269

0 commit comments

Comments
 (0)