dyoo / whalesong

Whalesong: Racket to JavaScript compiler
http://hashcollision.org/whalesong
250 stars 30 forks source link

Fix build problem with latest Racket release (aka fix the "x undefined" error) #105

Open soegaard opened 10 years ago

soegaard commented 10 years ago

The latest version of Racket has introduced an "undefined" value. If the undefined value is referenced an exception is thrown. This affects letrec, which no longer allows the (letrec ((x x)) x) trick that occurs in the Whalesong song source, where an undefined value is needed.

A temporary fix is to redefine letrec and letrec-values to use the old semantics. This PR does just that.

A longer term fix would be to introduce a new type of runtime value to represent the undefined value.