diff options
author | Joachim Breitner <mail@joachim-breitner.de> | 2015-09-09 10:18:18 +0200 |
---|---|---|
committer | Joachim Breitner <mail@joachim-breitner.de> | 2015-09-09 10:18:18 +0200 |
commit | 25d72fbf45903da0b65fccfd3853c7a7ecc06b57 (patch) | |
tree | a10105ab1515c118b13d6d709353660be2f4fc2a /libraries/ghc-prim/GHC/Classes.hs | |
parent | c07fd1dc37aae27a118fafd482dab52ba4946cb3 (diff) | |
download | haskell-wip/T10858.tar.gz |
Move thenCmp to GHC.Classeswip/T10858
as we need to derive code already that, and that happens before
GHC.Base.
Diffstat (limited to 'libraries/ghc-prim/GHC/Classes.hs')
-rw-r--r-- | libraries/ghc-prim/GHC/Classes.hs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libraries/ghc-prim/GHC/Classes.hs b/libraries/ghc-prim/GHC/Classes.hs index 18662ad539..299a8720a9 100644 --- a/libraries/ghc-prim/GHC/Classes.hs +++ b/libraries/ghc-prim/GHC/Classes.hs @@ -32,7 +32,8 @@ module GHC.Classes( Eq(..), eqInt, neInt, Ord(..), gtInt, geInt, leInt, ltInt, compareInt, compareInt#, (&&), (||), not, - divInt#, modInt# + divInt#, modInt#, + thenCmp ) where -- GHC.Magic is used in some derived instances @@ -296,6 +297,12 @@ not :: Bool -> Bool not True = False not False = True +-- This is used by the derived code for Ord, so put it here +thenCmp :: Ordering -> Ordering -> Ordering +LT `thenCmp` _ = LT +EQ `thenCmp` y = y +GT `thenCmp` _ = GT + ------------------------------------------------------------------------ -- These don't really belong here, but we don't have a better place to |