Scheme macro system Version 2.0
Robert Hieb and R. Kent Dybvig
92/06/18


The following files are contained in this directory:

    ReadMe               this file
    compat.ss            a few non-R4RS Chez Scheme procedure definitions
    hooks.ss             implementation-dependent hooks
    output.ss            procedures that determine form of expander output
    init.ss              a few inits
    expand.ss            the bully---
    expand.pp            preprocessed (bootstrapped) version of expand.ss
    loadpp.ss            loads system, including preprocessed expander
    macro-defs.ss        R4RS syntactic forms not defined in expand.ss
    structure.ss         sample code for define-structure
    syntax-case.ps       postscript for "Writing Macros ...", IUCS TR 356

    expand.pp was created from expand.ss by running it through Chez
    Scheme's macro expander to produce a file that can be loaded into
    an R4RS Scheme system (after init.ss).


Customizing
    The file hooks.ss may be the only file you have to change in order
    to successfully run the macro system in your Scheme implementation.
    There are a half-dozen or so procedures that must be provided,
    including hooks to the evaluator and to install a new expander.
    The Chez Scheme (Version 4) versions are given in the distributed
    hooks.ss, so no changes need be made to load the system into Chez
    Scheme.


Running
    Once hooks.ss has been properly set up, you should be able to load
    loadpp.ss into your Scheme system and start using the new macro
    system.


Structure of the Output
    Output from the expander is a subset of the essential R4RS forms,
    which should work in any Scheme system.  However, the output syntax
    can be changed by modifying the "build-" procedures in the file
    output.ss.


Notes
    All R4RS syntactic forms are defined, including delay.  Along with
    delay are simple definitions for make-promise (into which delay
    expressions expand) and force.

    Syntax-rules and with-syntax (described in TR356) are defined.

    syntax-case is actually defined as a macro that expands into calls
    to the procedure syntax-dispatch and the core form syntax-lambda;
    do not redefine these names.

    Several other top-level bindings not documented in TR356 are
    created:
        the "hooks" in hooks.ss
        the "build-" procedures in output.ss
        expand-syntax (the expander)
        
    The syntax of define has been extended to allow "(define id)",
    which assigns id to some unspecified value.

We have attempted to maintain R4RS compatibility where possible.  The
incompatibilities should be confined to hooks.ss.  Please let us know
if there is some incompatibility that is not flagged as such.

Send bug reports, comments, suggestions, and questions to Kent Dybvig
(dyb@iuvax.cs.indiana.edu).
