Idris2Doc : Data.Buffer.Indexed

Data.Buffer.Indexed

(source)

Reexports

importpublic Data.Array.Index
importpublic Data.Array.Indexed

Definitions

ix : IBuffern-> (0m : Nat) ->Ix (Sm) n=>Bits8
  Safely access a value in an immutable byte array at position `n - m`.

Totality: total
Visibility: export
atNat : IBuffern-> (m : Nat) -> {auto0_ : LTmn} ->Bits8
  Safely access a value in an immutable byte array at the given position.

Totality: total
Visibility: export
atByte : IBuffer256->Bits8->Bits8
  Safely access a value at the given byte position.

Totality: total
Visibility: export
empty : IBuffer0
  The empty byte array.

Totality: total
Visibility: export
bufferL : (ls : ListBits8) ->IBuffer (lengthls)
  Copy the values in a list to an immutable byte array of the same length.

Totality: total
Visibility: export
buffer : VectnBits8->IBuffern
  Copy the values in a vector to an immutable byte array of the same length.

Totality: total
Visibility: export
revBuffer : VectnBits8->IBuffern
  Copy the values in a vector to an immutable byte array of the same length
in reverse order.

This is useful the values in the byte array have been collected
from tail to head for instance when parsing some data.

Totality: total
Visibility: export
generate : (n : Nat) -> (Finn->Bits8) ->IBuffern
  Generate an immutable byte array of the given size using
the given iteration function.

Totality: total
Visibility: export
fill : (n : Nat) ->Bits8->IBuffern
  Fill an immutable byte array of the given size with the given value.

Totality: total
Visibility: export
iterate : (n : Nat) -> (Bits8->Bits8) ->Bits8->IBuffern
  Generate an immutable byte array of the given size by filling it with the
results of repeatedly applying `f` to the initial value.

Totality: total
Visibility: export
force : IBuffern->IBuffern
  Copy the content of an immutable byte array to a new immutable byte array.

This is mainly useful for reducing memory consumption, in case the
original array is actually backed by a much larger array, for
instance after taking a smaller prefix of a large array with `take`.

Totality: total
Visibility: export
hcomp : IBufferm->IBuffern->Ordering
  Lexicographic comparison of immutable byte arrays of distinct length.

Totality: total
Visibility: export
heq : IBufferm->IBuffern->Bool
  Heterogeneous equality for immutable byte arrays.

Totality: total
Visibility: export
toVect : IBuffern->VectnBits8
  Convert an immutable byte array to a vector of the same length.

Totality: total
Visibility: export
toVectWithIndex : IBuffern->Vectn (Finn, Bits8)
  Convert an immutable byte array to a vector of the same length
pairing all values with their index.

Totality: total
Visibility: export
foldr : (Bits8->a->a) ->a->IBuffern->a
  Right fold over the values of an immutable byte array plus their indices.

Totality: total
Visibility: export
toList : IBuffern->ListBits8
Totality: total
Visibility: export
foldrKV : (Finn->Bits8->a->a) ->a->IBuffern->a
  Right fold over the values of an immutable  byte array plus their indices.

Totality: total
Visibility: export
foldl : (a->Bits8->a) ->a->IBuffern->a
  Left fold over the values of an immutable byte array.

Totality: total
Visibility: export
toSnocList : IBuffern->SnocListBits8
Totality: total
Visibility: export
foldlKV : (Finn->a->Bits8->a) ->a->IBuffern->a
  Left fold over the values of an immutable byte array plus their indices.

Totality: total
Visibility: export
mapWithIndex : (Finn->Bits8->Bits8) ->IBuffern->IBuffern
  Mapping over the values of an immutable byte array together with their indices.

Totality: total
Visibility: export
map : (Bits8->Bits8) ->IBuffern->IBuffern
  Mapping over the values of an immutable byte array together with their indices.

Totality: total
Visibility: export
updateAt : Finn-> (Bits8->Bits8) ->IBuffern->IBuffern
  Update a single position in an immutable array by applying the given
function.

This will have to copy the whole array, so it runs in O(n).

Totality: total
Visibility: export
setAt : Finn->Bits8->IBuffern->IBuffern
  Set a single position in an immutable byte array.

This will have to copy the whole array, so it runs in O(n).

Totality: total
Visibility: export
traverseWithIndex : Applicativef=> (Finn->Bits8->fBits8) ->IBuffern->f (IBuffern)
  Effectful traversal of the values in an immutable byte array together with
their corresponding indices.

Totality: total
Visibility: export
traverse : Applicativef=> (Bits8->fBits8) ->IBuffern->f (IBuffern)
Totality: total
Visibility: export
append : IBufferm->IBuffern->IBuffer (m+n)
  Concatenate two immutable byte arrays.

Totality: total
Visibility: export
drop : (m : Nat) ->IBuffern->IBuffer (minusnm)
  Drop n elements from a immutable byte array. O(n)

Totality: total
Visibility: export
pack : ListBits8->AnyBuffer
Totality: total
Visibility: export
unpack : AnyBuffer->ListBits8
Totality: total
Visibility: export