[Scheme-reports] The SYNTAX-RULES macro phase error Andre van Tonder (03 May 2011 21:10 UTC)
Re: [Scheme-reports] The SYNTAX-RULES macro phase error Aaron W. Hsu (05 May 2011 03:01 UTC)
Re: [Scheme-reports] The SYNTAX-RULES macro phase error John Cowan (05 May 2011 08:08 UTC)

Re: [Scheme-reports] The SYNTAX-RULES macro phase error Aaron W. Hsu 05 May 2011 03:00 UTC

On Tue, 03 May 2011 17:10:03 -0400, Andre van Tonder <andre@het.brown.edu>
wrote:

> 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
> portable.
> (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
> others
> would require MY-SYNTAX-RULES to be imported FOR EXPAND for the macro
> definition
> 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
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports