[plt-scheme] module execution and require-for-syntax

From: Doug Orleans (dougo at place.org)
Date: Tue May 18 21:09:53 EDT 2004

Section 12.3.4 of the MzScheme manual has an example showing
expansion-time vs. run-time execution of module bodies.  The output is
supposed to be:

 ; "ET here" is printed during the expansion of m

 (require m) ; prints "RT here", then 7, then 700, then 7

When I try this, I get "ET here" during the expansion of m, then
"ET here" again when m is required, followed by "RT here" and the rest.
I get "ET here" again whenever I define a new module that requires m,
or requires a module that requires m, etc:

 > (module m2 mzscheme (require m))
 ET here
 > (module m3 mzscheme (require m2))
 ET here

Why does `et' need to get executed again every time `m' is
transitively required?  Is this correct behavior?  (If so, the example
output should probably be fixed.)

--dougo at place.org


Posted on the users mailing list.