X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcRnTypes.lhs;h=a72caa48556b39d9c4ff4538784b9dbf0bd069d9;hp=0ef30a847bbb7f1dfe93a03c6aa432208167af48;hb=526c3af1dc98987b6949f4df73c0debccf9875bd;hpb=842e9d6628a27cf1f420d53f6a5901935dc50c54 diff --git a/compiler/typecheck/TcRnTypes.lhs b/compiler/typecheck/TcRnTypes.lhs index 0ef30a8..a72caa4 100644 --- a/compiler/typecheck/TcRnTypes.lhs +++ b/compiler/typecheck/TcRnTypes.lhs @@ -517,7 +517,7 @@ It is used * when processing the export list \begin{code} data ImportAvails = ImportAvails { - imp_mods :: ModuleEnv (Module, [(ModuleName, Bool, SrcSpan)]), + imp_mods :: ModuleEnv [(ModuleName, Bool, SrcSpan)], -- Domain is all directly-imported modules -- The ModuleName is what the module was imported as, e.g. in -- import Foo as Bar @@ -526,8 +526,6 @@ data ImportAvails -- True => import was "import Foo ()" -- False => import was some other form -- - -- We need the Module in the range because we can't get - -- the keys of a ModuleEnv -- Used -- (a) to help construct the usage information in -- the interface file; if we import somethign we @@ -584,13 +582,12 @@ plusImportAvails (ImportAvails { imp_mods = mods2, imp_dep_mods = dmods2, imp_dep_pkgs = dpkgs2, imp_orphs = orphs2, imp_finsts = finsts2 }) - = ImportAvails { imp_mods = plusModuleEnv_C plus_mod mods1 mods2, + = ImportAvails { imp_mods = plusModuleEnv_C (++) mods1 mods2, imp_dep_mods = plusUFM_C plus_mod_dep dmods1 dmods2, imp_dep_pkgs = dpkgs1 `unionLists` dpkgs2, imp_orphs = orphs1 `unionLists` orphs2, imp_finsts = finsts1 `unionLists` finsts2 } where - plus_mod (m1, xs1) (_, xs2) = (m1, xs1 ++ xs2) plus_mod_dep (m1, boot1) (m2, boot2) = WARN( not (m1 == m2), (ppr m1 <+> ppr m2) $$ (ppr boot1 <+> ppr boot2) ) -- Check mod-names match