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.
_______________________________________________
Chicken-hackers mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/chicken-hackers