[ghc-steering-committee] Precedence of r.x
Iavor Diatchki
iavor.diatchki at gmail.com
Thu Dec 12 18:16:27 UTC 2019
I think that `f x.y` should mean `f (x.y)`.
On Thu, Dec 12, 2019 at 6:00 AM Joachim Breitner <mail at joachim-breitner.de>
wrote:
> Hi,
>
> Am Donnerstag, den 12.12.2019, 12:30 +0000 schrieb Richard Eisenberg:
> > I would also like to propose
> >
> > (C). Syntax error.
> >
> > That is, a tight-infix use of `.` does not associate with a function
> application on its left. A prefix occurrence of `.` would: `f x .y` would
> be `(f x) .y`.
> >
> >
> > We could also just make this a warning.
>
> such a warning was actually also proposed in the monster GitHub thread:
>
> https://github.com/ghc-proposals/ghc-proposals/pull/282#issuecomment-564597503
> as -Wproximity, which could warn about any misleading spacing, so not only
> `f x.y` (whether this is a record access or function composition), but also
> `x * y+z` etc.
>
> Sounds very nice! Probably orthogonal to this proposal, but maybe a way
> to make people worry less about the confusion that `f x.y` may bring?
>
> Cheers,
> Joachim
>
> --
> Joachim Breitner
> mail at joachim-breitner.de
> http://www.joachim-breitner.de/
>
> _______________________________________________
> 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/3231fc9a/attachment-0001.html>
More information about the ghc-steering-committee
mailing list