Over the last three decades, multi-stage programming has been used to write high-level, type-safe, optimising code generators for a wide variety of domains, from database queries and stream processing to geometry, parsing, and differentiable programming.
The Modular Macros project extends OCaml with new compile-time multi-stage programming features, enabling programmers to write code generators as functions that run during program compilation to produce efficient run-time code. These compile-time functions are deeply integrated into OCaml, with the same abstraction, safety, and modularity guarantees that shape the existing language design.
The central challenge lies in extending OCaml’s modules to support both run-time and compile-time components. This talk presents our higher-order mixed-stage module system as a solution to this challenge, and explores the insights for multi-stage language design and implementation that arise from taking modularity seriously.
Program Display Configuration
Mon 29 Jun
Displayed time zone: Brussels, Copenhagen, Madrid, Parischange