Proposal: Make Semigroup as a superclass of Monoid

David Feuer david.feuer at gmail.com
Sun Mar 29 15:23:19 UTC 2015


I guess I should get a dog in the fight—I think <> should be the Semigroup
method.
On Mar 29, 2015 11:22 AM, "David Feuer" <david.feuer at gmail.com> wrote:

> I like this idea, but I'm not exactly clear on the mechanics. Will mappend
> move to Semigroup, or <>, or will we get more redundant operations?
> On Mar 29, 2015 11:04 AM, "Herbert Valerio Riedel" <hvr at gnu.org> wrote:
>
>> On 2015-03-29 at 14:20:33 +0200, Jeremy wrote:
>> > Now that 7.10 is out, I would like to re-propose. The proposed plan is
>> > similar to AMP, but less invasive, as (in my subjective experience)
>> > user-defined Monoids are much less common than user-defined Monads.
>> >
>> > 1. GHC 7.12 will include Semigroup and NonEmpty in base. All Monoid
>> > instances, and anything else which forms a Semigroup, will have a
>> Semigroup
>> > instance. GHC will issue a warning when it encounters an instance of
>> Monoid
>> > which is not an instance of Semigroup.
>> >
>> > 2. GHC >7.12 will define Monoid as a subclass of Semigroup.
>>
>> +1
>> _______________________________________________
>> Libraries mailing list
>> Libraries at haskell.org
>> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20150329/6a118312/attachment-0001.html>


More information about the Libraries mailing list