<div dir="ltr"><div><div><div>If we&#39;re adding applicative brackets, it would be nice to have something like ⦇⦈ as options via UnicodeSyntax. When playing around with She, I found it much easier to read than the ASCII version, especially when I needed to combine them:<br>
<br></div>    (|(|a + b|) + (|c * d|)|)<br></div>    ⦇⦇a + b⦈ + ⦇c * d⦈⦈<br><br></div>Coincidentally, She is the perfect way to experiment with idiom brackets while thinking about a patch like this. I found it very illustrative just to go through old code and see what could really be improved and what couldn&#39;t. For me personally, I certainly found *some* code became more readable, but not quite as much as I expected.<br>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Aug 15, 2013 at 10:44 AM, Anton Nikishaev <span dir="ltr">&lt;<a href="mailto:me@lelf.lu" target="_blank">me@lelf.lu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">Simon Peyton-Jones &lt;<a href="mailto:simonpj@microsoft.com">simonpj@microsoft.com</a>&gt; writes:<br>
<br>
&gt; |  Indeed, I wished the 0-ary case would be more alike to the unary<br>
&gt; |  and binary case, cf.<br>
&gt; |<br>
&gt; |     return f0<br>
&gt; |     f1 &lt;$&gt; a1<br>
&gt; |     f2 &lt;$&gt; a1 &lt;*&gt; a2<br>
&gt; |<br>
&gt; |  What is needed is a nice syntax for &quot;idiom brackets&quot;.<br>
&gt;<br>
&gt; Indeed.  I&#39;m quite open to adding idiom brackets to GHC, if everyone<br>
&gt; can agree on their syntax, and someone would like to offer a patch.<br>
&gt;<br>
&gt; Something like<br>
&gt;       (| f a1 a2 |)<br>
&gt; perhaps?<br>
<br>
</div>I can make a patch after people agree on everything.<br>
<br>
There&#39;s also <a href="http://hackage.haskell.org/package/applicative-quoters" target="_blank">http://hackage.haskell.org/package/applicative-quoters</a> with<br>
its template haskell nastiness<br>
<br>
h&gt; :m +Control.Applicative.QQ.Idiom<br>
h&gt; :set -XQuasiQuotes<br>
h&gt; [i| (,) &quot;THX&quot; &quot;BYE&quot; |]<br>
[(&#39;T&#39;,&#39;B&#39;),(&#39;T&#39;,&#39;Y&#39;),(&#39;T&#39;,&#39;E&#39;),(&#39;H&#39;,&#39;B&#39;),(&#39;H&#39;,&#39;Y&#39;),(&#39;H&#39;,&#39;E&#39;),(&#39;X&#39;,&#39;B&#39;),(&#39;X&#39;,&#39;Y&#39;),(&#39;X&#39;,&#39;E&#39;)]<br>

<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
--<br>
lelf<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
</div></div></blockquote></div><br></div>