[GHC] #8569: ASSERT in testcase type-rep, only in some ways:

GHC ghc-devs at haskell.org
Fri Nov 29 10:59:29 UTC 2013


#8569: ASSERT in testcase type-rep, only in some ways:
-------------------------------------+------------------------------------
        Reporter:  nomeata           |            Owner:
            Type:  bug               |           Status:  new
        Priority:  normal            |        Milestone:
       Component:  Test Suite        |          Version:  7.7
      Resolution:                    |         Keywords:
Operating System:  Unknown/Multiple  |     Architecture:  Unknown/Multiple
 Type of failure:  None/Unknown      |       Difficulty:  Unknown
       Test Case:                    |       Blocked By:
        Blocking:                    |  Related Tickets:
-------------------------------------+------------------------------------

Comment (by nomeata):

 Tracing this further I find this equation:

 {{{
 lubUse :: UseDmd -> UseDmd -> UseDmd
 [..]
 lubUse (UProd ux1) (UProd ux2)
      | length ux1 == length ux2    = UProd $ zipWith lubMaybeUsed ux1 ux2
      | otherwise                   = Used
 lubUse (UProd {}) (UCall {})       = Used
 -- lubUse (UProd {}) Used             = Used
 lubUse (UProd ux) Used             = UProd (map (`lubMaybeUsed` useTop)
 ux)
 lubUse Used       (UProd ux)       = UProd (map (`lubMaybeUsed` useTop)
 ux)
 [...]
 lubUse Used _                      = Used  -- Note [Used should win]
 }}}

 Note that `UProd` lub’ed with `Used` yields `UProd`. This contradicts the
 note `Used should win`. Time for some git archeology... hmm, seems to be
 like this since dawn of time`^W`the demand analyzer. And as long as no
 GADTs are around, it probably does not cause problems.

 A simple fix would be to change that equation, but surely there are
 reasons for it...

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


More information about the ghc-tickets mailing list