{-# 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
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ArithmeticException -> ArithmeticException -> Bool
$c/= :: ArithmeticException -> ArithmeticException -> Bool
== :: ArithmeticException -> ArithmeticException -> Bool
$c== :: ArithmeticException -> ArithmeticException -> Bool
Eq,Int -> ArithmeticException -> ShowS
[ArithmeticException] -> ShowS
ArithmeticException -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ArithmeticException] -> ShowS
$cshowList :: [ArithmeticException] -> ShowS
show :: ArithmeticException -> String
$cshow :: ArithmeticException -> String
showsPrec :: Int -> ArithmeticException -> ShowS
$cshowsPrec :: Int -> ArithmeticException -> ShowS
Show)
instance Exception ArithmeticException where
toException :: ArithmeticException -> SomeException
toException = forall e. Exception e => e -> SomeException
oalgExceptionToException
fromException :: SomeException -> Maybe ArithmeticException
fromException = forall e. Exception e => SomeException -> Maybe e
oalgExceptionFromException