X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Frename%2FRnIfaces.lhs;h=72fb264f358b48f1579bb163ad0a5bc57de6d032;hb=30cf375e0bc79a6b71074a5e0fd2ec393241a751;hp=299a1f34fdf9d0182f80c9ce673e41641f91660c;hpb=5cf27e8f1731c52fe63a5b9615f927484164c61b;p=ghc-hetmet.git diff --git a/ghc/compiler/rename/RnIfaces.lhs b/ghc/compiler/rename/RnIfaces.lhs index 299a1f3..72fb264 100644 --- a/ghc/compiler/rename/RnIfaces.lhs +++ b/ghc/compiler/rename/RnIfaces.lhs @@ -45,6 +45,7 @@ import Name ( moduleNamePair, origName, RdrName(..) ) import PprStyle -- ToDo:rm import Outputable -- ToDo:rm import PrelInfo ( builtinNameInfo ) +import PrelMods ( pRELUDE ) import Pretty import Maybes ( MaybeErr(..) ) import UniqFM ( emptyUFM ) @@ -211,7 +212,7 @@ mergeIfaces (ParsedIface mod1 (_, files1) _ _ _ _ _ _ fixes1 tdefs1 vdefs1 idefs ppStr "merged with", ppPStr mod1]) $ ASSERT(mod1 == mod2) ParsedIface mod1 - (True, unionBags files1 files2) + (True, unionBags files2 files1) (panic "mergeIface: module version numbers") (panic "mergeIface: source version numbers") -- Version numbers etc must be extracted from (panic "mergeIface: usage version numbers") -- the merged file interfaces named above @@ -759,12 +760,10 @@ rnIfaceInstStuff iface_cache modname us occ_env done_inst_env to_return = case lookupTcRnEnv occ_env nm of Just _ -> True Nothing -> -- maybe it's builtin - case nm of - Qual _ _ -> False - Unqual n -> - case (lookupFM b_tc_names n) of + let str_mod = case nm of { Qual m n -> (n,m); Unqual n -> (n, pRELUDE) } + in case (lookupFM b_tc_names str_mod) of Just _ -> True - Nothing -> maybeToBool (lookupFM b_keys n) + Nothing -> maybeToBool (lookupFM b_keys str_mod) (b_tc_names, b_keys) -- pretty UGLY ... = case builtinNameInfo of ((_,builtin_tcs),b_keys,_) -> (builtin_tcs,b_keys)