X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Frename%2FRnNames.lhs;h=d98dc2aca9d1b3a6477c4ae4e1b5674d74db472a;hb=39262efa1c066d97547ac72d8bd16a145ac3f359;hp=fa5b376210af71988698b08ce3dfe36c6e0e3bcb;hpb=cc471d7b068eebc8f8a02879bed71195d6661718;p=ghc-hetmet.git diff --git a/ghc/compiler/rename/RnNames.lhs b/ghc/compiler/rename/RnNames.lhs index fa5b376..d98dc2a 100644 --- a/ghc/compiler/rename/RnNames.lhs +++ b/ghc/compiler/rename/RnNames.lhs @@ -142,8 +142,7 @@ getGlobalNames (HsModule this_mod _ exports imports decls mod_loc) isQual rdr_name]) `thenRn_` -- PROCESS EXPORT LISTS - exportsFromAvail this_mod exports all_avails gbl_env - `thenRn` \ exported_avails -> + exportsFromAvail this_mod exports all_avails gbl_env `thenRn` \ exported_avails -> -- DONE returnRn (gbl_env, exported_avails, Just all_avails) @@ -164,14 +163,17 @@ getGlobalNames (HsModule this_mod _ exports imports decls mod_loc) | FixitySig name fixity _ <- nameEnvElts local_fixity_env, isLocallyDefined name ] - in - traceRn (text "fixity env" <+> vcat (map ppr (nameEnvElts local_fixity_env))) `thenRn_` - --- TIDY UP - let - export_env = ExportEnv exported_avails exported_fixities + -- CONSTRUCT RESULTS + export_mods = case exports of + Nothing -> [] + Just es -> [mod | IEModuleContents mod <- es, mod /= this_mod] + + export_env = ExportEnv exported_avails exported_fixities export_mods (_, global_avail_env) = all_avails in + traceRn (text "fixity env" <+> vcat (map ppr (nameEnvElts local_fixity_env))) `thenRn_` + returnRn (Just (export_env, gbl_env, local_fixity_env, global_avail_env)) } where