You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(I may be misunderstanding or there may be a way to combine Nest<> or something else to fix this but I'm not seeing it at present.)
When opening the pattern, state depth is not incremented when entering the second scope's pattern so bound variables which actually identify the nested letrec are being looked up in the outer letrec. (Which fails in the test above because there are fewer bindings in the outer letrec than the index of the binding being sought.)
Culprit seems to be a missing .incr() on line 142 of scope.rs. Depth is incremented for unsafe_body but not for unsafe_pattern. I'm not clear in my head yet whether the obvious change of adding the .incr() for the pattern too (like this) is safe or correct but it doesn't seem to break any tests at least.
The text was updated successfully, but these errors were encountered:
I think there may be a bug in the handling of nested recursive bindings with embeds... i.e. nested letrecs as in the test I've added here:
curvelogic@39d7c56
(I may be misunderstanding or there may be a way to combine Nest<> or something else to fix this but I'm not seeing it at present.)
When opening the pattern, state depth is not incremented when entering the second scope's pattern so bound variables which actually identify the nested letrec are being looked up in the outer letrec. (Which fails in the test above because there are fewer bindings in the outer letrec than the index of the binding being sought.)
Culprit seems to be a missing
.incr()
on line 142 of scope.rs. Depth is incremented forunsafe_body
but not forunsafe_pattern
. I'm not clear in my head yet whether the obvious change of adding the.incr()
for the pattern too (like this) is safe or correct but it doesn't seem to break any tests at least.The text was updated successfully, but these errors were encountered: