diff options
| author | Malcolm.Wallace@cs.york.ac.uk <unknown> | 2009-12-02 03:28:07 +0000 |
|---|---|---|
| committer | Malcolm.Wallace@cs.york.ac.uk <unknown> | 2009-12-02 03:28:07 +0000 |
| commit | 07f3840b3eda6c79af00129c4d91b14c7d67ec8c (patch) | |
| tree | bc075d4e5999c3f81eaed92997b5ce6493b618cc /libraries/base/Data/Either.hs | |
| parent | 8c44eaba6f9224b16dc8556f0595e0ce71897cbb (diff) | |
| download | haskell-07f3840b3eda6c79af00129c4d91b14c7d67ec8c.tar.gz | |
Data.Either.partitionEithers was insufficiently lazy.
Spotted by Daniel Fischer.
Diffstat (limited to 'libraries/base/Data/Either.hs')
| -rw-r--r-- | libraries/base/Data/Either.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libraries/base/Data/Either.hs b/libraries/base/Data/Either.hs index 6af488fc9f..fd6651f4cc 100644 --- a/libraries/base/Data/Either.hs +++ b/libraries/base/Data/Either.hs @@ -79,8 +79,8 @@ rights x = [a | Right a <- x] partitionEithers :: [Either a b] -> ([a],[b]) partitionEithers = foldr (either left right) ([],[]) where - left a (l, r) = (a:l, r) - right a (l, r) = (l, a:r) + left a ~(l, r) = (a:l, r) + right a ~(l, r) = (l, a:r) {- {-------------------------------------------------------------------- |
