Module DA.Monoid

Data Types

data All

Boolean monoid under conjunction (&&)

All

Field Type Description
getAll Bool  

instance Monoid All

instance Semigroup All

instance Eq All

instance Ord All

instance Show All

data Any

Boolean Monoid under disjunction (||)

Any

Field Type Description
getAny Bool  

instance Monoid Any

instance Semigroup Any

instance Eq Any

instance Ord Any

instance Show Any

data Endo a

The monoid of endomorphisms under composition.

Endo

Field Type Description
appEndo a -> a  

instance Monoid (Endo a)

instance Semigroup (Endo a)

data Product a

Monoid under (*)

> Product 2 <> Product 3
Product 6

Product a

instance Multiplicative a => Monoid (Product a)

instance Multiplicative a => Semigroup (Product a)

instance Eq a => Eq (Product a)

instance Ord a => Ord (Product a)

instance Additive a => Additive (Product a)

instance Multiplicative a => Multiplicative (Product a)

instance Show a => Show (Product a)

data Sum a

Monoid under (+)

> Sum 1 <> Sum 2
Sum 3

Sum a

instance Additive a => Monoid (Sum a)

instance Additive a => Semigroup (Sum a)

instance Eq a => Eq (Sum a)

instance Ord a => Ord (Sum a)

instance Additive a => Additive (Sum a)

instance Multiplicative a => Multiplicative (Sum a)

instance Show a => Show (Sum a)