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

Malcolm Wallace malcolm.wallace at cs.york.ac.uk
Wed Dec 2 20:50:29 EST 2009

> #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.

> Shouldn't it be discussed on the libraries list first?

Possibly, although I believe we have never treated a change towards  
being more lazy as an API change before.  Making something more strict  
usually provokes discussion, because it causes more programs to crash,  
but making things lazier is usually considered a bugfix.

Copying to libraries@, to see if there are any objections.  If there  
are, feel free to back out the patch.
-> See http://hackage.haskell.org/trac/ghc/ticket/3709


More information about the Libraries mailing list