[r6rs-discuss] expansion process and syntax-case?
Per Bothner
per at bothner.com
Thu Jan 15 14:26:24 EST 2009
Is this (rough sketch) supposed to work:
(define (process form)
... do something with form ...)
(define-syntax foo
(lambda (form)
(syntax-case form ()
((_ . f) (process form)))))
(foo ...)
I.e. can a syntax-case macros make use of a function
define in the same module or top-level?
It seems that we *want* this to be well-defined.
However, reading the "Expansion process" in Chapter 10
doesn't explain how. It says:
define form
The expander records the fact that the defined identifier is a
variable but defers expansion of the right-hand-side expression
until after all of the definitions have been processed.
That implies that the macro-expansion of foo would call the
unexpanded function process.
What is the *real* intended expansion process?
--
--Per Bothner
per at bothner.com http://per.bothner.com/
More information about the r6rs-discuss
mailing list