cvs commit: fptools/ghc/compiler/basicTypes NewDemand.lhs fptools/ghc/compiler/stranal
DmdAnal.lhs
Simon Peyton Jones
simonpj@glass.cse.ogi.edu
Tue, 24 Jul 2001 09:42:11 -0700
simonpj 2001/07/24 09:42:11 PDT
Modified files:
ghc/compiler/basicTypes NewDemand.lhs
ghc/compiler/stranal DmdAnal.lhs
Log:
A major demand-analyser fix, which made it say something was
absent when it wasn't at all. Here's the comment from the
Case equation of dmdAnal.
-- Figure out whether the case binder is used, and use
-- that to set the keepity of the demand. This is utterly essential.
-- Consider f x = case x of y { (a,b) -> k y a }
-- If we just take scrut_demand = U(L,A), then we won't pass x to the
-- worker, so the worker will rebuild
-- x = (a, absent-error)
-- and that'll crash.
Revision Changes Path
1.5 +7 -1 fptools/ghc/compiler/basicTypes/NewDemand.lhs
1.6 +18 -6 fptools/ghc/compiler/stranal/DmdAnal.lhs