projects
/
ghc-base.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b72c413
)
Data.Either.partitionEithers was insufficiently lazy.
author
Malcolm.Wallace@cs.york.ac.uk
<unknown>
Wed, 2 Dec 2009 03:28:07 +0000
(
03:28
+0000)
committer
Malcolm.Wallace@cs.york.ac.uk
<unknown>
Wed, 2 Dec 2009 03:28:07 +0000
(
03:28
+0000)
Spotted by Daniel Fischer.
Data/Either.hs
patch
|
blob
|
history
diff --git
a/Data/Either.hs
b/Data/Either.hs
index
6af488f
..
fd6651f
100644
(file)
--- a/
Data/Either.hs
+++ b/
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)
{-
{--------------------------------------------------------------------