cs: fix $value confusion in schemify and begin0

The attempted repair for `$value` in 6c195d521c was wrong.
This commit is contained in:
Matthew Flatt 2019-03-29 11:00:44 -06:00
parent 253f0f4383
commit dd9e11e1c7
2 changed files with 2 additions and 3 deletions

View File

@ -3,8 +3,6 @@
(define-syntax begin0
(syntax-rules (void)
[(_ expr0) expr0]
[(_ expr0 (void)) ; detect this pattern as a way of accessing the `$value` form
($value expr0)]
[(_ expr0 expr ...)
(call-with-values (lambda ()
(call-with-values (lambda () expr0)

View File

@ -613,7 +613,8 @@
(apply values new-stack vals))
(loop (fx+ i 1) new-stack)))))]
[#($value ,e)
(begin0 (interpret e stack) (void))]
(let ([v (interpret e stack)])
v)]
[#(clear ,clears ,e)
(let loop ([clears clears] [stack stack])
(cond