1. Type directed compilation of row-typed algebraic effects
- Author
-
LeijenDaan
- Subjects
Computer science ,Type inference ,020207 software engineering ,0102 computer and information sciences ,02 engineering and technology ,Type (model theory) ,01 natural sciences ,Computer Graphics and Computer-Aided Design ,Algebra ,010201 computation theory & mathematics ,0202 electrical engineering, electronic engineering, information engineering ,Purely functional ,Algebraic number ,Software - Abstract
Algebraic effect handlers, introduced by Plotkin and Power in 2002, are recently gaining in popularity as a purely functional approach to modeling effects. In this article, we give a full overview of practical algebraic effects in the context of a compiled implementation in the Koka language. In particular, we show how algebraic effects generalize over common constructs like exception handling, state, iterators and async-await. We give an effective type inference algorithm based on extensible effect rows using scoped labels, and a direct operational semantics. Finally, we show an efficient compilation scheme to common runtime platforms (like JavaScript) using a type directed selective CPS translation.
- Published
- 2017