[commit: ghc] master: Improve tc-tracing a bit (95324f0)

git at git.haskell.org git at git.haskell.org
Mon Jun 25 14:35:16 UTC 2018


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/95324f01636d0d15a94742b2f4ce43cf4c8af3e2/ghc

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

commit 95324f01636d0d15a94742b2f4ce43cf4c8af3e2
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Mon Jun 25 11:46:29 2018 +0100

    Improve tc-tracing a bit


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

95324f01636d0d15a94742b2f4ce43cf4c8af3e2
 compiler/typecheck/TcEnv.hs  | 2 +-
 compiler/typecheck/TcExpr.hs | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/compiler/typecheck/TcEnv.hs b/compiler/typecheck/TcEnv.hs
index 4ea49ad..a703e57 100644
--- a/compiler/typecheck/TcEnv.hs
+++ b/compiler/typecheck/TcEnv.hs
@@ -567,7 +567,7 @@ tc_extend_local_env top_lvl extra_env thing_inside
 -- The second argument of type TyVarSet is a set of type variables
 -- that are bound together with extra_env and should not be regarded
 -- as free in the types of extra_env.
-  = do  { traceTc "env2" (ppr extra_env)
+  = do  { traceTc "tc_extend_local_env" (ppr extra_env)
         ; env0 <- getLclEnv
         ; env1 <- tcExtendLocalTypeEnv env0 extra_env
         ; stage <- getStage
diff --git a/compiler/typecheck/TcExpr.hs b/compiler/typecheck/TcExpr.hs
index a4a005c..c638ab9 100644
--- a/compiler/typecheck/TcExpr.hs
+++ b/compiler/typecheck/TcExpr.hs
@@ -1636,6 +1636,10 @@ tcExprSig expr (CompleteSig { sig_bndr = poly_id, sig_loc = loc })
   = setSrcSpan loc $   -- Sets the location for the implication constraint
     do { (tv_prs, theta, tau) <- tcInstType tcInstSkolTyVars poly_id
        ; given <- newEvVars theta
+       ; traceTc "tcExprSig: CompleteSig" $
+         vcat [ text "poly_id:" <+> ppr poly_id <+> dcolon <+> ppr (idType poly_id)
+              , text "tv_prs:" <+> ppr tv_prs ]
+
        ; let skol_info = SigSkol ExprSigCtxt (idType poly_id) tv_prs
              skol_tvs  = map snd tv_prs
        ; (ev_binds, expr') <- checkConstraints skol_info skol_tvs given $



More information about the ghc-commits mailing list