pyret-lang icon indicating copy to clipboard operation
pyret-lang copied to clipboard

Refinement with ID declared later in letrec causes internal error

Open jpolitz opened this issue 2 years ago • 0 comments

Both of these programs (with rec or letrec) cause an internal error.

image

image

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:

image

Probably refinements assuming the IDs are safe letrec IDs when they are not guaranteed to be.

jpolitz avatar Aug 20 '23 03:08 jpolitz