summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleg Grenrus <oleg.grenrus@iki.fi>2022-10-03 11:08:54 +0300
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-10-04 20:35:24 -0400
commit463ffe0287eab354a438304111041ef82d2ed016 (patch)
tree66a601928a27e69c11a0a3d32c77bf87b8417f99
parentb8df5c72185effbe2cca8d6038d2a356690c9d00 (diff)
downloadhaskell-463ffe0287eab354a438304111041ef82d2ed016.tar.gz
Use sameByteArray# in sameByteArray
-rw-r--r--libraries/base/Data/Array/Byte.hs3
1 files changed, 1 insertions, 2 deletions
diff --git a/libraries/base/Data/Array/Byte.hs b/libraries/base/Data/Array/Byte.hs
index 4e9071cbb1..cdd7885462 100644
--- a/libraries/base/Data/Array/Byte.hs
+++ b/libraries/base/Data/Array/Byte.hs
@@ -185,8 +185,7 @@ compareByteArraysFromBeginning (ByteArray ba1#) (ByteArray ba2#) (I# n#)
-- | Do two byte arrays share the same pointer?
sameByteArray :: ByteArray# -> ByteArray# -> Bool
sameByteArray ba1 ba2 =
- case reallyUnsafePtrEquality# (unsafeCoerce# ba1 :: ()) (unsafeCoerce# ba2 :: ()) of
- r -> isTrue# r
+ case sameByteArray# ba1 ba2 of r -> isTrue# r
-- | @since 4.17.0.0
instance Eq ByteArray where