Funcall.WrapWrap wraps an Elisp function as an OCaml function. Idiomatic use looks like:
let not = Funcall.Wrap.("not" <: bool @-> return bool)
let about_emacs = Funcall.Wrap.("about-emacs" <: nullary @-> return nil)val return : 'a Value.Type.t -> 'a tval nil : unit Value.Type.tval nullary : unit Value.Type.tval (<:) : string -> 'a t -> 'aval (@->) : 'a Value.Type.t -> 'b t -> ('a -> 'b) tinclude Value.Type.Sval create :
Core.Sexp.t ->
('a -> Core.Sexp.t) ->
(Value.t -> 'a) ->
('a -> Value.t) ->
'a Value.Type.tval with_of_value_exn : 'a Value.Type.t -> (Value.t -> 'a) -> 'a Value.Type.tval to_sexp : 'a Value.Type.t -> 'a -> Core.Sexp.tval bool : bool Value.Type.tval float : float Value.Type.tval ignored : unit Value.Type.tval int : int Value.Type.tval string : string Value.Type.tval time_ns : Core.Time_ns.t Value.Type.tRepresent an absolute time as a Lisp timestamp or Lisp time value.
(Info-goto-node "(elisp)Time of Day") for definitions.
val span_ns : Core.Time_ns.Span.t Value.Type.tRepresent a span of time as a Lisp timestamp or Lisp time value.
This has the same Lisp representation as time_ns.
val string_cached : string Value.Type.tstring_cached is like string, except it uses of_utf8_bytes_cached.
val unit : unit Value.Type.tval value : Value.t Value.Type.tval list : 'a Value.Type.t -> 'a list Value.Type.tval vector : 'a Value.Type.t -> 'a array Value.Type.tval list_or_singleton : 'a Value.Type.t -> 'a list Value.Type.tRepresent a single-element list as an atom (not wrapped in a list), and a multi-element or empty list as a regular Lisp list.
val array_as_list : 'a Value.Type.t -> 'a array Value.Type.tRepresent an ocaml array as an elisp list, without creating an intermediate ocaml list.
val option : 'a Value.Type.t -> 'a option Value.Type.toption represents None as nil and Some a as cons v nil, where v is the representation of a.
val nil_or : 'a Value.Type.t -> 'a option Value.Type.tnil_or t represents None as nil and Some a as v, where v is the representation of a. This is a common representation used by Elisp functions. But it is only correct if nil is not a representation of any value in t; in that situation use Type.option.
val alist : 'a Value.Type.t -> 'b Value.Type.t -> ('a * 'b) list Value.Type.tval tuple : 'a Value.Type.t -> 'b Value.Type.t -> ('a * 'b) Value.Type.tRepresent a tuple (a,b) as the elisp cons cell (a . b)
val tuple2_as_list :
'a Value.Type.t ->
'b Value.Type.t ->
('a * 'b) Value.Type.tRepresent a tuple (a,b) as the elisp list '(a b)
val tuple3_as_list :
'a Value.Type.t ->
'b Value.Type.t ->
'c Value.Type.t ->
('a * 'b * 'c) Value.Type.tRepresent a tuple (a,b,c) as the elisp list '(a b c)
val tuple4_as_list :
'a Value.Type.t ->
'b Value.Type.t ->
'c Value.Type.t ->
'd Value.Type.t ->
('a * 'b * 'c * 'd) Value.Type.tRepresent a tuple (a,b,c,d) as the elisp list '(a b c d)
val tuple5_as_list :
'a Value.Type.t ->
'b Value.Type.t ->
'c Value.Type.t ->
'd Value.Type.t ->
'e Value.Type.t ->
('a * 'b * 'c * 'd * 'e) Value.Type.tRepresent a tuple (a,b,c,d,e) as the elisp list '(a b c d e)
val sexpable :
(module Core.Sexpable with type t = 'a) ->
name:Core.Sexp.t ->
'a Value.Type.tEmbed a sexpable ocaml type, so we can save values of the type in emacs, e.g. as buffer local variables
val path_list : string list Value.Type.tA list of directories. Each element is a string (directory name) or nil (try default-directory). nil values are converted to "." in OCaml, which has the same meaning.