diff options
| author | herbelin | 2009-10-04 10:50:39 +0000 |
|---|---|---|
| committer | herbelin | 2009-10-04 10:50:39 +0000 |
| commit | 3b57619bd5dc164dcb51ad4fb390efd258940917 (patch) | |
| tree | a86ebb8f52443374966b496de5b361166c4ed02d /tactics | |
| parent | 88909c92cad0044dac83539b2b3d385242ed851e (diff) | |
Changed the way to support compatibility with previous versions.
Compatibility version is now a global parameter that every feature can
individually browse. This avoids having to keep the names of options
synchronous in their respective files and in now-removed file coqcompat.ml.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@12372 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'tactics')
| -rw-r--r-- | tactics/equality.ml | 11 | ||||
| -rw-r--r-- | tactics/tactics.ml | 9 | ||||
| -rw-r--r-- | tactics/tauto.ml4 | 4 |
3 files changed, 17 insertions, 7 deletions
diff --git a/tactics/equality.ml b/tactics/equality.ml index 6adfa3aafa..200b6deb71 100644 --- a/tactics/equality.ml +++ b/tactics/equality.ml @@ -46,7 +46,10 @@ open Evd (* Options *) -let discr_do_intro = ref true +let discriminate_introduction = ref true + +let discr_do_intro () = + !discriminate_introduction && Flags.version_strictly_greater Flags.V8_2 open Goptions let _ = @@ -54,8 +57,8 @@ let _ = { optsync = true; optname = "automatic introduction of hypotheses by discriminate"; optkey = ["Discriminate";"Introduction"]; - optread = (fun () -> !discr_do_intro); - optwrite = (:=) discr_do_intro } + optread = (fun () -> !discriminate_introduction); + optwrite = (:=) discriminate_introduction } (* Rewriting tactics *) @@ -683,7 +686,7 @@ let discrEverywhere with_evars = (* tclORELSE *) - (if !discr_do_intro then + (if discr_do_intro () then (tclTHEN (tclREPEAT introf) (Tacticals.tryAllHyps diff --git a/tactics/tactics.ml b/tactics/tactics.ml index 2a4fc6a0f5..f4262d731a 100644 --- a/tactics/tactics.ml +++ b/tactics/tactics.ml @@ -80,6 +80,11 @@ let dloc = dummy_loc (* Option for 8.2 compatibility *) open Goptions let dependent_propositions_elimination = ref true + +let use_dependent_propositions_elimination () = + !dependent_propositions_elimination + && Flags.version_strictly_greater Flags.V8_2 + let _ = declare_bool_option { optsync = true; @@ -2581,8 +2586,8 @@ let guess_elim isrec hyp0 gl = if isrec then lookup_eliminator mind s else let case = - if !dependent_propositions_elimination && - dependent_no_evar (mkVar hyp0) (pf_concl gl) + if use_dependent_propositions_elimination () && + dependent_no_evar (mkVar hyp0) (pf_concl gl) then make_case_dep else make_case_gen in pf_apply case gl mind s in diff --git a/tactics/tauto.ml4 b/tactics/tauto.ml4 index 6fea983772..60baa017cf 100644 --- a/tactics/tauto.ml4 +++ b/tactics/tauto.ml4 @@ -49,6 +49,8 @@ let strict_unit = false (* Whether inner iff are unfolded *) let iff_unfolding = ref false +let unfold_iff () = !iff_unfolding || Flags.version_less_or_equal Flags.V8_2 + open Goptions let _ = declare_bool_option @@ -256,7 +258,7 @@ let rec tauto_intuit t_reduce solver ist = ) >> let reduction_not _ist = - if !iff_unfolding then + if unfold_iff () then <:tactic< unfold Coq.Init.Logic.not, Coq.Init.Logic.iff in * >> else <:tactic< unfold Coq.Init.Logic.not in * >> |
