numeric-prelude-0.1.3: An experimental alternative hierarchy of numeric type classesSource codeContentsIndex
MathObj.Monoid
Synopsis
newtype GCD a = GCD {
runGCD :: a
}
newtype LCM a = LCM {
runLCM :: a
}
newtype Min a = Min {
runMin :: Maybe a
}
newtype Max a = Max {
runMax :: Maybe a
}
Documentation
newtype GCD a Source

It is only a monoid for non-negative numbers.

 idt <*> GCD (-2) = GCD 2

Thus, use this Monoid only for non-negative numbers!

Constructors
GCD
runGCD :: a
show/hide Instances
Eq a => Eq (GCD a)
Show a => Show (GCD a)
C a => C (GCD a)
newtype LCM a Source
Constructors
LCM
runLCM :: a
show/hide Instances
Eq a => Eq (LCM a)
Show a => Show (LCM a)
C a => C (LCM a)
newtype Min a Source
Nothing is the largest element.
Constructors
Min
runMin :: Maybe a
show/hide Instances
Eq a => Eq (Min a)
Show a => Show (Min a)
Ord a => C (Min a)
newtype Max a Source
Nothing is the smallest element.
Constructors
Max
runMax :: Maybe a
show/hide Instances
Eq a => Eq (Max a)
Show a => Show (Max a)
Ord a => C (Max a)
Produced by Haddock version 2.4.2