Module Find_subterm
exceptionNotUnifiable of (EConstr.constr * EConstr.constr * Pretype_errors.unification_error) optionexceptionSubtermUnificationError of Pretype_errors.subterm_unification_error
type 'a testing_function={match_fun : 'a -> EConstr.constr -> 'a;merge_fun : 'a -> 'a -> 'a;mutable testing_state : 'a;mutable last_found : Pretype_errors.position_reporting option;}
val make_eq_univs_test : Environ.env -> Evd.evar_map -> EConstr.constr -> Evd.evar_map testing_functionThis is the basic testing function, looking for exact matches of a closed term
val replace_term_occ_modulo : Environ.env -> Evd.evar_map -> Locus.occurrences Locus.or_like_first -> 'a testing_function -> (unit -> EConstr.constr) -> EConstr.constr -> EConstr.constrreplace_term_occ_modulo occl test mk clooks incfor subterm modulo a testing functiontestand replaces successfully matching subterms at the indicated occurrencesocclwithmk (); it turns a NotUnifiable exception raised by the testing function into a SubtermUnificationError.
val replace_term_occ_decl_modulo : Environ.env -> Evd.evar_map -> (Locus.occurrences * Locus.hyp_location_flag) Locus.or_like_first -> 'a testing_function -> (unit -> EConstr.constr) -> EConstr.named_declaration -> EConstr.named_declarationreplace_term_occ_decl_modulois similar toreplace_term_occ_modulobut for a named_declaration.
val subst_closed_term_occ : Environ.env -> Evd.evar_map -> Locus.occurrences Locus.or_like_first -> EConstr.constr -> EConstr.constr -> EConstr.constr * Evd.evar_mapsubst_closed_term_occ occl c dreplaces occurrences of closedcat positionsocclbyRel 1ind(see also Note OCC), unifying universes which results in a set of constraints.
val subst_closed_term_occ_decl : Environ.env -> Evd.evar_map -> (Locus.occurrences * Locus.hyp_location_flag) Locus.or_like_first -> EConstr.constr -> EConstr.named_declaration -> EConstr.named_declaration * Evd.evar_mapsubst_closed_term_occ_decl evd occl c declreplaces occurrences of closedcat positionsocclbyRel 1indecl.