
Hi, Am Dienstag, den 17.12.2019, 11:46 +0000 schrieb Simon Peyton Jones via ghc-steering-committee:
I.e. I will support `f r.x = f (r.x)`, if I can still add space before the .x.
That gets into a separate question, the "naked selector" question. There we have the following viable alternatives
(1) .x is illegal (2) .x means (\r. r.x) (3) .x is a postfix operator
Certainly (3) would all you to write r .x .y meaning r.x.y or f (r .x .y) meaning f (r.x.y)
But I was trying to close the discussion of (f r.x) before opening the discussion about 1/2/3 for naked selectors.
I don't think it can be answered separately. Maybe it can be seen as a clearly separate question if one strongly believes that `r.f` is the roughly the same thing as `M.f`. While I understand that view, I do not strongly believe in it, e.g. because we have `(complex expression).f` and `r.f.g.h`, and this shows me that `e.f` is a more complex and less atomic notion than a qualified name `M.f`. In order to form a decision about `f r.x = f (r.x)` I also need to know whether I can, for example, align vertically (a very Haskelly desire) without changing meaning: printf "%s %s" grandfather.first_name grandfather.last_name printf "%s %s" mom .first_name mom .last_name printf "%s %s" (kid!!0 ).first_name (kid!!0) .last_name (I am not saying that this is universally good style, but it is also not completely unreasonable.) Cheers, Joachim -- Joachim Breitner mail@joachim-breitner.de http://www.joachim-breitner.de/