Proposal: Make Semigroup as a superclass of Monoid

Henning Thielemann lemming at henning-thielemann.de
Tue Apr 7 09:50:25 UTC 2015



On Mon, 6 Apr 2015, wren romano wrote:

> (ObBikeshed: Honestly, I'd rather see:
>
>    class Semigroup a where
>        (<>) :: a -> a -> a
>        concat :: [a] -> a -- or: concat :: Foldable f => f a -> a
>
> ...getting rid of the mwhatever naming scheme and avoiding taking two
> names for one function.

I also do not like the "m*" names. Btw. your 'concat' already exists as 
Foldable.fold, but it is not a method of Monoid or Semigroup.


More information about the Libraries mailing list