Proposal: ArgumentDo

Sven Panne svenpanne at
Fri Jul 8 11:09:15 UTC 2016

2016-07-08 12:28 GMT+02:00 Joachim Breitner <mail at>:

> 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: explicit
states that

   do f &&& g

parses as

   (f &&& g) x

, so

      do f &&& g

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: <>

More information about the Glasgow-haskell-users mailing list