[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-hackers] cond-expand and macros
From: |
Kon Lovett |
Subject: |
Re: [Chicken-hackers] cond-expand and macros |
Date: |
Fri, 20 Nov 2009 14:17:26 -0800 |
On Nov 20, 2009, at 10:05 AM, Thomas Bushnell BSG wrote:
On Thu, 2009-11-19 at 18:33 -0800, Kon Lovett wrote:
Features are converted to keywords. The colon suffix is just the
default read/print form; #:keyword is the context-independent form.
The manual needs to document this; right now, one might have thought
they were ordinary symbols given every example and description in the
manual.
Please submit a bug report.
'cond-expand' uses a function that ensures the tested symbol is a
keyword, so 'foo' & '#:foo' are legal.
That the expansion-environment of a 'syntax-rules' transformer
doesn't
recognize 'cond-expand' is a different problem. (Note that 'syntax-
rules' in Chicken 3 is not a core expander.)
So the bug is more or less that the self-evaluating nature of keywords
doesn't work in the meta-environment for macro expansion, I assume.
No, they are ordinary symbols (assuming the keyword read syntax is not
present). The proffered symbol is converted to a keyword before
comparison with the set of features. But this is performed by a
procedure not the macro expander.
The self-evaluating nature of keywords works in macros AFAIK.
(Certainly that it goes differently in Chicken3+syntax-case is no
mystery, since the old syntax-case egg needed to provide its own
implementation of cond-expand anyway.)
Thomas
Best Wishes,
Kon
[Chicken-hackers] Re: cond-expand and macros, felix, 2009/11/22