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: Thomas Bushnell BSG
Subject: Re: [Chicken-hackers] cond-expand and macros
Date: Thu, 19 Nov 2009 16:45:26 -0800

Ok, so this is too weird by half.

When I do (register-feature! 'foo), then the feature that is registered
is foo:, despite what the actual manual says.  And then, for some
baroque reason, cond-expand matches foo and foo: (even though there is
no "foo" feature registered, since it's actually foo:) and then, inside
the context of a syntax-rules, suddenly cond-expand *doesn't* match foo,
though it still matches foo:.

Can I cry foul?  Why doesn't register-feature! simply register the
feature specified without this on-again-off-again colon magic?  What is
the point of adding a colon in the first place to the symbol name?  Why
is it magically removed again sometimes?

Thomas


On Thu, 2009-11-19 at 19:27 -0500, John Cowan wrote:
> Thomas Bushnell BSG scripsit:
> 
> > The following code does not work:
> > 
> > (define-syntax foo
> >   (syntax-rules ()
> >     ((_)
> >      (cond-expand
> >       (chicken (display "all good\n"))))))
> > (foo)
> > 
> 
> Calling (features) shows that the feature name is "chicken:", not
> "chicken".  If you change the above to reference chicken:, all is well.
> This is not backward compatible and is still probably a bug, but at
> least it's a simple bug.
> 
> On the other hand, (cond-expand (chicken (display "all good\n"))) does
> output "all good" right away.
> 






reply via email to

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