[commit: ghc] master: Remove ASSERTion about increasing TcLevels (a754a42)

Simon Peyton Jones simonpj at microsoft.com
Sun Jul 15 14:26:18 UTC 2018


Richard, weren't you going to open a ticket to track this?  It ought to hold!

Simon

| -----Original Message-----
| From: ghc-commits <ghc-commits-bounces at haskell.org> On Behalf Of
| git at git.haskell.org
| Sent: 15 July 2018 02:28
| To: ghc-commits at haskell.org
| Subject: [commit: ghc] master: Remove ASSERTion about increasing TcLevels
| (a754a42)
| 
| Repository : ssh://git@git.haskell.org/ghc
| 
| On branch  : master
| Link       :
| https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fghc.haske
| ll.org%2Ftrac%2Fghc%2Fchangeset%2Fa754a420b53cd2210ef60dcd695bf3334af2e40
| 0%2Fghc&data=02%7C01%7Csimonpj%40microsoft.com%7C9b543b1c10fd4fcae84c
| 08d5e9f2325b%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C1%7C636672148791196
| 487&sdata=o8HfV%2FQqEfk0wKuW1XStZXzkn%2FkyDbw8DsfBIpTnzpw%3D&rese
| rved=0
| 
| >---------------------------------------------------------------
| 
| 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)
| 
| _______________________________________________
| ghc-commits mailing list
| ghc-commits at haskell.org
| https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmail.hask
| ell.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fghc-
| commits&data=02%7C01%7Csimonpj%40microsoft.com%7C9b543b1c10fd4fcae84c
| 08d5e9f2325b%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C1%7C636672148791196
| 487&sdata=V1pVxb4Crgjv04p9ZCGx7BDis0eXSV2fV9MDOPZXZEA%3D&reserved
| =0


More information about the ghc-devs mailing list