basement-0.0.12: Foundation scrap box of array & string
LicenseBSD-style
MaintainerVincent Hanquez <vincent@snarc.org>
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Basement.Exception

Description

Common part for vectors

Synopsis

Documentation

data OutOfBound #

Exception during an operation accessing the vector out of bound

Represent the type of operation, the index accessed, and the total length of the vector.

data OutOfBoundOperation #

The type of operation that triggers an OutOfBound exception.

  • OOB_Index: reading an immutable vector
  • OOB_Read: reading a mutable vector
  • OOB_Write: write a mutable vector
  • OOB_MemCopy: copying a vector
  • OOB_MemSet: initializing a mutable vector

primOutOfBound :: PrimMonad prim => OutOfBoundOperation -> Offset ty -> CountOf ty -> prim a #