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

Richard Eisenberg rae at richarde.dev
Wed Dec 11 09:11:19 UTC 2019



> On Dec 11, 2019, at 3:27 AM, Eric Seidel <eric at seidel.io> wrote:
> 
> So I think I would be happy with bare `.lbl` being a postfix operator that binds less tightly than function application.

This means that `f x .bar` is `(f x) .bar` while `f x.bar` is `f (x.bar)`. A bit too subtle for me.

Another alternative is to make `.foo` a postfix operator that does not associate with function application. That is, `f x .bar` would be a parse error. So we can write `x .foo .bar` to mean the same as `x.foo.bar`, but we don't have to commit to any strange parsing rules around `f a .b c .d e`.

But I'm starting to lean toward just making bare `.foo` a syntax error and revisit this debate with more experience.

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


More information about the ghc-steering-committee mailing list