Returns scheme code with the macros and derived expression types of expression expanded to primitive expression types.
macro:evalreturns the value of expression in the current top level environment. expression can contain macro definitions. Side effects of expression will affect the top level environment.
filename should be a string. If filename names an existing file, the
macro:loadprocedure reads Scheme source code expressions and definitions from the file and evaluates them sequentially. These source code expressions and definitions may contain macro definitions. The
macro:loadprocedure does not affect the values returned by
This is version 2.1 of
syntax-case, the low-level macro facility
proposed and implemented by Robert Hieb and R. Kent Dybvig.
This version is further adapted by Harald Hanche-Olsen <hanche @ imf.unit.no> to make it compatible with, and easily usable with, SLIB. Mainly, these adaptations consisted of:
If you wish, you can see exactly what changes were done by reading the shell script in the file syncase.sh.
The two PostScript files were omitted in order to not burden the SLIB
distribution with them. If you do intend to use
however, you should get these files and print them out on a PostScript
printer. They are available with the original
distribution by anonymous FTP in
In order to use syntax-case from an interactive top level, execute:
(require 'syntax-case) (require 'repl) (repl:top-level macro:eval)
See the section Repl (see Repl) for more information.
To check operation of syntax-case get cs.indiana.edu:/pub/scheme/syntax-case, and type
(require 'syntax-case) (syncase:sanity-check)
syntax-case takes a long time to load – about 20s on
a SPARCstation SLC (with SCM) and about 90s on a Macintosh SE/30 (with
All R4RS syntactic forms are defined, including
delay are simple definitions for
delay expressions expand) and
with-syntax (described in TR356)
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:
build-procedures in output.ss
The syntax of define has been extended to allow
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).