SLE 2026
Thu 2 - Fri 3 July 2026
co-located with STAF 2026
Fri 3 Jul 2026 09:00 - 09:25 at Auditorium - SLE session 3

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 Jul

Displayed time zone: Brussels, Copenhagen, Madrid, Paris change