[GHC] #3709: Data.Either.partitionEithers is not lazy enough

Henning Thielemann lemming at henning-thielemann.de
Thu Dec 3 09:12:24 EST 2009


On Thu, 3 Dec 2009, Malcolm Wallace wrote:

>> #3709: Data.Either.partitionEithers is not lazy enough
>> 
>> This is a behavioural change, e.g.:
>> Main> case partitionEithers1 [Left 'a', error "Not me"] of (x : _, _) -> x
>> Program error: Not me
>> Main> case partitionEithers2 [Left 'a', error "Not me"] of (x : _, _) -> x
>> 'a'
>
> Yes, and isn't that the point of the bugfix?  No non-bottoming program has 
> changed, but fewer programs fail now.  I find it hard to imagine that anyone 
> could have been relying on getting a crash here.

Making something more lazy can cause a memory leak.


More information about the Libraries mailing list