Data.Either.partitionEithers was insufficiently lazy.
[ghc-base.git] / Data / Either.hs
index 6af488f..fd6651f 100644 (file)
@@ -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)
 
 {-
 {--------------------------------------------------------------------