basement-0.0.11: 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 Source #

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 Source # 
Instance details

Defined in Basement.Exception

Methods

showsPrec :: Int -> OutOfBound -> ShowS #

show :: OutOfBound -> String #

showList :: [OutOfBound] -> ShowS #

Exception OutOfBound Source # 
Instance details

Defined in Basement.Exception

Methods

toException :: OutOfBound -> SomeException

fromException :: SomeException -> Maybe OutOfBound

displayException :: OutOfBound -> String

data OutOfBoundOperation Source #

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

data InvalidRecast Source #

Instances
Show InvalidRecast Source # 
Instance details

Defined in Basement.Exception

Methods

showsPrec :: Int -> InvalidRecast -> ShowS #

show :: InvalidRecast -> String #

showList :: [InvalidRecast] -> ShowS #

Exception InvalidRecast Source # 
Instance details

Defined in Basement.Exception

Methods

toException :: InvalidRecast -> SomeException

fromException :: SomeException -> Maybe InvalidRecast

displayException :: InvalidRecast -> String

data NonEmptyCollectionIsEmpty Source #

Exception for using NonEmpty assertion with an empty collection