Effect handlers in scope
Author(s) -
Nicolas Wu,
Tom Schrijvers,
Ralf Hinze
Publication year - 2014
Publication title -
lirias (ku leuven)
Language(s) - English
Resource type - Conference proceedings
DOI - 10.1145/2633357.2633358
Subject(s) - syntax , scope (computer science) , semantics (computer science) , computer science , programming language , abstract syntax tree , computation , abstract syntax , operational semantics , theoretical computer science , natural language processing
Algebraic effect handlers are a powerful means for describing effectful computations. They provide a lightweight and orthogonal technique to define and compose the syntax and semantics of different effects. The semantics is captured by handlers, which are functions that transform syntax trees.Unfortunately, the approach does not support syntax for scoping constructs, which arise in a number of scenarios. While handlers can be used to provide a limited form of scope, we demonstrate that this approach constrains the possible interactions of effects and rules out some desired semantics.This paper presents two different ways to capture scoped constructs in syntax, and shows how to achieve different semantics by reordering handlers. The first approach expresses scopes using the existing algebraic handlers framework, but has some limitations. The problem is fully solved in the second approach where we introduce higher-order syntax.status: publishe
Accelerating Research
Robert Robinson Avenue,
Oxford Science Park, Oxford
OX4 4GP, United Kingdom
Address
John Eccles HouseRobert Robinson Avenue,
Oxford Science Park, Oxford
OX4 4GP, United Kingdom