[commit: ghc] master: More tc-tracing (0f43d0d)
git at git.haskell.org
git at git.haskell.org
Wed Jan 31 13:24:42 UTC 2018
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/0f43d0dba3da7b16f6d3fd2e7cb6e62ac524eb04/ghc
>---------------------------------------------------------------
commit 0f43d0dba3da7b16f6d3fd2e7cb6e62ac524eb04
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Wed Jan 31 13:03:37 2018 +0000
More tc-tracing
>---------------------------------------------------------------
0f43d0dba3da7b16f6d3fd2e7cb6e62ac524eb04
compiler/typecheck/TcInteract.hs | 11 +++++++++--
compiler/typecheck/TcRnTypes.hs | 2 +-
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/compiler/typecheck/TcInteract.hs b/compiler/typecheck/TcInteract.hs
index 39424de..59eea70 100644
--- a/compiler/typecheck/TcInteract.hs
+++ b/compiler/typecheck/TcInteract.hs
@@ -1117,12 +1117,19 @@ addFunDepWork inerts work_ev cls
add_fds inert_ct
| isImprovable inert_ev
- = emitFunDepDeriveds $
+ = do { traceTcS "addFunDepWork" (vcat
+ [ ppr work_ev
+ , pprCtLoc work_loc, ppr (isGivenLoc work_loc)
+ , pprCtLoc inert_loc, ppr (isGivenLoc inert_loc)
+ , pprCtLoc derived_loc, ppr (isGivenLoc derived_loc) ]) ;
+
+ emitFunDepDeriveds $
improveFromAnother derived_loc inert_pred work_pred
-- We don't really rewrite tys2, see below _rewritten_tys2, so that's ok
-- NB: We do create FDs for given to report insoluble equations that arise
-- from pairs of Givens, and also because of floating when we approximate
-- implications. The relevant test is: typecheck/should_fail/FDsFromGivens.hs
+ }
| otherwise
= return ()
where
@@ -1739,7 +1746,7 @@ emitFunDepDeriveds fd_eqns
where
do_one_FDEqn (FDEqn { fd_qtvs = tvs, fd_eqs = eqs, fd_loc = loc })
| null tvs -- Common shortcut
- = do { traceTcS "emitFunDepDeriveds 1" (ppr (ctl_depth loc) $$ ppr eqs)
+ = do { traceTcS "emitFunDepDeriveds 1" (ppr (ctl_depth loc) $$ ppr eqs $$ ppr (isGivenLoc loc))
; mapM_ (unifyDerived loc Nominal) eqs }
| otherwise
= do { traceTcS "emitFunDepDeriveds 2" (ppr (ctl_depth loc) $$ ppr eqs)
diff --git a/compiler/typecheck/TcRnTypes.hs b/compiler/typecheck/TcRnTypes.hs
index 13391d6..5e52496 100644
--- a/compiler/typecheck/TcRnTypes.hs
+++ b/compiler/typecheck/TcRnTypes.hs
@@ -96,7 +96,7 @@ module TcRnTypes(
bumpSubGoalDepth, subGoalDepthExceeded,
CtLoc(..), ctLocSpan, ctLocEnv, ctLocLevel, ctLocOrigin,
ctLocTypeOrKind_maybe,
- ctLocDepth, bumpCtLocDepth,
+ ctLocDepth, bumpCtLocDepth, isGivenLoc,
setCtLocOrigin, updateCtLocOrigin, setCtLocEnv, setCtLocSpan,
CtOrigin(..), exprCtOrigin, lexprCtOrigin, matchesCtOrigin, grhssCtOrigin,
isVisibleOrigin, toInvisibleOrigin,
More information about the ghc-commits
mailing list