<div dir="ltr">+1 for orthogonal -XDotPostfixApply.<div><br></div><div style>I&#39;m in the absolutely-love-using-dot-for-records camp, but I also like &quot;foo s1.toUpper s2.toUpper&quot;.  </div><div style><br></div><div style>

We&#39;re already so lazy about parentheses -- e.g. the non-haskellers I show code to are always appalled at $ ;-) -- and this helps scrap more parens!</div><div style><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">

On Mon, Jul 1, 2013 at 8:53 AM, Adam Gundry <span dir="ltr">&lt;<a href="mailto:adam.gundry@strath.ac.uk" target="_blank">adam.gundry@strath.ac.uk</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hi all,<br>
<br>
I have amended the plan [1] as a result of the ongoing discussion,<br>
including leaving the syntax alone for the time being, so record<br>
projections are written prefix.<br>
<br>
Regarding Barney&#39;s suggestion of field declarations:<br>
<div class="im"><br>
On 01/07/13 10:50, Barney Hilken wrote:<br>
&gt; All this extra syntax, whether it&#39;s ., #, or {} seems very heavy for a problem described as very rare.<br>
&gt; Why not simply use a declaration<br>
&gt;<br>
&gt;       field name<br>
&gt;<br>
&gt; whose effect is to declare<br>
&gt;<br>
&gt;       name :: r {name ::t} =&gt; r -&gt; t<br>
&gt;       name = getFld<br>
&gt;<br>
&gt; unless name is already in scope as a field name, in which case the declaration does nothing?<br>
<br>
</div>This makes sense. I guess the question is whether a new declaration form<br>
is justified. The implementation is slightly more subtle than you<br>
suggest, because we don&#39;t know whether `name` will be brought into scope<br>
as a field later, in which case the definition would clash with the<br>
actual field. It should be equivalent to defining<br>
<br>
data Unused { name :: () }<br>
data Unused2 { name :: () }<br>
<br>
(twice so that there is always ambiguity about a use of `name`).<br>
<br>
Adam<br>
<br>
[1]<br>
<a href="http://hackage.haskell.org/trac/ghc/wiki/Records/OverloadedRecordFields/Plan" target="_blank">http://hackage.haskell.org/trac/ghc/wiki/Records/OverloadedRecordFields/Plan</a><br>
<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
_______________________________________________<br>
Glasgow-haskell-users mailing list<br>
<a href="mailto:Glasgow-haskell-users@haskell.org">Glasgow-haskell-users@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/glasgow-haskell-users" target="_blank">http://www.haskell.org/mailman/listinfo/glasgow-haskell-users</a><br>
</div></div></blockquote></div><br></div>