summaryrefslogtreecommitdiff
path: root/libraries/base/GHC/Storable.hs
diff options
context:
space:
mode:
authorSylvain Henry <sylvain@haskus.fr>2021-11-02 18:21:46 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-11-06 07:53:42 -0400
commit2800eee24d006cfe5ed224e35e856154ae0cd444 (patch)
tree0b885b48cb1d0b31701a97a6532215e4009414f0 /libraries/base/GHC/Storable.hs
parent20956e5784fe43781d156dd7ab02f0bff4ab41fb (diff)
downloadhaskell-2800eee24d006cfe5ed224e35e856154ae0cd444.tar.gz
Make Word64 use Word64# on every architecture
Diffstat (limited to 'libraries/base/GHC/Storable.hs')
-rw-r--r--libraries/base/GHC/Storable.hs17
1 files changed, 0 insertions, 17 deletions
diff --git a/libraries/base/GHC/Storable.hs b/libraries/base/GHC/Storable.hs
index 548430eb59..d9b9382211 100644
--- a/libraries/base/GHC/Storable.hs
+++ b/libraries/base/GHC/Storable.hs
@@ -1,4 +1,3 @@
-{-# LANGUAGE CPP #-}
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE NoImplicitPrelude, MagicHash, UnboxedTuples #-}
{-# OPTIONS_HADDOCK not-home #-}
@@ -52,8 +51,6 @@ module GHC.Storable
, writeWord64OffPtr
) where
-#include "MachDeps.h"
-
import GHC.Stable ( StablePtr(..) )
import GHC.Int
import GHC.Word
@@ -105,17 +102,10 @@ readInt32OffPtr (Ptr a) (I# i)
= IO $ \s -> case readInt32OffAddr# a i s of (# s2, x #) -> (# s2, I32# x #)
readWord32OffPtr (Ptr a) (I# i)
= IO $ \s -> case readWord32OffAddr# a i s of (# s2, x #) -> (# s2, W32# x #)
-#if WORD_SIZE_IN_BITS < 64
readInt64OffPtr (Ptr a) (I# i)
= IO $ \s -> case readInt64OffAddr# a i s of (# s2, x #) -> (# s2, I64# x #)
readWord64OffPtr (Ptr a) (I# i)
= IO $ \s -> case readWord64OffAddr# a i s of (# s2, x #) -> (# s2, W64# x #)
-#else
-readInt64OffPtr (Ptr a) (I# i)
- = IO $ \s -> case readInt64OffAddr# a i s of (# s2, x #) -> (# s2, I64# (int64ToInt# x) #)
-readWord64OffPtr (Ptr a) (I# i)
- = IO $ \s -> case readWord64OffAddr# a i s of (# s2, x #) -> (# s2, W64# (word64ToWord# x) #)
-#endif
writeWideCharOffPtr :: Ptr Char -> Int -> Char -> IO ()
writeIntOffPtr :: Ptr Int -> Int -> Int -> IO ()
@@ -162,14 +152,7 @@ writeInt32OffPtr (Ptr a) (I# i) (I32# x)
= IO $ \s -> case writeInt32OffAddr# a i x s of s2 -> (# s2, () #)
writeWord32OffPtr (Ptr a) (I# i) (W32# x)
= IO $ \s -> case writeWord32OffAddr# a i x s of s2 -> (# s2, () #)
-#if WORD_SIZE_IN_BITS < 64
writeInt64OffPtr (Ptr a) (I# i) (I64# x)
= IO $ \s -> case writeInt64OffAddr# a i x s of s2 -> (# s2, () #)
writeWord64OffPtr (Ptr a) (I# i) (W64# x)
= IO $ \s -> case writeWord64OffAddr# a i x s of s2 -> (# s2, () #)
-#else
-writeInt64OffPtr (Ptr a) (I# i) (I64# x)
- = IO $ \s -> case writeInt64OffAddr# a i (intToInt64# x) s of s2 -> (# s2, () #)
-writeWord64OffPtr (Ptr a) (I# i) (W64# x)
- = IO $ \s -> case writeWord64OffAddr# a i (wordToWord64# x) s of s2 -> (# s2, () #)
-#endif