[commit: ghc] master: A bit more tc-tracing (82bad1a)
git at git.haskell.org
git at git.haskell.org
Mon Oct 30 08:44:03 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/82bad1a9e08e7ac72aecd6e5b7bde8e828c56256/ghc
>---------------------------------------------------------------
commit 82bad1a9e08e7ac72aecd6e5b7bde8e828c56256
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Mon Oct 16 16:15:08 2017 +0100
A bit more tc-tracing
>---------------------------------------------------------------
82bad1a9e08e7ac72aecd6e5b7bde8e828c56256
compiler/typecheck/TcCanonical.hs | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/compiler/typecheck/TcCanonical.hs b/compiler/typecheck/TcCanonical.hs
index be8bbee..d48d04f 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
More information about the ghc-commits
mailing list