This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: Macro expansion problem
On 05/19/2009 11:26 AM, Dan Stanger wrote:
The following test program prints
Trace1: (symbol->string (quote b))
upon loading. define-input is not passed into the function,
test-exprs->proc, but is matched anyway.
The problem appears to be when creating the template
for the 2nd rule in:
(define-syntax
test-out
(syntax-rules (test-content-type!
define-input)
((test-out (test-content-type! expr ...))
(test-content-type! expr ...))
((test-out (define-input form))
(mtrace1 (define-input form)))
((test-out expr) (display expr ))
))
(test-out ,@exprs))))
Somehow the define-input in the pattern fails to
match the define-input in the literals list,
so define-input is read as a pattern variable.
I haven't yet had time to figure out whether this would
be an easy or difficult fix - I have to remind myself
how the macro processing works ... (The complication
is how "hygiene" is handled.)
--
--Per Bothner
per@bothner.com http://per.bothner.com/