(************************************************************************) (* * The Rocq Prover / The Rocq Development Team *) (* v * Copyright INRIA, CNRS and contributors *) (* <O___,, * (see version control and CREDITS file for authors & dates) *) (* \VV/ **************************************************************) (* // * This file is distributed under the terms of the *) (* * GNU Lesser General Public License Version 2.1 *) (* * (see LICENSE file for the text of the license) *) (************************************************************************)
open Names open EConstr open Genarg open Geninterp open Tactypes
(** Coercions from highest level generic arguments to actual data used by Ltac interpretation. Those functions examinate dynamic types and try to return
something sensible according to the object content. *)
(** Abstract application, to print ltac functions *) type appl =
| UnnamedAppl (** For generic applications: nothing is printed *)
| GlbAppl of (Names.KerName.t * Val.t list) list (** For calls to global constants, some may alias other. *)
type tacvalue =
| VFun of appl * Tacexpr.ltac_trace * Loc.t option * Val.t Id.Map.t *
Name.t list * Tacexpr.glob_tactic_expr
| VRec ofVal.t Id.Map.t ref * Tacexpr.glob_tactic_expr
(** {5 High-level access to values}
The [of_*] functions cast a given argument into a value. The [to_*] do the converse, and return [None] if there is a type mismatch.
*)
module Value : sig type t = Val.t
val of_tacvalue : tacvalue -> t val to_tacvalue : t -> tacvalue option val of_constr : constr -> t val to_constr : t -> constr option val of_uconstr : Ltac_pretype.closed_glob_constr -> t val to_uconstr : t -> Ltac_pretype.closed_glob_constr option val of_constr_context : Constr_matching.context -> t val to_constr_context : t -> Constr_matching.context option val of_int : int -> t val to_int : t -> int option val of_ident : Id.t -> t val to_ident : t -> Id.t option val to_list : t -> t listoption val to_option : t -> t optionoption val to_pair : t -> (t * t) option val cast : 'a typed_abstract_argument_type -> Geninterp.Val.t -> 'a
val of_constr_under_binders : Ltac_pretype.constr_under_binders -> t (* No [to_constr_under_binders], use [coerce_to_constr] instead *) end
(** {5 Coercion functions} *)
val coerce_to_constr_context : Value.t -> Constr_matching.context
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.