aboutsummaryrefslogtreecommitdiff
path: root/API/API.mli
diff options
context:
space:
mode:
Diffstat (limited to 'API/API.mli')
-rw-r--r--API/API.mli124
1 files changed, 66 insertions, 58 deletions
diff --git a/API/API.mli b/API/API.mli
index 5804a82f64..8b0bef48c9 100644
--- a/API/API.mli
+++ b/API/API.mli
@@ -1280,23 +1280,28 @@ sig
| Algebraic of module_expression
| Struct of module_signature
| FullStruct
- and module_body =
+ and 'a generic_module_body =
{ mod_mp : Names.ModPath.t;
- mod_expr : module_implementation;
+ mod_expr : 'a;
mod_type : module_signature;
mod_type_alg : module_expression option;
mod_constraints : Univ.ContextSet.t;
mod_delta : Mod_subst.delta_resolver;
- mod_retroknowledge : Retroknowledge.action list
+ mod_retroknowledge : 'a module_retroknowledge;
}
and module_signature = (module_type_body,structure_body) functorize
- and module_type_body = module_body
+ and module_body = module_implementation generic_module_body
+ and module_type_body = unit generic_module_body
and structure_body = (Names.Label.t * structure_field_body) list
and structure_field_body =
| SFBconst of constant_body
| SFBmind of mutual_inductive_body
| SFBmodule of module_body
| SFBmodtype of module_type_body
+ and _ module_retroknowledge =
+ | ModBodyRK :
+ Retroknowledge.action list -> module_implementation module_retroknowledge
+ | ModTypeRK : unit module_retroknowledge
end
module Declareops :
@@ -2107,6 +2112,7 @@ sig
val coq_not_ref : Globnames.global_reference lazy_t
val coq_or_ref : Globnames.global_reference lazy_t
val build_coq_and : Globnames.global_reference Util.delayed
+ val build_coq_or : Globnames.global_reference Util.delayed
val build_coq_I : Globnames.global_reference Util.delayed
val coq_reference : string -> string list -> string -> Globnames.global_reference
end
@@ -3072,55 +3078,67 @@ end
(* XXX: Located manually from intf *)
module Glob_term :
sig
- type cases_pattern_r =
+ type 'a cases_pattern_r =
| PatVar of Names.Name.t
- | PatCstr of Names.constructor * cases_pattern list * Names.Name.t
- and cases_pattern = cases_pattern_r CAst.t
+ | PatCstr of Names.constructor * 'a cases_pattern_g list * Names.Name.t
+ and 'a cases_pattern_g = ('a cases_pattern_r, 'a) DAst.t
+ type cases_pattern = [ `any ] cases_pattern_g
type existential_name = Names.Id.t
- type glob_constr_r =
+ type 'a glob_constr_r =
| GRef of Globnames.global_reference * Misctypes.glob_level list option
(** An identifier that represents a reference to an object defined
either in the (global) environment or in the (local) context. *)
| GVar of Names.Id.t
(** An identifier that cannot be regarded as "GRef".
Bound variables are typically represented this way. *)
- | GEvar of existential_name * (Names.Id.t * glob_constr) list
+ | GEvar of existential_name * (Names.Id.t * 'a glob_constr_g) list
| GPatVar of Evar_kinds.matching_var_kind
- | GApp of glob_constr * glob_constr list
- | GLambda of Names.Name.t * Decl_kinds.binding_kind * glob_constr * glob_constr
- | GProd of Names.Name.t * Decl_kinds.binding_kind * glob_constr * glob_constr
- | GLetIn of Names.Name.t * glob_constr * glob_constr option * glob_constr
- | GCases of Term.case_style * glob_constr option * tomatch_tuples * cases_clauses
- | GLetTuple of Names.Name.t list * (Names.Name.t * glob_constr option) * glob_constr * glob_constr
- | GIf of glob_constr * (Names.Name.t * glob_constr option) * glob_constr * glob_constr
- | GRec of fix_kind * Names.Id.t array * glob_decl list array *
- glob_constr array * glob_constr array
+ | GApp of 'a glob_constr_g * 'a glob_constr_g list
+ | GLambda of Names.Name.t * Decl_kinds.binding_kind * 'a glob_constr_g * 'a glob_constr_g
+ | GProd of Names.Name.t * Decl_kinds.binding_kind * 'a glob_constr_g * 'a glob_constr_g
+ | GLetIn of Names.Name.t * 'a glob_constr_g * 'a glob_constr_g option * 'a glob_constr_g
+ | GCases of Term.case_style * 'a glob_constr_g option * 'a tomatch_tuples_g * 'a cases_clauses_g
+ | GLetTuple of Names.Name.t list * (Names.Name.t * 'a glob_constr_g option) * 'a glob_constr_g * 'a glob_constr_g
+ | GIf of 'a glob_constr_g * (Names.Name.t * 'a glob_constr_g option) * 'a glob_constr_g * 'a glob_constr_g
+ | GRec of 'a fix_kind_g * Names.Id.t array * 'a glob_decl_g list array *
+ 'a glob_constr_g array * 'a glob_constr_g array
| GSort of Misctypes.glob_sort
| GHole of Evar_kinds.t * Misctypes.intro_pattern_naming_expr * Genarg.glob_generic_argument option
- | GCast of glob_constr * glob_constr Misctypes.cast_type
+ | GCast of 'a glob_constr_g * 'a glob_constr_g Misctypes.cast_type
- and glob_constr = glob_constr_r CAst.t
+ and 'a glob_constr_g = ('a glob_constr_r, 'a) DAst.t
- and glob_decl = Names.Name.t * Decl_kinds.binding_kind * glob_constr option * glob_constr
+ and 'a glob_decl_g = Names.Name.t * Decl_kinds.binding_kind * 'a glob_constr_g option * 'a glob_constr_g
- and fix_recursion_order =
+ and 'a fix_recursion_order_g =
| GStructRec
- | GWfRec of glob_constr
- | GMeasureRec of glob_constr * glob_constr option
+ | GWfRec of 'a glob_constr_g
+ | GMeasureRec of 'a glob_constr_g * 'a glob_constr_g option
- and fix_kind =
- | GFix of ((int option * fix_recursion_order) array * int)
+ and 'a fix_kind_g =
+ | GFix of ((int option * 'a fix_recursion_order_g) array * int)
| GCoFix of int
- and predicate_pattern =
+ and 'a predicate_pattern_g =
Names.Name.t * (Names.inductive * Names.Name.t list) Loc.located option
- and tomatch_tuple = (glob_constr * predicate_pattern)
+ and 'a tomatch_tuple_g = ('a glob_constr_g * 'a predicate_pattern_g)
- and tomatch_tuples = tomatch_tuple list
+ and 'a tomatch_tuples_g = 'a tomatch_tuple_g list
- and cases_clause = (Names.Id.t list * cases_pattern list * glob_constr) Loc.located
- and cases_clauses = cases_clause list
+ and 'a cases_clause_g = (Names.Id.t list * 'a cases_pattern_g list * 'a glob_constr_g) Loc.located
+ and 'a cases_clauses_g = 'a cases_clause_g list
+
+ type glob_constr = [ `any ] glob_constr_g
+ type tomatch_tuple = [ `any ] tomatch_tuple_g
+ type tomatch_tuples = [ `any ] tomatch_tuples_g
+ type cases_clause = [ `any ] cases_clause_g
+ type cases_clauses = [ `any ] cases_clauses_g
+ type glob_decl = [ `any ] glob_decl_g
+ type fix_kind = [ `any ] fix_kind_g
+ type predicate_pattern = [ `any ] predicate_pattern_g
+ type any_glob_constr =
+ | AnyGlobConstr : 'r glob_constr_g -> any_glob_constr
(** A globalised term together with a closure representing the value
of its free variables. Intended for use when these variables are taken
@@ -3184,6 +3202,10 @@ sig
| NCast of notation_constr * notation_constr Misctypes.cast_type
type interpretation = (Names.Id.t * (subscopes * notation_var_instance_type)) list *
notation_constr
+ type precedence = int
+ type parenRelation =
+ | L | E | Any | Prec of precedence
+ type tolerability = precedence * parenRelation
end
module Tactypes :
@@ -3976,11 +3998,14 @@ end
module Detyping :
sig
+ type 'a delay =
+ | Now : 'a delay
+ | Later : [ `thunk ] delay
val print_universes : bool ref
val print_evar_arguments : bool ref
- val detype : ?lax:bool -> bool -> Names.Id.t list -> Environ.env -> Evd.evar_map -> EConstr.constr -> Glob_term.glob_constr
+ val detype : 'a delay -> ?lax:bool -> bool -> Names.Id.t list -> Environ.env -> Evd.evar_map -> EConstr.constr -> 'a Glob_term.glob_constr_g
val subst_glob_constr : Mod_subst.substitution -> Glob_term.glob_constr -> Glob_term.glob_constr
- val set_detype_anonymous : (?loc:Loc.t -> int -> Glob_term.glob_constr) -> unit
+ val set_detype_anonymous : (?loc:Loc.t -> int -> Names.Id.t) -> unit
end
module Indrec :
@@ -4013,18 +4038,11 @@ sig
expand_evars : bool
}
- type pure_open_constr = Evd.evar_map * EConstr.constr
- type glob_constr_ltac_closure = Glob_term.ltac_var_map * Glob_term.glob_constr
-
val understand_ltac : inference_flags ->
Environ.env -> Evd.evar_map -> Glob_term.ltac_var_map ->
- typing_constraint -> Glob_term.glob_constr -> pure_open_constr
+ typing_constraint -> Glob_term.glob_constr -> Evd.evar_map * EConstr.t
val understand_tcc : ?flags:inference_flags -> Environ.env -> Evd.evar_map ->
?expected_type:typing_constraint -> Glob_term.glob_constr -> Evd.evar_map * EConstr.constr
- val type_uconstr :
- ?flags:inference_flags ->
- ?expected_type:typing_constraint ->
- Geninterp.interp_sign -> Glob_term.closed_glob_constr -> EConstr.constr Tactypes.delayed_open
val understand : ?flags:inference_flags -> ?expected_type:typing_constraint ->
Environ.env -> Evd.evar_map -> Glob_term.glob_constr -> Constr.t Evd.in_evar_universe_context
val check_evars : Environ.env -> Evd.evar_map -> Evd.evar_map -> EConstr.constr -> unit
@@ -4179,22 +4197,12 @@ sig
'a -> Notation_term.notation_constr -> Glob_term.glob_constr
end
-module Ppextend :
-sig
-
- type precedence = int
- type parenRelation =
- | L | E | Any | Prec of precedence
- type tolerability = precedence * parenRelation
-
-end
-
module Notation :
sig
type cases_pattern_status = bool
type required_module = Libnames.full_path * string list
type 'a prim_token_interpreter = ?loc:Loc.t -> 'a -> Glob_term.glob_constr
- type 'a prim_token_uninterpreter = Glob_term.glob_constr list * (Glob_term.glob_constr -> 'a option) * cases_pattern_status
+ type 'a prim_token_uninterpreter = Glob_term.glob_constr list * (Glob_term.any_glob_constr -> 'a option) * cases_pattern_status
type delimiters = string
type local_scopes = Notation_term.tmp_scope_name option * Notation_term.scope_name list
type notation_location = (Names.DirPath.t * Names.DirPath.t) * string
@@ -4393,16 +4401,16 @@ end
module Evar_refiner :
sig
+ type glob_constr_ltac_closure = Glob_term.ltac_var_map * Glob_term.glob_constr
+
val w_refine : Evar.t * Evd.evar_info ->
- Pretyping.glob_constr_ltac_closure -> Evd.evar_map -> Evd.evar_map
+ glob_constr_ltac_closure -> Evd.evar_map -> Evd.evar_map
end
module Proof_type :
sig
- type prim_rule =
- | Cut of bool * bool * Names.Id.t * Term.types
- | Refine of Constr.t
+ type prim_rule = Refine of Constr.t
type tactic = Goal.goal Evd.sigma -> Goal.goal list Evd.sigma
end
@@ -4880,7 +4888,7 @@ sig
val pr_with_comments : ?loc:Loc.t -> Pp.t -> Pp.t
val pr_lident : Names.Id.t Loc.located -> Pp.t
val pr_lname : Names.Name.t Loc.located -> Pp.t
- val prec_less : int -> int * Ppextend.parenRelation -> bool
+ val prec_less : int -> int * Notation_term.parenRelation -> bool
val pr_constr_expr : Constrexpr.constr_expr -> Pp.t
val pr_lconstr_expr : Constrexpr.constr_expr -> Pp.t
val pr_constr_pattern_expr : Constrexpr.constr_pattern_expr -> Pp.t
@@ -5241,7 +5249,7 @@ sig
val build_selector :
Environ.env -> Evd.evar_map -> int -> EConstr.constr -> EConstr.types ->
- EConstr.constr -> EConstr.constr -> Evd.evar_map * EConstr.constr
+ EConstr.constr -> EConstr.constr -> EConstr.constr
val replace : EConstr.constr -> EConstr.constr -> unit Proofview.tactic
val general_rewrite :
orientation -> Locus.occurrences -> freeze_evars_flag -> dep_proof_flag ->