monoid-extras-0.2.2.2: Various extra monoid-related definitions and utilities

Maintainerdiagrams-discuss@googlegroups.com
Safe HaskellSafe-Inferred

Data.Monoid.PosInf

Description

Make a semigroup under min into a monoid by adjoining an element corresponding to positive infinity.

Documentation

data PosInf a Source

Constructors

Finite a 
PosInfty 

Instances

Eq a => Eq (PosInf a) 
(Eq (PosInf a), Ord a) => Ord (PosInf a) 
Show a => Show (PosInf a) 
Ord a => Monoid (PosInf a) 
Ord a => Semigroup (PosInf a) 

minimum :: Ord a => [a] -> PosInf aSource