[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-janitors] Re: #445: define-record doesn't respect scope rules
From: |
Chicken Trac |
Subject: |
[Chicken-janitors] Re: #445: define-record doesn't respect scope rules |
Date: |
Sun, 12 Dec 2010 12:50:27 -0000 |
#445: define-record doesn't respect scope rules
----------------------+-----------------------------------------------------
Reporter: mario | Owner: felix
Type: defect | Status: assigned
Priority: major | Milestone: 4.7.0
Component: unknown | Version: 4.6.x
Resolution: | Keywords:
----------------------+-----------------------------------------------------
Comment(by sjamaan):
Felix, of course you were correct: the eq? in canonicalize-body is wrong.
The reason is that the current syntax environment contains a macro (a list
containing the expansion handling procedure and the syntax env of that
handler), which can't be eq?ed to a macro name of course.
I fixed this by looking up the value in the current syntax env and if it's
a macro comparing its handler to all handlers in the core syntax env. If
the handler is found, use the name that handler is bound to in the core
syntax env.
If the name is not found in the current syntax env, the name is just
returned as that name would be looked up in the core syntax env by the
macro expander, so it's either already the core name, or simply not a
macro at all.
I added a couple of nasty tests I could come up with. Hopefully this
provides complete coverage, but probably not :)
--
Ticket URL: <http://bugs.call-cc.org/ticket/445#comment:6>
Chicken Scheme <http://www.call-with-current-continuation.org/>
Chicken Scheme is a compiler for the Scheme programming language.
- [Chicken-janitors] #445: define-record doesn't respect scope rules, Chicken Trac, 2010/12/09
- [Chicken-janitors] Re: #445: define-record doesn't respect scope rules, Chicken Trac, 2010/12/09
- [Chicken-janitors] Re: #445: define-record doesn't respect scope rules, Chicken Trac, 2010/12/10
- [Chicken-janitors] Re: #445: define-record doesn't respect scope rules, Chicken Trac, 2010/12/10
- [Chicken-janitors] Re: #445: define-record doesn't respect scope rules, Chicken Trac, 2010/12/11
- [Chicken-janitors] Re: #445: define-record doesn't respect scope rules, Chicken Trac, 2010/12/11
- [Chicken-janitors] Re: #445: define-record doesn't respect scope rules,
Chicken Trac <=
- [Chicken-janitors] Re: #445: define-record doesn't respect scope rules, Chicken Trac, 2010/12/16
- [Chicken-janitors] Re: #445: define-record doesn't respect scope rules, Chicken Trac, 2010/12/16
- [Chicken-janitors] Re: #445: define-record doesn't respect scope rules, Chicken Trac, 2010/12/20