No value restriction is needed for algebraic effects and handlers

Ohad Kammar, Matija Pretnar
5/23/2016
28 citations
cs.PLcs.LO

Official code: matijapretnar/proofs (19 stars, AMPL, last commit 2020-02-04).

Abstract

We present a straightforward, sound Hindley-Milner polymorphic type system for algebraic effects and handlers in a call-by-value calculus, which allows type variable generalisation of arbitrary computations, not just values. This result is surprising.

Show full abstract

On the one hand, the soundness of unrestricted call-by-value Hindley-Milner polymorphism is known to fail in the presence of computational effects such as reference cells and continuations. On the other hand, many programming examples can be recast to use effect handlers instead of these effects. Analysing the expressive power of effect handlers with respect to state effects, we claim handlers cannot express reference cells, and show they can simulate dynamically scoped state.

View on arXivView PDF

Code Implementations(1)

A collection of mechanised proofs

190AMPL, Standard MLNov 28, 20136 years ago

Similar Papers

Cite this paper

@article{kammar2016value,
  title  = {No value restriction is needed for algebraic effects and handlers},
  author = {Ohad Kammar and Matija Pretnar},
  year   = {2016},
  eprint = {1605.06938},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1605.06938}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/1605.06938.svg)](https://codeofpaper.com/paper/1605.06938)

Discussion