Maintainer | bastiaan.heeren@ou.nl |
---|---|
Stability | provisional |
Portability | portable (depends on ghc) |
Safe Haskell | None |
Language | Haskell98 |
- 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)
Semi-ring
Ring
Field
class Ring a => Field a where Source
Nothing
timesInverse :: a -> a Source
(Eq a, Fractional a) => Field (SafeNum a) Source | |
(CoField a, Field a) => Field (SmartField a) Source |
Additive monoid
Additive | |
|
Functor Additive Source | |
Applicative Additive Source | |
Eq a => Eq (Additive a) Source | |
Ord a => Ord (Additive a) Source | |
Show a => Show (Additive a) Source | |
Arbitrary a => Arbitrary (Additive a) Source | |
CoArbitrary a => CoArbitrary (Additive a) Source | |
SemiRing a => Monoid (Additive a) Source | |
CoRing a => CoGroup (Additive a) Source | |
CoSemiRing a => CoMonoid (Additive a) Source | |
Ring a => Group (Additive a) Source |
Multiplicative monoid
newtype Multiplicative a Source
Functor Multiplicative Source | |
Applicative Multiplicative Source | |
Eq a => Eq (Multiplicative a) Source | |
Ord a => Ord (Multiplicative a) Source | |
Show a => Show (Multiplicative a) Source | |
Arbitrary a => Arbitrary (Multiplicative a) Source | |
CoArbitrary a => CoArbitrary (Multiplicative a) Source | |
SemiRing a => Monoid (Multiplicative a) Source | |
CoSemiRing a => CoMonoidZero (Multiplicative a) Source | |
CoField a => CoGroup (Multiplicative a) Source | |
CoSemiRing a => CoMonoid (Multiplicative a) Source | |
SemiRing a => MonoidZero (Multiplicative a) Source | |
Field a => Group (Multiplicative a) Source |
Datatype for safe numeric operators
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 | |
Ord a => Ord (SafeNum a) Source | |
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
CoSemiRing a => CoSemiRing (SmartField a) Source |
class CoSemiRing a => CoRing a where Source
CoRing a => CoRing (SmartField a) Source |