basement-0.0.15: Foundation scrap box of array & string
LicenseBSD-style
MaintainerVincent Hanquez <vincent@snarc.org>
Stabilityexperimental
Portabilityportable
Safe HaskellSafe-Inferred
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
Exception OutOfBound Source # 
Instance details

Defined in Basement.Exception

Methods

toException :: OutOfBound -> SomeException

fromException :: SomeException -> Maybe OutOfBound

displayException :: OutOfBound -> String

Show OutOfBound Source # 
Instance details

Defined in Basement.Exception

Methods

showsPrec :: Int -> OutOfBound -> ShowS #

show :: OutOfBound -> String #

showList :: [OutOfBound] -> ShowS #

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

Defined in Basement.Exception

Methods

showsPrec :: Int -> OutOfBoundOperation -> ShowS #

show :: OutOfBoundOperation -> String #

showList :: [OutOfBoundOperation] -> ShowS #

Eq OutOfBoundOperation Source # 
Instance details

Defined in Basement.Exception

data InvalidRecast Source #

Instances

Instances details
Exception InvalidRecast Source # 
Instance details

Defined in Basement.Exception

Methods

toException :: InvalidRecast -> SomeException

fromException :: SomeException -> Maybe InvalidRecast

displayException :: InvalidRecast -> String

Show InvalidRecast Source # 
Instance details

Defined in Basement.Exception

Methods

showsPrec :: Int -> InvalidRecast -> ShowS #

show :: InvalidRecast -> String #

showList :: [InvalidRecast] -> ShowS #

newtype RecastSourceSize Source #

Constructors

RecastSourceSize Int 

Instances

Instances details
Show RecastSourceSize Source # 
Instance details

Defined in Basement.Exception

Methods

showsPrec :: Int -> RecastSourceSize -> ShowS #

show :: RecastSourceSize -> String #

showList :: [RecastSourceSize] -> ShowS #

Eq RecastSourceSize Source # 
Instance details

Defined in Basement.Exception

data NonEmptyCollectionIsEmpty Source #

Exception for using NonEmpty assertion with an empty collection