<p dir="ltr">So you would argue that these should desugar to the same thing? I'm on the fence - on the one hand its nice to be able to leave a few 'pure's out, but on the other those parenthesis have no syntactic meaning before, so it's questionable why they suddenly do inside idiom brackets.</p>
<p dir="ltr">I can live with needing a few more 'pure's though.</p>
<p dir="ltr">- Ollie</p>
<div class="gmail_quote">On 26 Feb 2015 23:28, "Roman Cheplyaka" <<a href="mailto:roma@ro-che.info">roma@ro-che.info</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I'm starting to like this. Except the weird difference between spaces on<br>
different levels that you point out, i.e.<br>
<br>
[| const True False |]<br>
<br>
vs<br>
<br>
[| (const True) False |]<br>
<br>
<br>
<br>
<br>
On 26/02/15 23:04, Oliver Charles wrote:<br>
> Hi all,<br>
><br>
> A few days ago I made a post here to gauge interest in adding idiom<br>
> brackets to GHC. Response was a bit more mixed than I was hoping, but no<br>
> one seemed to drastically against the idea, so I've moved forward with a<br>
> more detailed proposal.<br>
><br>
> You can find the full proposal here:<br>
><br>
>     <a href="https://ocharles.org.uk/IdiomBrackets.html" target="_blank">https://ocharles.org.uk/IdiomBrackets.html</a><br>
><br>
> A particular difference in my proposal from existing solutions comes<br>
> from my desire to lift almost *all* expressions - with the original<br>
> syntax - into idiom brackets. This means normal function application and<br>
> tuples, but also case expressions, let bindings, record construction,<br>
> record update, infix notation, and so on.<br>
><br>
> At first I was skeptical about this, but I am finding uses for this more<br>
> and more. I really like how it lets me use the interesting data (that<br>
> is, whatever is "under" the applicative functor) where it's most<br>
> relevant - rather than having to build a function and thread that value<br>
> back through. Examples of this can be seen in my proposal.<br>
><br>
> To prove its use, I've been working with this Template Haskell<br>
> expression:<br>
><br>
>     <a href="https://ocharles.org.uk/IdiomExp.hs" target="_blank">https://ocharles.org.uk/IdiomExp.hs</a><br>
><br>
> It *almost* does exactly what I want, the only problem is I can't get<br>
> Template Haskell to give me a difference between<br>
><br>
>     $(i [| const True False |])<br>
><br>
> and<br>
><br>
>     $(i [| (const True) False |])<br>
><br>
> which I was planning to be significant.<br>
><br>
> The proposal has mostly grown into my own personal notebook, so I'm<br>
> happy to clarify anything that is vague/contradictory/confusing.<br>
><br>
> Look forward to hearing your thoughts!<br>
><br>
> -- Ollie<br>
> _______________________________________________<br>
> Haskell-Cafe mailing list<br>
> <a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
> <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
><br>
<br>
</blockquote></div>