X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Frename%2FRename.lhs;h=409abef3c9f3e2407da158b2faa11791c2c29fcd;hb=30cf375e0bc79a6b71074a5e0fd2ec393241a751;hp=743c83d1253eb30bc3c964f0216a607cceb02fde;hpb=f3998ec18fd0f3d56b377d41e2a2958aaf9460ec;p=ghc-hetmet.git diff --git a/ghc/compiler/rename/Rename.lhs b/ghc/compiler/rename/Rename.lhs index 743c83d..409abef 100644 --- a/ghc/compiler/rename/Rename.lhs +++ b/ghc/compiler/rename/Rename.lhs @@ -14,7 +14,7 @@ import Ubiq import HsSyn import RdrHsSyn ( RdrNameHsModule(..), RdrNameImportDecl(..) ) -import RnHsSyn ( RnName, RenamedHsModule(..), isRnTyConOrClass, isRnWired ) +import RnHsSyn ( RnName(..){-.. is for Ix hack only-}, RenamedHsModule(..), isRnTyConOrClass, isRnWired ) --ToDo:rm: all for debugging only import Maybes @@ -43,6 +43,7 @@ import Maybes ( catMaybes ) import Name ( isLocallyDefined, mkBuiltinName, Name, RdrName(..) ) import PrelInfo ( builtinNameInfo, BuiltinNames(..), BuiltinKeys(..) ) import PrelMods ( pRELUDE ) +import Unique ( ixClassKey ) import UniqFM ( emptyUFM, lookupUFM, addListToUFM_C, eltsUFM ) import UniqSupply ( splitUniqSupply ) import Util ( panic, assertPanic ) @@ -163,15 +164,14 @@ renameModule us input@(HsModule mod _ _ imports _ _ _ _ _ _ _ _ _ _) pair_orig rn = (origName rn, rn) - -- we must ensure that the definitions of things in the BuiltinKey - -- table which may be *required* by the typechecker etc are read. - must_haves - = [ name_fn (mkBuiltinName u pRELUDE str) - | (str, (u, name_fn)) <- fmToList b_keys, + = [ name_fn (mkBuiltinName u mod str) + | ((str, mod), (u, name_fn)) <- fmToList b_keys, str `notElem` [ SLIT("main"), SLIT("mainPrimIO")] ] in - ASSERT (isEmptyBag orig_occ_dups) +-- ASSERT (isEmptyBag orig_occ_dups) + (if (isEmptyBag orig_occ_dups) then \x->x + else pprTrace "orig_occ_dups:" (ppAboves [ ppCat [ppr PprDebug m, ppr PprDebug n, ppr PprDebug o] | (m,n,o) <- bagToList orig_occ_dups])) $ ASSERT (isEmptyBag orig_def_dups) rnIfaces iface_cache imp_mods us3 orig_def_env orig_occ_env