HORIZON HASKELLDocslts/ghc-9.14.x7a6c33e2026-10-12Search packagesCtrl K
Theme: |

GHC 9.14.1 · lts/ghc-9.14.x · 7a6c33e · 2026-10-12

Bool#

Int#

Word#

Addr import/export

valuewordFromAddr#
  1. :: Word#
  2. -> Addr#
  3. -> Bool#
  4. -> State# s
  5. -> (# State# s, Word# #)

Read a Word from addr in base-256 representation.

@n is the number of bytes to read.

The endianness is selected with the Bool# parameter: write most significant byte first (big-endian) if 1# or least significant byte first (little-endian) if 0#.

valuewordToAddr# :: Word# -> Addr# -> Bool# -> State# s -> (# State# s, Word# #)

Write a Word to addr in base-256 representation and return the number of bytes written.

The endianness is selected with the Bool# parameter: write most significant byte first (big-endian) if 1# or least significant byte first (little-endian) if 0#.

ByteArray import/export

Read a Word from ByteArray in base-256 representation.

@n is the number of bytes to read.

The endianness is selected with the Bool# parameter: write most significant byte first (big-endian) if 1# or least significant byte first (little-endian) if 0#.

Write a Word to MutableByteArray in base-256 representation and return the number of bytes written.

The endianness is selected with the Bool# parameter: write most significant byte first (big-endian) if 1# or least significant byte first (little-endian) if 0#.

The offset is in bytes.

Exception

IO