basement-0.0.14: 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

Instances details
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

Instances

Instances details
Eq OutOfBoundOperation Source # 
Instance details

Defined in Basement.Exception

Show OutOfBoundOperation Source # 
Instance details

Defined in Basement.Exception

Methods

showsPrec :: Int -> OutOfBoundOperation -> ShowS #

show :: OutOfBoundOperation -> String #

showList :: [OutOfBoundOperation] -> ShowS #

data InvalidRecast Source #

Instances

Instances details
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

newtype RecastSourceSize Source #

Constructors

RecastSourceSize Int 

Instances

Instances details
Eq RecastSourceSize Source # 
Instance details

Defined in Basement.Exception

Show RecastSourceSize Source # 
Instance details

Defined in Basement.Exception

Methods

showsPrec :: Int -> RecastSourceSize -> ShowS #

show :: RecastSourceSize -> String #

showList :: [RecastSourceSize] -> ShowS #

data NonEmptyCollectionIsEmpty Source #

Exception for using NonEmpty assertion with an empty collection