[Haskell-cafe] new recursive do notation (ghc 6.12.x) spoils
layout
John Lask
jvlask at hotmail.com
Mon Jun 21 14:15:45 EDT 2010
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 >>= 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 don't know
> if the construction is admissible though.
>
>
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
More information about the Haskell-Cafe
mailing list