[commit: ghc] master: Remove ASSERTion about increasing TcLevels (a754a42)
git at git.haskell.org
git at git.haskell.org
Sun Jul 15 01:27:49 UTC 2018
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/a754a420b53cd2210ef60dcd695bf3334af2e400/ghc
>---------------------------------------------------------------
commit a754a420b53cd2210ef60dcd695bf3334af2e400
Author: Richard Eisenberg <rae at cs.brynmawr.edu>
Date: Thu Jul 12 16:10:34 2018 -0400
Remove ASSERTion about increasing TcLevels
This removes an ASSERTion that TcLevels should increase by
exactly one in every implication. While this is a sensible
goal, it's not true today, and we should not be crippling
DEBUG for everyone while debugging this.
The ASSERT was added in 261dd83cacec71edd551e9c581d05285c9ea3226
>---------------------------------------------------------------
a754a420b53cd2210ef60dcd695bf3334af2e400
compiler/typecheck/TcSimplify.hs | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/compiler/typecheck/TcSimplify.hs b/compiler/typecheck/TcSimplify.hs
index 13a3f73..c57ef56 100644
--- a/compiler/typecheck/TcSimplify.hs
+++ b/compiler/typecheck/TcSimplify.hs
@@ -1495,7 +1495,8 @@ solveImplication imp@(Implic { ic_tclvl = tclvl
= do { inerts <- getTcSInerts
; traceTcS "solveImplication {" (ppr imp $$ text "Inerts" <+> ppr inerts)
- ; when debugIsOn check_tc_level
+ -- commented out; see `where` clause below
+ -- ; when debugIsOn check_tc_level
-- Solve the nested constraints
; (no_given_eqs, given_insols, residual_wanted)
@@ -1544,10 +1545,15 @@ solveImplication imp@(Implic { ic_tclvl = tclvl
-- TcLevels must be strictly increasing (see (ImplicInv) in
-- Note [TcLevel and untouchable type variables] in TcType),
-- and in fact I thinkthey should always increase one level at a time.
+
+ -- Though sensible, this check causes lots of testsuite failures. It is
+ -- remaining commented out for now.
+ {-
check_tc_level = do { cur_lvl <- TcS.getTcLevel
; MASSERT2( tclvl == pushTcLevel cur_lvl
, text "Cur lvl =" <+> ppr cur_lvl $$
text "Imp lvl =" <+> ppr tclvl ) }
+ -}
----------------------
setImplicationStatus :: Implication -> TcS (Maybe Implication)
More information about the ghc-commits
mailing list