[commit: ghc] master: A bit more tracing (e9e650d)

Simon Peyton Jones <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.ghc
Message-ID <[email protected]>
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/e9e650dd08ad7d192f6e0225db7468faadf55c02

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

commit e9e650dd08ad7d192f6e0225db7468faadf55c02
Author: Simon Peyton Jones <[email protected]>
Date:   Mon Dec 24 09:38:43 2012 +0000

    A bit more tracing

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

 compiler/typecheck/TcCanonical.lhs |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/compiler/typecheck/TcCanonical.lhs b/compiler/typecheck/TcCanonical.lhs
index 3dd8844..a7533ed 100644
--- a/compiler/typecheck/TcCanonical.lhs
+++ b/compiler/typecheck/TcCanonical.lhs
@@ -199,10 +199,10 @@ canEvNC :: CtLoc -> CtEvidence -> TcS StopOrContinue
 -- Called only for non-canonical EvVars 
 canEvNC d ev 
   = case classifyPredType (ctEvPred ev) of
-      ClassPred cls tys -> canClassNC d ev cls tys 
-      EqPred ty1 ty2    -> canEqNC    d ev ty1 ty2 
-      TuplePred tys     -> canTuple   d ev tys
-      IrredPred {}      -> canIrred   d ev 
+      ClassPred cls tys -> traceTcS "canEvNC:cls" (ppr cls <+> ppr tys) >> canClassNC d ev cls tys 
+      EqPred ty1 ty2    -> traceTcS "canEvNC:eq" (ppr ty1 $$ ppr ty2)   >> canEqNC    d ev ty1 ty2 
+      TuplePred tys     -> traceTcS "canEvNC:tup" (ppr tys)             >> canTuple   d ev tys
+      IrredPred {}      -> traceTcS "canEvNC:irred" (ppr (ctEvPred ev)) >> canIrred   d ev 
 \end{code}
 
 
@@ -249,6 +249,8 @@ canClass d ev cls tys
        ; let co = mkTcTyConAppCo (classTyCon cls) cos 
              xi = mkClassPred cls xis
        ; mb <- rewriteCtFlavor ev xi co
+       ; traceTcS "canClass" (vcat [ ppr ev <+> ppr cls <+> ppr tys 
+                                   , ppr xi, ppr mb ])
        ; case mb of
            Nothing -> return Stop
            Just new_ev -> continueWith $
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.