Skip to main content
Kent Academic Repository

Structured Handling of Scoped Effects.

Yang, Zhixuan, Paviotti, Marco, Wu, Nicholas, van den Berg, Birthe, Schrijvers, Tom (2022) Structured Handling of Scoped Effects. In: Sergey, Ilya, ed. Lecture Notes in Computer Science. 13240. pp. 462-491. Springer ISBN 978-3-030-99335-1. (doi:10.1007/978-3-030-99336-8\_17) (The full text of this publication is not currently available from this repository. You may be able to access a copy if URLs are provided) (KAR id:99278)

The full text of this publication is not currently available from this repository. You may be able to access a copy if URLs are provided. (Contact us about this Publication)
Official URL:
https://link.springer.com/chapter/10.1007/978-3-03...

Abstract

Algebraic effects offer a versatile framework that covers a wide variety of effects. However, an important family of operations— those that delimit a scope, and usually modelled as handlers—are not algebraic, thus preventing them from being used freely in conjunction with algebraic operations. Although proposals for scoped operations ex- ist, they are either ad-hoc and unprincipled, or too inconvenient for practical programming. This paper provides the best of both worlds: a theoretically-founded model of scoped effects that is convenient for im- plementation and reasoning. Our new model is based on an adjunction between a locally finitely presentable category and a category of functo- rial algebras. Using comparison functors between adjunctions, we show that our new model, the earlier indexed model, and a third approach that simulates scoped operations in terms of algebraic ones have equal expressivity for handling scoped operations. We consider our new model to be the sweet spot between ease of implementation and structuredness. Additionally, our approach automatically induces fusion laws of handlers of scoped effects, which are useful for reasoning and optimisation

Item Type: Conference or workshop item (Paper)
DOI/Identification number: 10.1007/978-3-030-99336-8\_17
Uncontrolled keywords: Computational effects, Category theory, Haskell, Algebraic theories, Scoped effects, Handlers, Abstract syntax
Divisions: Divisions > Division of Computing, Engineering and Mathematical Sciences > School of Computing
Depositing User: Marco Paviotti
Date Deposited: 21 Dec 2022 20:24 UTC
Last Modified: 21 Dec 2022 20:24 UTC
Resource URI: https://kar.kent.ac.uk/id/eprint/99278 (The current URI for this page, for reference purposes)

University of Kent Author Information

  • Depositors only (login required):

Total unique views for this document in KAR since July 2020. For more details click on the image.