<div dir="ltr">Are there other use cases where the left-associative operator enables nicer code? I suspect that they are, but I can't think of any myself.</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 6, 2016 at 6:45 AM, Mario Blažević <span dir="ltr"><<a href="mailto:mblazevic@stilo.com" target="_blank">mblazevic@stilo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On 2016-06-06 07:30 AM, Herbert Valerio Riedel wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello!<br>
<br>
In short, the right-associative fixity of (Data.{Monoid,Semigroup}.<>)<br>
subtly conflicts with definitions of (<>) in pretty printing APIs, for<br>
which the left-associative variant is sometimes desirable. This subtle<br>
overloading of (<>) is error-prone, as one has to remember which version<br>
of (<>) is currently in scope in order to be able to reason about<br>
non-trivial expressions involving this operator.<br>
<br>
This proposal is an attempt to resolve this unfortunate and confusing<br>
situation by completing the `Semigroup`/`Monoid` vocabulary with a<br>
standard left-associative alias. Please see<br>
<br>
   <a href="https://ghc.haskell.org/trac/ghc/wiki/Proposal/LeftAssocSemigroupOp" rel="noreferrer" target="_blank">https://ghc.haskell.org/trac/ghc/wiki/Proposal/LeftAssocSemigroupOp</a><br>
<br>
for more details.<br>
<br>
Discussion period: 4 weeks<br>
<br>
<br>
</blockquote>
<br></div></div>
        The proposal is well argued, but it omits any discussion of the proper place for the new operator. Why place it in Data.Semigroup, if its only purpose is to support the pretty-print libraries? Since the libraries in question will need to change anyway, or at least their imports will, why not add the operator there instead? Or, alternatively, to a Text.PrettyPrint module?<br>
<br>
_______________________________________________<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" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br>
</blockquote></div><br></div>