<div dir="ltr">+1 for orthogonal -XDotPostfixApply.<div><br></div><div style>I'm in the absolutely-love-using-dot-for-records camp, but I also like "foo s1.toUpper s2.toUpper". </div><div style><br></div><div style>
We'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"><<a href="mailto:adam.gundry@strath.ac.uk" target="_blank">adam.gundry@strath.ac.uk</a>></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's suggestion of field declarations:<br>
<div class="im"><br>
On 01/07/13 10:50, Barney Hilken wrote:<br>
> All this extra syntax, whether it's ., #, or {} seems very heavy for a problem described as very rare.<br>
> Why not simply use a declaration<br>
><br>
> field name<br>
><br>
> whose effect is to declare<br>
><br>
> name :: r {name ::t} => r -> t<br>
> name = getFld<br>
><br>
> 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'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>