# Data.IOArray

data IOArray : Type -> Type
  MkIOArray : ArrayData elem -> IOArray elem
newArray : Int -> elem -> IO (IOArray elem)

  Create a new array of the given size, with all entries set to the
  given default element.

unsafeReadArray : IOArray elem -> Int -> IO elem

  Read the element at a location in an array.
  There is no bounds checking, hence this is unsafe. Safe interfaces can
  be implemented on top of this, either with a run time or compile time
  check.

unsafeWriteArray : IOArray elem -> Int -> elem -> IO ()

  Write an element at a location in an array.
  There is no bounds checking, hence this is unsafe. Safe interfaces can
  be implemented on top of this, either with a run time or compile time
  check.