Gambit Version 4.0 beta 14
(load "~~/syntax-case") "/usr/local/Gambit-C/syntax-case.scm" (define-macro (foo . o) #f) *** ERROR -- invalid syntax (foo . o)
Also, (include "macros.scm") will splice the forms in as the documents say, but only macros in that file will be available, and you'll get an error if they use any procedures defined in the same file. -- Alex
Afficher les réponses par date
On 8/19/05, Alex Shinn <alexshinn@gmail.com> wrote:
Gambit Version 4.0 beta 14
(load "~~/syntax-case") "/usr/local/Gambit-C/syntax-case.scm" (define-macro (foo . o) #f) *** ERROR -- invalid syntax (foo . o)
From the syntax-case file: ; Since the ; syntax-case expander does not know about Gambit's syntactic ; extensions (like DSSSL parameters, forms like "namespace", ; "define-macro", "define-type", and "c-lambda"), those syntactic ; extensions cannot be used. On the other hand, the syntax-case ; expander defines some new special forms, such as "module", ; "alias", and "eval-when".
So you probably want define-syntax (see R5RS 5.3) AGL -- Adam Langley agl@imperialviolet.org http://www.imperialviolet.org (+44) (0)7906 332512 PGP: 9113 256A CC0F 71A6 4C84 5087 CDA5 52DF 2CB6 3D60
On 8/19/05, Adam Langley <alangley@gmail.com> wrote:
From the syntax-case file: ; Since the ; syntax-case expander does not know about Gambit's syntactic ; extensions (like DSSSL parameters, forms like "namespace", ; "define-macro", "define-type", and "c-lambda"), those syntactic ; extensions cannot be used. On the other hand, the syntax-case ; expander defines some new special forms, such as "module", ; "alias", and "eval-when".
Ah! It would be nice if gambit-c.txt mentioned this. Or better yet if loading syntax-case redefined define-macro: http://www.cs.utah.edu/plt/mailarch/plt-scheme-2001/msg01267.html -- Alex
participants (2)
-
Adam Langley -
Alex Shinn