Problem with the let binding.
Closed this issue · 1 comments
zigaLuksic commented
While cleaning up the desugaring I had some trouble with the way the variables interact in the let case.
Turns out there is a problem:
let a = 1 and b = a + 1 in b
The above code complains about not knowing the variable a
in the second part.
Also, using fold_right
seems like an odd choice to me, as the following complains about not knowing the variable a
first:
let x = 1 and y = x + 1 and a = 1 and b = a + 1
I tried switching it to fold_left
but with no success.
zigaLuksic commented
Turns out the mistake was in my understanding of what let
should do.