A Type System for Effect Handlers and Dynamic Labels - Inria - Institut national de recherche en sciences et technologies du numérique Access content directly
Preprints, Working Papers, ... (Preprint) Year :

A Type System for Effect Handlers and Dynamic Labels


We consider a simple yet expressive λ-calculus equipped with references, effect handlers, and dynamic allocation of effect labels, and whose operational semantics does not involve coercions or rely on type information. We equip this language with a type system that supports type and effect polymorphism, allows reordering row entries and extending a row with new entries, and supports (but is not restricted to) lexically scoped handlers. This requires addressing the issue of potential aliasing between effect names. Our original solution is to interpret a row not only as a permission to perform certain effects but also as a disjointness requirement bearing on effect names. The type system guarantees strong type soundness: a well-typed program cannot crash or perform an unhandled effect. We prove this fact by encoding the type system into a novel Separation Logic for effect handlers, which we build on top of Iris. Our results are formalized in Coq.
Fichier principal
Vignette du fichier
de-vilhena-pottier-tes.pdf (545.72 Ko) Télécharger le fichier
Origin : Files produced by the author(s)

Dates and versions

hal-03886668 , version 1 (06-12-2022)


  • HAL Id : hal-03886668 , version 1


Paulo Emílio de Vilhena, François Pottier. A Type System for Effect Handlers and Dynamic Labels. 2022. ⟨hal-03886668⟩
30 View
20 Download


Gmail Facebook Twitter LinkedIn More