|
| From: | Chicken Trac |
| Subject: | [Chicken-janitors] #518: strip-syntax returns wrong value for renamed symbols exported form a module |
| Date: | Sat, 05 Mar 2011 17:10:38 -0000 |
#518: strip-syntax returns wrong value for renamed symbols exported form a
module
---------------------+------------------------------------------------------
Reporter: syn | Owner:
Type: defect | Status: new
Priority: major | Milestone: 4.7.0
Component: unknown | Version: 4.6.x
Keywords: |
---------------------+------------------------------------------------------
Stripping syntax from symbols in a macro that have previously been renamed
and happen to have the same name as a symbol exported by the module the
macro is defined in returns the symbol prefixed with the module name. This
is particularly annoying with IR macros which rename all symbols
implicitly and thus this problem is likely to occur.
The problem can be reproduces using the following program. It outputs "no:
foo#baz" when it should actually output "yes: baz".
{{{
(module foo
;; not exporting baz makes it work as expected
(bar baz)
(import chicken scheme)
(define baz 'qux)
(define-syntax bar
(er-macro-transformer
(lambda (x r c)
(let ((e (strip-syntax (r (cadr x)))))
(if (eq? 'baz e)
(display "yes: ")
(display "no: "))
(display e)
'(void)))))
)
(import foo)
(bar baz)
}}}
--
Ticket URL: <https://bugs.call-cc.org/ticket/518>
Chicken Scheme <http://www.call-with-current-continuation.org/>
Chicken Scheme is a compiler for the Scheme programming language.
| [Prev in Thread] | Current Thread | [Next in Thread] |