summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Jakobi <simon.jakobi@gmail.com>2021-03-25 15:32:24 +0100
committerSimon Jakobi <simon.jakobi@gmail.com>2021-06-24 19:10:58 +0000
commit3b19c6007fae38bcd0cf00245058b0b4ebb17f3f (patch)
tree90b2ef303ae6763d3f724386275f0baabd6214ef
parent138b7a5775251c330ade870a0b8d1f5c4659e669 (diff)
downloadhaskell-wip/sjakobi/T8354-inline-ord.tar.gz
INLINE Ord methods (#8354)wip/sjakobi/T8354-inline-ord
-rw-r--r--libraries/ghc-prim/GHC/Classes.hs7
1 files changed, 7 insertions, 0 deletions
diff --git a/libraries/ghc-prim/GHC/Classes.hs b/libraries/ghc-prim/GHC/Classes.hs
index dfd707bd8c..97a4f1e008 100644
--- a/libraries/ghc-prim/GHC/Classes.hs
+++ b/libraries/ghc-prim/GHC/Classes.hs
@@ -340,6 +340,13 @@ class (Eq a) => Ord a where
compare :: a -> a -> Ordering
(<), (<=), (>), (>=) :: a -> a -> Bool
max, min :: a -> a -> a
+ {-# INLINE compare #-}
+ {-# INLINE (<) #-}
+ {-# INLINE (<=) #-}
+ {-# INLINE (>) #-}
+ {-# INLINE (>=) #-}
+ {-# INLINE max #-}
+ {-# INLINE min #-}
compare x y = if x == y then EQ
-- NB: must be '<=' not '<' to validate the