summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2017-10-16 16:15:08 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2017-10-30 08:43:29 +0000
commit82bad1a9e08e7ac72aecd6e5b7bde8e828c56256 (patch)
treeae0ba07ae25d388a9a8fb6fa0f0c043257b1692d
parentcca2d6b78f97bfb79bef4dc3f75d6c4d15b94680 (diff)
downloadhaskell-82bad1a9e08e7ac72aecd6e5b7bde8e828c56256.tar.gz
A bit more tc-tracing
-rw-r--r--compiler/typecheck/TcCanonical.hs10
1 files changed, 8 insertions, 2 deletions
diff --git a/compiler/typecheck/TcCanonical.hs b/compiler/typecheck/TcCanonical.hs
index be8bbeecba..d48d04fc75 100644
--- a/compiler/typecheck/TcCanonical.hs
+++ b/compiler/typecheck/TcCanonical.hs
@@ -829,7 +829,8 @@ zonk_eq_types = go
-> do { cts <- readTcRef ref
; case cts of
Flexi -> give_up
- Indirect ty' -> unSwap swapped go ty' ty }
+ Indirect ty' -> do { trace_indirect tv ty'
+ ; unSwap swapped go ty' ty } }
_ -> give_up
where
give_up = return $ Left $ unSwap swapped Pair (mkTyVarTy tv) ty
@@ -842,12 +843,17 @@ zonk_eq_types = go
then go ty1' ty2'
else return $ Left (Pair (TyVarTy tv1) (TyVarTy tv2)) }
+ trace_indirect tv ty
+ = traceTcS "Following filled tyvar (zonk_eq_types)"
+ (ppr tv <+> equals <+> ppr ty)
+
quick_zonk tv = case tcTyVarDetails tv of
MetaTv { mtv_ref = ref }
-> do { cts <- readTcRef ref
; case cts of
Flexi -> return (TyVarTy tv, False)
- Indirect ty' -> return (ty', True) }
+ Indirect ty' -> do { trace_indirect tv ty'
+ ; return (ty', True) } }
_ -> return (TyVarTy tv, False)
-- This happens for type families, too. But recall that failure