License | BSD-style |
---|---|
Maintainer | Vincent Hanquez <vincent@snarc.org> |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Common part for vectors
- data OutOfBound = OutOfBound OutOfBoundOperation Int Int
- data OutOfBoundOperation
- isOutOfBound :: Offset ty -> CountOf ty -> Bool
- outOfBound :: OutOfBoundOperation -> Offset ty -> CountOf ty -> a
- primOutOfBound :: PrimMonad prim => OutOfBoundOperation -> Offset ty -> CountOf ty -> prim a
- data InvalidRecast = InvalidRecast RecastSourceSize RecastDestinationSize
- newtype RecastSourceSize = RecastSourceSize Int
- newtype RecastDestinationSize = RecastDestinationSize Int
- data NonEmptyCollectionIsEmpty = NonEmptyCollectionIsEmpty
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
isOutOfBound :: Offset ty -> CountOf ty -> Bool #
outOfBound :: OutOfBoundOperation -> Offset ty -> CountOf ty -> a #
primOutOfBound :: PrimMonad prim => OutOfBoundOperation -> Offset ty -> CountOf ty -> prim a #
data InvalidRecast #
newtype RecastDestinationSize #
data NonEmptyCollectionIsEmpty #
Exception for using NonEmpty assertion with an empty collection