aboutsummaryrefslogtreecommitdiff
path: root/tactics/rewrite.ml4
diff options
context:
space:
mode:
authormsozeau2009-05-18 16:07:55 +0000
committermsozeau2009-05-18 16:07:55 +0000
commitbb89852617bfc8c973ba6746a77d1c2913b720ad (patch)
tree879750c59612ff143dca415981fb8b01dbbe4df6 /tactics/rewrite.ml4
parentdf3115c21feb70d43c4021b104282b2c35c4dd5b (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/rewrite.ml4')
-rw-r--r--tactics/rewrite.ml44
1 files changed, 3 insertions, 1 deletions
diff --git a/tactics/rewrite.ml4 b/tactics/rewrite.ml4
index 213f0d11e9..b981635eb7 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