File tree 1 file changed +2
-7
lines changed
ghcide/src/Development/IDE/Plugin/CodeAction
1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,6 @@ import Language.Haskell.LSP.Types
32
32
import OccName
33
33
import Outputable (ppr , showSDocUnsafe )
34
34
import Data.Generics (listify )
35
- import Development.IDE.Spans.Common (showNameWithoutUniques )
36
35
37
36
------------------------------------------------------------------------------
38
37
@@ -214,9 +213,7 @@ extendImportTopLevel df idnetifier (L l it@ImportDecl {..})
214
213
top <- uniqueSrcSpanT
215
214
rdr <- liftParseAST df idnetifier
216
215
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
220
217
when alreadyImported $
221
218
lift (Left $ idnetifier <> " already imported" )
222
219
@@ -266,9 +263,7 @@ extendImportViaParent df parent child (L l it@ImportDecl {..})
266
263
srcChild <- uniqueSrcSpanT
267
264
childRdr <- liftParseAST df child
268
265
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'
272
267
when alreadyImported $
273
268
lift (Left $ child <> " already included in " <> parent <> " imports" )
274
269
You can’t perform that action at this time.
0 commit comments