Rewriting Macros on the Fly: A Modular Approach to Administrative Reduction During(…)
summary
A system rewrites administrative expressions during macro expansion to avoid the extra lambdas and applications that CPS and other transforms ordinarily emit, implemented as Racket macros with a programmable localized rewriting rules registry and a rewrite table that performs intro/elim shortcuts. The implementation (code on GitHub) composes as compositional macros, handles CPS and co-pattern examples, produces near‑normal‑form expansions, and proves usable for debugging and extension in practice.
AI-written summary · about
chapters (7)
- 0:00Rewriting macros in Scheme
- 2:31Admin reductions in macros
- 7:03Monolithic macro limits
- 9:30Modular CPS with monadic primitives
- 12:20Modularity vs optimization
- 15:55Rewriting intro/elimination pairs
- 17:20Real-world applications
related talks
01h 03mModern Macros
17mMacros for Domain-Specific Languages
40mLet's Build a Hygienic Macro Expander
42mThe Macronomicon
12mMulti-Stage Programming with Generative and Analytical Macros
43mAdventures in Metaprogramming: Macros versus Shapeless
19mRhombus: A New Spin on Macros without All the Parentheses
42mAvoiding macros with inline and derived
