numeric-prelude-0.4.2: An experimental alternative hierarchy of numeric type classes

Safe HaskellSafe-Inferred
LanguageHaskell98

MathObj.Monoid

Synopsis

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 

Fields

runGCD :: a
 

Instances

Eq a => Eq (GCD a) 
Show a => Show (GCD a) 
C a => C (GCD a) 

newtype LCM a Source

Constructors

LCM 

Fields

runLCM :: a
 

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 

Fields

runMin :: Maybe a
 

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 

Fields

runMax :: Maybe a
 

Instances

Eq a => Eq (Max a) 
Show a => Show (Max a) 
Ord a => C (Max a)