[GHC] #15384: Every implication should bump the TcLevel exactly once

GHC ghc-devs at haskell.org
Sun Jul 15 14:37:03 UTC 2018


#15384: Every implication should bump the TcLevel exactly once
-------------------------------------+-------------------------------------
           Reporter:  goldfire       |             Owner:  (none)
               Type:  task           |            Status:  new
           Priority:  normal         |         Milestone:  8.6.1
          Component:  Compiler       |           Version:  8.5
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 Simon recently added an assertion that every implication bumps the TcLevel
 exactly once. However, this turns out not to be true, and thus caused
 quite a few failures in a `DEBUG` compiler. I commented the check out, but
 we really should investigate and fix any deviations from this plan.

 Here is the suspect code in TcSimplify:

 {{{
     -- 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 ) }
     -}
 }}}

 The goal is to uncomment this region without introducing failures.

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15384>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list