summaryrefslogtreecommitdiff
path: root/compiler/GHC/Rename/Module.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/Rename/Module.hs')
-rw-r--r--compiler/GHC/Rename/Module.hs4
1 files changed, 2 insertions, 2 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'