diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2017-10-16 16:15:08 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2017-10-30 08:43:29 +0000 |
commit | 82bad1a9e08e7ac72aecd6e5b7bde8e828c56256 (patch) | |
tree | ae0ba07ae25d388a9a8fb6fa0f0c043257b1692d | |
parent | cca2d6b78f97bfb79bef4dc3f75d6c4d15b94680 (diff) | |
download | haskell-82bad1a9e08e7ac72aecd6e5b7bde8e828c56256.tar.gz |
A bit more tc-tracing
-rw-r--r-- | compiler/typecheck/TcCanonical.hs | 10 |
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 |