Idris2Doc : Data.Array.Mutable

Data.Array.Mutable

(source)

Reexports

importpublic Data.Linear.Token
importpublic Data.Array.Core
importpublic Data.Array.Index

Definitions

setAtSuffix : MArrays (lengthys) a->Suffix (x::xs) ys->a->F1's
  Set a value in a mutable array corresponding to a position in a list
used for filling said array.

Totality: total
Visibility: export
setIx : MArraysna-> (0m : Nat) ->Ix (Sm) n=>a->F1's
  Set a value at index `n - m` in a mutable array.

This actually uses the auto implicit argument for accessing the
the array. It is mainly useful for iterating over an array from the left
by using a natural number for counting down (see also the documentation
for `Ix`).

Totality: total
Visibility: export
setNat : MArraysna-> (m : Nat) -> {auto0_ : LTmn} ->a->F1's
  Set a value at index `m` in a mutable array.

Totality: total
Visibility: export
getIx : MArraysna-> (0m : Nat) ->Ix (Sm) n=>F1sa
  Read a value at index `n - m` from a mutable array.

This actually uses the auto implicit argument for accessing the
the array. It is mainly useful for iterating over an array from the left
by using a natural number for counting down (see also the documentation
for `Ix`).

Totality: total
Visibility: export
getNat : MArraysna-> (m : Nat) -> {auto0_ : LTmn} ->F1sa
  Read a value at index `m` from a mutable array.

Totality: total
Visibility: export
modifyIx : MArraysna-> (0m : Nat) ->Ix (Sm) n=> (a->a) ->F1's
  Modify a value at index `n - m` in a mutable array.

This actually uses the auto implicit argument for accessing the
the array. It is mainly useful for iterating over an array from the left
by using a natural number for counting down (see also the documentation
for `Ix`).

Totality: total
Visibility: export
modifyNat : MArraysna-> (m : Nat) -> {auto0_ : LTmn} -> (a->a) ->F1's
  Modify a value at index `m` in a mutable array.

Totality: total
Visibility: export
writeList : MArrays (lengthxs) a-> (ys : Lista) ->Suffixysxs=>F1's
  Writes the data from a list to a mutable array.

This uses the `Suffix` proof for safely indexing into the array.

Totality: total
Visibility: export
writeListWith : MArrays (lengthxs) b-> (ys : Lista) -> (a->b) ->Suffixysxs=>F1's
  Writes the data from a list to a mutable array.

This uses the `Suffix` proof for safely indexing into the array.

Totality: total
Visibility: export
writeVect : MArraysna->Vectka->Ixkn=>F1's
  Writes the data from a vector to a mutable array.

Totality: total
Visibility: export
writeVectRev : MArraysna-> (m : Nat) ->Vectka-> {auto0_ : LTEmn} ->F1's
  Writes the data from a vector to a mutable array in reverse order.

Totality: total
Visibility: export
genFrom : MArraysna-> (m : Nat) -> {auto0_ : LTEmn} -> (Finn->a) ->F1's
  Overwrite the values in a mutable array from the
given index downward with the result of the given function.

Totality: total
Visibility: export
genFrom' : MArraysna-> (m : Nat) -> {auto0_ : LTEmn} -> (Finn->F1sa) ->F1's
  Overwrite the values in a mutable array from the
given index downward with the result of the given function.

Totality: total
Visibility: export
iterateFrom : MArraysna-> (m : Nat) ->Ixmn=> (a->a) ->a->F1's
  Overwrite the values in a mutable array from the
given index upward with the results of applying the given
function repeatedly.

Totality: total
Visibility: export
allocList : (xs : Lista) ->WithMArray (lengthxs) ab->b
Totality: total
Visibility: export
allocListWith : (xs : Lista) -> (a->b) ->WithMArray (lengthxs) bc->c
Totality: total
Visibility: export
allocVect : Vectna->WithMArraynab->b
Totality: total
Visibility: export
allocVectRev : Vectna->WithMArraynab->b
Totality: total
Visibility: export
allocGen : (n : Nat) -> (Finn->a) ->WithMArraynab->b
Totality: total
Visibility: export
allocIter : (n : Nat) -> (a->a) ->a->WithMArraynab->b
Totality: total
Visibility: export
mgrow : MArraysna-> (m : Nat) ->a->F1s (MArrays (m+n) a)
  Allocates a new mutable array and adds the elements from `r`
at its beginning.

Totality: total
Visibility: export
mappend : MArraysma->MArraysna->F1s (MArrays (m+n) a)
  Allocates a new mutable array and adds the elements from `p`
at its beginning, followed by adding the elements from `q`.

Totality: total
Visibility: export
mfilterWithKey : MArraysna-> (Finn->a->Bool) ->F1s (m : Nat**MArraysma)
  Filters the values in a mutable array according to the given predicate.

Totality: total
Visibility: export
mfilter : MArraysna-> (a->Bool) ->F1s (m : Nat**MArraysma)
  Filters the values in a mutable array according to the given predicate.

Totality: total
Visibility: export
mmapMaybeWithKey : MArraysna-> (Finn->a->Maybeb) ->F1s (m : Nat**MArraysmb)
  Filters the values in a mutable array according to the given predicate.

Totality: total
Visibility: export
mdrop : (m : Nat) ->MArraysna->F1s (MArrays (minusnm) a)
  Drop `m` elements from a mutable array.

Totality: total
Visibility: export
mupdate1 : (a->F1sa) ->MArraysna->F1's
  Apply an effectful function `f` to each element of the mutable array.

Unlike `mmap1` and `mmap`, this function performs inplace mutation.

Totality: total
Visibility: export
mupdate : (a->a) ->MArraysna->F1's
  Apply a function `f` to each element of the mutable array.

Unlike `mmap1` and `mmap`, this function performs inplace mutation.

Totality: total
Visibility: export
mmap1 : (a->F1sb) ->MArraysna->F1s (MArraysnb)
  Apply a function `f` to each element of the mutable array.

Totality: total
Visibility: export
mmap : (a->b) ->MArraysna->F1s (MArraysnb)
  Apply a function `f` to each element of the mutable array.

Totality: total
Visibility: export
mreverse : MArrayska->F1s (MArrayska)
  Reverse the order of elements in a mutable array.

Totality: total
Visibility: export
foldrLin : MArrayska-> (a->b->b) ->b->F1sb
  Accumulate the values stored in a mutable array.

Totality: total
Visibility: export
toVect : MArrayska->F1s (Vectka)
  Store the values in a mutable array in a `Vect` of the same size.

Totality: total
Visibility: export
toVectWith : MArrayska-> (Fink->a->b) ->F1s (Vectkb)
  Extract and convert the values stored in a mutable array
and store them in a `Vect` of the same size.

Totality: total
Visibility: export