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

Simon Peyton Jones simonpj at microsoft.com
Thu Dec 12 09:44:05 UTC 2019


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


More information about the ghc-steering-committee mailing list