diff options
author | 2009-05-18 16:07:55 +0000 | |
---|---|---|
committer | 2009-05-18 16:07:55 +0000 | |
commit | bb89852617bfc8c973ba6746a77d1c2913b720ad (patch) | |
tree | 879750c59612ff143dca415981fb8b01dbbe4df6 /tactics | |
parent | df3115c21feb70d43c4021b104282b2c35c4dd5b (diff) |
Minor unification changes:
- Primitive setup for firing typeclass resolution on-demand: add a flag to
control resolution of remaining evars (e.g. typeclasses) during
unification.
- Prevent canonical projection resolution when no delta is allowed
during unification (fixes incompatibility found in ssreflect).
- Correctly check types when the head is an evar _or_ a meta in w_unify.
Move [isEvar_or_Meta] to kernel/term.ml, it's used in two places now.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@12131 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'tactics')
-rw-r--r-- | tactics/auto.ml | 1 | ||||
-rw-r--r-- | tactics/class_tactics.ml4 | 1 | ||||
-rw-r--r-- | tactics/rewrite.ml4 | 4 | ||||
-rw-r--r-- | tactics/tactics.ml | 1 |
4 files changed, 6 insertions, 1 deletions
diff --git a/tactics/auto.ml b/tactics/auto.ml index aceb5c525..8a2578c30 100644 --- a/tactics/auto.ml +++ b/tactics/auto.ml @@ -708,6 +708,7 @@ let auto_unif_flags = { modulo_conv_on_closed_terms = Some full_transparent_state; use_metas_eagerly = false; modulo_delta = empty_transparent_state; + resolve_evars = true; } (* Try unification with the precompiled clause, then use registered Apply *) diff --git a/tactics/class_tactics.ml4 b/tactics/class_tactics.ml4 index f9485e64c..78ef3c6fc 100644 --- a/tactics/class_tactics.ml4 +++ b/tactics/class_tactics.ml4 @@ -103,6 +103,7 @@ let auto_unif_flags = { modulo_conv_on_closed_terms = Some full_transparent_state; use_metas_eagerly = true; modulo_delta = var_full_transparent_state; + resolve_evars = false; } let unify_e_resolve flags (c,clenv) gls = diff --git a/tactics/rewrite.ml4 b/tactics/rewrite.ml4 index 213f0d11e..b981635eb 100644 --- a/tactics/rewrite.ml4 +++ b/tactics/rewrite.ml4 @@ -272,6 +272,7 @@ let rewrite_unif_flags = { Unification.modulo_conv_on_closed_terms = None; Unification.use_metas_eagerly = true; Unification.modulo_delta = empty_transparent_state; + Unification.resolve_evars = true; } let conv_transparent_state = (Idpred.empty, Cpred.full) @@ -280,6 +281,7 @@ let rewrite2_unif_flags = { Unification.modulo_conv_on_closed_terms = Some conv_transparent_state; Unification.use_metas_eagerly = true; Unification.modulo_delta = empty_transparent_state; + Unification.resolve_evars = true; } let convertible env evd x y = @@ -320,7 +322,7 @@ let unify_eqn env sigma hypinfo t = let mvs = clenv_dependent false env' in clenv_pose_metas_as_evars env' mvs in - let evd' = Typeclasses.resolve_typeclasses ~fail:false env'.env env'.evd in + let evd' = Typeclasses.resolve_typeclasses ~fail:true env'.env env'.evd in let env' = { env' with evd = evd' } in let nf c = Evarutil.nf_evar ( evd') (Clenv.clenv_nf_meta env' c) in let c1 = nf c1 and c2 = nf c2 diff --git a/tactics/tactics.ml b/tactics/tactics.ml index f3f15630f..3d3b22045 100644 --- a/tactics/tactics.ml +++ b/tactics/tactics.ml @@ -680,6 +680,7 @@ let elim_flags = { modulo_conv_on_closed_terms = Some full_transparent_state; use_metas_eagerly = true; modulo_delta = empty_transparent_state; + resolve_evars = false; } let elimination_clause_scheme with_evars allow_K elimclause indclause gl = |