Dynamic Wind for OCaml Effect Handlers with Escaping Continuation Support

Effect handlers and dynamic wind provide mechanisms for implementing language constructs, such as generators and dynamically scoped variables, as libraries or embedded domain-specific languages (EDSLs). This paper presents a library implementation of dynamic wind in OCaml that is composable with effect handlers in OCaml. Their composition is challenging, especially when a delimited continuation captured by an effect handler escapes the handler’s scope. Indeed, a straightforward retrofitting of Voigt’s dynamic wind, originally implemented in Effekt, does not behave intuitively. In particular, it fails to implement dynamically scoped variables when a generator created within a dynamic wind scope resumes outside that scope. This is because Voigt’s approach captures only the dynamic winds inside delimited continuations. Our key idea is to decorate delimited continuations with the dynamic winds enclosing the effect handler, i.e., the delimited continuation itself. We implement our dynamic wind library on top of OCaml’s effect handlers and demonstrate that our design yields intuitive behavior.
Fri 3 JulDisplayed time zone: Brussels, Copenhagen, Madrid, Paris change
09:00 - 10:15 | |||
09:00 25mTalk | Dynamic Wind for OCaml Effect Handlers with Escaping Continuation Support SLE 2026 Antonino Yann William Gillard , Tetsuro Yamazaki University of Tokyo, Tomoharu Ugawa University of Tokyo DOI | ||
09:25 25mTalk | Why Just-In-Time Compilation Matters: Evaluating Runtime and Energy Efficiency SLE 2026 DOI | ||
09:50 25mTalk | Engineering Verified Model Transformations through a Proof-Based Language Workbench SLE 2026 DOI | ||