[ghc-steering-committee] Precedence of r.x

Simon Marlow marlowsd at gmail.com
Thu Dec 12 09:49:26 UTC 2019


Definitely (A).

On Thu, 12 Dec 2019 at 09:44, Simon Peyton Jones via ghc-steering-committee
<ghc-steering-committee at haskell.org> wrote:

> A question for the committee.
>
> What does
>         f r.x
> mean, where there is no white space on either side of the dot?
>
> A. The proposal says it means (f (r.x))
> B. Joachim wants it to mean ((f r).x)
>
> In trying to guide the discussion to a conclusion I proposed to fix on
> (A).  I don't think it was controversial in the public discussion, it's
> compatible with qualified names, and forcing `f (r.x)` looks horribly
> clumsy to me.
>
> Partly it's a question of whether your starting point is
> (a) "." is fundamentally an operator, albeit with
>     some special extra rules, or
> (b) R.x, r.x, and .x are new syntactic forms,
>     unrelated to the infix operator (.)
> I'm definitely thinking of it in the latter way.
>
> I don't really want to re-open this question, and I'm not sure if the
> authors of the proposal could live with (B). However, if the committee
> wants to reopen the question, then that is what we should do.   Can you
> express a view on this narrow question?
>
> Simon
> _______________________________________________
> ghc-steering-committee mailing list
> ghc-steering-committee at haskell.org
> https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-steering-committee/attachments/20191212/556cbc18/attachment.html>


More information about the ghc-steering-committee mailing list