diff options
author | Ian Lynagh <igloo@earth.li> | 2009-11-23 19:43:10 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2009-11-23 19:43:10 +0000 |
commit | 99ead68a69b2b726957784a64e531653b1ee2c9c (patch) | |
tree | 86cf32502a68a3d28f71a7f6fddaca8e1f851de3 /libraries/base/GHC/Base.lhs | |
parent | 23a2c67ef70748c786436bf03a1c41b7add18826 (diff) | |
download | haskell-99ead68a69b2b726957784a64e531653b1ee2c9c.tar.gz |
Move Eq/Ord Ordering instances to de-orphan them
Diffstat (limited to 'libraries/base/GHC/Base.lhs')
-rw-r--r-- | libraries/base/GHC/Base.lhs | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/libraries/base/GHC/Base.lhs b/libraries/base/GHC/Base.lhs index 9f8d325139..45ec617bb0 100644 --- a/libraries/base/GHC/Base.lhs +++ b/libraries/base/GHC/Base.lhs @@ -469,36 +469,6 @@ otherwise = True %********************************************************* %* * -\subsection{Type @Ordering@} -%* * -%********************************************************* - -\begin{code} --- | Represents an ordering relationship between two values: less --- than, equal to, or greater than. An 'Ordering' is returned by --- 'compare'. --- XXX These don't work: --- deriving instance Eq Ordering --- deriving instance Ord Ordering --- Illegal binding of built-in syntax: con2tag_Ordering# -instance Eq Ordering where - EQ == EQ = True - LT == LT = True - GT == GT = True - _ == _ = False - -- Read in GHC.Read, Show in GHC.Show - -instance Ord Ordering where - LT <= _ = True - _ <= LT = False - EQ <= _ = True - _ <= EQ = False - GT <= GT = True -\end{code} - - -%********************************************************* -%* * \subsection{Type @Char@ and @String@} %* * %********************************************************* @@ -642,16 +612,6 @@ lazy x = x -- sees it as lazy. Then the worker/wrapper phase inlines it. -- Result: happiness - --- | The call '(inline f)' reduces to 'f', but 'inline' has a BuiltInRule --- that tries to inline 'f' (if it has an unfolding) unconditionally --- The 'NOINLINE' pragma arranges that inline only gets inlined (and --- hence eliminated) late in compilation, after the rule has had --- a good chance to fire. -inline :: a -> a -{-# NOINLINE[0] inline #-} -inline x = x - -- Assertion function. This simply ignores its boolean argument. -- The compiler may rewrite it to @('assertError' line)@. |