chicken-hackers
[Top][All Lists]
Advanced

[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: Thu, 19 Nov 2009 20:07:21 -0800


On Nov 19, 2009, at 7:15 PM, John Cowan wrote:

Kon Lovett scripsit:

'cond-expand' uses a function that ensures the tested symbol is a
keyword, so 'foo' & '#:foo' are legal.

Fair enough. But in Chicken 4 syntax-rules macros, the non-keyword form
doesn't match, only the keyword form.  That makes no sense.  It's not
that cond-expand as a whole isn't being recognized, because it is;
it throws an error because there is no match.

My hypothesis (I didn't check) is the non-keyword symbol is run thru a "hygiene" regimen; keywords cannot be identifiers so exempt. Maybe:

        (syntax-rules (foo)
                ((_ ?x ?y)
                        (cond-expand
                                (foo ...

might do something useful.


--
"The serene chaos that is Courage, and the phenomenon   address@hidden
of Unopened Consciousness have been known to the        John Cowan
Great World eons longer than Extaboulism."
"Why is that?" the woman inquired.
"Because I just made that word up", the Master said wisely.
       --Kehlog Albran, The Profit             http://www.ccil.org/~cowan

Best Wishes,
Kon






reply via email to

[Prev in Thread] Current Thread [Next in Thread]