Comment 12 for bug 378735

Revision history for this message
Abdulaziz Ghuloum (aghuloum) wrote : Re: [Bug 378735] Re: Missing source annotations

On May 28, 2009, at 8:14 PM, leppie wrote:

> (add-mark (gen-mark) x expr)
>
> with:
>
> (add-mark (gen-mark)
> (if (and (pair? x)
> (stx? expr)
> (annotation? (stx-expr expr)))
> (make-annotation x (annotation-source (stx-expr expr)) x)
> x)
> expr))

Doesn't look right. I think there are places in the expander where
it assumes that annotations are always inside top-marked stx objects
and if you wrap an annotation around an stx, it gets confused.

Try looking inside the stx-ae* field which contains the trace of all
macro expansions that ultimately lead to the given expression. Maybe
the first or the last one is what you're looking for. Let me know.

Aziz,,,