Proposal: Make Semigroup as a superclass of Monoid

David Feuer david.feuer at gmail.com
Sun Mar 29 15:22:32 UTC 2015


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/4afc5fda/attachment.html>


More information about the Libraries mailing list