Module Js_of_ocaml_toplevel_protocol.Worker_msg

Types of the messages exchanged with a toplevel in a Web Worker.

module Message_id : sig ... end
module Fd : sig ... end
module Lexbuf : sig ... end
type step_result = [
  1. | `Phrase of bool
  2. | `Eof
]
type _ host_msg =
  1. | Init : {
    1. cmis_base_url : string;
    } -> unit host_msg
  2. | Reset : unit host_msg
  3. | Check : {
    1. setenv : bool;
    2. code : string;
    } -> unit host_msg
  4. | Clear_check : unit host_msg
  5. | Execute : {
    1. code_fd : Fd.t option;
    2. print_outcome : bool;
    3. answer_fd : Fd.t;
    4. code : string;
    } -> bool host_msg
  6. | Use_string : {
    1. filename : string option;
    2. print_outcome : bool;
    3. answer_fd : Fd.t;
    4. code : string;
    } -> bool host_msg
  7. | Use_mod_string : {
    1. answer_fd : Fd.t;
    2. print_outcome : bool;
    3. modname : string;
    4. sig_code : string option;
    5. code : string;
    } -> bool host_msg
  8. | Import_scripts : string list -> unit host_msg
  9. | Open_lexbuf : {
    1. id : Lexbuf.t;
    2. code : string;
    3. code_fd : Fd.t option;
    } -> unit host_msg
  10. | Step : {
    1. lexbuf : Lexbuf.t;
    2. print_outcome : bool;
    3. answer_fd : Fd.t;
    } -> step_result host_msg
  11. | Close_lexbuf : {
    1. lexbuf : Lexbuf.t;
    } -> unit host_msg
type _ msg_ty =
  1. | Unit : unit msg_ty
  2. | Bool : bool msg_ty
  3. | Int : int msg_ty
  4. | String : string msg_ty
  5. | Step_result : step_result msg_ty
type (_, _) eq =
  1. | Eq : ('a, 'a) eq
type toploop_msg =
  1. | Write : Fd.t * string -> toploop_msg
  2. | ReturnSuccess : Message_id.t * 'a msg_ty * 'a * Wrapped_intf.warning list -> toploop_msg
  3. | ReturnError : Message_id.t * Wrapped_intf.error * Wrapped_intf.warning list -> toploop_msg
val ty_of_host_msg : 't. 't host_msg -> 't msg_ty