Skip to content

Macro Expansion Tracing #192

@aalpar

Description

@aalpar

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

  • Extend OriginInfo with new fields (IntroScope, UseSite, Template)
  • Add Scope.ID() method
  • Populate fields during expansion
  • Add syntax-origin primitive
  • Verify unique scope IDs per invocation

Use Cases

  • Error messages pointing to template source
  • Macro debugging
  • Understanding expansion process

Metadata

Metadata

Assignees

No one assigned

    Labels

    plannedDesign complete, ready to starttoolingDeveloper tools and debugging

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions