This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Re: Portable Syntax Case
Adam Warner wrote:
(sc-expand '(define-syntax and2 (lambda (x) (syntax-case x () ((_ x y) (syntax (if x y #f)))))))
Argument #0 to 'vector-ref' has wrong type
My guess is that it's using Kawa's interaction-environment
unction rather than psyntax.pp's.
You could try running Kawa with --no-inline.
However, at some point you'll want to integrate psyntax into Kawa,
which probably require using Kawa's version of these functions.
The 6.9 version of psyntax.ss does not define interaction-environment,
but the 6.9a version does.
I notice that the mzscheme manual documents a "general, mostly hygienic
macro system is based on syntax-case by Dybvig, Hieb, and Bruggeman",
and it appears they use a different implementation.
I think trying to force-fit psyntax.pp or psyntax.ss into Kawa will
be difficult, and the result may be slow. Trying to fix the problems
with the existing partial implementation of syntax-case may be more
promising, at least in terms of getting something integrated into Kawa.
Both appraches will be a non-trivial ...
--
--Per Bothner
per@bothner.com http://per.bothner.com/