[commit: ghc] wip/pattern-synonyms: Comments and tracing only (fd75cea)

git at git.haskell.org git at git.haskell.org
Sun May 25 07:22:53 UTC 2014


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/pattern-synonyms
Link       : http://ghc.haskell.org/trac/ghc/changeset/fd75ceae17d99e183c7c43c1b94511f21839da3d/ghc

>---------------------------------------------------------------

commit fd75ceae17d99e183c7c43c1b94511f21839da3d
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Tue Apr 29 13:11:51 2014 +0100

    Comments and tracing only


>---------------------------------------------------------------

fd75ceae17d99e183c7c43c1b94511f21839da3d
 compiler/coreSyn/CorePrep.lhs | 1 +
 compiler/iface/LoadIface.lhs  | 3 ++-
 compiler/main/TidyPgm.lhs     | 2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/compiler/coreSyn/CorePrep.lhs b/compiler/coreSyn/CorePrep.lhs
index 60cb60e..c754aae 100644
--- a/compiler/coreSyn/CorePrep.lhs
+++ b/compiler/coreSyn/CorePrep.lhs
@@ -196,6 +196,7 @@ corePrepTopBinds initialCorePrepEnv binds
 
 mkDataConWorkers :: [TyCon] -> [CoreBind]
 -- See Note [Data constructor workers]
+-- c.f. Note [Injecting implicit bindings] in TidyPgm
 mkDataConWorkers data_tycons
   = [ NonRec id (Var id)        -- The ice is thin here, but it works
     | tycon <- data_tycons,     -- CorePrep will eta-expand it
diff --git a/compiler/iface/LoadIface.lhs b/compiler/iface/LoadIface.lhs
index 2824d92..30b2f0b 100644
--- a/compiler/iface/LoadIface.lhs
+++ b/compiler/iface/LoadIface.lhs
@@ -417,7 +417,6 @@ loadDecl ignore_prags mod (_version, decl)
   = do  {       -- Populate the name cache with final versions of all 
                 -- the names associated with the decl
           main_name      <- lookupOrig mod (ifName decl)
---        ; traceIf (text "Loading decl for " <> ppr main_name)
 
         -- Typecheck the thing, lazily
         -- NB. Firstly, the laziness is there in case we never need the
@@ -491,6 +490,8 @@ loadDecl ignore_prags mod (_version, decl)
                              pprPanic "loadDecl" (ppr main_name <+> ppr n $$ ppr (decl))
 
         ; implicit_names <- mapM (lookupOrig mod) (ifaceDeclImplicitBndrs decl)
+
+--         ; traceIf (text "Loading decl for " <> ppr main_name $$ ppr implicit_names)
         ; return $ (main_name, thing) :
                       -- uses the invariant that implicit_names and
                       -- implictTyThings are bijective
diff --git a/compiler/main/TidyPgm.lhs b/compiler/main/TidyPgm.lhs
index b299015..e974c82 100644
--- a/compiler/main/TidyPgm.lhs
+++ b/compiler/main/TidyPgm.lhs
@@ -562,7 +562,7 @@ Oh: two other reasons for injecting them late:
 There is one sort of implicit binding that is injected still later,
 namely those for data constructor workers. Reason (I think): it's
 really just a code generation trick.... binding itself makes no sense.
-See CorePrep Note [Data constructor workers].
+See Note [Data constructor workers] in CorePrep.
 
 \begin{code}
 getTyConImplicitBinds :: TyCon -> [CoreBind]



More information about the ghc-commits mailing list