License | BSD-style |
---|---|
Maintainer | Vincent Hanquez <vincent@snarc.org> |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Common part for vectors
Synopsis
- 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.
Instances
Show OutOfBound # | |
Defined in Basement.Exception showsPrec :: Int -> OutOfBound -> ShowS # show :: OutOfBound -> String # showList :: [OutOfBound] -> ShowS # | |
Exception OutOfBound # | |
Defined in Basement.Exception toException :: OutOfBound -> SomeException # fromException :: SomeException -> Maybe OutOfBound # displayException :: OutOfBound -> String # |
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
Instances
Eq OutOfBoundOperation # | |
Defined in Basement.Exception (==) :: OutOfBoundOperation -> OutOfBoundOperation -> Bool # (/=) :: OutOfBoundOperation -> OutOfBoundOperation -> Bool # | |
Show OutOfBoundOperation # | |
Defined in Basement.Exception showsPrec :: Int -> OutOfBoundOperation -> ShowS # show :: OutOfBoundOperation -> String # showList :: [OutOfBoundOperation] -> ShowS # |
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 #
Instances
Show InvalidRecast # | |
Defined in Basement.Exception showsPrec :: Int -> InvalidRecast -> ShowS # show :: InvalidRecast -> String # showList :: [InvalidRecast] -> ShowS # | |
Exception InvalidRecast # | |
Defined in Basement.Exception |
newtype RecastSourceSize #
Instances
Eq RecastSourceSize # | |
Defined in Basement.Exception (==) :: RecastSourceSize -> RecastSourceSize -> Bool # (/=) :: RecastSourceSize -> RecastSourceSize -> Bool # | |
Show RecastSourceSize # | |
Defined in Basement.Exception showsPrec :: Int -> RecastSourceSize -> ShowS # show :: RecastSourceSize -> String # showList :: [RecastSourceSize] -> ShowS # |
newtype RecastDestinationSize #
Instances
Eq RecastDestinationSize # | |
Defined in Basement.Exception (==) :: RecastDestinationSize -> RecastDestinationSize -> Bool # (/=) :: RecastDestinationSize -> RecastDestinationSize -> Bool # | |
Show RecastDestinationSize # | |
Defined in Basement.Exception showsPrec :: Int -> RecastDestinationSize -> ShowS # show :: RecastDestinationSize -> String # showList :: [RecastDestinationSize] -> ShowS # |
data NonEmptyCollectionIsEmpty #
Exception for using NonEmpty assertion with an empty collection
Instances
Show NonEmptyCollectionIsEmpty # | |
Defined in Basement.Exception showsPrec :: Int -> NonEmptyCollectionIsEmpty -> ShowS # show :: NonEmptyCollectionIsEmpty -> String # showList :: [NonEmptyCollectionIsEmpty] -> ShowS # | |
Exception NonEmptyCollectionIsEmpty # | |