[ghc-steering-committee] RecordDotSyntax: please express a view

Richard Eisenberg rae at richarde.dev
Tue Dec 10 14:33:01 UTC 2019



> On Dec 10, 2019, at 2:27 PM, Simon Peyton Jones <simonpj at microsoft.com> wrote:
> 
> |  To be concrete, I propose this:
> 
> Not concrete enough.  I don't understand 
> 
> |  prefix             with a ( before the .: field selector
> |                     otherwise: field access
> 
> What does (f a .b c .d e) mean?

According to my table, we have two prefix `.`s. These are field accesses. Just like the tight infix positioning of `.`. So, (f a .b c .d e) means the exact same thing as (f a.b c.d e), which is, presumably (f (a.b) (c.d) e).

Perhaps that's not what we like. But it is simple and comes straight from my table. And it is not too bad for programmers: prefix `.` is *just like* tight infix `.`. The only exception is at the beginning of a section, where tight-infix does not make sense.

Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-steering-committee/attachments/20191210/6b0fd2ad/attachment.html>


More information about the ghc-steering-committee mailing list