Skip to content
Book Open access

Effects with Variable Binding

Aug 2026 · Proceedings of the 11th ACM SIGPLAN International Workshop on Type-Driven Development · 0 citations · 48 references

Abstract

Algebraic effects are a simple and modular approach to modelling effectful computations. They are commonly embedded in functional programming languages, where they provide a lightweight and powerful way of programming with effects. Such embeddings typically use host language functions to represent continuations of effectful operations. While host language functions allow for easy programming with effects, they also hinder programmers wishing to define custom optimizations for effectful programs. Specifically, we cannot, in general, know what precisely a host language function does from within the language. This paper presents a solution to this problem by embedding algebraic effects as intrinsically typed, De Bruijn-indexed syntax. Working in Agda, we demonstrate how this provides a safe-by-construction model of effectful computations, with support for optimizations that inspect and transform variable binding. We intend this to be the basis of a verified compiler that uses our notion of effects with variable binding as an intermediate representation.

Read PDF

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.