aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorherbelin2008-04-04 09:57:41 +0000
committerherbelin2008-04-04 09:57:41 +0000
commitcbe17d1d7b5116edfaf3fedd74fe4636f08f0c70 (patch)
tree063dfda4e1eb2206be37f200f312cfa9336fbf3b
parent1b118b7b7164d8c8543d4ba184f6afed10e2006c (diff)
Protection de rewrite in contre le dépliage des constantes dans w_unify, ce qui
n'était pas encore fait git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@10750 85f007b7-540e-0410-9357-904b9bb8a0f7
-rw-r--r--pretyping/clenv.ml4
-rw-r--r--pretyping/clenv.mli2
-rw-r--r--tactics/tactics.ml5
3 files changed, 6 insertions, 5 deletions
diff --git a/pretyping/clenv.ml b/pretyping/clenv.ml
index 0d462f793d..242368ce99 100644
--- a/pretyping/clenv.ml
+++ b/pretyping/clenv.ml
@@ -304,7 +304,7 @@ let connect_clenv gls clenv =
In particular, it assumes that [env'] and [sigma'] extend [env] and [sigma].
*)
-let clenv_fchain ?(allow_K=true) mv clenv nextclenv =
+let clenv_fchain ?(allow_K=true) ?(flags=default_unify_flags) mv clenv nextclenv =
(* Add the metavars of [nextclenv] to [clenv], with their name-environment *)
let clenv' =
{ templval = clenv.templval;
@@ -314,7 +314,7 @@ let clenv_fchain ?(allow_K=true) mv clenv nextclenv =
env = nextclenv.env } in
(* unify the type of the template of [nextclenv] with the type of [mv] *)
let clenv'' =
- clenv_unify allow_K CUMUL
+ clenv_unify allow_K ~flags:flags CUMUL
(clenv_term clenv' nextclenv.templtyp)
(clenv_meta_type clenv' mv)
clenv' in
diff --git a/pretyping/clenv.mli b/pretyping/clenv.mli
index 6a7038a078..4f27ec902f 100644
--- a/pretyping/clenv.mli
+++ b/pretyping/clenv.mli
@@ -61,7 +61,7 @@ val mk_clenv_from_env : env -> evar_map -> int option -> constr * types -> claus
val connect_clenv : evar_info sigma -> clausenv -> clausenv
val clenv_fchain :
- ?allow_K:bool -> metavariable -> clausenv -> clausenv -> clausenv
+ ?allow_K:bool -> ?flags:unify_flags -> metavariable -> clausenv -> clausenv -> clausenv
(***************************************************************)
(* Unification with clenvs *)
diff --git a/tactics/tactics.ml b/tactics/tactics.ml
index 28e35cf97b..08eddef96c 100644
--- a/tactics/tactics.ml
+++ b/tactics/tactics.ml
@@ -931,7 +931,8 @@ let elimination_in_clause_scheme with_evars id elimclause indclause gl =
let hyp = mkVar id in
let hyp_typ = pf_type_of gl hyp in
let hypclause = mk_clenv_from_n gl (Some 0) (hyp, hyp_typ) in
- let elimclause'' = clenv_fchain ~allow_K:false hypmv elimclause' hypclause in
+ let elimclause'' =
+ clenv_fchain ~allow_K:false ~flags:elim_flags hypmv elimclause' hypclause in
let new_hyp_typ = clenv_type elimclause'' in
if eq_constr hyp_typ new_hyp_typ then
errorlabstrm "general_rewrite_in"
@@ -1959,7 +1960,7 @@ let compute_elim_sig ?elimc elimt =
let nparams = Intset.cardinal (free_rels concl_with_args) in
let preds,params = cut_list (List.length params_preds - nparams) params_preds in
- (* A first approximation, further anlysis will tweak it *)
+ (* A first approximation, further analysis will tweak it *)
let res = ref { empty_scheme with
(* This fields are ok: *)
elimc = elimc; elimt = elimt; concl = conclusion;