(* Futures: representation for values that are possibly not yet known *) open Wire open Rpc_t type 'a future_t = | Local of 'a * 'a typerep (* The value is known locally *) | Var of varname * 'a typerep (* Variable: the value is not known *) | Tag of tagname * 'a typerep (* Name of a remote fn: only the server knows that value *) | Exc of string (* Remote or communication exception *) val newvar : 'a typerep -> varname * 'a future_t (* Serialization and deserialization for futures *) val future_to_chr_val : 'a future_t -> chr_val (* Set the future from the partial value received from the wire *) val future_from_wire : 'a future_t ref -> wire_t partial -> unit