summaryrefslogtreecommitdiff
path: root/compiler/GHC/Rename
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/Rename')
-rw-r--r--compiler/GHC/Rename/Module.hs4
-rw-r--r--compiler/GHC/Rename/Names.hs2
2 files changed, 3 insertions, 3 deletions
diff --git a/compiler/GHC/Rename/Module.hs b/compiler/GHC/Rename/Module.hs
index deee12a726..533a794807 100644
--- a/compiler/GHC/Rename/Module.hs
+++ b/compiler/GHC/Rename/Module.hs
@@ -373,8 +373,8 @@ rnHsForeignDecl (ForeignImport { fd_name = name, fd_sig_ty = ty, fd_fi = spec })
; (ty', fvs) <- rnHsSigType (ForeignDeclCtx name) TypeLevel Nothing ty
-- Mark any PackageTarget style imports as coming from the current package
- ; let unitId = thisPackage $ hsc_dflags topEnv
- spec' = patchForeignImport unitId spec
+ ; let unitId = homeUnit $ hsc_dflags topEnv
+ spec' = patchForeignImport unitId spec
; return (ForeignImport { fd_i_ext = noExtField
, fd_name = name', fd_sig_ty = ty'
diff --git a/compiler/GHC/Rename/Names.hs b/compiler/GHC/Rename/Names.hs
index ccc72bac36..69c0746646 100644
--- a/compiler/GHC/Rename/Names.hs
+++ b/compiler/GHC/Rename/Names.hs
@@ -448,7 +448,7 @@ calculateAvails dflags iface mod_safe' want_boot imported_by =
ptrust = trust == Sf_Trustworthy || trust_pkg
(dependent_mods, dependent_pkgs, pkg_trust_req)
- | pkg == thisPackage dflags =
+ | pkg == homeUnit dflags =
-- Imported module is from the home package
-- Take its dependent modules and add imp_mod itself
-- Take its dependent packages unchanged