Maximum and Minimum monoids

wren ng thornton wren at
Wed Jan 2 05:02:43 CET 2013

On 12/29/12 10:28 PM, Conal Elliott wrote:
> I kicked off a discussion 5 years ago (according to trac) and suggested the
> Bounded solution. I still miss these instances and find myself redefining
> them. It bothers me, however that the Bounded constraint is unnecessarily
> restrictive. We only need UpperBounded for Min and LowerBounded for Max.

Indeed. And this isn't the only place the distinction is worth making. 
Those two classes are in the prelude I've been developing over the past 
few years (for personal/internal work). One of these days I'll push it 
to Hackage, and maybe one day it'll make it's way into Haskell'.

Live well,

More information about the Libraries mailing list