summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2021-01-13 10:50:24 -0500
committerBen Gamari <ben@smart-cactus.org>2021-03-10 13:18:17 -0500
commit7d212b4912edbf388e9d54a19fb3a3bffc9ec5c0 (patch)
tree7fbabb33bfe2775413c959b50c47e1c45986d959
parent5581e7b4c3ab6aa2bb7cca6ed917ed40ad3ed423 (diff)
downloadhaskell-7d212b4912edbf388e9d54a19fb3a3bffc9ec5c0.tar.gz
FastMutInt: Drop FastMutPtr
This appears to be unused.
-rw-r--r--compiler/GHC/Data/FastMutInt.hs26
1 files changed, 1 insertions, 25 deletions
diff --git a/compiler/GHC/Data/FastMutInt.hs b/compiler/GHC/Data/FastMutInt.hs
index d7b8072b2c..0cc26d793c 100644
--- a/compiler/GHC/Data/FastMutInt.hs
+++ b/compiler/GHC/Data/FastMutInt.hs
@@ -9,26 +9,18 @@
module GHC.Data.FastMutInt(
FastMutInt, newFastMutInt,
- readFastMutInt, writeFastMutInt,
-
- FastMutPtr, newFastMutPtr,
- readFastMutPtr, writeFastMutPtr
+ readFastMutInt, writeFastMutInt
) where
import GHC.Prelude
import Data.Bits
import GHC.Base
-import GHC.Ptr
newFastMutInt :: IO FastMutInt
readFastMutInt :: FastMutInt -> IO Int
writeFastMutInt :: FastMutInt -> Int -> IO ()
-newFastMutPtr :: IO FastMutPtr
-readFastMutPtr :: FastMutPtr -> IO (Ptr a)
-writeFastMutPtr :: FastMutPtr -> Ptr a -> IO ()
-
data FastMutInt = FastMutInt (MutableByteArray# RealWorld)
newFastMutInt = IO $ \s ->
@@ -43,19 +35,3 @@ readFastMutInt (FastMutInt arr) = IO $ \s ->
writeFastMutInt (FastMutInt arr) (I# i) = IO $ \s ->
case writeIntArray# arr 0# i s of { s ->
(# s, () #) }
-
-data FastMutPtr = FastMutPtr (MutableByteArray# RealWorld)
-
-newFastMutPtr = IO $ \s ->
- case newByteArray# size s of { (# s, arr #) ->
- (# s, FastMutPtr arr #) }
- -- GHC assumes 'sizeof (Int) == sizeof (Ptr a)'
- where !(I# size) = finiteBitSize (0 :: Int) `unsafeShiftR` 3
-
-readFastMutPtr (FastMutPtr arr) = IO $ \s ->
- case readAddrArray# arr 0# s of { (# s, i #) ->
- (# s, Ptr i #) }
-
-writeFastMutPtr (FastMutPtr arr) (Ptr i) = IO $ \s ->
- case writeAddrArray# arr 0# i s of { s ->
- (# s, () #) }