summaryrefslogtreecommitdiff
path: root/libraries/base/GHC/Int.hs
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2022-06-14 08:53:44 -0400
committerMatthew Pickering <matthewtpickering@gmail.com>2023-02-06 15:24:49 +0000
commitce3b05d03f60fb66f4d0a0f312c790070aee5088 (patch)
treeb468e8c30321ff28a4efbd76a0fb80087601c653 /libraries/base/GHC/Int.hs
parent0e0c57b14e8a147a36d5a95429d9346a96476848 (diff)
downloadhaskell-wip/mp-revert-exit-joins.tar.gz
Revert "Use fix-sized equality primops for fixed size boxed types"wip/mp-revert-exit-joins
This reverts commit 024020c38126f3ce326ff56906d53525bc71690c. (cherry picked from commit b1d109ad542e4c37ae5af6ace71baf2cb509d865)
Diffstat (limited to 'libraries/base/GHC/Int.hs')
-rw-r--r--libraries/base/GHC/Int.hs12
1 files changed, 6 insertions, 6 deletions
diff --git a/libraries/base/GHC/Int.hs b/libraries/base/GHC/Int.hs
index 5afe9db6a5..fa96f5b5d4 100644
--- a/libraries/base/GHC/Int.hs
+++ b/libraries/base/GHC/Int.hs
@@ -69,8 +69,8 @@ instance Eq Int8 where
(/=) = neInt8
eqInt8, neInt8 :: Int8 -> Int8 -> Bool
-eqInt8 (I8# x) (I8# y) = isTrue# (x `eqInt8#` y)
-neInt8 (I8# x) (I8# y) = isTrue# (x `neInt8#` y)
+eqInt8 (I8# x) (I8# y) = isTrue# ((int8ToInt# x) ==# (int8ToInt# y))
+neInt8 (I8# x) (I8# y) = isTrue# ((int8ToInt# x) /=# (int8ToInt# y))
{-# INLINE [1] eqInt8 #-}
{-# INLINE [1] neInt8 #-}
@@ -280,8 +280,8 @@ instance Eq Int16 where
(/=) = neInt16
eqInt16, neInt16 :: Int16 -> Int16 -> Bool
-eqInt16 (I16# x) (I16# y) = isTrue# (x `eqInt16#` y)
-neInt16 (I16# x) (I16# y) = isTrue# (x `neInt16#` y)
+eqInt16 (I16# x) (I16# y) = isTrue# ((int16ToInt# x) ==# (int16ToInt# y))
+neInt16 (I16# x) (I16# y) = isTrue# ((int16ToInt# x) /=# (int16ToInt# y))
{-# INLINE [1] eqInt16 #-}
{-# INLINE [1] neInt16 #-}
@@ -488,8 +488,8 @@ instance Eq Int32 where
(/=) = neInt32
eqInt32, neInt32 :: Int32 -> Int32 -> Bool
-eqInt32 (I32# x) (I32# y) = isTrue# (x `eqInt32#` y)
-neInt32 (I32# x) (I32# y) = isTrue# (x `neInt32#` y)
+eqInt32 (I32# x) (I32# y) = isTrue# ((int32ToInt# x) ==# (int32ToInt# y))
+neInt32 (I32# x) (I32# y) = isTrue# ((int32ToInt# x) /=# (int32ToInt# y))
{-# INLINE [1] eqInt32 #-}
{-# INLINE [1] neInt32 #-}