projects
/
ghc-base.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
some fixes for hGetBufSome
[ghc-base.git]
/
Data
/
Either.hs
diff --git
a/Data/Either.hs
b/Data/Either.hs
index
956e6da
..
fd6651f
100644
(file)
--- a/
Data/Either.hs
+++ b/
Data/Either.hs
@@
-27,8
+27,11
@@
module Data.Either (
import GHC.Base
import GHC.Show
import GHC.Read
import GHC.Base
import GHC.Show
import GHC.Read
+#endif
+
import Data.Typeable
import Data.Typeable
+#ifdef __GLASGOW_HASKELL__
{-
-- just for testing
import Test.QuickCheck
{-
-- just for testing
import Test.QuickCheck
@@
-76,8
+79,8
@@
rights x = [a | Right a <- x]
partitionEithers :: [Either a b] -> ([a],[b])
partitionEithers = foldr (either left right) ([],[])
where
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)
{-
{--------------------------------------------------------------------
{-
{--------------------------------------------------------------------