From 4466ab6e055ce826baf88db3b84b191c96bdebbf Mon Sep 17 00:00:00 2001 From: Simon Jakobi Date: Thu, 25 Mar 2021 15:32:24 +0100 Subject: INLINABLE Ord methods (#8354) --- libraries/ghc-prim/GHC/Classes.hs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libraries/ghc-prim/GHC/Classes.hs b/libraries/ghc-prim/GHC/Classes.hs index dfd707bd8c..a509319c0d 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 + {-# INLINABLE compare #-} + {-# INLINABLE (<) #-} + {-# INLINABLE (<=) #-} + {-# INLINABLE (>) #-} + {-# INLINABLE (>=) #-} + {-# INLINABLE max #-} + {-# INLINABLE min #-} compare x y = if x == y then EQ -- NB: must be '<=' not '<' to validate the -- cgit v1.2.1