dyoo / whalesong

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

returning zero values causes bad things #90

Open dyoo opened 12 years ago

dyoo commented 12 years ago

Bug: returning zero values to a continuation is breaking. I need to simplify the multiple-value-return procedure so it's less error-prone.

dyoo commented 11 years ago

The error I'm seeing is more than just zero arity. I'm seeing that:

(call/cc (lambda (k) (k 3 4 5)))

fails. It should return three values instead to its continuation instead. That is, Whalesong is currently doing:

> (procedure-arity (call/cc (lambda (k) k)))
1

and that's wrong: it should really be a vararity function returning multiple values back.