Whilst I have nothing against the change in syntax for recursive do aka
http://old.nabble.com/Update-on-GHC-6.12.1-td26103595.html
Instead of writing
mdo
a - getChar
b - f c
c - g b
putChar c
return b
you would write
do
a - getChar
rec { b - f c
; c
On 22 June 2010 03:18, John Lask jvl...@hotmail.com wrote:
I just want my nice neat layout back. I have just spent an inordinate amount
of time updating code when if the parser recognised do rec as a recursive
group it would have been a drop in replacement and taken me one tenth of the
time.
On Jun 21, 2010, at 10:18 AM, John Lask wrote:
do rec
a - getChar
b - f c
c - g b
putChar c
return b
I don't particularly care that the only recursive statements are
#2,#3 - I just want my nice neat layout back. I have just spent an
inordinate amount of time updating code
On Jun 20, 2010, at 6:24 PM, Alexander Solla wrote:
do a - getChar
let b = c = return . f
let c = b = return . g
c = putChar
b
Correction: by your construction, f and g are already in the Kliesli
category, so you don't need the return compositions. I still
On Sunday 20 June 2010 9:24:54 pm Alexander Solla wrote:
Why can't you just use let notation do deal with the recursion? I
thought lets in do blocks were just a little bit of syntactic sugar
for regular let expressions, which do allow mutual recursion. I
could be totally wrong though. I'm
On 20/06/2010 6:32 PM, Alexander Solla wrote:
in your example c will not be in scope in the expression (let b = c =
return . f) - that's the purpose of the recursive do construct (mdo, now
do .. rec ..)
jvl
On Jun 20, 2010, at 6:24 PM, Alexander Solla wrote:
do a - getChar
let b = c =