[R6RS] modules
R. Kent Dybvig
dyb
Tue Aug 24 11:13:23 EDT 2004
> How many times is the body of M evaluated? Is it just once, so that all
> of the calls to `get-x' in N and P call the same function? ...
Again, I prefer just once.
> ... If so, what
> mechanism allows the result to be treated differently in N and P?
Here's one approach:
* (require M) introduces a substitution marked "run-time" from each
import name to the corresponding export label.
* (require only-for-syntax M) introduces a substitution marked
"expand-time" from each import name to the corresponding export label.
* (require also-for-syntax M) introduces a substitution marked
"any-time" from each import name to the corresponding export label.
When expanding transformer code, the expander signals an error
for attempted references through substitutions marked "run-time";
otherwise, the expander signals an error for attempted references through
substitutions marked "expand-time".
Kent
More information about the R6RS
mailing list