HORIZON HASKELLDocslts/ghc-10.0.x2b276322026-10-31Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 2b27632 · 2026-10-31

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