Skip to content

Commit 183f84b

Browse files
committed
Strip qualifiers properly
1 parent f5488e9 commit 183f84b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,8 @@ extendImportTopLevel df idnetifier (L l it@ImportDecl {..})
203203
rdr <- liftParseAST df idnetifier
204204

205205
let alreadyImported =
206-
showNameWithoutUniques rdr `elem`
207-
map (showNameWithoutUniques @RdrName) (listify (const True) lies)
206+
showNameWithoutUniques (occName (unLoc rdr)) `elem`
207+
map (showNameWithoutUniques @OccName) (listify (const True) lies)
208208
when alreadyImported $
209209
lift (Left $ idnetifier <> " already imported")
210210

@@ -255,8 +255,8 @@ extendImportViaParent df parent child (L l it@ImportDecl {..})
255255
childRdr <- liftParseAST df child
256256

257257
let alreadyImported =
258-
showNameWithoutUniques childRdr `elem`
259-
map (showNameWithoutUniques @RdrName) (listify (const True) lies')
258+
showNameWithoutUniques(occName (unLoc childRdr)) `elem`
259+
map (showNameWithoutUniques @OccName) (listify (const True) lies')
260260
when alreadyImported $
261261
lift (Left $ child <> " already included in " <> parent <> " imports")
262262

0 commit comments

Comments
 (0)