[previous] [up] [next]     [contents] [index]
Next: Autodetecting Compiled Files for Up: Compiling Individual Files with Previous: Compiling Individual Files with

Prefixing Compilation with Macro and Signature Definitions

A load or require-library expression in a source file is compiled--but not evaluated!--as the source file is compiled. Even if the load or require-library expression loads macro or signature definitions, these will not be loaded as the file is compiled. To fix this problem for macro- and signature-defining files and libraries, wrap each load or require-library expression with (begin-elaboration-time ...), which directs the compiler to evaluate the wrapped expression at compilation time.

mzc's -p or --prefix flag takes a file and loads it at elaboration time before compiling the source files specified on the command line. This is useful for installing a set of macros or signatures that the source files expect to be present already.



PLT