<div dir="ltr">František Farka [1] worked in detail on a proposal that would make such refactorings painless, see <i>Maintainable type classes for Haskell</i> [2]<div><br></div><div>  Cheers,</div><div>  Petr<br><div><br></div><div>[1] <a href="http://staff.computing.dundee.ac.uk/frantisekfarka/">http://staff.computing.dundee.ac.uk/frantisekfarka/</a><br></div><div>[2] <a href="http://staff.computing.dundee.ac.uk/frantisekfarka/publications.html">http://staff.computing.dundee.ac.uk/frantisekfarka/publications.html</a></div><div><br><div><div class="gmail_quote">po 30. 3. 2015 v 11:24 odesílatel Merijn Verstraaten <<a href="mailto:merijn@inconsistent.nl">merijn@inconsistent.nl</a>> napsal:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">-2 from me.<br>
<br>
Not because I oppose Semigroup as a superclass of Monoid, but because of brittle migration path.<br>
<br>
I would much rather put the resurrection of DefaultSuperclassInstances [1], IntrinsicSuperclasses [2], or some new proposal on the roadmap that would allow us to more easily refactor and update the typeclass hierarchy without breaking everything all the time.<br>
<br>
Cheers,<br>
Merijn<br>
<br>
[1] - <a href="https://ghc.haskell.org/trac/ghc/wiki/DefaultSuperclassInstances" target="_blank">https://ghc.haskell.org/trac/<u></u>ghc/wiki/<u></u>DefaultSuperclassInstances</a><br>
[2] - <a href="https://ghc.haskell.org/trac/ghc/wiki/IntrinsicSuperclasses" target="_blank">https://ghc.haskell.org/trac/<u></u>ghc/wiki/IntrinsicSuperclasses</a><br>
> On 30 Mar 2015, at 5:39, John Alfred Nathanael Chee <<a href="mailto:cheecheeo@gmail.com" target="_blank">cheecheeo@gmail.com</a>> wrote:<br>
><br>
> Jeremy,<br>
><br>
> Do you propose:<br>
><br>
> Monoid a => Monoid (Maybe a)<br>
><br>
> be changed to:<br>
><br>
> Semigroup a => Monoid (Maybe a)<br>
><br>
> as the documentation indicates?<br>
><br>
> +1, but I think there are some technicalities that I think would benefit from a more concrete proposal including as a patch or hackage analysis.<br>
><br>
> On Sun, Mar 29, 2015 at 8:16 PM, M Farkas-Dyck <<a href="mailto:strake888@gmail.com" target="_blank">strake888@gmail.com</a>> wrote:<br>
> On 29/03/2015 at 05:20:33 -0700, Jeremy wrote:<br>
> > 1. GHC 7.12 will include Semigroup and NonEmpty in base.<br>
><br>
> +1 for Semigroup at least.<br>
><br>
> NonEmpty is simply the cofree comonad of Maybe, so I think we ought to define it either as such or to be compatibly redefinitile as such, e.g.<br>
><br>
> now:<br>
> data NonEmpty a = a .: Maybe (NonEmpty a)<br>
><br>
> so potentially later:<br>
> data Cofree f a = a .: f (Cofree f a)<br>
> type NonEmpty = Cofree Maybe<br>
><br>
> as otherwise we shall have various code using nonsame isomorphic types which one must convert or coerce between for no good reason.<br>
><br>
> +1 for NonEmpty if so defined, -1 otherwise.<br>
><br>
> > 2. GHC >7.12 will define Monoid as a subclass of Semigroup.<br>
><br>
> +1<br>
><br>
> On 29/03/2015 at 11:23:19 -0400, David Feuer wrote:<br>
> > I guess I should get a dog in the fight—I think <> should be the Semigroup method.<br>
><br>
> +1<br>
> ______________________________<u></u>_________________<br>
> Libraries mailing list<br>
> <a href="mailto:Libraries@haskell.org" target="_blank">Libraries@haskell.org</a><br>
> <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" target="_blank">http://mail.haskell.org/cgi-<u></u>bin/mailman/listinfo/libraries</a><br>
><br>
><br>
><br>
> --<br>
> Love in Jesus Christ, John Alfred Nathanael Chee<br>
> <a href="http://www.biblegateway.com/" target="_blank">http://www.biblegateway.com/</a><br>
> <a href="http://web.cecs.pdx.edu/~chee/" target="_blank">http://web.cecs.pdx.edu/~chee/</a><br>
> ______________________________<u></u>_________________<br>
> Libraries mailing list<br>
> <a href="mailto:Libraries@haskell.org" target="_blank">Libraries@haskell.org</a><br>
> <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" target="_blank">http://mail.haskell.org/cgi-<u></u>bin/mailman/listinfo/libraries</a><br>
<br>
______________________________<u></u>_________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org" target="_blank">Libraries@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" target="_blank">http://mail.haskell.org/cgi-<u></u>bin/mailman/listinfo/libraries</a><br>
</blockquote></div></div></div></div></div>