[Larceny-users] visibility of bindings inside macros
AndrevanTonder
andre at het.brown.edu
Sat Aug 2 06:36:14 EDT 2008
On Sat, 2 Aug 2008, Jon Wells wrote:
> What is it that makes definitions for standard parts of the language
> visible at XXX below and it be illegal to refer to a definition of one's
> own creation?
>
> (import (rnrs))
>
> (define-syntax blarg
> (lambda (form)
>
> ;; XXX
>
> (syntax-case form ()
> ((_ crud ...)
> :
Since XXX is executed at macro expansion time, you can refer to definitions of
your own creation in XXX as long as you wrap them in a library that you then
import "for expand" - see the r6rs documentation for the syntax. You
do not have to do that for (rnrs) because everything in
(rnrs) is exported for both runtime and expansion time by default.
Andre
More information about the Larceny-users
mailing list