
8 Aug
2006
8 Aug
'06
3:58 p.m.
On Aug 8, 2006, at 10:24 AM, Simon Marlow wrote:
It may well be better, but it doesn't have the same laziness properties, so it isn't the same function. eg. try this:
do filterM (\x -> return undefined) [1]; return () Ah yes, I missed that.
Of course we may discuss whether the extra laziness is useful, but I can't apply the patch as it stands because it would break Haskell 98. Data.List uses "#ifdef USE_REPORT_PRELUDE" in places to choose between original and improved implementations. Is that an option in this case?
But the foldr is not needed:
The foldr was there to allow fusion, I believe.
Cheers, Simon