3 ms·
Hmm... Maybe I need to look at multi-core OCaml more closely, but I don't think it's true in general of algebraic effects (or at least its freer monad variants)
by dwohnitmok 8y ago
Hmm... Maybe I need to look at multi-core OCaml more closely, but I don't think it's true in general of algebraic effects (or at least its freer monad variants), as in I'm pretty sure I can emulate a list using them. In particular I'm pretty sure I can do that with `Cont` alone.
- fmap 8y agoYou're right, the linearity restriction on the handler continuation is a peculiarity of multi-core OCaml and really more of an implementation detail. However, it is also true that you cannot encode, e.g., the continuation monad using (typed) algebraic effects. The precise relationship isn't that simple, but this paper: https://arxiv.org/abs/1610.09161 analyzes a particular setting in detail.