pyret-lang
pyret-lang copied to clipboard
Refinement with ID declared later in letrec causes internal error
Both of these programs (with rec or letrec) cause an internal error.
rec n :: Number%(is-zero) = 10
rec is-zero = lam(x): x == 0 end
letrec n :: Number%(is-zero) = 10,
is-zero = lam(x): x == 0 end:
n
end
The expected behavior is this error:
Probably refinements assuming the IDs are safe letrec IDs when they are not guaranteed to be.