Proposal: ArgumentDo

Joachim Breitner mail at joachim-breitner.de
Fri Jul 8 10:28:27 UTC 2016


Hi,

Am Freitag, den 08.07.2016, 11:32 +0200 schrieb Sven Panne:
> 2016-07-08 9:09 GMT+02:00 Joachim Breitner <mail at joachim-breitner.de>:
> > Am Freitag, den 08.07.2016, 08:35 +0200 schrieb Sven Panne:
> > >    foobar
> > >       do f &&& g
> > >       x
> > [...] Only with the proposed addition, it becomes an argument to foobar. [...]
> 
> Huh?  Nope! The Wiki page explicitly says that
> 
>    do f &&& g
>    x
> 
> means
> 
>    (f &&& g) x
> 
> Why should this be different here? Simply writing "foobar" above that
> construct won't trigger any special layout rules, I hope...

I believe this follows from the existing layout rules.

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.

Greetings,
Joachim

-- 
-- 

Joachim “nomeata” Breitner
  mail at joachim-breitner.dehttps://www.joachim-breitner.de/
  XMPP: nomeata at joachim-breitner.de • OpenPGP-Key: 0xF0FBF51F
  Debian Developer: nomeata at debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://mail.haskell.org/pipermail/glasgow-haskell-users/attachments/20160708/3f53cc0e/attachment.sig>


More information about the Glasgow-haskell-users mailing list