Proposal: Make Semigroup as a superclass of Monoid

Edward Kmett ekmett at gmail.com
Mon Mar 30 19:09:46 UTC 2015


That definitely pushes me towards one of the "long" adoption paths.

Here adding a Semigroup instance for Matrix actually works to get the same
symbol, but it has a different fixity (infixr 8). Same with (<>) in the
pretty printing libraries (infixl 6).

In Data.Monoid and Data.Semigroup we have infixr 6 <>

-Edward


On Mon, Mar 30, 2015 at 2:51 PM, Henning Thielemann <
lemming at henning-thielemann.de> wrote:

>
> On Mon, 30 Mar 2015, Edward Kmett wrote:
>
>  Collapse the first two steps into one step, but this means that nobody
>> gets any warning of new names coming
>> into the Prelude. On the other hand this would get us all the way to done
>> by 7.14. On one hand, the first
>> order consequence the amount of breakage caused by adding Semigroup to
>> Prelude and taking (<>) is almost
>> entirely confined to a handful of pretty printing libraries -- and we
>> already broke those same libraries by
>> taking (<$>).
>>
>
> Btw. hmatrix is another prominent package defining (<>) for matrix and
> related multiplications.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20150330/b830a6fb/attachment.html>


More information about the Libraries mailing list