Move Eq and Ord for Int from GHC.Base to GHC.Classes, so they are not longer orphan.
[ghc-base.git] / Data / Either.hs
index 6af488f..b45609b 100644 (file)
@@ -1,4 +1,8 @@
-{-# OPTIONS_GHC -XNoImplicitPrelude #-}
+{-# LANGUAGE CPP, NoImplicitPrelude #-}
+#ifdef __GLASGOW_HASKELL__
+{-# LANGUAGE DeriveDataTypeable, StandaloneDeriving #-}
+#endif
+
 -----------------------------------------------------------------------------
 -- |
 -- Module      :  Data.Either
@@ -79,8 +83,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)
 
 {-
 {--------------------------------------------------------------------