[commit: ghc] master: A bit more tracing in TcHsType.tcTyVar (2d52c3a)

git at git.haskell.org git at git.haskell.org
Tue Mar 1 17:27:59 UTC 2016


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

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

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

commit 2d52c3ad1b5c1e346dc11e7d9290022475841ab0
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Mon Feb 29 14:17:30 2016 +0000

    A bit more tracing in TcHsType.tcTyVar


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

2d52c3ad1b5c1e346dc11e7d9290022475841ab0
 compiler/typecheck/TcHsType.hs | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/compiler/typecheck/TcHsType.hs b/compiler/typecheck/TcHsType.hs
index 5b0d9b9..8c22c5c 100644
--- a/compiler/typecheck/TcHsType.hs
+++ b/compiler/typecheck/TcHsType.hs
@@ -924,10 +924,14 @@ tcTyVar mode name         -- Could be a tyvar, a tycon, or a datacon
                   -> TcM (TcType, TcKind)
     handle_tyfams tc tc_tc
       | mightBeUnsaturatedTyCon tc_tc
-      = return (ty, tc_kind)
+      = do { traceTc "tcTyVar2a" (ppr tc_tc $$ ppr tc_kind)
+           ; return (ty, tc_kind) }
 
       | otherwise
-      = instantiateTyN 0 ty tc_kind
+      = do { (tc_ty, kind) <- instantiateTyN 0 ty tc_kind
+           ; traceTc "tcTyVar2b" (vcat [ ppr tc <+> dcolon <+> ppr tc_kind
+                                       , ppr tc_ty $$ ppr kind ])
+           ; return (tc_ty, kind) }
       where
         ty      = mkNakedTyConApp tc []
         tc_kind = tyConKind tc_tc



More information about the ghc-commits mailing list