diff options
Diffstat (limited to 'compiler/GHC/Types/Name.hs')
-rw-r--r-- | compiler/GHC/Types/Name.hs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/GHC/Types/Name.hs b/compiler/GHC/Types/Name.hs index 4a03a5bfc9..6cdf6513d6 100644 --- a/compiler/GHC/Types/Name.hs +++ b/compiler/GHC/Types/Name.hs @@ -87,6 +87,7 @@ import {-# SOURCE #-} GHC.Core.TyCo.Rep( TyThing ) import GHC.Platform import GHC.Types.Name.Occurrence import GHC.Unit.Module +import GHC.Unit.Home import GHC.Types.SrcLoc import GHC.Types.Unique import GHC.Utils.Misc @@ -338,10 +339,10 @@ nameIsHomePackageImport this_mod -- | Returns True if the Name comes from some other package: neither this -- package nor the interactive package. -nameIsFromExternalPackage :: Unit -> Name -> Bool -nameIsFromExternalPackage this_unit name +nameIsFromExternalPackage :: HomeUnit -> Name -> Bool +nameIsFromExternalPackage home_unit name | Just mod <- nameModule_maybe name - , moduleUnit mod /= this_unit -- Not the current unit + , notHomeModule home_unit mod -- Not the current unit , not (isInteractiveModule mod) -- Not the 'interactive' package = True | otherwise |