(************************************************************************) (* v * The Coq Proof Assistant / The Coq Development Team *) (* valexpr; r_to : valexpr -> 'a; r_id : bool; (** True if the functions above are physical identities. *) } (** 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 -> valexpr val to_unit : valexpr -> unit val unit : unit repr val of_int : int -> valexpr val to_int : valexpr -> int val int : int repr val of_bool : bool -> valexpr val to_bool : valexpr -> bool val bool : bool repr val of_char : char -> valexpr val to_char : valexpr -> char val char : char repr val of_string : string -> valexpr val to_string : valexpr -> string val string : string repr val of_list : ('a -> valexpr) -> 'a list -> valexpr val to_list : (valexpr -> 'a) -> valexpr -> 'a list val list : 'a repr -> 'a list repr val of_constr : EConstr.t -> valexpr val to_constr : valexpr -> EConstr.t val constr : EConstr.t repr val of_exn : Exninfo.iexn -> valexpr val to_exn : valexpr -> Exninfo.iexn val exn : Exninfo.iexn repr val of_ident : Id.t -> valexpr val to_ident : valexpr -> Id.t val ident : Id.t repr val of_closure : ml_tactic -> valexpr val to_closure : valexpr -> ml_tactic val closure : ml_tactic repr val block : valexpr array repr val of_array : ('a -> valexpr) -> 'a array -> valexpr val to_array : (valexpr -> 'a) -> valexpr -> 'a array val array : 'a repr -> 'a array repr val of_tuple : valexpr array -> valexpr val to_tuple : valexpr -> valexpr array val of_option : ('a -> valexpr) -> 'a option -> valexpr val to_option : (valexpr -> 'a) -> valexpr -> 'a option val option : 'a repr -> 'a option repr val of_pattern : Pattern.constr_pattern -> valexpr val to_pattern : valexpr -> Pattern.constr_pattern val pattern : Pattern.constr_pattern repr val of_pp : Pp.t -> valexpr val to_pp : valexpr -> Pp.t val pp : Pp.t repr val of_constant : Constant.t -> valexpr val to_constant : valexpr -> Constant.t val constant : Constant.t repr val of_reference : Globnames.global_reference -> valexpr val to_reference : valexpr -> Globnames.global_reference val reference : Globnames.global_reference repr val of_ext : 'a Val.tag -> 'a -> valexpr val to_ext : 'a Val.tag -> valexpr -> 'a val repr_ext : 'a Val.tag -> 'a repr val valexpr : valexpr repr (** {5 Dynamic tags} *) val val_constr : EConstr.t Val.tag val val_ident : Id.t Val.tag val val_pattern : Pattern.constr_pattern Val.tag val val_pp : Pp.t Val.tag val val_sort : ESorts.t Val.tag val val_cast : Constr.cast_kind Val.tag val val_inductive : inductive Val.tag val val_constant : Constant.t Val.tag val val_constructor : constructor Val.tag val val_projection : Projection.t Val.tag val val_case : Constr.case_info Val.tag val val_univ : Univ.universe_level Val.tag val val_free : Id.Set.t 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 KerName.t * valexpr array * backtrace (** Ltac2-defined exceptions seen from OCaml side *)