module Data.Exception.Types
( NotFound (..)
, NotAllowed (..)
, AlreadyExists (..)
, OutOfBounds (..)
, DivideByZero (..)
) where
import Data.Text
data NotFound entity
= NotFound
deriving (Show, Eq)
data NotAllowed entity user
= NotAllowed entity user
deriving (Show, Eq)
newtype AlreadyExists entity
= AlreadyExists entity
deriving (Show, Eq)
newtype OutOfBounds entity index
= OutOfBounds index
deriving (Show, Eq)
data DivideByZero
= DivideByZero
deriving (Show, Eq)
newtype InvalidFormat entity
= InvalidFormat entity
deriving (Show, Eq)
data WithMessage err
= err `WithMessage` Text
deriving (Show, Eq)