Maximum and Minimum monoids
ekmett at gmail.com
Fri Dec 28 22:11:24 CET 2012
And they are already present in the semigroups package with those names and
On Fri, Dec 28, 2012 at 2:57 PM, Strake <strake888 at gmail.com> wrote:
> On 28/12/2012, Roman Cheplyaka <roma at ro-che.info> wrote:
> > 1. Actually, Max and Min are already there. No need to rename or do
> > anything.
> > ...
> > So, the best solution seems to be to merge semigroups into base.
> > My proposal would be to move only Data.Semigroup to base, as it will
> > lead to significant simplification, but leave other modules (NonEmpty,
> > Natural) in a separate package, since they are of limited applicability
> > and would gain nothing by being inside base.
> Agree. If we do so, we can thus define these:
> instance (Ord a, Bounded a) => Monoid (Max a)
> instance (Ord a, Bounded a) => Monoid (Min a)
> no Maybe wrapper needed, and "Max" and "Min" are brief.
> Libraries mailing list
> Libraries at haskell.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Libraries