[Git][ghc/ghc][wip/marge_bot_batch_merge_job] Use sameByteArray# in sameByteArray

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Tue Oct 4 10:02:44 UTC 2022



Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC


Commits:
7b54bce2 by Oleg Grenrus at 2022-10-04T06:02:27-04:00
Use sameByteArray# in sameByteArray

- - - - -


1 changed file:

- libraries/base/Data/Array/Byte.hs


Changes:

=====================================
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



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/7b54bce29765886c98eda95dc9a6915aead956c3

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/7b54bce29765886c98eda95dc9a6915aead956c3
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20221004/fe07e4ef/attachment-0001.html>


More information about the ghc-commits mailing list