Ltac2_plugin.Tac2ffi
val repr_of : 'a repr -> 'a -> Tac2val.valexpr
val repr_to : 'a repr -> Tac2val.valexpr -> 'a
val make_repr : ('a -> Tac2val.valexpr) -> (Tac2val.valexpr -> 'a) -> 'a repr
These functions allow to convert back and forth between OCaml and Ltac2 data representation. The to_*
functions raise an anomaly whenever the data has not expected shape.
val of_unit : unit -> Tac2val.valexpr
val to_unit : Tac2val.valexpr -> unit
val unit : unit repr
val of_int : int -> Tac2val.valexpr
val to_int : Tac2val.valexpr -> int
val int : int repr
val of_bool : bool -> Tac2val.valexpr
val to_bool : Tac2val.valexpr -> bool
val bool : bool repr
val of_char : char -> Tac2val.valexpr
val to_char : Tac2val.valexpr -> char
val char : char repr
val of_bytes : Stdlib.Bytes.t -> Tac2val.valexpr
val to_bytes : Tac2val.valexpr -> Stdlib.Bytes.t
val bytes : Stdlib.Bytes.t repr
val of_string : string -> Tac2val.valexpr
WARNING these functions copy
val to_string : Tac2val.valexpr -> string
val string : string repr
val of_list : ('a -> Tac2val.valexpr) -> 'a list -> Tac2val.valexpr
val to_list : (Tac2val.valexpr -> 'a) -> Tac2val.valexpr -> 'a list
val of_constr : EConstr.t -> Tac2val.valexpr
val to_constr : Tac2val.valexpr -> EConstr.t
val of_preterm : Ltac_pretype.closed_glob_constr -> Tac2val.valexpr
val to_preterm : Tac2val.valexpr -> Ltac_pretype.closed_glob_constr
val preterm : Ltac_pretype.closed_glob_constr repr
val of_cast : Constr.cast_kind -> Tac2val.valexpr
val to_cast : Tac2val.valexpr -> Constr.cast_kind
val cast : Constr.cast_kind repr
val of_err : Exninfo.iexn -> Tac2val.valexpr
val to_err : Tac2val.valexpr -> Exninfo.iexn
val err : Exninfo.iexn repr
val of_exn : Exninfo.iexn -> Tac2val.valexpr
val to_exn : Tac2val.valexpr -> Exninfo.iexn
val exn : Exninfo.iexn repr
val of_exninfo : Exninfo.info -> Tac2val.valexpr
val to_exninfo : Tac2val.valexpr -> Exninfo.info
val exninfo : Exninfo.info repr
val of_ident : Names.Id.t -> Tac2val.valexpr
val to_ident : Tac2val.valexpr -> Names.Id.t
val ident : Names.Id.t repr
val of_closure : Tac2val.closure -> Tac2val.valexpr
val to_closure : Tac2val.valexpr -> Tac2val.closure
val closure : Tac2val.closure repr
val of_block : (int * Tac2val.valexpr array) -> Tac2val.valexpr
val to_block : Tac2val.valexpr -> int * Tac2val.valexpr array
val block : (int * Tac2val.valexpr array) repr
val of_array : ('a -> Tac2val.valexpr) -> 'a array -> Tac2val.valexpr
val to_array : (Tac2val.valexpr -> 'a) -> Tac2val.valexpr -> 'a array
val of_tuple : Tac2val.valexpr array -> Tac2val.valexpr
val to_tuple : Tac2val.valexpr -> Tac2val.valexpr array
val of_pair : ('a -> Tac2val.valexpr) -> ('b -> Tac2val.valexpr) -> ('a * 'b) -> Tac2val.valexpr
val to_pair : (Tac2val.valexpr -> 'a) -> (Tac2val.valexpr -> 'b) -> Tac2val.valexpr -> 'a * 'b
val of_triple : ('a -> Tac2val.valexpr) -> ('b -> Tac2val.valexpr) -> ('c -> Tac2val.valexpr) -> ('a * 'b * 'c) -> Tac2val.valexpr
val to_triple : (Tac2val.valexpr -> 'a) -> (Tac2val.valexpr -> 'b) -> (Tac2val.valexpr -> 'c) -> Tac2val.valexpr -> 'a * 'b * 'c
val of_option : ('a -> Tac2val.valexpr) -> 'a option -> Tac2val.valexpr
val to_option : (Tac2val.valexpr -> 'a) -> Tac2val.valexpr -> 'a option
val of_pattern : Pattern.constr_pattern -> Tac2val.valexpr
val to_pattern : Tac2val.valexpr -> Pattern.constr_pattern
val pattern : Pattern.constr_pattern repr
val of_evar : Evar.t -> Tac2val.valexpr
val to_evar : Tac2val.valexpr -> Evar.t
val of_pp : Pp.t -> Tac2val.valexpr
val to_pp : Tac2val.valexpr -> Pp.t
val of_constant : Names.Constant.t -> Tac2val.valexpr
val to_constant : Tac2val.valexpr -> Names.Constant.t
val constant : Names.Constant.t repr
val of_instance : EConstr.EInstance.t -> Tac2val.valexpr
val to_instance : Tac2val.valexpr -> EConstr.EInstance.t
val instance : EConstr.EInstance.t repr
val of_reference : Names.GlobRef.t -> Tac2val.valexpr
val to_reference : Tac2val.valexpr -> Names.GlobRef.t
val reference : Names.GlobRef.t repr
val of_ext : 'a Tac2dyn.Val.tag -> 'a -> Tac2val.valexpr
val to_ext : 'a Tac2dyn.Val.tag -> Tac2val.valexpr -> 'a
val repr_ext : 'a Tac2dyn.Val.tag -> 'a repr
val of_open : (Names.KerName.t * Tac2val.valexpr array) -> Tac2val.valexpr
val to_open : Tac2val.valexpr -> Names.KerName.t * Tac2val.valexpr array
val open_ : (Names.KerName.t * Tac2val.valexpr array) repr
val of_uint63 : Uint63.t -> Tac2val.valexpr
val to_uint63 : Tac2val.valexpr -> Uint63.t
val of_float : Float64.t -> Tac2val.valexpr
val to_float : Tac2val.valexpr -> Float64.t
val of_pstring : Pstring.t -> Tac2val.valexpr
val to_pstring : Tac2val.valexpr -> Pstring.t
val app_fun1 : ('a, 'b) fun1 -> 'a repr -> 'b repr -> 'a -> 'b Proofview.tactic
val to_fun1 : 'a repr -> 'b repr -> Tac2val.valexpr -> ('a, 'b) fun1
val valexpr : Tac2val.valexpr repr
val val_constr : EConstr.t Tac2dyn.Val.tag
val val_ident : Names.Id.t Tac2dyn.Val.tag
val val_pattern : Pattern.constr_pattern Tac2dyn.Val.tag
val val_preterm : Ltac_pretype.closed_glob_constr Tac2dyn.Val.tag
val val_matching_context : Constr_matching.context Tac2dyn.Val.tag
val val_evar : Evar.t Tac2dyn.Val.tag
val val_pp : Pp.t Tac2dyn.Val.tag
val val_sort : EConstr.ESorts.t Tac2dyn.Val.tag
val val_cast : Constr.cast_kind Tac2dyn.Val.tag
val val_inductive : Names.inductive Tac2dyn.Val.tag
val val_constant : Names.Constant.t Tac2dyn.Val.tag
val val_constructor : Names.constructor Tac2dyn.Val.tag
val val_projection : Names.Projection.t Tac2dyn.Val.tag
val val_qvar : Sorts.QVar.t Tac2dyn.Val.tag
val val_case : Constr.case_info Tac2dyn.Val.tag
val val_binder : (Names.Name.t EConstr.binder_annot * EConstr.types) Tac2dyn.Val.tag
val val_free : Names.Id.Set.t Tac2dyn.Val.tag
val val_uint63 : Uint63.t Tac2dyn.Val.tag
val val_float : Float64.t Tac2dyn.Val.tag
val val_ltac1 : Geninterp.Val.t Tac2dyn.Val.tag
val val_pretype_flags : Pretyping.inference_flags Tac2dyn.Val.tag
val val_expected_type : Pretyping.typing_constraint Tac2dyn.Val.tag
val val_ind_data : (Names.Ind.t * Declarations.mutual_inductive_body) Tac2dyn.Val.tag
val val_transparent_state : TransparentState.t Tac2dyn.Val.tag
val val_exninfo : Exninfo.info Tac2dyn.Val.tag
val val_exn : Exninfo.iexn Tac2dyn.Val.tag
Toplevel representation of OCaml exceptions. Invariant: no LtacError
should be put into a value with tag val_exn
.
Exception
exception LtacError of Names.KerName.t * Tac2val.valexpr array
Ltac2-defined exceptions seen from OCaml side