{-# LANGUAGE NoImplicitPrelude #-}
module OAlg.Structure.Exception
( ArithmeticException(..)
)
where
import OAlg.Prelude
data ArithmeticException
= NotAddable
| NotMultiplicable
| NotInvertible
| UndefinedScalarproduct
| NotExponential
| NotEndo
| NotTransformable
| NoMinusOne
| NotApplicable
deriving (ArithmeticException -> ArithmeticException -> Bool
(ArithmeticException -> ArithmeticException -> Bool)
-> (ArithmeticException -> ArithmeticException -> Bool)
-> Eq ArithmeticException
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ArithmeticException -> ArithmeticException -> Bool
== :: ArithmeticException -> ArithmeticException -> Bool
$c/= :: ArithmeticException -> ArithmeticException -> Bool
/= :: ArithmeticException -> ArithmeticException -> Bool
Eq,Int -> ArithmeticException -> ShowS
[ArithmeticException] -> ShowS
ArithmeticException -> String
(Int -> ArithmeticException -> ShowS)
-> (ArithmeticException -> String)
-> ([ArithmeticException] -> ShowS)
-> Show ArithmeticException
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ArithmeticException -> ShowS
showsPrec :: Int -> ArithmeticException -> ShowS
$cshow :: ArithmeticException -> String
show :: ArithmeticException -> String
$cshowList :: [ArithmeticException] -> ShowS
showList :: [ArithmeticException] -> ShowS
Show)
instance Exception ArithmeticException where
toException :: ArithmeticException -> SomeException
toException = ArithmeticException -> SomeException
forall e. Exception e => e -> SomeException
oalgExceptionToException
fromException :: SomeException -> Maybe ArithmeticException
fromException = SomeException -> Maybe ArithmeticException
forall e. Exception e => SomeException -> Maybe e
oalgExceptionFromException