Open okuoku opened 2 years ago
tested: https://github.com/justinethier/cyclone/commit/cf66cf1057fcd687cc42d4d7dcaeeef00cba089b
It seems guard syntax evaluates its cond clause s in wrong dynamic environment. e.g.)
guard
(define p0 (make-parameter 1)) (guard (c (#t (display (list (p0) '== 1)) (newline))) (parameterize ((p0 2)) (display (list (p0) '== 2)) (newline) (raise 'unused)))
should print
(2 == 2) (1 == 1)
but it prints
(2 == 2) (2 == 1)
R7RS specifies dynamic environment here as:
That implicit cond expression is evaluated with the continuation and dynamic environment of the guard expression.
cond
Thanks for the report @okuoku, I'll look into this.
tested: https://github.com/justinethier/cyclone/commit/cf66cf1057fcd687cc42d4d7dcaeeef00cba089b
It seems
guard
syntax evaluates its cond clause s in wrong dynamic environment. e.g.)should print
but it prints
R7RS specifies dynamic environment here as: