<div>Bikeshedding: Would it be better to put the definition for +&gt; (or better yet &lt;&gt;) in the dictionary for Monoid with a circular definition for mappend? That way new code defining Monoid instances can avoid ever having to even mention mappend. I&#39;m ok with it either way. I admit adding it to the dictionary might add dictionary passing overhead and risk inconsistent definitions of &lt;&gt; and mappend.</div>

<div> </div>
<div>-Edward Kmett<br></div>
<div class="gmail_quote">On Tue, Jun 30, 2009 at 5:37 PM, Bryan O&#39;Sullivan <span dir="ltr">&lt;<a href="mailto:bos@serpentine.com">bos@serpentine.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Ticket: <a href="http://hackage.haskell.org/trac/ghc/ticket/3339" target="_blank">http://hackage.haskell.org/trac/ghc/ticket/3339</a><br>
<br>From the ticket: <br>
<p>This proposal was, I think, originally suggested by Jules Bean. The idea is to add two functions to the <tt>Data.Monoid</tt> module, <tt>(+&gt;)</tt> and <tt>(&lt;+)</tt>, corresponding to different uses of <tt>mappend</tt>. These should not be methods of the <tt>Monoid</tt> typeclass, but top-level functions. </p>

<p>I hope (but slightly doubt) that the visual nature of the two operators might help to counter the thought that monoids are just for gluing things together. </p><pre>(+&gt;) :: (Monoid a) =&gt; a -&gt; a -&gt; a<br>a +&gt; b = a `mappend` b<br>
<br>(&lt;+) :: (Monoid a) =&gt; a -&gt; a -&gt; a<br>a &lt;+ b = b `mappend` a<br><br>infixl 4 +&gt;<br>infixl 4 &lt;+<br></pre>
<p>Proposed deadline: two weeks. </p>
<p>If this looks reasonable, I&#39;ll attach darcs patches. </p><br>_______________________________________________<br>Libraries mailing list<br><a href="mailto:Libraries@haskell.org">Libraries@haskell.org</a><br><a href="http://www.haskell.org/mailman/listinfo/libraries" target="_blank">http://www.haskell.org/mailman/listinfo/libraries</a><br>
<br></blockquote></div><br>