module GHC.Classes where
import GHC.Bool
+import GHC.Integer
-- GHC.Magic is used in some derived instances
import GHC.Magic ()
import GHC.Ordering
(C# c1) == (C# c2) = c1 `eqChar#` c2
(C# c1) /= (C# c2) = c1 `neChar#` c2
+instance Eq Integer where
+ (==) = eqInteger
+ (/=) = neqInteger
+
-- | The 'Ord' class is used for totally ordered datatypes.
--
-- Instances of 'Ord' can be derived for any user-defined
(C# c1) <= (C# c2) = c1 `leChar#` c2
(C# c1) < (C# c2) = c1 `ltChar#` c2
+instance Ord Integer where
+ (<=) = leInteger
+ (>) = gtInteger
+ (<) = ltInteger
+ (>=) = geInteger
+ compare = compareInteger
+
-- OK, so they're technically not part of a class...:
-- Boolean functions