From b43c4c32b8c57abdbf0ecfabf81854379a5aa5b6 Mon Sep 17 00:00:00 2001 From: Neil Mitchell Date: Sun, 10 May 2020 14:20:22 +0100 Subject: [PATCH] #983, avoid converting module names to strings once more --- src/GHC/Util/Scope.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/GHC/Util/Scope.hs b/src/GHC/Util/Scope.hs index c548d69ba..dd7962b62 100644 --- a/src/GHC/Util/Scope.hs +++ b/src/GHC/Util/Scope.hs @@ -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