* Attila Lendvai ([EMAIL PROTECTED]) [070812 15:39]:
> > (defmacro foo ()
> > ''macro)
> >
> > (iter (for i from 1 to 1)
> > (labels ((foo ()
> > 'labels))
> > (return (foo))))
> >
> > returns MACRO, not LABELS
>
> this is a limitation of iterate, it's not updating the environment
> while walking its body (in fact it calls macroexpand with nil env, i
> think). this is mostly becase doing so would be platform dependent.
It doesn't need to be able to update the environment because it can see for
itself that foo is a function, not a macro. This is the case that cannot be
handled portably:
(defmacro foo ()
''macro)
(defmacro bar (form &environment env)
(macroexpand form env))
(iter (for i from 1 to 1)
(labels ((foo ()
'labels))
(return (bar (foo)))))
--larry
_______________________________________________
iterate-devel site list
[email protected]
http://common-lisp.net/mailman/listinfo/iterate-devel