Vo Minh Thu <not...@gmail.com> wrote: > This is not a parsing problem, but a scoping one: try to run this > program: > > main = do > let x = y > y = 5 > let a = b > let b = 6 > print (x, y, a, b) > > Cheers, > Thu
Martijn has actually covered this question: > > Where each sequence of let-less bindings is put in a separate > > binding group. I'm no parsing wizard, but I couldn't come up with > > any situations in which this would cause ambiguity. To me, the > > let-less version is easier on the eyes, more consistent with <- > > bindings, and also makes it less of a hassle to move stuff around. The suggestion seems sound to me, and the additional 'let' can really be annoying in cases where you have a lot of 'let' bindings among very few monadic actions. My current way to deal with this is to move the stuff to separate computations, but it's certainly not a nice solution: myComp = c >>= f where f x = ... where a = ... b = ... Greets Ertugrul -- Not to be or to be and (not to be or to be and (not to be or to be and (not to be or to be and ... that is the list monad.
signature.asc
Description: PGP signature
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe