summaryrefslogtreecommitdiff
path: root/testsuite/tests/ffi/should_run
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/ffi/should_run')
-rw-r--r--testsuite/tests/ffi/should_run/T16650a.hs2
-rw-r--r--testsuite/tests/ffi/should_run/T16650b.hs2
-rw-r--r--testsuite/tests/ffi/should_run/UnliftedNewtypesByteArrayOffset.hs4
3 files changed, 3 insertions, 5 deletions
diff --git a/testsuite/tests/ffi/should_run/T16650a.hs b/testsuite/tests/ffi/should_run/T16650a.hs
index ab1cd9c67e..6a43a55118 100644
--- a/testsuite/tests/ffi/should_run/T16650a.hs
+++ b/testsuite/tests/ffi/should_run/T16650a.hs
@@ -44,4 +44,4 @@ luckySingleton = IO $ \s0 -> case newByteArray# 1# s0 of
readByteArray :: MutableByteArray -> Int -> IO Word8
readByteArray (MutableByteArray b#) (I# i#) = IO $ \s0 ->
case readWord8Array# b# i# s0 of
- (# s1, w #) -> (# s1, W8# w #)
+ (# s1, w #) -> (# s1, W8# (narrowWord8# w) #)
diff --git a/testsuite/tests/ffi/should_run/T16650b.hs b/testsuite/tests/ffi/should_run/T16650b.hs
index 763329fc8b..ba0d4a72a0 100644
--- a/testsuite/tests/ffi/should_run/T16650b.hs
+++ b/testsuite/tests/ffi/should_run/T16650b.hs
@@ -53,7 +53,7 @@ luckySingleton = IO $ \s0 -> case newByteArray# 1# s0 of
readByteArray :: MutableByteArray -> Int -> IO Word8
readByteArray (MutableByteArray b#) (I# i#) = IO $ \s0 ->
case readWord8Array# b# i# s0 of
- (# s1, w #) -> (# s1, W8# w #)
+ (# s1, w #) -> (# s1, W8# (narrowWord8# w) #)
-- Write a mutable byte array to the array of mutable byte arrays
-- at the given index.
diff --git a/testsuite/tests/ffi/should_run/UnliftedNewtypesByteArrayOffset.hs b/testsuite/tests/ffi/should_run/UnliftedNewtypesByteArrayOffset.hs
index 8e0aaeef50..8953e9b02d 100644
--- a/testsuite/tests/ffi/should_run/UnliftedNewtypesByteArrayOffset.hs
+++ b/testsuite/tests/ffi/should_run/UnliftedNewtypesByteArrayOffset.hs
@@ -35,7 +35,7 @@ main = do
readByteArray :: MutableByteArray -> Int -> IO Word8
readByteArray (MutableByteArray b#) (I# i#) = IO $ \s0 ->
case readWord8Array# b# i# s0 of
- (# s1, w #) -> (# s1, W8# w #)
+ (# s1, w #) -> (# s1, W8# (narrowWord8# w) #)
-- Create a new mutable byte array of length 1 with the sole byte
-- set to the 105.
@@ -43,5 +43,3 @@ luckySingleton :: IO MutableByteArray
luckySingleton = IO $ \s0 -> case newByteArray# 1# s0 of
(# s1, marr# #) -> case writeWord8Array# marr# 0# 105## s1 of
s2 -> (# s2, MutableByteArray marr# #)
-
-