[commit: ghc] master: tc-tracing only (a434bcb)

git at git.haskell.org git at git.haskell.org
Wed Jul 25 11:26:07 UTC 2018


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

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

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

commit a434bcbc8049f3f98a1312f3001c93d415b5c4ae
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Wed Jul 25 11:52:44 2018 +0100

    tc-tracing only


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

a434bcbc8049f3f98a1312f3001c93d415b5c4ae
 compiler/typecheck/FunDeps.hs    | 9 ++++++++-
 compiler/typecheck/TcInteract.hs | 3 ++-
 compiler/typecheck/TcSimplify.hs | 5 ++++-
 3 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/compiler/typecheck/FunDeps.hs b/compiler/typecheck/FunDeps.hs
index c8f0b1d..4052ccb 100644
--- a/compiler/typecheck/FunDeps.hs
+++ b/compiler/typecheck/FunDeps.hs
@@ -283,7 +283,14 @@ improveClsFD clas_tvs fd
                   -> []
 
                   | otherwise
-                  -> [(meta_tvs, fdeqs)]
+                  -> -- pprTrace "iproveClsFD" (vcat
+                     --  [ text "is_tvs =" <+> ppr qtvs
+                     --  , text "tys_inst =" <+> ppr tys_inst
+                     --  , text "tys_actual =" <+> ppr tys_actual
+                     --  , text "ltys1 =" <+> ppr ltys1
+                     --  , text "ltys2 =" <+> ppr ltys2
+                     --  , text "subst =" <+> ppr subst ]) $
+                     [(meta_tvs, fdeqs)]
                         -- We could avoid this substTy stuff by producing the eqn
                         -- (qtvs, ls1++rs1, ls2++rs2)
                         -- which will re-do the ls1/ls2 unification when the equation is
diff --git a/compiler/typecheck/TcInteract.hs b/compiler/typecheck/TcInteract.hs
index 9b50b09..028b755 100644
--- a/compiler/typecheck/TcInteract.hs
+++ b/compiler/typecheck/TcInteract.hs
@@ -1608,7 +1608,8 @@ interactTyVarEq inerts workItem@(CTyEqCan { cc_tyvar = tv
        ; stopWith ev "Solved from inert" }
 
   | ReprEq <- eq_rel   -- See Note [Do not unify representational equalities]
-  = continueWith workItem
+  = do { traceTcS "Not unifying representational equality" (ppr workItem)
+       ; continueWith workItem }
 
   | isGiven ev         -- See Note [Touchables and givens]
   = continueWith workItem
diff --git a/compiler/typecheck/TcSimplify.hs b/compiler/typecheck/TcSimplify.hs
index fb5a70c..97da3dc 100644
--- a/compiler/typecheck/TcSimplify.hs
+++ b/compiler/typecheck/TcSimplify.hs
@@ -1357,7 +1357,10 @@ solveWanteds :: WantedConstraints -> TcS WantedConstraints
 -- so that the inert set doesn't mindlessly propagate.
 -- NB: wc_simples may be wanted /or/ derived now
 solveWanteds wc@(WC { wc_simple = simples, wc_impl = implics })
-  = do { traceTcS "solveWanteds {" (ppr wc)
+  = do { cur_lvl <- TcS.getTcLevel
+       ; traceTcS "solveWanteds {" $
+         vcat [ text "Level =" <+> ppr cur_lvl
+              , ppr wc ]
 
        ; wc1 <- solveSimpleWanteds simples
                 -- Any insoluble constraints are in 'simples' and so get rewritten



More information about the ghc-commits mailing list