Module Brr_ocaml_poke
ocaml_poke object for OCaml console.
See the OCaml console manual for more information.
Poke objects
The type for OCaml poke objects. Note that the actual object may live in another global context.
val version : Brr_ocaml_poke.t -> intversion p is the version of the poke object interface.
val ocaml_version : Brr_ocaml_poke.t -> Jstr.tocaml_version p is the OCaml version being poked by p.
val jsoo_version : Brr_ocaml_poke.t -> Jstr.tjsoo_version p is the js_of_ocaml version being poked by p.
val eval : Brr_ocaml_poke.t -> Jstr.t -> Brr.Json.t Fut.or_erroreval expr evaluates the given OCaml toplevel phrase in the poke object and returns the result as a JSON string.
val use : Brr_ocaml_poke.t -> Jstr.t -> Brr.Json.t Fut.or_erroruse phrases silently evaluates the given OCaml toplevel phrases in the poke object and returns possible errors via a JSON string.
Finding poke objects
val find : unit -> Brr_ocaml_poke.t option Fut.or_errorfind () looks for and initalizes an OCaml poke object in the global context of the caller.
val find_eval'd :
eval:(Jstr.t -> Brr.Json.t Fut.or_error) ->
Brr_ocaml_poke.t option Fut.or_errorfind_eval'd looks for and initializes an OCaml poke object by using the given JavaScript eval function.