Skip to content

Commit

Permalink
#983, avoid converting module names to strings once more
Browse files Browse the repository at this point in the history
  • Loading branch information
ndmitchell committed May 10, 2020
1 parent 1559650 commit b43c4c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/GHC/Util/Scope.hs
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ possModules (Scope is) x = f x
possImport :: LImportDecl GhcPs -> Located RdrName -> Bool
possImport i n | isSpecial' n = False
possImport (L _ i) (L _ (Qual mod x)) =
moduleNameString mod `elem` map fromModuleName' ms && possImport (noLoc i{ideclQualified=NotQualified}) (noLoc $ mkRdrUnqual x)
where ms = ideclName i : maybeToList (ideclAs i)
mod `elem` ms && possImport (noLoc i{ideclQualified=NotQualified}) (noLoc $ mkRdrUnqual x)
where ms = map unLoc $ ideclName i : maybeToList (ideclAs i)
possImport (L _ i) (L _ (Unqual x)) = ideclQualified i == NotQualified && maybe True f (ideclHiding i)
where
f :: (Bool, Located [LIE GhcPs]) -> Bool
Expand Down

0 comments on commit b43c4c3

Please sign in to comment.