[gambit-list] syntax-case and DSSSL
James Cash
james.nvc at gmail.com
Mon May 21 20:24:20 EDT 2007
Is there any way to have both the syntax-case macros and use Gambit's DSSSL
parameters at the same time? I found that you can't use them normally after
loading the file, as in
> (load "~~/syntax-case.scm")
"/usr/local/Gambit-C/4.0b22/syntax-case.scm"> (load "~~/syntax-case.scm")
> (define (foo x #!key y)
(list x y))
*** ERROR -- invalid syntax (define (foo x #!key y) (list x y))> (define
(foo x #!key y)
(list x y))
However, if I do
> (##define (foo x #!key y)
(list x y))
It works fine. Okay.
But now, if I were to try this:
> (define-syntax twice
(syntax-rules ()
((_ x) (begin x x))))
> (##define (bar x)
(twice x))
> (bar 5)
** ERROR IN bar, (stdin)@55.2 -- unbound variable twice
So, once I've loaded syntax-rules, I can only use the DSSSL extensions in
##define forms, but I can only use syntax macros in define forms. Is there
any way around this? Do I have to prefix the syntax macros with a
specific namespace?
I'm assuming that's what the problem is, the macros being in a
different namespace...but which one?
Kind of curious,
James
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20070521/c75e74d9/attachment.htm>
More information about the Gambit-list
mailing list