TR-H-0171 :1995.8.28

Matthias Blume

Refining Hygienic Macros for Modules and Separate Compilation

Abstract:Genuine differences in the treatment of identifiers in block-structured languages and those that provide qualified names for accessing components of modules or aggregate data structures invalidate some of the assumptions hygienic macro systems are based on. We will investigate how these assumptions have to be changed, and the consequences for the construction of hygienic macro expanders. Macro expansion algorithms rely on their ability to rename identifiers throughout the program. This creates difficulties when some identifiers are used to connect individually compiled program units. Therefore, it is necessary to make separate compilation aware of macro expansion and vice versa. We will show how this can be done.

Keywords: hygienic macros, modules, separate compilation, Scheme