t(try ce with pi -> cei, v, c, q) = assert(not q); c(b.trywith(b.delay(fun () -> {| ce |}0), fun pi -> {| cei |}0)) t(try ce finally e, v, c, q) = assert(not q); c(b.tryfinally(b.delay(fun () -> {| ce |}0), fun () -> e)) t(if e then ce, v, c, q) = t(ce, v, v.c(if e then v else b.zero()), q) t(if e then ce1 else ce2, v, c, q) = assert(not q); c(if e then {| ce1 |}0) else {| ce2 |}0) t(for x = e1 to e2 do ce, v, c, q) = t(for x in e1 .. e2 do ce, v, c, q) t(for p1 in e1 do joinop p2 in e2 onword (e3 eop e4) ce, v, c, q) = assert(q); t(for pat(v) in b.join(src(e1), src(e2), p1.e3, p2.e4, p1. p2.(p1,p2)) do ce, v , c, q) t(for p1 in e1 do groupjoinop p2 in e2 onword (e3 eop e4) into p3 ce, v, c, q) = assert(q); t(for pat(v) in b.groupjoin(src(e1), src(e2), p1.e3, p2.e4, p1. p3.(p1,p3)) do ce, v , c, q) t(for x in e do ce, v, c, q) = t(ce, v {x}, v.c(b.for(src(e), fun x -> v)), q) t(do e in ce, v, c, q) = t(ce, v, v.c(e; v), q) t(do! e in ce, v, c, q) = t(let! () = e in ce, v, c, q) t(joinop p2 in e2 on (e3 eop e4) ce, v, c, q) = t(for pat(v) in c({| yield exp(v) |}0) do join p2 in e2 onword (e3 eop e4) ce, v, v.v, q) t(groupjoinop p2 in e2 onword (e3 eop e4) into p3 ce, v, c, q) = t(for pat(v) in c({| yield exp(v) |}0) do groupjoin p2 in e2 on (e3 eop e4) into p3 ce, v, v.v, q) t([<customoperator("cop")>]cop arg, v, c, q) = assert (q); [| cop arg, c(b.yield exp(v)) |]v t([<customoperator("cop", maintainsvarspaceusingbind=true)>]cop arg; e, v, c, q) = assert (q); cl (cop arg; e, v, c(b.return exp(v)), false) t([<customoperator("cop")>]cop arg; e, v, c, q) = assert (q); cl (cop arg; e, v, c(b.yield exp(v)), false) t(ce1; ce2, v, c, q) = c(b.combine({| ce1 |}0, b.delay(fun () -> {| ce2 |}0))) t(do! e;, v, c, q) = t(let! () = src(e) in b.return(), v, c, q) t(e;, v, c, q) = c(e;b.zero()) the following notes apply to the translations: the lambda expression (fun f x -> b) is represented by x.b. the auxiliary function var(p) denotes a set of variables that are introduced by a pattern p. for example: var(x) = {x}, var((x,y)) = {x,y} or var(s (x,y)) = {x,y} where s is a type constructor. is an update operator for a set v to denote extended variable spaces. it updates the existing variables. for example, {x,y} var((x,z)) becomes {x,y,z} where the second x replaces the first x.