From 0b1ca3f5cbbc9dd3b8cc8e6df566b3dd3effe928 Mon Sep 17 00:00:00 2001 From: simonpj Date: Fri, 10 Oct 2003 07:34:35 +0000 Subject: [PATCH] [project @ 2003-10-10 07:34:34 by simonpj] Wibbles --- ghc/compiler/iface/LoadIface.lhs | 9 +++++---- ghc/compiler/iface/TcIface.lhs | 9 +++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/ghc/compiler/iface/LoadIface.lhs b/ghc/compiler/iface/LoadIface.lhs index bbdc6b2..9110575 100644 --- a/ghc/compiler/iface/LoadIface.lhs +++ b/ghc/compiler/iface/LoadIface.lhs @@ -281,8 +281,9 @@ loadDecl ignore_prags mod decls_map (_version, decl) mk_new_bndr mb_parent occ = newGlobalBinder mod occ mb_parent loc loc = importedSrcLoc (moduleUserString mod) -zapIdInfo decl@(IfaceId { ifIdInfo = HasInfo _ }) = decl { ifIdInfo = DiscardedInfo } -zapIdInfo decl = decl +zapIdInfo decl@(IfaceId {ifIdInfo = HasInfo _}) = decl { ifIdInfo = DiscardedInfo } +zapIdInfo decl = decl + -- Don't alter "NoInfo", just "HasInfo" ----------------- ifaceDeclSubBndrs :: IfaceDecl -> [OccName] @@ -307,8 +308,8 @@ ifaceDeclSubBndrs (IfaceData {ifCons = DataCons cons}) ifaceDeclSubBndrs other = [] conDeclBndrs (IfaceConDecl con_occ _ _ _ _ fields) - = [con_occ, mkDataConWrapperOcc con_occ, mkDataConWorkerOcc con_occ] - ++ fields + = fields ++ + [con_occ, mkDataConWrapperOcc con_occ, mkDataConWorkerOcc con_occ] ----------------------------------------------------- diff --git a/ghc/compiler/iface/TcIface.lhs b/ghc/compiler/iface/TcIface.lhs index 8c2653d..92c8d38 100644 --- a/ghc/compiler/iface/TcIface.lhs +++ b/ghc/compiler/iface/TcIface.lhs @@ -112,12 +112,12 @@ tcImportDecl name = do { -- Make sure the interface is loaded ; let { nd_doc = ptext SLIT("Need decl for") <+> ppr name } - ; traceIf nd_doc + ; traceIf (nd_doc <+> char '{') -- Brace matches the later message ; loadHomeInterface nd_doc name -- Get the real name of the thing, with a correct nameParent field. - -- Before the interface is loaded, we may have a non-commital 'Nothing' in - -- the namePareent field (made up by IfaceEnv.lookupOrig), but + -- Before the interface is loaded, we may have a non-committal 'Nothing' + -- in the namePareent field (made up by IfaceEnv.lookupOrig), but -- loading the interface updates the name cache. -- We need the right nameParent field in getThing ; real_name <- lookupOrig (nameModuleName name) (nameOccName name) @@ -132,7 +132,7 @@ tcImportDecl name ; let { extra | getName main_thing == real_name = empty | otherwise = brackets (ptext SLIT("when seeking") <+> ppr real_name) } - ; traceIf (ptext SLIT("...imported decl for") <+> ppr main_thing <+> extra) + ; traceIf (ptext SLIT(" ...imported decl for") <+> ppr main_thing <+> extra <+> char '}') -- Look up the wanted Name in the type envt; it might be @@ -173,6 +173,7 @@ recordImportOf thing -- Now type-check those rules (which may side-effect the EPS again) ; traceIf (text "tcImport: extend type env" <+> ppr new_things) + ; traceIf (text "tcImport: rules" <+> vcat (map ppr iface_rules)) ; core_rules <- mapM tc_rule iface_rules ; updateEps_ (\ eps -> eps { eps_rule_base = extendRuleBaseList (eps_rule_base eps) core_rules } -- 1.7.10.4