Effect handlersについて調べた時のメモ書きです。 OCamlについては初心者です。
参考文献
(* A tagless-final embedding of the language with shift/reset | |
operators and fully supported answer-type modification (ATM). | |
This implementation is based on the prompt-passing translation | |
described in the paper "ATM without tears: prompt-passing style | |
transformation for typed delimited-control operators" | |
http://ebooks.au.dk/index.php/aul/catalog/view/4/4/31-1 | |
*) | |
open Delimcc;; |
import scala.language.higherKinds | |
import scalaz._ | |
import scalaz.std.option._ | |
import scalaz.syntax.monadPlus._ | |
trait Parsers [Elem, C[+_], Repr[+_, _, _[_]]] { | |
def cond (f: Elem => Boolean): Repr[Elem, Elem, C] | |
def elem (e: Elem): Repr[Elem, Elem, C] = cond(_ == e) | |
def success [T] (r: T): Repr[T, Elem, C] | |
def failure (msg: String): Repr[Nothing, Elem, C] |
Effect handlersについて調べた時のメモ書きです。 OCamlについては初心者です。
参考文献