ICFP 2023
Mon 4 - Sat 9 September 2023 Seattle, Washington, United States
Wed 6 Sep 2023 14:00 - 14:30 at B - Fifth Avenue - Meta programming Chair(s): Gabriel Radanne

We introduce MacoCaml, a new design and implementation of compile-time code generation for the OCaml language. MacoCaml features a novel combination of macros with phase separation and quotation-based staging, where macros are considered as compile-time bindings, expression cross evaluation phases using staging annotations, and compile-time evaluation happens inside top-level splices. We provide a theoretical foundation for MacoCaml by formalizing a typed source calculus maco that supports interleaving typing and compile-time code generation, references with explicit compile-time heaps, and modules. We study various crucial properties including soundness and phase distinction. We have implemented MacoCaml in the OCaml compiler, and ported two substantial existing libraries to validate our implementation.

Wed 6 Sep

Displayed time zone: Pacific Time (US & Canada) change

13:30 - 14:30
Meta programmingICFP Papers and Events at B - Fifth Avenue
Chair(s): Gabriel Radanne Inria
13:30
30m
Talk
Embedding by Unembedding
ICFP Papers and Events
Kazutaka Matsuda Tohoku University, Samantha Frohlich University of Bristol, Meng Wang University of Bristol, Nicolas Wu Imperial College London
DOI
14:00
30m
Talk
MacoCaml: Staging Composable and Compilable Macros
ICFP Papers and Events
Ningning Xie University of Toronto, Leo White Jane Street, Olivier Nicole Tarides, Jeremy Yallop University of Cambridge
DOI Pre-print