It is possible to set up multiple configuration packages. The default configuration package opens the following structures:
more-structures-interfaceat the end of the file
You can define additional configuration packages by making a package that opens module-system and, optionally, built-in-structures, more-structures, or other structures that export structures and interfaces.
> ,config (define-structure foo (export) (open module-system built-in-structures more-structures)) > ,in foo foo> (define-structure x (export a b) (open scheme) (files x)) foo>
Unfortunately, the above example does not work.
The problem is that every environment in which
define-structure is defined must also have a way to
create "reflective towers" (a misnomer; a better name would be
A new reflective tower is required whenever a new environment is created for
compiling the source code in the package associated with a new structure.
The environment's tower is used at compile time for
and so forth. It is a "tower" because that environment, in turn, has to say what environment to use if(define-syntax
macro-source) (let-syntax ((
macro-sourceitself contains a use of
The simplest way to provide a tower maker is to pass on the one used by
an existing configuration package.
The special form
export-reflective-tower creates an interface
that exports a configuration package's tower.
The following example uses
,structure command to obtain a tower maker and create a new
> ,config ,structure t (export-reflective-tower-maker) > ,config (define-structure foo (export) (open module-system t built-in-structures more-structures))
Previous: Command processor support | Next: Discussion