Re: Proposal: Add Data.Semigroup to base, as a superclass of Monoid

-1 I think types that lack an empty element are a misfeature. They usually end up contaminating everything they touch, which is why semigroups forms an entire parallel ecosystem of its own. This is a very slippery slope that won't end with the addition of `Data.Semigroup` and once it is in it will be impossible to take it out.

On 2013-06-12 at 00:04:04 +0200, Gabriel Gonzalez wrote:
I think types that lack an empty element are a misfeature.
...so having a data-type for representing non-empty lists (on which operation such as head/last/minimum/maximum et. al can be proper statically guaranteed total functions as opposed to resorting to 'Maybe'-wrapped results which need to be checked dynamically at runtime) is a misfeature?
They usually end up contaminating everything they touch, which is why semigroups forms an entire parallel ecosystem of its own.
Can you provide a concrete example showing the kind of problematic "contamination" that is caused by semigroup-forming types? cheers, hvr
participants (2)
-
Gabriel Gonzalez
-
Herbert Valerio Riedel