Maintainer  bastiaan.heeren@ou.nl 

Stability  provisional 
Portability  portable (depends on ghc) 
Safe Haskell  None 
Language  Haskell2010 
Synopsis
 class SemiRing a where
 class SemiRing a => Ring a where
 plusInverse :: a > a
 () :: a > a > a
 class Ring a => Field a where
 timesInverse :: a > a
 (/) :: a > a > a
 newtype Additive a = Additive {
 fromAdditive :: a
 newtype Multiplicative a = Multiplicative {
 fromMultiplicative :: a
 data SafeNum a
 safeNum :: SafeNum a > Either String a
 class CoSemiRing a where
 class CoSemiRing a => CoRing a where
 class CoRing a => CoField a where
 isRecip :: a > Maybe a
 isDivision :: a > Maybe (a, a)
Semiring
class SemiRing a where Source #
Instances
SemiRing Expr Source #  
Num a => SemiRing (SafeNum a) Source #  
(CoField a, Field a) => SemiRing (SmartField a) Source #  
Defined in Domain.Algebra.SmartGroup (+) :: SmartField a > SmartField a > SmartField a Source # zero :: SmartField a Source # sum :: [SmartField a] > SmartField a Source # (*) :: SmartField a > SmartField a > SmartField a Source # one :: SmartField a Source # product :: [SmartField a] > SmartField a Source # 
Ring
class SemiRing a => Ring a where Source #
Nothing
Instances
Ring Expr Source #  
Num a => Ring (SafeNum a) Source #  
(CoField a, Field a) => Ring (SmartField a) Source #  
Defined in Domain.Algebra.SmartGroup plusInverse :: SmartField a > SmartField a Source # () :: SmartField a > SmartField a > SmartField a Source # 
Field
class Ring a => Field a where Source #
Nothing
Instances
Field Expr Source #  
(Eq a, Fractional a) => Field (SafeNum a) Source #  
(CoField a, Field a) => Field (SmartField a) Source #  
Defined in Domain.Algebra.SmartGroup timesInverse :: SmartField a > SmartField a Source # (/) :: SmartField a > SmartField a > SmartField a Source # 
Additive monoid
Additive  

Instances
Functor Additive Source #  
Applicative Additive Source #  
Eq a => Eq (Additive a) Source #  
Ord a => Ord (Additive a) Source #  
Show a => Show (Additive a) Source #  
SemiRing a => Semigroup (Additive a) Source #  
SemiRing a => Monoid (Additive a) Source #  
Arbitrary a => Arbitrary (Additive a) Source #  
CoArbitrary a => CoArbitrary (Additive a) Source #  
Defined in Domain.Algebra.Field coarbitrary :: Additive a > Gen b > Gen b #  
CoRing a => CoGroup (Additive a) Source #  
CoSemiRing a => CoMonoid (Additive a) Source #  
Ring a => Group (Additive a) Source #  
Multiplicative monoid
newtype Multiplicative a Source #
Instances
Datatype for safe numeric operators
Instances
Monad SafeNum Source #  
Functor SafeNum Source #  
Applicative SafeNum Source #  
Eq a => Eq (SafeNum a) Source #  
(Eq a, Fractional a) => Fractional (SafeNum a) Source #  
Num a => Num (SafeNum a) Source #  
Defined in Domain.Algebra.Field  
Ord a => Ord (SafeNum a) Source #  
Defined in Domain.Algebra.Field  
Show a => Show (SafeNum a) Source #  
Arbitrary a => Arbitrary (SafeNum a) Source #  
(Eq a, Fractional a) => Field (SafeNum a) Source #  
Num a => Ring (SafeNum a) Source #  
Num a => SemiRing (SafeNum a) Source #  
CoSemiRing, CoRing, and CoField (for matching)
class CoSemiRing a where Source #
Instances
CoSemiRing Expr Source #  
CoSemiRing a => CoSemiRing (SmartField a) Source #  
Defined in Domain.Algebra.SmartGroup isPlus :: SmartField a > Maybe (SmartField a, SmartField a) Source # isZero :: SmartField a > Bool Source # isTimes :: SmartField a > Maybe (SmartField a, SmartField a) Source # isOne :: SmartField a > Bool Source # 
class CoSemiRing a => CoRing a where Source #
Instances
CoRing Expr Source #  
CoRing a => CoRing (SmartField a) Source #  
Defined in Domain.Algebra.SmartGroup isNegate :: SmartField a > Maybe (SmartField a) Source # isMinus :: SmartField a > Maybe (SmartField a, SmartField a) Source # 
class CoRing a => CoField a where Source #
Instances
CoField Expr Source #  
CoField a => CoField (SmartField a) Source #  
Defined in Domain.Algebra.SmartGroup isRecip :: SmartField a > Maybe (SmartField a) Source # isDivision :: SmartField a > Maybe (SmartField a, SmartField a) Source # 