next up previous
Next: Higher-order modules Up: No Title Previous: Interfaces


Hygienic macros, as described in [1,2], are implemented. Structures may export macros; auxiliary names introduced into the expansion are resolved in the environment of the macro's definition.

For example, the scheme structure's delay macro is defined by the rewrite rule =0pt=0pt=0pt =0pt[] (delay exp) (make-promise (lambda () exp)).

The variable make-promise is defined in the scheme structure's underlying package, but is not exported. A use of the delay macro, however, always accesses the correct definition of make-promise. Similarly, the case macro expands into uses of cond, eqv?, and so on. These names are exported by scheme, but their correct bindings will be found even if they are shadowed by definitions in the client package.

Margaret M Fleck
Tue Nov 5 21:13:16 CST 1996