aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Hugo Herbelin <Hugo.Herbelin@inria.fr>2014-10-12 15:36:17 +0200
committerGravatar Hugo Herbelin <Hugo.Herbelin@inria.fr>2014-10-13 19:12:34 +0200
commite9c25b3368a73737553821d2e954383c57698a86 (patch)
tree30374a292fcbb373862cae80d6288be4783aa77a
parent267d7a63e9c24573226d0890bedb783f10dcb235 (diff)
Add support for deactivating type class inference from induction/destruct.
-rw-r--r--proofs/clenvtac.ml4
-rw-r--r--proofs/clenvtac.mli2
-rw-r--r--tactics/tactics.ml8
3 files changed, 7 insertions, 7 deletions
diff --git a/proofs/clenvtac.ml b/proofs/clenvtac.ml
index 99ea2300c..76fc37d37 100644
--- a/proofs/clenvtac.ml
+++ b/proofs/clenvtac.ml
@@ -82,10 +82,10 @@ open Unification
let dft = default_unify_flags
-let res_pf ?(with_evars=false) ?(flags=dft ()) clenv =
+let res_pf ?(with_evars=false) ?(with_classes=true) ?(flags=dft ()) clenv =
Proofview.Goal.enter begin fun gl ->
let clenv gl = clenv_unique_resolver ~flags clenv gl in
- clenv_refine with_evars (Tacmach.New.of_old clenv (Proofview.Goal.assume gl))
+ clenv_refine with_evars ~with_classes (Tacmach.New.of_old clenv (Proofview.Goal.assume gl))
end
(* [unifyTerms] et [unify] ne semble pas gérer les Meta, en
diff --git a/proofs/clenvtac.mli b/proofs/clenvtac.mli
index bede509e7..6a7e12a35 100644
--- a/proofs/clenvtac.mli
+++ b/proofs/clenvtac.mli
@@ -15,7 +15,7 @@ open Unification
(** Tactics *)
val unify : ?flags:unify_flags -> constr -> unit Proofview.tactic
val clenv_refine : evars_flag -> ?with_classes:bool -> clausenv -> unit Proofview.tactic
-val res_pf : ?with_evars:evars_flag -> ?flags:unify_flags -> clausenv -> unit Proofview.tactic
+val res_pf : ?with_evars:evars_flag -> ?with_classes:bool -> ?flags:unify_flags -> clausenv -> unit Proofview.tactic
val clenv_pose_dependent_evars : evars_flag -> clausenv -> clausenv
val clenv_value_cast_meta : clausenv -> constr
diff --git a/tactics/tactics.ml b/tactics/tactics.ml
index 9a4c52dc1..08dbf3965 100644
--- a/tactics/tactics.ml
+++ b/tactics/tactics.ml
@@ -962,7 +962,7 @@ let enforce_prop_bound_names rename tac =
| _ ->
tac
-let elimination_clause_scheme with_evars ?(flags=elim_flags ())
+let elimination_clause_scheme with_evars ?(with_classes=true) ?(flags=elim_flags ())
rename i (elim, elimty, bindings) indclause =
Proofview.Goal.enter begin fun gl ->
let env = Proofview.Goal.env gl in
@@ -975,7 +975,7 @@ let elimination_clause_scheme with_evars ?(flags=elim_flags ())
(str "The type of elimination clause is not well-formed."))
in
let elimclause' = clenv_fchain ~flags indmv elimclause indclause in
- enforce_prop_bound_names rename (Clenvtac.res_pf elimclause' ~with_evars:with_evars ~flags)
+ enforce_prop_bound_names rename (Clenvtac.res_pf elimclause' ~with_evars ~with_classes ~flags)
end
(*
@@ -1143,7 +1143,7 @@ let elimination_in_clause_scheme with_evars ?(flags=elim_flags ())
let general_elim_clause with_evars flags id c e =
let elim = match id with
- | None -> elimination_clause_scheme with_evars ~flags
+ | None -> elimination_clause_scheme with_evars ~with_classes:true ~flags
| Some id -> elimination_in_clause_scheme with_evars ~flags id
in
general_elim_clause_gen elim c e
@@ -3567,7 +3567,7 @@ let induction_tac with_evars elim (varname,lbind) typ gl =
let i = match i with None -> index_of_ind_arg elimt | Some i -> i in
let elimc = mkCast (elimc, DEFAULTcast, elimt) in
Proofview.V82.of_tactic
- (elimination_clause_scheme with_evars rename i (elimc, elimt, lbindelimc) indclause) gl
+ (elimination_clause_scheme with_evars ~with_classes:false rename i (elimc, elimt, lbindelimc) indclause) gl
let induction_from_context isrec with_evars (indref,nparams,elim) (hyp0,lbind) names
inhyps =