module Foundation.Array.Common
( OutOfBound(..)
, OutOfBoundOperation(..)
, InvalidRecast(..)
, RecastSourceSize(..)
, RecastDestinationSize(..)
) where
import Foundation.Internal.Base
data OutOfBoundOperation = OOB_Read | OOB_Write | OOB_MemSet | OOB_Index
deriving (Show,Eq,Typeable)
data OutOfBound = OutOfBound OutOfBoundOperation Int Int
deriving (Show,Typeable)
instance Exception OutOfBound
newtype RecastSourceSize = RecastSourceSize Int
deriving (Show,Eq,Typeable)
newtype RecastDestinationSize = RecastDestinationSize Int
deriving (Show,Eq,Typeable)
data InvalidRecast = InvalidRecast RecastSourceSize RecastDestinationSize
deriving (Show,Typeable)
instance Exception InvalidRecast