package ecaml
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=87e76473915e12d718096100a5c4d15d98aba6f99ecbf21814b7389e8c28bb25
doc/ecaml.ecaml_value/Ecaml_value/Funcall/Wrap/index.html
Module Funcall.Wrap
Source
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)
include Value.Type.S
val create :
Core.Sexp.t ->
('a -> Core.Sexp.t) ->
(Value.t -> 'a) ->
('a -> Value.t) ->
'a Value.Type.t
string_cached
is like string
, except it uses of_utf8_bytes_cached
.
Represent an ocaml array as an elisp list, without creating an intermediate ocaml list.
option
represents None
as nil
and Some a
as cons v nil
, where v
is the representation of a
.
nil_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
.
Represent a tuple (a,b) as the elisp cons cell (a . b)
Represent a tuple (a,b) as the elisp list '(a b)
Embed a sexpable ocaml type, so we can save values of the type in emacs, e.g. as buffer local variables
A 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.