whalesong
whalesong copied to clipboard
Behaviour of (letrec ([x x]) x) changed in Racket
The latest Racket has changed the behaviour of (letrec ([x x]) x). Currently any program beginning with #lang whalesong fails due to an "x undefined" error. The undefined value is now exported from racket/undefined.
Note that (letrec ([x x]) x) is used in other files too:
grep -r undefined * | grep letrec whalesong/cs019/private/sigs-patched.rkt:(define the-undefined-value (letrec ([x x]) x)) whalesong/cs019/teach-runtime.rkt:(define undefined (letrec ([x x]) x)) whalesong/tests/older-tests/moby-programs/misc.rkt:(check-expect (undefined? (letrec ([x x]) x)) true)
Also in kernel.rkt the function -undefined? could be replaced with: (require racket/undefined) (define (-undefined? x) (eq? x undefined))