Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MIT/GNU Scheme, Cyclone: Does not follow dynamic scoping rule #153

Closed
okuoku opened this issue Jul 5, 2020 · 1 comment
Closed

MIT/GNU Scheme, Cyclone: Does not follow dynamic scoping rule #153

okuoku opened this issue Jul 5, 2020 · 1 comment

Comments

@okuoku
Copy link
Owner

okuoku commented Jul 5, 2020

SRFI-34 and R7RS says:

That implicit cond expression is evaluated with the continuation and dynamic environment of the guard expression.

but MIT/GNU Scheme evaluates cond clauses inside body's dynamic environment, which is incorrect. Guile2 also affected but it is fixed in Guile3.

(define p0 (make-parameter 0))

(check-equal 'done4
             (parameterize
               ((p0 1))
               (check-equal 1 (p0))
               (guard
                 (cnd (#t
                       (check-equal 1 (p0)) ;; Guile2 and MIT/GNU Scheme says 2 here
                       'done4))
                 (check-equal 1 (p0))
                 (parameterize
                   ((p0 2))
                   (check-equal 2 (p0))
                   (raise 'bogus)))))
@okuoku okuoku changed the title MIT/GNU Scheme: Does not follow dynamic scoping rule MIT/GNU Scheme, Cyclone: Does not follow dynamic scoping rule Jul 24, 2022
@okuoku
Copy link
Owner Author

okuoku commented Jul 24, 2022

Filed:

justinethier/cyclone#491

Tracked in exp2.

@okuoku okuoku closed this as completed Jul 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant