package ecaml

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type 'a t
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 ... end
include 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 ... end
include Open_on_rhs_intf.S with type 'a t := 'a t
val return : 'a -> 'a t
val map : 'a t -> f:('a -> 'b) -> 'b t
val both : 'a t -> 'b t -> ('a * 'b) t
val required : Symbol.t -> 'a Ecaml_value.Value.Type.t -> 'a t
val optional : Symbol.t -> 'a Ecaml_value.Value.Type.t -> 'a option t
val rest : Symbol.t -> 'a Ecaml_value.Value.Type.t -> 'a list t
val optional_with_default : Symbol.t -> 'a -> 'a Ecaml_value.Value.Type.t -> 'a t
val optional_with_nil : Symbol.t -> 'a Ecaml_value.Value.Type.t -> 'a t

An optional argument whose Value.Type.t handles nil directly.

include Ecaml_value.Value.Type.S
val with_of_value_exn : 'a Ecaml_value.Value.Type.t -> (Ecaml_value.Value.t -> 'a) -> 'a Ecaml_value.Value.Type.t
val bool : bool Ecaml_value.Value.Type.t
val float : float Ecaml_value.Value.Type.t
val ignored : unit Ecaml_value.Value.Type.t
val string : string Ecaml_value.Value.Type.t
val string_cached : string Ecaml_value.Value.Type.t

string_cached is like string, except it uses of_utf8_bytes_cached.

val unit : unit Ecaml_value.Value.Type.t
val option : ?wrapped:bool -> 'a Ecaml_value.Value.Type.t -> 'a option Ecaml_value.Value.Type.t

The representation of an option type's values in Elisp can be "wrapped" or "unwrapped". In either case, None is represented as nil. The unrwapped representation of Some v is the representation of v, whereas the wrapped representation is cons v nil. Wrapping is necessary if nil is a representation of some value v_nil, in order to distinguish between the representation of None and Some v_nil.

Represent a tuple (a,b) as the elisp cons cell (a . b)

Represent 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.t

Embed a sexpable ocaml type, so we can save values of the type in emacs, e.g. as buffer local variables

Embed 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 returns true:

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 Ecaml_value.Value.Type.t

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.

module Interactive : sig ... end
module For_testing : sig ... end
val 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_value.Function.Fn.t -> unit
module Returns : sig ... end
val 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 -> unit
val 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 -> 'a Returns.t -> (unit -> 'a) -> unit
val 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) -> unit
val lambda : Core_kernel.Source_code_position.t -> ?docstring:string -> ?interactive:Interactive.t -> 'a Returns.t -> 'a t -> Ecaml_value.Function.t
val lambda_nullary : Core_kernel.Source_code_position.t -> ?docstring:string -> ?interactive:Interactive.t -> 'a Returns.t -> (unit -> 'a) -> Ecaml_value.Function.t
val lambda_nullary_nil : Core_kernel.Source_code_position.t -> ?docstring:string -> ?interactive:Interactive.t -> (unit -> unit) -> Ecaml_value.Function.t
module Private : sig ... end