Module Ecaml.Defun
include Ecaml__.Defun_intf.Defun
val sexp_of_t : ('a -> Ppx_sexp_conv_lib.Sexp.t) -> 'a t -> Ppx_sexp_conv_lib.Sexp.t
module 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 Open_on_rhs_intf : sig ... endmodule Let_syntax : sig ... endinclude Open_on_rhs_intf.S with type 'a S.t := 'a t
type 'a t= 'a t
val return : 'a -> 'a tval map : 'a t -> f:('a -> 'b) -> 'b tval both : 'a t -> 'b t -> ('a * 'b) tval required : Symbol.t -> 'a Ecaml__.Import.Value.Type.t -> 'a tval optional : Symbol.t -> 'a Ecaml__.Import.Value.Type.t -> 'a option tval rest : Symbol.t -> 'a Ecaml__.Import.Value.Type.t -> 'a list tval optional_with_default : Symbol.t -> 'a -> 'a Ecaml__.Import.Value.Type.t -> 'a tval optional_with_nil : Symbol.t -> 'a Ecaml__.Import.Value.Type.t -> 'a tAn optional argument whose
Value.Type.thandlesnildirectly.
include Ecaml__.Import.Value.Type.S
val create : Core_kernel.Sexp.t -> ('a -> Core_kernel.Sexp.t) -> (value -> 'a) -> ('a -> value) -> 'a tval with_of_value_exn : 'a t -> (value -> 'a) -> 'a tval to_sexp : 'a t -> 'a -> Core_kernel.Sexp.tval bool : bool tval float : float tval ignored : unit tval int : int tval string : string tval string_cached : string tstring_cachedis likestring, except it usesof_utf8_bytes_cached.
val unit : unit tval value : value tval list : 'a t -> 'a list tval vector : 'a t -> 'a array tval option : ?wrapped:bool -> 'a t -> 'a option tThe representation of an option type's values in Elisp can be "wrapped" or "unwrapped". In either case,
Noneis represented asnil. The unrwapped representation ofSome vis the representation ofv, whereas the wrapped representation iscons v nil. Wrapping is necessary ifnilis a representation of some valuev_nil, in order to distinguish between the representation ofNoneandSome v_nil.
val alist : 'a t -> 'b t -> ('a * 'b) list tval tuple : 'a t -> 'b t -> ('a * 'b) tRepresent a tuple (a,b) as the elisp cons cell (a . b)
val sexpable : (module Core_kernel.Sexpable with type t = 'a) -> name:Core_kernel.Sexp.t -> 'a tEmbed a sexpable ocaml type, so we can save values of the type in emacs, e.g. as buffer local variables
val caml_embed : 'a Core_kernel.Type_equal.Id.t -> 'a tEmbed values of type
'a. Note that unlike other functions above, the values are not transformed, so this can be used to preserve state in emacs. More precisely, this following returnstrue:let var = Var.create (Value.Type.caml_embed type_id) in Current_buffer.set_value var v; phys_equal v (Current_buffer.value_exn var)
val path_list : string list 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 ... endval defun_raw : Symbol.t -> Core_kernel.Source_code_position.t -> ?docstring:string -> ?interactive:string -> args:Symbol.t list -> ?optional_args:Symbol.t list -> ?rest_arg:Symbol.t -> Ecaml__.Import.Function.Fn.t -> unit
module Returns : sig ... endval defun : Symbol.t -> Core_kernel.Source_code_position.t -> ?docstring:string -> ?define_keys:(Keymap.t * string) list -> ?obsoletes:Symbol.t -> ?interactive:Interactive.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
defunwill 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 -> '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 -> (unit -> unit) -> unitval lambda : Core_kernel.Source_code_position.t -> ?docstring:string -> ?interactive:Interactive.t -> 'a Returns.t -> 'a t -> Ecaml__.Import.Function.tval lambda_nullary : Core_kernel.Source_code_position.t -> ?docstring:string -> ?interactive:Interactive.t -> 'a Returns.t -> (unit -> 'a) -> Ecaml__.Import.Function.tval lambda_nullary_nil : Core_kernel.Source_code_position.t -> ?docstring:string -> ?interactive:Interactive.t -> (unit -> unit) -> Ecaml__.Import.Function.t
module Private : sig ... end