aboutsummaryrefslogtreecommitdiffhomepage
path: root/proofs
diff options
context:
space:
mode:
authorGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2001-01-21 22:43:16 +0000
committerGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2001-01-21 22:43:16 +0000
commit35d6012afbe76653c3835ce0ba26106a7be84efd (patch)
treee0a8188b6b7b2906ea4569b59c970856ed5dea55 /proofs
parentca05ae9d85000d42fe855bdcf055cfd1dacf15b8 (diff)
Bug « f_equal » : arguments inférables par une unification des types qui n'était pas faite (rem: le nouveau test ralentit un peu l'ensemble)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@1263 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'proofs')
-rw-r--r--proofs/clenv.ml9
1 files changed, 7 insertions, 2 deletions
diff --git a/proofs/clenv.ml b/proofs/clenv.ml
index 1fe882caf..da4233c72 100644
--- a/proofs/clenv.ml
+++ b/proofs/clenv.ml
@@ -82,6 +82,10 @@ let unify_0 mc wc m n =
match (kind_of_term cM,kind_of_term cN) with
| IsCast (c,_), _ -> unirec_rec substn c cN
| _, IsCast (c,_) -> unirec_rec substn cM c
+ | IsMeta k1, IsMeta k2 ->
+ if k1 < k2 then (k1,cN)::metasubst,evarsubst
+ else if k1 = k2 then substn
+ else (k2,cM)::metasubst,evarsubst
| IsMeta k, _ -> (k,cN)::metasubst,evarsubst
| _, IsMeta k -> (k,cM)::metasubst,evarsubst
| IsLambda (_,t1,c1), IsLambda (_,t2,c2) ->
@@ -574,10 +578,11 @@ let clenv_merge with_types =
clenv_resrec (metas'@t) evars' clenv
else
let mc,ec =
- if with_types then
+ let mvty = clenv_instance_type clenv mv in
+ if with_types or occur_meta mvty then
let nty = clenv_type_of clenv
(clenv_instance clenv (mk_freelisted n)) in
- unify_0 [] clenv.hook (clenv_instance_type clenv mv) nty
+ unify_0 [] clenv.hook mvty nty
else ([],[]) in
clenv_resrec (mc@t) ec (clenv_assign mv n clenv)