2016-07-08 12:28 GMT+02:00 Joachim Breitner <m...@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.
_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users

Reply via email to