
3 Aug
2007
3 Aug
'07
5 p.m.
Hi
if you write :
let x = (<-a):x
is it possible that is desugars into :
temp <-a let x = temp:x
that would'nt work ?
That would work, since 'a' doesn't refer to 'x'. I can't think of a real example where it becomes an issue, but the scope within 'a' has changed.
Also :
do case x of [] -> return 1 (y:ys) -> f (<- g y)
Is it not possible that is desugars to
do case x of [] -> return 1 (y:ys) -> g y >>= \temp -> f temp
See the rule about always binding to the previous line of a do block. This case then violates that. Thanks Neil