Eff Directly in OCaml

Oleg Kiselyov
(Tohoku University, Japan)
KC Sivaramakrishnan
(University of Cambridge, UK)

The language Eff is an OCaml-like language serving as a prototype implementation of the theory of algebraic effects, intended for experimentation with algebraic effects on a large scale.

We present the embedding of Eff into OCaml, using the library of delimited continuations or the multicore OCaml branch. We demonstrate the correctness of the embedding denotationally, relying on the tagless-final–style interpreter-based denotational semantics, including the novel, direct denotational semantics of multi-prompt delimited control. The embedding is systematic, lightweight, performant and supports even higher-order, 'dynamic' effects with their polymorphism. OCaml thus may be regarded as another implementation of Eff, broadening the scope and appeal of that language.

In Kenichi Asai and Mark Shinwell: Proceedings ML Family Workshop / OCaml Users and Developers workshops (ML/OCAML 2016), Nara, Japan, September 22-23, 2016, Electronic Proceedings in Theoretical Computer Science 285, pp. 23–58.
Published: 31st December 2018.

ArXived at: https://dx.doi.org/10.4204/EPTCS.285.2 bibtex PDF
References in reconstructed bibtex, XML and HTML format (approximated).
Comments and questions to: eptcs@eptcs.org
For website issues: webmaster@eptcs.org