std/core/hnd▲toc

Internal effect handler primitives.

Internal primitives to implement evidence based algebraic effect handlers. These are emitted by the compiler during evidence translation and this module is always implicitly imported.

alias cfcstd/core/hnd/cfc: V = int32std/core/types/int32: V

control flow context: -1: none: bottom /
0: except: never resumes 1: linear: resumes exactly once   / 2: affine: resumes never or once | 3: multi: resumes never, once, or multiple times.

type clause0std/core/hnd/clause0: (V, (E, V) -> V, E, V) -> V<a,b,e,c>
type clause1std/core/hnd/clause1: (V, V, (E, V) -> V, E, V) -> V<a,b,c,e,d>
fun clause-control1( clause : (x : a, k : (b) -> e d) -> e d ) : clause1std/core/hnd/clause1: (V, V, (E, V) -> V, E, V) -> V<a,b,c,e,d>
fun clause-control3( op : (x1 : a, x2 : b, x3 : c, k : (d) -> e b1) -> e b1 ) : clause1std/core/hnd/clause1: (V, V, (E, V) -> V, E, V) -> V<(a, b, c),d,a1,e,b1>
fun clause-control4( op : (x1 : a, x2 : b, x3 : c, x4 : d, k : (a1) -> e c1) -> e c1 ) : clause1std/core/hnd/clause1: (V, V, (E, V) -> V, E, V) -> V<(a, b, c, d),a1,b1,e,c1>
fun clause-never3( op : (a, b, c) -> e b1 ) : clause1std/core/hnd/clause1: (V, V, (E, V) -> V, E, V) -> V<(a, b, c),d,a1,e,b1>
fun clause-tail-noyield3( op : (a, b, c) -> e d ) : clause1std/core/hnd/clause1: (V, V, (E, V) -> V, E, V) -> V<(a, b, c),d,a1,e,b1>
fun clause-tail3( op : (a, b, c) -> e d ) : clause1std/core/hnd/clause1: (V, V, (E, V) -> V, E, V) -> V<(a, b, c),d,a1,e,b1>
fun clause-tail4( op : (a, b, c, d) -> e a1 ) : clause1std/core/hnd/clause1: (V, V, (E, V) -> V, E, V) -> V<(a, b, c, d),a1,b1,e,c1>
type clause2std/core/hnd/clause2: (V, V, V, (E, V) -> V, E, V) -> V<a,b,c,d,e,a1>
fun clause-control2( clause : (x1 : a, x2 : b, k : (c) -> e a1) -> e a1 ) : clause2std/core/hnd/clause2: (V, V, V, (E, V) -> V, E, V) -> V<a,b,c,d,e,a1>
type evstd/core/hnd/ev: ((E, V) -> V) -> V<a>
alias ev-indexstd/core/hnd/ev-index: V = ssize_tstd/core/types/ssize_t: V
type htagstd/core/hnd/htag: ((E, V) -> V) -> V<a>
type resume-contextstd/core/hnd/resume-context: (V, E, E, V) -> V<a,e,e1,b>
type yield-infostd/core/hnd/yield-info: V
fun finally( fin : () -> e types/(), action : () -> e a ) : e a
fun initially( init : (intstd/core/types/int: V) -> e types/(), action : () -> e a ) : e a
fun local-var( init : a, action : (l : local-varstd/core/types/local-var: (H, V) -> V<h,a>) -> <localstd/core/types/local: H -> X<h>|e> b ) : <localstd/core/types/local: H -> X<h>|e> b
fun unsafe-st( f : () -> <ststd/core/types/st: H -> E<globalstd/core/types/global: H>|e> a ) : (() -> e a)
fun unsafe-try-finalize( action : () -> e a ) : e eitherstd/core/types/either: (V, V) -> V<yield-infostd/core/hnd/yield-info: V,a>
fun yield-bind( x : a, next : (a) -> e b ) : e b
fun yield-bind2( x : a, extend : (a) -> e b, next : (a) -> e b ) : e b
fun yield-extend( next : (a) -> e b ) : e b
fun yielding(): boolstd/core/types/bool: V
fun yielding-non-final(): boolstd/core/types/bool: V
private import std/core/typesstd/core/types