[commit: ghc] master: A bit more tcTrace (6c2d917)

git at git.haskell.org git at git.haskell.org
Fri Apr 28 11:04:21 UTC 2017


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

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

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

commit 6c2d9175c70d735834f0bd1673647d00f0a483b5
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Tue Apr 25 13:15:04 2017 +0100

    A bit more tcTrace


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

6c2d9175c70d735834f0bd1673647d00f0a483b5
 compiler/typecheck/TcUnify.hs | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/compiler/typecheck/TcUnify.hs b/compiler/typecheck/TcUnify.hs
index 6d39169..6bb81d9 100644
--- a/compiler/typecheck/TcUnify.hs
+++ b/compiler/typecheck/TcUnify.hs
@@ -1161,7 +1161,8 @@ unifyType :: Outputable a => Maybe a   -- ^ If present, has type 'ty1'
           -> TcTauType -> TcTauType -> TcM TcCoercionN
 -- Actual and expected types
 -- Returns a coercion : ty1 ~ ty2
-unifyType thing ty1 ty2 = uType origin TypeLevel ty1 ty2
+unifyType thing ty1 ty2 = traceTc "utype" (ppr ty1 $$ ppr ty2 $$ ppr thing) >>
+                          uType origin TypeLevel ty1 ty2
   where
     origin = TypeEqOrigin { uo_actual = ty1, uo_expected = ty2
                           , uo_thing  = mkErrorThing <$> thing }
@@ -1173,7 +1174,8 @@ noThing :: Maybe (HsExpr Name)
 noThing = Nothing
 
 unifyKind :: Outputable a => Maybe a -> TcKind -> TcKind -> TcM CoercionN
-unifyKind thing ty1 ty2 = uType origin KindLevel ty1 ty2
+unifyKind thing ty1 ty2 = traceTc "ukind" (ppr ty1 $$ ppr ty2 $$ ppr thing) >>
+                          uType origin KindLevel ty1 ty2
   where origin = TypeEqOrigin { uo_actual = ty1, uo_expected = ty2
                               , uo_thing  = mkErrorThing <$> thing }
 



More information about the ghc-commits mailing list