
28 Dec
2012
28 Dec
'12
6:50 p.m.
On 28/12/2012, Edward Kmett
And they are already present in the semigroups package with those names and that Monoid.
Ah, sorry, missed the Monoid instance.
On 28/12/2012, Gabriel Gonzalez
Moreover, the entire Bounded constraint seems wrong in principle. There is no intuitive reason why some type should be bounded to be able to take a maximum of a set of elements. The Ord constraint should be sufficient to define a maximum.
No; the set may be empty.
I also don't think it is a good idea to have direct Monoid instances for Max and Min, because they behave weirdly on empty lists. Do you really think that "minimum [] :: Int" should be defined?
If we had the Bounded constraint, it wouldn't be.