diff options
author | Edward Z. Yang <ezyang@cs.stanford.edu> | 2016-10-06 00:17:15 -0700 |
---|---|---|
committer | Edward Z. Yang <ezyang@cs.stanford.edu> | 2016-10-08 01:37:33 -0700 |
commit | 4e8a0607140b23561248a41aeaf837224aa6315b (patch) | |
tree | 8e03945afe5c40c13b41667e0175f14db15d0780 /compiler/rename | |
parent | 00b530d5402aaa37e4085ecdcae0ae54454736c1 (diff) | |
download | haskell-4e8a0607140b23561248a41aeaf837224aa6315b.tar.gz |
Distinguish between UnitId and InstalledUnitId.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Diffstat (limited to 'compiler/rename')
-rw-r--r-- | compiler/rename/RnNames.hs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/rename/RnNames.hs b/compiler/rename/RnNames.hs index e1258a3d0d..70c6b5fcad 100644 --- a/compiler/rename/RnNames.hs +++ b/compiler/rename/RnNames.hs @@ -358,6 +358,7 @@ calculateAvails dflags iface mod_safe' want_boot = | otherwise = dep_finsts deps pkg = moduleUnitId (mi_module iface) + ipkg = toInstalledUnitId pkg -- Does this import mean we now require our own pkg -- to be trusted? See Note [Trust Own Package] @@ -382,9 +383,9 @@ calculateAvails dflags iface mod_safe' want_boot = -- Imported module is from another package -- Dump the dependent modules -- Add the package imp_mod comes from to the dependent packages - ASSERT2( not (pkg `elem` (map fst $ dep_pkgs deps)) - , ppr pkg <+> ppr (dep_pkgs deps) ) - ([], (pkg, False) : dep_pkgs deps, False) + ASSERT2( not (ipkg `elem` (map fst $ dep_pkgs deps)) + , ppr ipkg <+> ppr (dep_pkgs deps) ) + ([], (ipkg, False) : dep_pkgs deps, False) in ImportAvails { imp_mods = emptyModuleEnv, -- this gets filled in later |