Predictable macros for hindley milner
summary
Klister is an ML‑like prototype language that implements type-aware hygienic macros written in the full language (macros run in a monadic macro context) and guarantees that macro expansion is insensitive to the type‑checker’s traversal order by pausing and resuming macros via stuck macros. The system uses Matthew Flatt’s scope model, represents elaboration as tasks with metavariables and a lattice of refinement, and unblocks macros when unification solves types. A working prototype and sources live on GitHub.
AI-written summary · about
chapters (11)
- 0:00Intro
- 0:49Some Klister Code
- 2:23Minimal Core, Extensions as Libraries
- 3:38Hygiene
- 4:58Type-aware
- 6:30Principal Types
- 10:16Stuck Macros: A Solution
- 11:39Why this way?
- 13:28Implementation Technique
- 15:28Key Features
- 18:04Roadmap
related talks
12mMulti-Stage Programming with Generative and Analytical Macros
40mLet's Build a Hygienic Macro Expander
01h 03mModern Macros
23mMacro-embedding Compiler Intermediate Languages in Racket
14mType-Sensitive Algebraic Macros
42mThe Macronomicon
30mA pred-LL(*) Parsable Typed Higher-Order Macro System for Architecture Descriptio...
43mAdventures in Metaprogramming: Macros versus Shapeless
