Improve full laziness by floating allocations out of value lambdas
authorsimonpj@microsoft.com <unknown>
Wed, 9 May 2007 11:18:12 +0000 (11:18 +0000)
committersimonpj@microsoft.com <unknown>
Wed, 9 May 2007 11:18:12 +0000 (11:18 +0000)
commite706b70b9c863300a118797992b8aa46ad3e2865
treee82d61d7caee3c31d6dd7d8f598ef40e8eebcedb
parentba3819264292ce81f02495f67887a0568d373d1e
Improve full laziness by floating allocations out of value lambdas

This patch simplifies the code slightly, and simultaneously improves
full laziness by floating allocations (lambdas, constructor apps) out
of loops.

See Note [Escaping a value lambda] in SetLevels, which explains.

There's a test that shows it up: simplrun009

This relevant to SpecConstr, because a call looks like
f lvl
instead of
f (\x. blah)
and the latter is easier to match in a robust way.
compiler/simplCore/SetLevels.lhs