package ecaml
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=89f2806dd37012b07ddbaf40c2d9cfb9de29289944d921d23f4fd9b93d5c7cba
doc/ecaml.ecaml_value/Ecaml_value/Funcall/Wrap/index.html
Module Funcall.Wrap
Wrap 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.S
val 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 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 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 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 ".", which has the same meaning.