Proposal: ArgumentDo
Sven Panne
svenpanne at gmail.com
Fri Jul 8 11:09:15 UTC 2016
2016-07-08 12:28 GMT+02:00 Joachim Breitner <mail at joachim-breitner.de>:
> Currenlty,
>
> foobar
> (do f &&& g)
> x
>
> calls foobar with two arguments, while
>
> (do f &&& g)
> x
>
> calls (f &&& g) with one argument. The ArgumentDo proposal does not change
> that, only that the parenthesis become redundant.
>
I don't think so:
https://ghc.haskell.org/trac/ghc/wiki/ArgumentDo#BlockasaLHS explicit
states that
do f &&& g
x
parses as
(f &&& g) x
, so
foobar
do f &&& g
x
parses as
foobar ((f &&& g) x)
under the new proposal, which I find highly confusing. If it doesn't parse
like this under the proposal, the wiki page is wrong and/or the proposal is
not compositional: Why should being below "foobar" change the parse?
"foobar" is not a keyword switching to some different mode.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/glasgow-haskell-users/attachments/20160708/0401cd2d/attachment.html>
More information about the Glasgow-haskell-users
mailing list