Summary
Enable tracing of macro-generated code back to source: which macro, which invocation, definition-site location.
Design
See plans/MACRO_EXPANSION_TRACING.md for full design.
Key Addition
syntax-origin primitive for Scheme-level inspection.
Tasks
Use Cases
- Error messages pointing to template source
- Macro debugging
- Understanding expansion process
Summary
Enable tracing of macro-generated code back to source: which macro, which invocation, definition-site location.
Design
See
plans/MACRO_EXPANSION_TRACING.mdfor full design.Key Addition
syntax-originprimitive for Scheme-level inspection.Tasks
OriginInfowith new fields (IntroScope, UseSite, Template)Scope.ID()methodsyntax-originprimitiveUse Cases