Commit c6de5805 authored by John Ericson's avatar John Ericson Committed by Marge Bot
Browse files

Use fix-sized order primops for fixed size boxed types

Progress towards #19026
parent e0ded198
Pipeline #35428 canceled with stages
in 40 seconds
......@@ -89,10 +89,10 @@ instance Ord Int8 where
{-# INLINE [1] ltInt8 #-}
{-# INLINE [1] leInt8 #-}
gtInt8, geInt8, ltInt8, leInt8 :: Int8 -> Int8 -> Bool
(I8# x) `gtInt8` (I8# y) = isTrue# ((int8ToInt# x) ># (int8ToInt# y))
(I8# x) `geInt8` (I8# y) = isTrue# ((int8ToInt# x) >=# (int8ToInt# y))
(I8# x) `ltInt8` (I8# y) = isTrue# ((int8ToInt# x) <# (int8ToInt# y))
(I8# x) `leInt8` (I8# y) = isTrue# ((int8ToInt# x) <=# (int8ToInt# y))
(I8# x) `gtInt8` (I8# y) = isTrue# (x `gtInt8#` y)
(I8# x) `geInt8` (I8# y) = isTrue# (x `geInt8#` y)
(I8# x) `ltInt8` (I8# y) = isTrue# (x `ltInt8#` y)
(I8# x) `leInt8` (I8# y) = isTrue# (x `leInt8#` y)
-- | @since 2.01
instance Show Int8 where
......@@ -302,10 +302,10 @@ instance Ord Int16 where
{-# INLINE [1] ltInt16 #-}
{-# INLINE [1] leInt16 #-}
gtInt16, geInt16, ltInt16, leInt16 :: Int16 -> Int16 -> Bool
(I16# x) `gtInt16` (I16# y) = isTrue# ((int16ToInt# x) ># (int16ToInt# y))
(I16# x) `geInt16` (I16# y) = isTrue# ((int16ToInt# x) >=# (int16ToInt# y))
(I16# x) `ltInt16` (I16# y) = isTrue# ((int16ToInt# x) <# (int16ToInt# y))
(I16# x) `leInt16` (I16# y) = isTrue# ((int16ToInt# x) <=# (int16ToInt# y))
(I16# x) `gtInt16` (I16# y) = isTrue# (x `gtInt16#` y)
(I16# x) `geInt16` (I16# y) = isTrue# (x `geInt16#` y)
(I16# x) `ltInt16` (I16# y) = isTrue# (x `ltInt16#` y)
(I16# x) `leInt16` (I16# y) = isTrue# (x `leInt16#` y)
-- | @since 2.01
instance Show Int16 where
......@@ -520,10 +520,10 @@ instance Ord Int32 where
{-# INLINE [1] ltInt32 #-}
{-# INLINE [1] leInt32 #-}
gtInt32, geInt32, ltInt32, leInt32 :: Int32 -> Int32 -> Bool
(I32# x) `gtInt32` (I32# y) = isTrue# ((int32ToInt# x) ># (int32ToInt# y))
(I32# x) `geInt32` (I32# y) = isTrue# ((int32ToInt# x) >=# (int32ToInt# y))
(I32# x) `ltInt32` (I32# y) = isTrue# ((int32ToInt# x) <# (int32ToInt# y))
(I32# x) `leInt32` (I32# y) = isTrue# ((int32ToInt# x) <=# (int32ToInt# y))
(I32# x) `gtInt32` (I32# y) = isTrue# (x `gtInt32#` y)
(I32# x) `geInt32` (I32# y) = isTrue# (x `geInt32#` y)
(I32# x) `ltInt32` (I32# y) = isTrue# (x `ltInt32#` y)
(I32# x) `leInt32` (I32# y) = isTrue# (x `leInt32#` y)
-- | @since 2.01
instance Show Int32 where
......
......@@ -97,10 +97,10 @@ instance Ord Word8 where
{-# INLINE [1] ltWord8 #-}
{-# INLINE [1] leWord8 #-}
gtWord8, geWord8, ltWord8, leWord8 :: Word8 -> Word8 -> Bool
(W8# x) `gtWord8` (W8# y) = isTrue# ((word8ToWord# x) `gtWord#` (word8ToWord# y))
(W8# x) `geWord8` (W8# y) = isTrue# ((word8ToWord# x) `geWord#` (word8ToWord# y))
(W8# x) `ltWord8` (W8# y) = isTrue# ((word8ToWord# x) `ltWord#` (word8ToWord# y))
(W8# x) `leWord8` (W8# y) = isTrue# ((word8ToWord# x) `leWord#` (word8ToWord# y))
(W8# x) `gtWord8` (W8# y) = isTrue# (x `gtWord8#` y)
(W8# x) `geWord8` (W8# y) = isTrue# (x `geWord8#` y)
(W8# x) `ltWord8` (W8# y) = isTrue# (x `ltWord8#` y)
(W8# x) `leWord8` (W8# y) = isTrue# (x `leWord8#` y)
-- | @since 2.01
instance Show Word8 where
......@@ -287,10 +287,10 @@ instance Ord Word16 where
{-# INLINE [1] ltWord16 #-}
{-# INLINE [1] leWord16 #-}
gtWord16, geWord16, ltWord16, leWord16 :: Word16 -> Word16 -> Bool
(W16# x) `gtWord16` (W16# y) = isTrue# ((word16ToWord# x) `gtWord#` (word16ToWord# y))
(W16# x) `geWord16` (W16# y) = isTrue# ((word16ToWord# x) `geWord#` (word16ToWord# y))
(W16# x) `ltWord16` (W16# y) = isTrue# ((word16ToWord# x) `ltWord#` (word16ToWord# y))
(W16# x) `leWord16` (W16# y) = isTrue# ((word16ToWord# x) `leWord#` (word16ToWord# y))
(W16# x) `gtWord16` (W16# y) = isTrue# (x `gtWord16#` y)
(W16# x) `geWord16` (W16# y) = isTrue# (x `geWord16#` y)
(W16# x) `ltWord16` (W16# y) = isTrue# (x `ltWord16#` y)
(W16# x) `leWord16` (W16# y) = isTrue# (x `leWord16#` y)
-- | @since 2.01
instance Show Word16 where
......@@ -520,10 +520,10 @@ instance Ord Word32 where
{-# INLINE [1] ltWord32 #-}
{-# INLINE [1] leWord32 #-}
gtWord32, geWord32, ltWord32, leWord32 :: Word32 -> Word32 -> Bool
(W32# x) `gtWord32` (W32# y) = isTrue# ((word32ToWord# x) `gtWord#` (word32ToWord# y))
(W32# x) `geWord32` (W32# y) = isTrue# ((word32ToWord# x) `geWord#` (word32ToWord# y))
(W32# x) `ltWord32` (W32# y) = isTrue# ((word32ToWord# x) `ltWord#` (word32ToWord# y))
(W32# x) `leWord32` (W32# y) = isTrue# ((word32ToWord# x) `leWord#` (word32ToWord# y))
(W32# x) `gtWord32` (W32# y) = isTrue# (x `gtWord32#` y)
(W32# x) `geWord32` (W32# y) = isTrue# (x `geWord32#` y)
(W32# x) `ltWord32` (W32# y) = isTrue# (x `ltWord32#` y)
(W32# x) `leWord32` (W32# y) = isTrue# (x `leWord32#` y)
-- | @since 2.01
instance Num Word32 where
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment