Proposal: ArgumentDo

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


Hi,

Am Freitag, den 08.07.2016, 13:09 +0200 schrieb Sven Panne:
> I don't think so: https://ghc.haskell.org/trac/ghc/wiki/ArgumentDo#Bl
> ockasaLHS explicit states that
> 
>    do f &&& g
>    x
> 
> parses as
> 
>    (f &&& g) x

Correct

> , so
> 
>    foobar
>       do f &&& g
>       x
> 
> parses as
> 
>    foobar ((f &&& g) x)

Where is the outer set of parenthesis coming from?

This is all not related to the ArgumentDo notation. Note that

    (f &&& g)
    x

parses as

   (f &&& g) x

and still

   foobar
     (f &&& g)
     x

parses as

    foobar (f &&& g) x

just as

   foobar
   (f &&& g)
   x

does.

(NB: I consider
      foobar
      arg1
      arg2
bad style and prefer
      foobar
          arg1
          arg2
but the former is allowed now and will be allowed later as well.)


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/7dc6b711/attachment.sig>


More information about the Glasgow-haskell-users mailing list