(module $control (type $func (;0;) (func)) (type $cont (;1;) (cont $func)) (type $cont-func (;2;) (func (param (ref $cont)))) (type $cont-cont (;3;) (cont $cont-func)) (type (;4;) (func (param (ref $cont-cont)))) (type (;5;) (func (param (ref null $cont)))) (type (;6;) (func (result (ref $cont-cont) (ref $cont)))) (tag $control (;0;) (type 4) (param (ref $cont-cont))) (export "control" (tag 0)) (export "prompt" (func $prompt)) (func $prompt (;0;) (type 5) (param $nextk (ref null $cont)) (local $h (ref $cont-cont)) (local $k (ref $cont)) block $on_control (type 6) (result (ref $cont-cont) (ref $cont)) local.get $nextk resume $cont (on $control $on_control) return end local.set $k local.set $h local.get $k local.get $h resume $cont-cont ) )