GHC.ArrayArray

base-4.17.0.0: Basic libraries

License | see libraries/base/LICENSE
Maintainer | cvs-ghc@haskell.org
Stability | internal
Portability | non-portable (GHC Extensions)
Safe Haskell | Trustworthy
Language | Haskell2010

GHC.ArrayArray

Description

Legacy interface for arrays of arrays. Deprecated, because the `Array#` type can now store arrays directly. Consider simply using `Array#` instead of `ArrayArray#`.

Use GHC.Exts instead of importing this module directly.

Synopsis

- newtype ArrayArray# = ArrayArray# (Array# ByteArray#)
- newtype MutableArrayArray# s = MutableArrayArray# (MutableArray# s ByteArray#)
- newArrayArray# :: Int# -> State# s -> (# State# s, MutableArrayArray# s #)
- unsafeFreezeArrayArray# :: MutableArrayArray# s -> State# s -> (# State# s, ArrayArray# #)
- sizeofArrayArray# :: ArrayArray# -> Int#
- sizeofMutableArrayArray# :: MutableArrayArray# s -> Int#
- indexByteArrayArray# :: ArrayArray# -> Int# -> ByteArray#
- indexArrayArrayArray# :: ArrayArray# -> Int# -> ArrayArray#
- readByteArrayArray# :: MutableArrayArray# s -> Int# -> State# s -> (# State# s, ByteArray# #)
- readMutableByteArrayArray# :: MutableArrayArray# s -> Int# -> State# s -> (# State# s, MutableByteArray# s #)
- readArrayArrayArray# :: MutableArrayArray# s -> Int# -> State# s -> (# State# s, ArrayArray# #)
- readMutableArrayArrayArray# :: MutableArrayArray# s -> Int# -> State# s -> (# State# s, MutableArrayArray# s #)
- writeByteArrayArray# :: MutableArrayArray# s -> Int# -> ByteArray# -> State# s -> State# s
- writeMutableByteArrayArray# :: MutableArrayArray# s -> Int# -> MutableByteArray# s -> State# s -> State# s
- writeArrayArrayArray# :: MutableArrayArray# s -> Int# -> ArrayArray# -> State# s -> State# s
- writeMutableArrayArrayArray# :: MutableArrayArray# s -> Int# -> MutableArrayArray# s -> State# s -> State# s
- copyArrayArray# :: ArrayArray# -> Int# -> MutableArrayArray# s -> Int# -> Int# -> State# s -> State# s
- copyMutableArrayArray# :: MutableArrayArray# s -> Int# -> MutableArrayArray# s -> Int# -> Int# -> State# s -> State# s
- sameArrayArray# :: ArrayArray# -> ArrayArray# -> Int#
- sameMutableArrayArray# :: MutableArrayArray# s -> MutableArrayArray# s -> Int#

# Documentation

newtype ArrayArray# Source #

Constructors

ArrayArray# (Array# ByteArray#) |

newtype MutableArrayArray# s Source #

Constructors

MutableArrayArray# (MutableArray# s ByteArray#) |

newArrayArray# :: Int# -> State# s -> (# State# s, MutableArrayArray# s #) Source #

Create a new mutable array of arrays with the specified number of elements, in the specified state thread, with each element recursively referring to the newly created array.

unsafeFreezeArrayArray# :: MutableArrayArray# s -> State# s -> (# State# s, ArrayArray# #) Source #

Make a mutable array of arrays immutable, without copying.

sizeofArrayArray# :: ArrayArray# -> Int# Source #

Return the number of elements in the array.

sizeofMutableArrayArray# :: MutableArrayArray# s -> Int# Source #

Return the number of elements in the array.

indexByteArrayArray# :: ArrayArray# -> Int# -> ByteArray# Source #

indexArrayArrayArray# :: ArrayArray# -> Int# -> ArrayArray# Source #

readByteArrayArray# :: MutableArrayArray# s -> Int# -> State# s -> (# State# s, ByteArray# #) Source #

readMutableByteArrayArray# :: MutableArrayArray# s -> Int# -> State# s -> (# State# s, MutableByteArray# s #) Source #

readArrayArrayArray# :: MutableArrayArray# s -> Int# -> State# s -> (# State# s, ArrayArray# #) Source #

readMutableArrayArrayArray# :: MutableArrayArray# s -> Int# -> State# s -> (# State# s, MutableArrayArray# s #) Source #

writeByteArrayArray# :: MutableArrayArray# s -> Int# -> ByteArray# -> State# s -> State# s Source #

writeMutableByteArrayArray# :: MutableArrayArray# s -> Int# -> MutableByteArray# s -> State# s -> State# s Source #

writeArrayArrayArray# :: MutableArrayArray# s -> Int# -> ArrayArray# -> State# s -> State# s Source #

writeMutableArrayArrayArray# :: MutableArrayArray# s -> Int# -> MutableArrayArray# s -> State# s -> State# s Source #

copyArrayArray# :: ArrayArray# -> Int# -> MutableArrayArray# s -> Int# -> Int# -> State# s -> State# s Source #

Copy a range of the `ArrayArray#` to the specified region in the `MutableArrayArray#`. Both arrays must fully contain the specified ranges, but this is not checked. The two arrays must not be the same array in different states, but this is not checked either.

copyMutableArrayArray# :: MutableArrayArray# s -> Int# -> MutableArrayArray# s -> Int# -> Int# -> State# s -> State# s Source #

Copy a range of the first MutableArrayArray# to the specified region in the second MutableArrayArray#. Both arrays must fully contain the specified ranges, but this is not checked. The regions are allowed to overlap, although this is only possible when the same array is provided as both the source and the destination.

sameArrayArray# :: ArrayArray# -> ArrayArray# -> Int# Source #

Compare the underlying pointers of two arrays of arrays.

sameMutableArrayArray# :: MutableArrayArray# s -> MutableArrayArray# s -> Int# Source #

Compare the underlying pointers of two mutable arrays of arrays.