diff options
Diffstat (limited to 'testsuite/tests/lib/integer/integerImportExport.hs')
-rw-r--r-- | testsuite/tests/lib/integer/integerImportExport.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/testsuite/tests/lib/integer/integerImportExport.hs b/testsuite/tests/lib/integer/integerImportExport.hs index bef208afd0..ab044214ed 100644 --- a/testsuite/tests/lib/integer/integerImportExport.hs +++ b/testsuite/tests/lib/integer/integerImportExport.hs @@ -33,13 +33,13 @@ newByteArray :: Word# -> IO MBA newByteArray sz = IO $ \s -> case newPinnedByteArray# (word2Int# sz) s of (# s, arr #) -> (# s, MBA arr #) indexByteArray :: ByteArray# -> Word# -> Word8 -indexByteArray a# n# = W8# (indexWord8Array# a# (word2Int# n#)) +indexByteArray a# n# = W8# (narrowWord8# (indexWord8Array# a# (word2Int# n#))) -- indexMutableByteArray :: MutableByteArray# RealWorld -> Word# -> IO Word8 -- indexMutableByteArray a# n# = IO $ \s -> case readWord8Array# a# (word2Int# n#) s of (# s', v #) -> (# s', W# v #) writeByteArray :: MutableByteArray# RealWorld -> Int# -> Word8 -> IO () -writeByteArray arr i (W8# w) = IO $ \s -> case writeWord8Array# arr i w s of s -> (# s, () #) +writeByteArray arr i (W8# w) = IO $ \s -> case writeWord8Array# arr i (extendWord8# w) s of s -> (# s, () #) lengthByteArray :: ByteArray# -> Word lengthByteArray ba = W# (int2Word# (sizeofByteArray# ba)) |