Safe Haskell | None |
---|---|
Language | Haskell2010 |
Big-endian fixed-width numbers.
Synopsis
- word8 :: e -> Parser e s Word8
- word16 :: e -> Parser e s Word16
- word32 :: e -> Parser e s Word32
- word64 :: e -> Parser e s Word64
- word128 :: e -> Parser e s Word128
- word256 :: e -> Parser e s Word256
- int8 :: e -> Parser e s Int8
- int16 :: e -> Parser e s Int16
- int32 :: e -> Parser e s Int32
- int64 :: e -> Parser e s Int64
- word16Array :: e -> Int -> Parser e s (PrimArray Word16)
- word32Array :: e -> Int -> Parser e s (PrimArray Word32)
- word64Array :: e -> Int -> Parser e s (PrimArray Word64)
- word128Array :: e -> Int -> Parser e s (PrimArray Word128)
- word256Array :: e -> Int -> Parser e s (PrimArray Word256)
Unsigned
Signed
Many
Unsigned
:: e | Error message if not enough bytes are present |
-> Int | Number of big-endian 16-bit words to expect |
-> Parser e s (PrimArray Word16) | Native-endian elements |
Parse an array of big-endian unsigned 16-bit words. If the host is
big-endian, the implementation is optimized to simply memcpy
bytes
into the result array. The result array always has elements in
native-endian byte order.
:: e | Error message if not enough bytes are present |
-> Int | Number of big-endian 32-bit words to expect |
-> Parser e s (PrimArray Word32) | Native-endian elements |
Parse an array of big-endian unsigned 32-bit words.
:: e | Error message if not enough bytes are present |
-> Int | Number of big-endian 64-bit words to consume |
-> Parser e s (PrimArray Word64) | Native-endian elements |
Parse an array of big-endian unsigned 64-bit words.