| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
open Names |
| 18 |
open Environ |
| 19 |
open Evd |
| 20 |
open EConstr |
| 21 |
open Glob_term |
| 22 |
open Ltac_pretype |
| 23 |
|
| 24 |
val add_bidirectionality_hint : env -> GlobRef.t -> int -> unit |
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
val get_bidirectionality_hint : env -> GlobRef.t -> int option |
| 30 |
|
| 31 |
val clear_bidirectionality_hint : env -> GlobRef.t -> unit |
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
type possible_fix_indices = int list list |
| 37 |
|
| 38 |
|
| 39 |
type possible_guard = { |
| 40 |
possibly_cofix : bool; |
| 41 |
possible_fix_indices : possible_fix_indices; |
| 42 |
} |
| 43 |
|
| 44 |
val search_guard : |
| 45 |
?loc:Loc.t -> ?evars:CClosure.evar_handler -> |
| 46 |
?elim_to:(Sorts.Quality.t -> Sorts.Quality.t -> bool) -> env -> |
| 47 |
possible_guard -> Constr.rec_declaration -> int array option |
| 48 |
|
| 49 |
val search_fix_guard : |
| 50 |
?loc:Loc.t -> ?evars:CClosure.evar_handler -> env -> |
| 51 |
possible_fix_indices -> Constr.rec_declaration -> int array |
| 52 |
|
| 53 |
val esearch_guard : |
| 54 |
?loc:Loc.t -> env -> evar_map -> possible_guard -> |
| 55 |
EConstr.rec_declaration -> int array option |
| 56 |
|
| 57 |
val esearch_fix_guard : |
| 58 |
?loc:Loc.t -> env -> evar_map -> possible_fix_indices -> |
| 59 |
EConstr.rec_declaration -> int array |
| 60 |
|
| 61 |
val esearch_cofix_guard : ?loc:Loc.t -> env -> evar_map -> EConstr.rec_declaration -> unit |
| 62 |
|
| 63 |
type typing_constraint = |
| 64 |
| IsType |
| 65 |
| OfType of types |
| 66 |
| WithoutTypeConstraint |
| 67 |
|
| 68 |
type use_typeclasses = NoUseTC | UseTCForConv | UseTC |
| 69 |
|
| 70 |
|
| 71 |
|
| 72 |
|
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
|
| 77 |
type inference_flags = { |
| 78 |
use_coercions : bool; |
| 79 |
use_typeclasses : use_typeclasses; |
| 80 |
solve_unification_constraints : bool; |
| 81 |
fail_evar : bool; |
| 82 |
expand_evars : bool; |
| 83 |
program_mode : bool; |
| 84 |
poly : PolyFlags.t; |
| 85 |
undeclared_evars_rr : bool; |
| 86 |
unconstrained_sorts : bool; |
| 87 |
} |
| 88 |
|
| 89 |
val default_inference_flags : bool -> inference_flags |
| 90 |
|
| 91 |
val no_classes_no_fail_inference_flags : inference_flags |
| 92 |
|
| 93 |
val all_no_fail_flags : inference_flags |
| 94 |
|
| 95 |
val all_and_fail_flags : inference_flags |
| 96 |
|
| 97 |
|
| 98 |
|
| 99 |
|
| 100 |
|
| 101 |
|
| 102 |
|
| 103 |
|
| 104 |
val understand_tcc : ?flags:inference_flags -> env -> evar_map -> |
| 105 |
?expected_type:typing_constraint -> glob_constr -> evar_map * constr |
| 106 |
|
| 107 |
|
| 108 |
|
| 109 |
val understand_tcc_ty : ?flags:inference_flags -> env -> evar_map -> |
| 110 |
?expected_type:typing_constraint -> glob_constr -> evar_map * constr * types |
| 111 |
|
| 112 |
|
| 113 |
|
| 114 |
|
| 115 |
|
| 116 |
|
| 117 |
|
| 118 |
|
| 119 |
|
| 120 |
|
| 121 |
|
| 122 |
|
| 123 |
|
| 124 |
val understand_ltac : inference_flags -> |
| 125 |
env -> evar_map -> ltac_var_map -> |
| 126 |
typing_constraint -> glob_constr -> evar_map * EConstr.t |
| 127 |
|
| 128 |
val understand_ltac_ty : inference_flags -> |
| 129 |
env -> evar_map -> ltac_var_map -> |
| 130 |
typing_constraint -> glob_constr -> evar_map * EConstr.t * EConstr.types |
| 131 |
|
| 132 |
|
| 133 |
|
| 134 |
|
| 135 |
|
| 136 |
|
| 137 |
|
| 138 |
val understand : ?flags:inference_flags -> ?expected_type:typing_constraint -> |
| 139 |
env -> evar_map -> glob_constr -> constr Evd.in_ustate |
| 140 |
|
| 141 |
val understand_uconstr : |
| 142 |
?flags:inference_flags -> ?expected_type:typing_constraint -> |
| 143 |
env -> evar_map -> Ltac_pretype.closed_glob_constr -> evar_map * EConstr.t |
| 144 |
|
| 145 |
|
| 146 |
|
| 147 |
|
| 148 |
type inference_hook = env -> evar_map -> Evar.t -> (evar_map * constr) option |
| 149 |
|
| 150 |
|
| 151 |
|
| 152 |
|
| 153 |
|
| 154 |
|
| 155 |
|
| 156 |
val solve_remaining_evars : ?hook:inference_hook -> inference_flags -> |
| 157 |
env -> ?initial:evar_map -> evar_map -> evar_map |
| 158 |
|
| 159 |
|
| 160 |
|
| 161 |
|
| 162 |
val check_evars_are_solved : |
| 163 |
program_mode:bool -> env -> ?initial:evar_map -> evar_map -> unit |
| 164 |
|
| 165 |
|
| 166 |
|
| 167 |
|
| 168 |
val check_evars : env -> ?initial:evar_map -> evar_map -> constr -> unit |
| 169 |
|
| 170 |
|
| 171 |
|
| 172 |
val ise_pretype_gen : |
| 173 |
inference_flags -> env -> evar_map -> |
| 174 |
ltac_var_map -> typing_constraint -> glob_constr -> evar_map * constr * types |
| 175 |
|
| 176 |
|
| 177 |
|
| 178 |
type pretype_flags = { |
| 179 |
poly: PolyFlags.t; |
| 180 |
resolve_tc : bool; |
| 181 |
program_mode : bool; |
| 182 |
use_coercions : bool; |
| 183 |
undeclared_evars_rr : bool; |
| 184 |
unconstrained_sorts : bool; |
| 185 |
} |
| 186 |
|
| 187 |
type 'a pretype_fun = ?loc:Loc.t -> flags:pretype_flags -> Evardefine.type_constraint -> GlobEnv.t -> evar_map -> evar_map * 'a |
| 188 |
|
| 189 |
type pretyper = { |
| 190 |
pretype_ref : pretyper -> GlobRef.t * glob_instance option -> unsafe_judgment pretype_fun; |
| 191 |
pretype_var : pretyper -> Id.t -> unsafe_judgment pretype_fun; |
| 192 |
pretype_evar : pretyper -> existential_name CAst.t * (lident * glob_constr) list -> unsafe_judgment pretype_fun; |
| 193 |
pretype_patvar : pretyper -> Evar_kinds.matching_var_kind -> unsafe_judgment pretype_fun; |
| 194 |
pretype_app : pretyper -> glob_constr * glob_constr list -> unsafe_judgment pretype_fun; |
| 195 |
pretype_proj : pretyper -> (Constant.t * glob_instance option) * glob_constr list * glob_constr -> unsafe_judgment pretype_fun; |
| 196 |
pretype_lambda : pretyper -> Name.t * binding_kind * glob_constr * glob_constr -> unsafe_judgment pretype_fun; |
| 197 |
pretype_prod : pretyper -> Name.t * binding_kind * glob_constr * glob_constr -> unsafe_judgment pretype_fun; |
| 198 |
pretype_letin : pretyper -> Name.t * glob_constr * glob_constr option * glob_constr -> unsafe_judgment pretype_fun; |
| 199 |
pretype_cases : pretyper -> Constr.case_style * glob_constr option * tomatch_tuples * cases_clauses -> unsafe_judgment pretype_fun; |
| 200 |
pretype_lettuple : pretyper -> Name.t list * (Name.t * glob_constr option) * glob_constr * glob_constr -> unsafe_judgment pretype_fun; |
| 201 |
pretype_if : pretyper -> glob_constr * (Name.t * glob_constr option) * glob_constr * glob_constr -> unsafe_judgment pretype_fun; |
| 202 |
pretype_rec : pretyper -> glob_fix_kind * Id.t array * glob_decl list array * glob_constr array * glob_constr array -> unsafe_judgment pretype_fun; |
| 203 |
pretype_sort : pretyper -> glob_sort -> unsafe_judgment pretype_fun; |
| 204 |
pretype_hole : pretyper -> Evar_kinds.glob_evar_kind -> unsafe_judgment pretype_fun; |
| 205 |
pretype_genarg : pretyper -> Genarg.glob_generic_argument -> unsafe_judgment pretype_fun; |
| 206 |
pretype_cast : pretyper -> glob_constr * Constr.cast_kind option * glob_constr -> unsafe_judgment pretype_fun; |
| 207 |
pretype_int : pretyper -> Uint63.t -> unsafe_judgment pretype_fun; |
| 208 |
pretype_float : pretyper -> Float64.t -> unsafe_judgment pretype_fun; |
| 209 |
pretype_string : pretyper -> Pstring.t -> unsafe_judgment pretype_fun; |
| 210 |
pretype_array : pretyper -> glob_instance option * glob_constr array * glob_constr * glob_constr -> unsafe_judgment pretype_fun; |
| 211 |
pretype_type : pretyper -> glob_constr -> unsafe_type_judgment pretype_fun; |
| 212 |
} |
| 213 |
|
| 214 |
|
| 215 |
|
| 216 |
|
| 217 |
|
| 218 |
|
| 219 |
|
| 220 |
val default_pretyper : pretyper |
| 221 |
|
| 222 |
|
| 223 |
val eval_pretyper : pretyper -> flags:pretype_flags -> Evardefine.type_constraint -> GlobEnv.t -> evar_map -> glob_constr -> evar_map * unsafe_judgment |