Article View: comp.lang.scheme.c
Article #212Macros in MIT-Scheme
From: Gary Levin
Date: Wed, 25 Jan 1989 18:54
Date: Wed, 25 Jan 1989 18:54
32 lines
1836 bytes
1836 bytes
Does anyone have a description of the macro facilities of MIT-Scheme?
It appears that you make changes in the syntax-tables, but I have been
unable to find any definitions of the facilities in the distribution
that I FTP'ed.
In particular, what environments are used when in the macro expansion
phase? I have some code that is distributed with TI-Scheme that I
would like to port to MIT-Scheme, but the macro conventions are
different. The problem I seem to face is that one of the macros in
the code expands to a macro definition and the body is being evaluated
in the wrong environment.
Along related lines, does anyone have the extend-syntax commands
written for MIT-Scheme. This is the code I am trying to port
(originally written by Dybvig, included in the TI distribution).
Eventually I would like to see a proper definition of MIT-Scheme's
macros, but with extend-syntax, I'd be able to do most of what is
needed anyway.
For those who have not seen extend-syntax, or who don't recognize it
by name, here is a famous example.
(extend-syntax (let)
( (let ( (v e) ... ) b1 b2 ...)
( (lambda (v ...) b1 b2 ...) e ...)
) )
This defines `let' as an application of a lambda expression. The
ellipsis is part of the syntax. Nice feature.
--
Gary Levin/Dept of Math & CS/Clarkson Univ/Potsdam, NY 13676/(315) 268-2384
BitNet: gary@clutx Internet: gary@clutx.clarkson.edu
Technical Details
Message-ID:
<GARY.89Jan25135441@milo.mcs.clarkson.edu>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!tank!ncar!mailrus!cornell!batcomputer!sun.soe.clarkson.edu!garyShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!tank!ncar!mailrus!cornell!batcomputer!sun.soe.clarkson.edu!gary From: gary@milo.mcs.clarkson.edu (Gary Levin) Newsgroups: comp.lang.scheme.c Subject: Macros in MIT-Scheme Message-ID: <GARY.89Jan25135441@milo.mcs.clarkson.edu> Date: 25 Jan 89 18:54:41 GMT Sender: news@sun.soe.clarkson.edu Distribution: comp Organization: Clarkson University, Postdam NY Lines: 32