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

Nikita Volkov nikita.y.volkov at
Wed Jun 12 11:03:24 CEST 2013

On Jun 12, 2013, at 2:40 AM, Johan Tibell <johan.tibell at> wrote:

> I don't want to see us break all current code every time someone decides that we should add another layer (pointed, say) between e.g. functor and monad.

This can also be considered a good argument to make as many of the breaking changes as possible at once. This is why I believe we should initiate polls on all imaginable initiatives, including the Pointed. My votes for Semigroup and Pointed are neutral, i.e. 0 and 0.

Concerning the discussion on Monoid's <>. Since we've stepped on a path of Prelude generalization, what about reimplementing the ++ in terms of Monoid? It's proven to be quite useful in the Snoyman's (of Yesod) classy-prelude experiment. Just think about it: we don't lose anything, and we get the expected String-like API for working with Text, ByteString and etc, and we also free up the <> operator.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Libraries mailing list