package ecaml
Module Ecaml.Defun
val sexp_of_t :
('a -> Ppx_sexp_conv_lib.Sexp.t) ->
'a t ->
Ppx_sexp_conv_lib.Sexp.tmodule Open_on_rhs_intf : sig ... endinclude Core_kernel.Applicative.Let_syntax
with type 'a t := 'a t
with module Open_on_rhs_intf := Open_on_rhs_intf
module Let_syntax : sig ... endinclude Open_on_rhs_intf.S with type 'a t := 'a t
val return : 'a -> 'a tval required : string -> 'a Ecaml_value.Value.Type.t -> 'a tval optional : string -> 'a Ecaml_value.Value.Type.t -> 'a option tval rest : string -> 'a Ecaml_value.Value.Type.t -> 'a list tval optional_with_default : string -> 'a -> 'a Ecaml_value.Value.Type.t -> 'a tval optional_with_nil : string -> 'a Ecaml_value.Value.Type.t -> 'a tAn optional argument whose Value.Type.t handles nil directly.
include Ecaml_value.Value.Type.S
val create :
Core_kernel.Sexp.t ->
('a -> Core_kernel.Sexp.t) ->
(Ecaml_value.Value.t -> 'a) ->
('a -> Ecaml_value.Value.t) ->
'a Ecaml_value.Value.Type.tval with_of_value_exn :
'a Ecaml_value.Value.Type.t ->
(Ecaml_value.Value.t -> 'a) ->
'a Ecaml_value.Value.Type.tval to_sexp : 'a Ecaml_value.Value.Type.t -> 'a -> Core_kernel.Sexp.tval bool : bool Ecaml_value.Value.Type.tval float : float Ecaml_value.Value.Type.tval ignored : unit Ecaml_value.Value.Type.tval int : int Ecaml_value.Value.Type.tval string : string Ecaml_value.Value.Type.tval string_cached : string Ecaml_value.Value.Type.tstring_cached is like string, except it uses of_utf8_bytes_cached.
val unit : unit Ecaml_value.Value.Type.tval value : Ecaml_value.Value.t Ecaml_value.Value.Type.tval list : 'a Ecaml_value.Value.Type.t -> 'a list Ecaml_value.Value.Type.tval vector : 'a Ecaml_value.Value.Type.t -> 'a array Ecaml_value.Value.Type.tval array_as_list :
'a Ecaml_value.Value.Type.t ->
'a array Ecaml_value.Value.Type.tRepresent an ocaml array as an elisp list, without creating an intermediate ocaml list.
val option : 'a Ecaml_value.Value.Type.t -> 'a option Ecaml_value.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 Ecaml_value.Value.Type.t -> 'a option Ecaml_value.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 Ecaml_value.Value.Type.t ->
'b Ecaml_value.Value.Type.t ->
('a * 'b) list Ecaml_value.Value.Type.tval tuple :
'a Ecaml_value.Value.Type.t ->
'b Ecaml_value.Value.Type.t ->
('a * 'b) Ecaml_value.Value.Type.tRepresent a tuple (a,b) as the elisp cons cell (a . b)
val tuple2_as_list :
'a Ecaml_value.Value.Type.t ->
'b Ecaml_value.Value.Type.t ->
('a * 'b) Ecaml_value.Value.Type.tRepresent a tuple (a,b) as the elisp list '(a b)
val sexpable :
(module Core_kernel.Sexpable with type t = 'a) ->
name:Core_kernel.Sexp.t ->
'a Ecaml_value.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 Ecaml_value.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.
module Interactive : sig ... endmodule For_testing : sig ... endmodule Returns : sig ... endAn Returns.t states the return type of a function and whether the function returns a value of that type directly or via a Deferred.t. An (a, a) Returns.t means that the function returns a directly. An (a, a Deferred.t) Returns.t means that the function returns a via an a Deferred.t.
val defun :
Symbol.t ->
Core_kernel.Source_code_position.t ->
?docstring:string ->
?should_profile:bool ->
?define_keys:(Keymap.t * string) list ->
?obsoletes:Symbol.t ->
?interactive:Interactive.t ->
?evil_config:Evil.Config.t ->
(_, 'a) Returns.t ->
'a t ->
unitval defalias :
Symbol.t ->
Core_kernel.Source_code_position.t ->
?docstring:string ->
alias_of:Symbol.t ->
unit ->
unit(describe-function 'defalias) (Info-goto-node "(elisp)Defining Functions")
val define_obsolete_alias :
Symbol.t ->
Core_kernel.Source_code_position.t ->
?docstring:string ->
alias_of:Symbol.t ->
since:string ->
unit ->
unit(describe-function 'define-obsolete-function-alias)
N.B. Load order matters. A subsequent defun will override the aliasing.
val defun_nullary :
Symbol.t ->
Core_kernel.Source_code_position.t ->
?docstring:string ->
?define_keys:(Keymap.t * string) list ->
?obsoletes:Symbol.t ->
?interactive:Interactive.t ->
?evil_config:Evil.Config.t ->
(_, 'a) Returns.t ->
(unit -> 'a) ->
unitval defun_nullary_nil :
Symbol.t ->
Core_kernel.Source_code_position.t ->
?docstring:string ->
?define_keys:(Keymap.t * string) list ->
?obsoletes:Symbol.t ->
?interactive:Interactive.t ->
?evil_config:Evil.Config.t ->
(unit -> unit) ->
unitval lambda :
Core_kernel.Source_code_position.t ->
?docstring:string ->
?interactive:Interactive.t ->
(_, 'a) Returns.t ->
'a t ->
Ecaml_value.Function.tval lambda_nullary :
Core_kernel.Source_code_position.t ->
?docstring:string ->
?interactive:Interactive.t ->
(_, 'a) Returns.t ->
(unit -> 'a) ->
Ecaml_value.Function.tval lambda_nullary_nil :
Core_kernel.Source_code_position.t ->
?docstring:string ->
?interactive:Interactive.t ->
(unit -> unit) ->
Ecaml_value.Function.t