Previous Contents Next

5.11   Module sendback: sending messages from Objective Caml



Generates Ocaml functions from asynchronous port names, allowing asychronous callbacks from Ocaml to the join-calculus.


Given an asynchronous port name (name) and the appropriate wrapper sendback.wrap_t, sendback.wrap_t (name) returns Objective Caml function that takes some arguments and posts them on (name) each time it is called from within an external computation. WARNING: using sendbacks defeats automatic type coercion in various way
external wrap_unit: <<>> -> < (ml.unit,ml.unit) ml.fun >
maps zero-ary portnames into functions of type unit -> unit
external wrap_float: <<ml.float>> -> <(ml.float,ml.unit) ml.fun>
external wrap_float_float: <<ml.float * ml.float>> -> <(ml.float,(ml.float,ml.unit) ml.fun) ml.fun>
map portnames of type <ml.float> into functions of type float -> unit and portnames of type <ml.float * ml.float> into functions of type float -> float -> unit
external wrap_string: <<string>> -> <(string,ml.unit) ml.fun>
maps portnames of type <string> into functions of type string -> unit
external wrap_int: <<int>> -> <(int,ml.unit) ml.fun>
maps portnames of type <int> into functions of type float -> unit
external wrap_sys: <<'a>> ->  <('a,ml.unit) ml.fun>
system wrapper: the argument is already a join-calculus value

Previous Contents Next