Re: [GHC] #7994: Make foldl into a good consumer

#7994: Make foldl into a good consumer
-------------------------------------+------------------------------------
Reporter: simonpj | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.6.3
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):
I gave it a shot, analysing the body and the rhs of a let in alternation
until a fixed point is found with regard to
* demand on the rhs
* rhs’s demand type
* body’s demand type
and as expected, the resulting core looks good:
{{{
$wgo_s1oi [Occ=LoopBreaker]
:: GHC.Prim.Int#
-> GHC.Prim.Double#
-> GHC.Prim.Double#
-> Data.Complex.Complex GHC.Types.Double
[LclId, Arity=3, Str=DmdType
participants (1)
-
GHC