[R6RS] modules

Matthew Flatt mflatt
Tue Aug 24 13:42:50 EDT 2004


At Tue, 24 Aug 2004 12:32:04 -0500 (EST), "R. Kent Dybvig" wrote:
> > But #'x isn't in the scope of the require form.
> 
> You're right---I had lost track of your example.  I don't see offhand how
> to prevent references through syntax objects transmitted in this manner
> when the module bindings are actually available.  Does MzScheme's model
> eliminate the problem?

Yes. The key is to instantiate the module once for each phase, instead
of just once for all phases, and the first step in instantiating a
module is to phase-shift the module's literal syntax objects as
necessary.

Thus, there are two `get-x' functions when running my little example
--- one created by `(require M)', and other created by `(require
only-for-syntax M)'. The former returns a "normal" #'x, and the latter
returns an #'x that is shifted one phase.

Matthew



More information about the R6RS mailing list