[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Scheme-reports] The SYNTAX-RULES macro phase error
On Tue, 03 May 2011 17:10:03 -0400, Andre van Tonder <andre@x>
> Even if we only have SYNTAX-RULES it is possible to confuse macro phases.
> It may be important for some users to know that the following is not
> (This kind of thing is actually not all that uncommon.)
> (define-syntax my-syntax-rules
> (syntax-rules ()
> ((_ blah) (syntax-rules ..........)))
> (define-syntax foo (my-syntax-rules ........)) ;; PHASE ERROR
> This kind of thing would just work in some Scheme implementations, but
> would require MY-SYNTAX-RULES to be imported FOR EXPAND for the macro
> of FOO to work.
> Maybe WG1 could remark on this in the report.
This is interesting, since I think that the implementations that allow
this tend to be in the implicit-phasing camp, and those that do not tend
to be in the explicit-phasing camp. I know that Chez allows this sort of
thing, but what about Scheme48 or Racket? I'm pretty sure that Racket
would not allow that. I do not have it installed to test it though.
Aaron W. Hsu
Programming is just another word for the lost art of thinking.
Scheme-reports mailing list