summaryrefslogtreecommitdiff
path: root/tactics/equality.ml
diff options
context:
space:
mode:
Diffstat (limited to 'tactics/equality.ml')
-rw-r--r--tactics/equality.ml18
1 files changed, 4 insertions, 14 deletions
diff --git a/tactics/equality.ml b/tactics/equality.ml
index c130fa15..7ab8d0c3 100644
--- a/tactics/equality.ml
+++ b/tactics/equality.ml
@@ -487,9 +487,6 @@ let apply_special_clear_request clear_flag f =
e when catchable_exception e -> tclIDTAC
end
-type delayed_open_constr_with_bindings =
- env -> evar_map -> evar_map * constr with_bindings
-
let general_multi_rewrite with_evars l cl tac =
let do1 l2r f =
Proofview.Goal.enter begin fun gl ->
@@ -497,7 +494,7 @@ let general_multi_rewrite with_evars l cl tac =
let env = Proofview.Goal.env gl in
let sigma,c = f env sigma in
tclWITHHOLES with_evars
- (general_rewrite_clause l2r with_evars ?tac c) sigma cl
+ (general_rewrite_clause l2r with_evars ?tac c cl) sigma
end
in
let rec doN l2r c = function
@@ -1233,8 +1230,6 @@ let try_delta_expand env sigma t =
let eq_dec_scheme_kind_name = ref (fun _ -> failwith "eq_dec_scheme undefined")
let set_eq_dec_scheme_kind k = eq_dec_scheme_kind_name := (fun _ -> k)
-let eqdep_dec = qualid_of_string "Coq.Logic.Eqdep_dec"
-
let inject_if_homogenous_dependent_pair ty =
Proofview.Goal.nf_enter begin fun gl ->
try
@@ -1257,7 +1252,7 @@ let inject_if_homogenous_dependent_pair ty =
(* knows inductive types *)
if not (Ind_tables.check_scheme (!eq_dec_scheme_kind_name()) (fst ind) &&
pf_apply is_conv gl ar1.(2) ar2.(2)) then raise Exit;
- Library.require_library [Loc.ghost,eqdep_dec] (Some false);
+ Coqlib.check_required_library ["Coq";"Logic";"Eqdep_dec"];
let new_eq_args = [|pf_type_of gl ar1.(3);ar1.(3);ar2.(3)|] in
let inj2 = Coqlib.coq_constant "inj_pair2_eq_dec is missing"
["Logic";"Eqdep_dec"] "inj_pair2_eq_dec" in
@@ -1474,8 +1469,6 @@ let subst_tuple_term env sigma dep_pair1 dep_pair2 b =
(* then it uses the predicate "\x.phi(proj1_sig x,proj2_sig x)", and so *)
(* on for further iterated sigma-tuples *)
-exception NothingToRewrite
-
let cutSubstInConcl l2r eqn =
Proofview.Goal.nf_enter begin fun gl ->
let (lbeq,u,(t,e1,e2)) = find_eq_data_decompose gl eqn in
@@ -1500,10 +1493,10 @@ let cutSubstInHyp l2r eqn id =
tclTHENFIRST
(tclTHENLIST [
(Proofview.Unsafe.tclEVARS sigma);
- (change_in_hyp None (fun s -> s,typ) (id,InHypTypeOnly));
+ (change_in_hyp None (make_change_arg typ) (id,InHypTypeOnly));
(replace_core (onHyp id) l2r eqn)
])
- (change_in_hyp None (fun s -> s,expected) (id,InHypTypeOnly))
+ (change_in_hyp None (make_change_arg expected) (id,InHypTypeOnly))
end
let try_rewrite tac =
@@ -1513,9 +1506,6 @@ let try_rewrite tac =
| e when catchable_exception e ->
tclZEROMSG
(strbrk "Cannot find a well-typed generalization of the goal that makes the proof progress.")
- | NothingToRewrite ->
- tclZEROMSG
- (strbrk "Nothing to rewrite.")
| e -> Proofview.tclZERO ~info e
end