Module Camlid.ExpertSource

Sourceval typedef : string -> ('a, Format.formatter, unit, Expr.defined) format4 -> 'a
Sourceval mlalias : string -> ('a, Format.formatter, unit, Expr.defined) format4 -> 'a
Sourceval mlabstract : ?keep_name:bool -> string -> Expr.defined
Sourceval existing : string -> Expr.var list -> Expr.code
Sourceval calli_existing : string -> Expr.var list -> Expr.expr
Sourceval get_boxing : Type.conv -> Expr.expr * Expr.expr
Sourceval builtin_mltypes : unbox_attribute:Type.unbox_attribute -> unbox_version:(int * int) -> ?u_type:string -> c_type:string -> c2ml:string -> ml2c:string -> ?u2c:string -> ?c2u:string -> ?ml2u:string -> ?u2ml:string -> string -> Type.mlc
Sourceval string_nt : ?owned:bool -> unit -> Type.mlc
Sourceval string_fixed_length : ?init:bool -> ?owned:bool -> Expr.var -> Type.mlc
Sourceval string_length_struct : Expr.defined
Sourceval string_length : ?owned:bool -> unit -> Type.mlc
Sourceval ptr_ref : Type.mlc -> Type.mlc
Sourcetype copy = {
  1. copy : Expr.expr;
  2. c_from : Expr.Var.t;
  3. c_to : Expr.Var.t;
}
Sourceval mk_copy : cty:Expr.expr -> ?vars:(dst:Expr.Var.t -> src:Expr.Var.t -> Expr.Var.t list) -> ?exprs:(dst:Expr.Var.t -> src:Expr.Var.t -> Expr.expr list) -> string -> copy
Sourceval copy : copy:copy -> Type.mlc -> Type.mlc
Sourceval array : ?init:bool -> ?owned:bool -> len:Expr.var -> Type.mlc -> Type.mlc
Sourceval array_length : ?owned:bool -> Type.mlc -> Type.mlc
Sourceval map_param_in_call : ?name:string -> (Expr.expr -> Expr.expr -> Expr.expr * Expr.expr) -> Type.param -> Type.param
Sourceval deref_in_call : Type.param -> Type.param
Sourceval use_new_param_only_in_call : Type.param -> Type.param
Sourceval get_field : Expr.expr -> string -> Type.param -> Type.param
Sourceval len_field : Type.param -> Type.param
Sourcetype get = {
  1. get : Expr.expr;
  2. c : Expr.var;
  3. i : Expr.var;
}
Sourcetype set = {
  1. set : Expr.expr;
  2. c : Expr.var;
  3. i : Expr.var;
}
Sourcetype initialize = {
  1. initialize : Expr.expr;
  2. c : Expr.var;
}
Sourceval abstract : ?initialize:initialize -> ?get:get -> ?set:set -> icty:Expr.defined -> ml:string -> cty:Expr.defined -> unit -> Type.mlc
Sourcetype finalize = {
  1. finalize : Expr.expr;
  2. i : Expr.var;
}
Sourcetype finalize_op = {
  1. finalize_op : Expr.code;
  2. v : Expr.var;
}
Sourcetype hash = {
  1. hash : Expr.expr;
  2. i : Expr.var;
}
Sourcetype hash_op = {
  1. hash_op : Expr.code;
  2. v : Expr.var;
}
Sourcetype compare = {
  1. compare : Expr.expr;
  2. i1 : Expr.var;
  3. i2 : Expr.var;
}
Sourcetype compare_op = {
  1. compare_op : Expr.code;
  2. v1 : Expr.var;
  3. v2 : Expr.var;
}
Sourceval custom : ?initialize:initialize -> ?finalize:finalize -> ?hash:hash -> ?compare:compare -> ?get:get -> ?set:set -> ml:string -> icty:Expr.expr -> cty:Expr.expr -> unit -> Type.mlc
Sourceval custom_ptr : ?initialize:initialize -> ?finalize:finalize -> ?hash:hash -> ?compare:compare -> ?malloc:bool -> ml:string -> cty:Expr.expr -> unit -> Type.mlc
Sourceval e_value : Expr.expr
Sourceval value : string -> Type.mlc
Sourceval mk_get : icty:Expr.expr -> cty:Expr.expr -> ?vars:(dst:Expr.Var.t -> src:Expr.Var.t -> Expr.Var.t list) -> ?exprs:(dst:Expr.Var.t -> src:Expr.Var.t -> Expr.expr list) -> string -> get
Sourceval mk_set : icty:Expr.expr -> cty:Expr.expr -> ?vars:(dst:Expr.Var.t -> src:Expr.Var.t -> Expr.Var.t list) -> ?exprs:(dst:Expr.Var.t -> src:Expr.Var.t -> Expr.expr list) -> string -> set
Sourceval mk_finalize : icty:Expr.expr -> ?vars:(Expr.Var.t -> Expr.Var.t list) -> ?exprs:(Expr.Var.t -> Expr.expr list) -> string -> finalize
Sourceval mk_finalize_ptr : icty:Expr.expr -> ?vars:(Expr.Var.t -> Expr.Var.t list) -> ?exprs:(Expr.Var.t -> Expr.expr list) -> string -> finalize
Sourceval mk_hash : icty:Expr.expr -> ?vars:(Expr.Var.t -> Expr.Var.t list) -> ?exprs:(Expr.Var.t -> Expr.expr list) -> string -> hash
Sourceval mk_compare : icty:Expr.expr -> string -> compare
Sourceval mk_initialize : cty:Expr.expr -> ?vars:(Expr.Var.t -> Expr.Var.t list) -> ?exprs:(Expr.Var.t -> Expr.expr list) -> string -> initialize
Sourceval simple_param : ?input_label:string -> ?binds:(Expr.var * Expr.expr) list -> ?input:bool -> ?output:bool -> ?used_in_call:bool -> ?name:string -> Type.mlc -> Type.param * Expr.var
Sourceval simple_result : Type.mlc -> Type.result
Sourceval list_or_empty : empty:(Format.formatter -> unit -> unit) -> sep:unit Fmt.t -> 'a Fmt.t -> Format.formatter -> 'a list -> unit
Sourceval code_c_fun : params:Type.param list -> call_params:Type.param list -> result:Type.result option -> name:string -> Expr.expr -> Expr.code
  • parameter call_params

    should be a reordered subset of params (usually it is params)

Sourceval code_c_fun_bytecode : params:Type.param list -> result:Type.result option -> Expr.code -> Expr.code
Sourceval print_ml_fun : params:Type.param list -> ?call_params:Type.param list -> ?result:Type.result -> mlname:string -> Expr.expr -> Expr.expr
Sourceval declare_struct : string -> (string * Expr.expr) list -> Expr.defined
Sourceval if_ : ?else_:Expr.expr -> Expr.expr -> then_:Expr.expr -> Expr.expr
Sourceval seq : Expr.expr list -> Expr.expr
Sourcetype convert = {
  1. convert : Expr.expr;
  2. src : Expr.var;
  3. dst : Expr.var;
}
Sourceval mk_converter : src:Type.c -> dst:Type.c -> ?vars:(dst:Expr.var -> src:Expr.var -> Expr.var list) -> ?exprs:(dst:Expr.var -> src:Expr.var -> Expr.expr list) -> string -> convert
Sourceval convert : ?mlc_to_c:convert -> ?c_to_mlc:convert -> mlc:Type.mlc -> c:Type.c -> unit -> Type.mlc
Sourcemodule AlgData : sig ... end
Sourceval ret_option_if : Expr.expr -> Type.mlc -> Type.mlc

ret_option_if expr ty the ocaml calue returned is Some v if the C expression expr is true, and v is returned by ty, otherwise it is None

Sourceval get_expression : mlname:string -> Type.mlc -> Expr.expr -> Expr.expr

get_expression ~mlname ty expr defined the function mlname that return the value of the C expression expr of type ty

Sourceval bigarray_array1 : managed:string -> kind:string -> cty:string -> mlty:string -> mlelt:string -> unit -> Type.mlc

The biggaray is mirrored by a structure with a field "len" of type size_t and a field "t" of type "cty*"

  • parameter managed

    C constant name for the managed flag

  • parameter kind

    C constant name for the kind flag

  • parameter cty

    the C type of the C elements

  • parameter mlty

    the OCaml type of the OCaml elements

  • parameter mlelt

    the OCaml type witness for the C elements