Add a note about the definition of quot etc
[ghc-base.git] / Data / Either.hs
index 956e6da..b45609b 100644 (file)
@@ -1,4 +1,8 @@
-{-# OPTIONS_GHC -XNoImplicitPrelude #-}
+{-# LANGUAGE CPP, NoImplicitPrelude #-}
+#ifdef __GLASGOW_HASKELL__
+{-# LANGUAGE DeriveDataTypeable, StandaloneDeriving #-}
+#endif
+
 -----------------------------------------------------------------------------
 -- |
 -- Module      :  Data.Either
@@ -27,8 +31,11 @@ module Data.Either (
 import GHC.Base
 import GHC.Show
 import GHC.Read
+#endif
+
 import Data.Typeable
 
+#ifdef __GLASGOW_HASKELL__
 {-
 -- just for testing
 import Test.QuickCheck
@@ -76,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)
 
 {-
 {--------------------------------------------------------------------