
8 Oct
2010
8 Oct
'10
1:54 p.m.
On 8 October 2010 10:54, Simon Marlow
We could make GHC respect the report, but we'd have to use
(e op) ==> let z = e in \x -> z op x
to retain sharing without relying on full laziness.
This might be a good idea in fact - all other things being equal, having lambdas be more visible to the compiler is a good thing.
Of course, this change could cause a performance regression to existing code. Personally, I think that this is a report bug: there is no syntactic lambda in (`op` e) or (`op` e) so I would expect the evaluation of e to be shared. Max