Menu

#9 annotations for macro-generated code

open
nobody
3
2002-06-24
2002-06-24
No

Currently, code generated by macros has no annotations.
Macro expansion preserves annotations for any piece of
the input used in the output of the expansion, but any
other code is without annotations. For example,
(or (foo) (bar))
will expand into
(let ([t (foo)]) (if t t (bar)))
and furher into
((lambda (t) (if t t (bar))) (foo))
The (bar) and (foo) will be annotated but the lambda,
and if won't be.

There are at least two alternatives for what the
annotation should be:
* that of the "or".
* that of the occurrence of the expression in the macro
body.

The latter seems more logical.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB