\begin{code}
-{-# OPTIONS_GHC -XNoImplicitPrelude #-}
+{-# LANGUAGE CPP, NoImplicitPrelude, MagicHash, UnboxedTuples #-}
+-- We believe we could deorphan this module, by moving lots of things
+-- around, but we haven't got there yet:
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# OPTIONS_HADDOCK hide #-}
-----------------------------------------------------------------------------
-- Module : GHC.Num
-- Copyright : (c) The University of Glasgow 1994-2002
-- License : see libraries/base/LICENSE
---
+--
-- Maintainer : cvs-ghc@haskell.org
-- Stability : internal
-- Portability : non-portable (GHC Extensions)
infixl 7 *
infixl 6 +, -
-default () -- Double isn't available yet,
+default () -- Double isn't available yet,
-- and we shouldn't be using defaults anyway
\end{code}
-- | Absolute value.
abs :: a -> a
-- | Sign of a number.
- -- The functions 'abs' and 'signum' should satisfy the law:
+ -- The functions 'abs' and 'signum' should satisfy the law:
--
-- > abs x * signum x == x
--
| n `eqInt` 0 = 0
| otherwise = 1
+ {-# INLINE fromInteger #-} -- Just to be sure!
fromInteger i = I# (toInt# i)
quotRemInt :: Int -> Int -> (Int, Int)
%*********************************************************
%* *
-\subsection{The @Integer@ instances for @Eq@, @Ord@}
-%* *
-%*********************************************************
-
-\begin{code}
-instance Eq Integer where
- (==) = eqInteger
- (/=) = neqInteger
-
-------------------------------------------------------------------------
-instance Ord Integer where
- (<=) = leInteger
- (>) = gtInteger
- (<) = ltInteger
- (>=) = geInteger
- compare = compareInteger
-\end{code}
-
-
-%*********************************************************
-%* *
\subsection{The @Integer@ instances for @Show@}
%* *
%*********************************************************