Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
- type Natural = Integer
- newtype Sum a = Sum {
- fromSum :: a
- newtype Product a = Product {
- fromProduct :: a
- newtype Exponential a = Exponential {
- fromExponential :: a
- class Additive a where
- add :: (Foldable t, Additive a) => t a -> a
- class Additive r => DecidableZero r where
- class Additive a => AbelianAdditive a
- class Additive a => Group a where
- class (AbelianAdditive a, Ring scalar) => Module scalar a where
- class Multiplicative a where
- multiply :: (Multiplicative a, Foldable f) => f a -> a
- type SemiRing a = (Multiplicative a, AbelianAdditive a)
- class (SemiRing a, Group a) => Ring a where
- class Multiplicative a => Division a where
- class (Ring a, Division a) => Field a where
- type VectorSpace scalar a = (Field scalar, Module scalar a)
- class Ring a => EuclideanDomain a where
- class (Real a, Enum a, EuclideanDomain a) => Integral a where
- data Ratio a = !a :% !a
- type MyRational = Ratio Integer
- gcd :: Integral a => a -> a -> a
- ifThenElse :: Bool -> t -> t -> t
- data InitialAdditive
Documentation
newtype Exponential a Source #
Group a => Division (Exponential a) Source # | |
Additive a => Multiplicative (Exponential a) Source # | |
class Additive a where Source #
Additive monoid
Additive Double Source # | |
Additive Float Source # | |
Additive Int Source # | |
Additive Integer Source # | |
Additive Word8 Source # | |
Additive Word16 Source # | |
Additive Word32 Source # | |
Additive CInt Source # | |
Additive InitialAdditive Source # | |
Integral a => Additive (Ratio a) Source # | |
(Ord k, Additive v) => Additive (Map k v) Source # | |
class Additive r => DecidableZero r where Source #
class Additive a => AbelianAdditive a Source #
AbelianAdditive Double Source # | |
AbelianAdditive Float Source # | |
AbelianAdditive Int Source # | |
AbelianAdditive Integer Source # | |
AbelianAdditive CInt Source # | |
Integral a => AbelianAdditive (Ratio a) Source # | |
(Ord k, AbelianAdditive v) => AbelianAdditive (Map k v) Source # | |
class (AbelianAdditive a, Ring scalar) => Module scalar a where Source #
Module
class Multiplicative a where Source #
Multiplicative monoid
multiply :: (Multiplicative a, Foldable f) => f a -> a Source #
type SemiRing a = (Multiplicative a, AbelianAdditive a) Source #
class Multiplicative a => Division a where Source #
type VectorSpace scalar a = (Field scalar, Module scalar a) Source #
class Ring a => EuclideanDomain a where Source #
class (Real a, Enum a, EuclideanDomain a) => Integral a where Source #
type MyRational = Ratio Integer Source #
ifThenElse :: Bool -> t -> t -> t Source #