HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulearray-0.5.8.0Haskell2010

Data.Array.IO

Mutable boxed and unboxed arrays in the IO monad.

  • 2 types
  • 2 values
  • Packagearray-0.5.8.0
  • Exports4
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceIO.hs

IO arrays with boxed elements

1 declaration
newtypenewtype IOArray i e
#

An IOArray is a mutable, boxed, non-strict array in the IO monad. The type arguments are as follows:

  • i: the index type of the array (should be an instance of Ix)

  • e: the element type of the array.

Instances2MArray, Eq
  • MArray IOArray e IODefined in array-0.5.8.0 · Data.Array.Base
  • Eq (IOArray i e)Defined in ghc-internal-9.1003.0 · GHC.Internal.IOArray

IO arrays with unboxed elements

1 declaration
newtypenewtype IOUArray i e
#

Mutable, unboxed, strict arrays in the IO monad. The type arguments are as follows:

  • i: the index type of the array (should be an instance of Ix)

  • e: the element type of the array. Only certain element types are supported: see Data.Array.MArray for a list of instances.

Instances18MArray, Eq, …

Overloaded mutable array interface

0 declarations

Doing I/O with IOUArrays

2 declarations
valuehGetArray
  1. :: Handle

    Handle to read from

  2. -> IOUArray Int Word8

    Array in which to place the values

  3. -> Int

    Number of Word8s to read

  4. -> IO Int

    Returns: the number of Word8s actually read, which might be smaller than the number requested if the end of file was reached.

#

Reads a number of Word8s from the specified Handle directly into an array.