Re: Proposal: ArgumentDo

2016-07-08 Thread Iavor Diatchki
Hello, while we are voting here, I kind of like this proposal, so +1 for me. I understand that some of the examples look strange to Haskell old-timers but, as Joachim points out, the behavior is very consistent. Besides, the "Less Obvious Examples" were selected so that they are, well, less ob

layout was Re: Proposal: ArgumentDo

2016-07-08 Thread C Maeder
Hi, the layout language options are hard to find (at least in the user guide). Therefore I try to give an overview here. The relevant options I've found by using ghc-7.10.3 with option --supported-languages are: NondecreasingIndentation DoAndIfThenElse RelaxedLayout AlternativeLayoutRule Alterna

Re: Proposal: ArgumentDo

2016-07-08 Thread Aloïs Cochard
-1 for same reasons. On 8 July 2016 at 14:00, Henrik Nilsson wrote: > Hi all, > > Joachim Breitner wrote: > > > 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 > > [...] > > Where is the outer set of par

Re: Proposal: ArgumentDo

2016-07-08 Thread Henrik Nilsson
Hi all, Joachim Breitner wrote: > 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 > [...] > Where is the outer set of parenthesis coming from? > > This is all not related to the ArgumentDo notation. Note tha

Re: Proposal: ArgumentDo

2016-07-08 Thread Joachim Breitner
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 > > pa

Re: Proposal: ArgumentDo

2016-07-08 Thread Sven Panne
2016-07-08 12:28 GMT+02:00 Joachim Breitner : > 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 r

Re: Proposal: ArgumentDo

2016-07-08 Thread Joachim Breitner
Hi, Am Freitag, den 08.07.2016, 11:32 +0200 schrieb Sven Panne: > 2016-07-08 9:09 GMT+02:00 Joachim Breitner : > > 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 f

Re: Proposal: ArgumentDo

2016-07-08 Thread Sven Panne
2016-07-08 9:09 GMT+02:00 Joachim Breitner : > 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 &&

Re: Proposal: ArgumentDo

2016-07-08 Thread C Maeder
Surely layout can bite you: f do x do y and I'm having difficulties to find the documentation for the various layout options. But this is no argument against this proposal! Improper use of white spaces can always be used to obfuscate code! Style guides are important. Furthermore, a wr

Re: Proposal: ArgumentDo

2016-07-08 Thread Joachim Breitner
Hi, Am Freitag, den 08.07.2016, 08:35 +0200 schrieb Sven Panne: >    foobar >       do f &&& g >       x > > Should the x now be an argument of foobar (as it is currently) or the > "do"? If it is not an argument of the "do", suddenly things get very > context-dependent. Computers are good at hand