29 Dec
2012
29 Dec
'12
7:50 a.m.
On 28/12/2012, Edward Kmett <ekmett@gmail.com> wrote:
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 <gabriel439@gmail.com> wrote:
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.