The latest Racket compiles the racket letrec and letrec-values into bytecode that checks for access to uninitialized values via check-for-unsafe-undefined. The easiest solution to fix Whalesong is to add these definitions of letrec and letrec-values to kernel.rkt.
(define-syntax (letrec stx)
(syntax-parse stx
[(_ ([id expr] ...) body ...)
(syntax/loc stx
(let ([id 'undefined] ...)
(set! id expr) ...
(let () body ...)))]))
(define-syntax (letrec-values stx)
(syntax-parse stx
[(_ ([(id ...) expr] ...) body ...)
(syntax/loc stx
(let ([id 'undefined] ... ...)
(set!-values (id ...) expr) ...
(let () body ...)))]))
The latest Racket compiles the racket letrec and letrec-values into bytecode that checks for access to uninitialized values via check-for-unsafe-undefined. The easiest solution to fix Whalesong is to add these definitions of letrec and letrec-values to kernel.rkt.
(define-syntax (letrec stx) (syntax-parse stx [(_ ([id expr] ...) body ...) (syntax/loc stx (let ([id 'undefined] ...) (set! id expr) ... (let () body ...)))]))
(define-syntax (letrec-values stx) (syntax-parse stx [(_ ([(id ...) expr] ...) body ...) (syntax/loc stx (let ([id 'undefined] ... ...) (set!-values (id ...) expr) ... (let () body ...)))]))