package jupyter-kernel

  1. Overview
  2. Docs

User-Defined Kernel

type exec_action =
  1. | Mime of mime_data_bundle
type exec_status_ok = {
  1. msg : string option;
  2. actions : exec_action list;
}
type completion_status = {
  1. completion_matches : string list;
  2. completion_start : int;
  3. completion_end : int;
}
type is_complete_reply =
  1. | Is_complete
  2. | Is_not_complete of string
type history_request = Protocol_j.history_request
type inspect_request = Protocol_j.inspect_request = {
  1. ir_code : string;
  2. ir_cursor_pos : int;
  3. ir_detail_level : int;
}
type inspect_reply_ok = {
  1. iro_status : string;
  2. iro_found : bool;
  3. iro_data : mime_data_bundle;
}
val mime : ?base64:bool -> ty:string -> string -> exec_action
val ok : ?actions:exec_action list -> string option -> exec_status_ok
type t = {
  1. init : unit -> unit Lwt.t;
  2. exec : count:int -> string -> exec_status_ok or_error Lwt.t;
  3. is_complete : string -> is_complete_reply Lwt.t;
  4. language : string;
  5. language_version : int list;
  6. banner : string option;
  7. file_extension : string;
  8. mime_type : string option;
  9. codemirror_mode : string option;
  10. complete : pos:int -> string -> completion_status Lwt.t;
  11. inspect : inspect_request -> inspect_reply_ok or_error Lwt.t;
  12. history : history_request -> string list Lwt.t;
}
val make : ?banner:string -> ?file_extension:string -> ?mime_type:string -> ?codemirror_mode:string -> ?init:(unit -> unit Lwt.t) -> ?is_complete:(string -> is_complete_reply Lwt.t) -> ?complete:(pos:int -> string -> completion_status Lwt.t) -> ?inspect:(inspect_request -> inspect_reply_ok or_error Lwt.t) -> ?history:(history_request -> string list Lwt.t) -> language_version:int list -> language:string -> exec:(count:int -> string -> exec_status_ok or_error Lwt.t) -> unit -> t