(* perform controls deep/shallow *) try 1 + 2 with | effect n, k -> continue k (n + 1) (* should produce 3 *) (* perform deep *) try perform 0 + perform 1 with | effect n, k -> continue k (n + 1) (* should produce 3 *) (* perform shallow *) try perform_shallow 0 + perform_shallow 1 with | effect n, k -> continue k (n + 1) (* should produce unhandled operaton *) (* ------------------------------------------------------------ *) (* try controls deep/shallow *) try 1 + 2 with | effect n, k -> continue k (n + 1) (* should produce 3 *) try_shallow 1 + 2 with | effect n, k -> continue k (n + 1) (* should produce 3 *) (* handle deep *) try perform 0 + perform 1 with | effect n, k -> continue k (n + 1) (* should produce 3 *) (* handle shallow *) try_shallow perform 0 + perform 1 with | effect n, k -> continue k (n + 1) (* should produce unhandled operaton *)