Data.HashMap.Internal.Array
WARNING
This module is considered internal.
The Package Versioning Policy does not apply.
The contents of this module may change in any way whatsoever and without any warning between minor versions of this package.
Authors importing this module are expected to track development closely.
Description
Zero based arrays.
Note that no bounds checking are performed.
Documentation
Constructors
Array | |
Fields
|
Creation
new :: Int -> a -> ST s (MArray s a) Source #
Create a new mutable array of specified size, in the specified state thread, with each element containing the specified initial value.
singletonM :: a -> ST s (Array a) Source #
Basic interface
update :: Array e -> Int -> e -> Array e Source #
updateWith' :: Array e -> Int -> (e -> e) -> Array e Source #
unsafeUpdateM :: Array e -> Int -> e -> ST s () Source #
insert :: Array e -> Int -> e -> Array e Source #
insertM :: Array e -> Int -> e -> ST s (Array e) Source #
delete :: Array e -> Int -> Array e Source #
trim :: MArray s a -> Int -> ST s (Array a) Source #
Create a new array of the n
first elements of mary
.
copy :: Array e -> Int -> MArray s e -> Int -> Int -> ST s () Source #
Unsafely copy the elements of an array. Array bounds are not checked.
copyM :: MArray s e -> Int -> MArray s e -> Int -> Int -> ST s () Source #
Unsafely copy the elements of an array. Array bounds are not checked.