4 ms·
You're right, the linearity restriction on the handler continuation is a peculiarity of multi-core OCaml and really more of an implementation detail. However,
by fmap 8y ago
You'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.