diff options
author | 2008-04-09 14:59:09 +0000 | |
---|---|---|
committer | 2008-04-09 14:59:09 +0000 | |
commit | 119f9ef620c4318dc3221808b0583f1b02182f38 (patch) | |
tree | d516d81b756c901cd6fa1a8482d6ea7914a66950 /pretyping/pretyping.ml | |
parent | 7bf9b0c621d8cfebbecaf0ffc1a3ee84429a665f (diff) |
Fix evar bugs in type classes:
- disallow uninstantiated hypotheses (typically local variables with no
assigned types) as solutions for typeclass instantiation.
- Fix resolve_typeclasses call in pretyping that was not propagating
found instances in the term.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@10772 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'pretyping/pretyping.ml')
-rw-r--r-- | pretyping/pretyping.ml | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/pretyping/pretyping.ml b/pretyping/pretyping.ml index 83381710d..df1e45d86 100644 --- a/pretyping/pretyping.ml +++ b/pretyping/pretyping.ml @@ -687,9 +687,11 @@ module Pretyping_F (Coercion : Coercion.S) = struct let c = pretype_gen evdref env lvar kind c in let evd,_ = consider_remaining_unif_problems env !evdref in if fail_evar then - (let evd = Typeclasses.resolve_typeclasses ~onlyargs:false ~all:false env (evars_of evd) evd in - check_evars env Evd.empty evd c); - evd, c + let evd = Typeclasses.resolve_typeclasses ~onlyargs:false ~all:false env (evars_of evd) evd in + let c = Evarutil.nf_isevar evd c in + check_evars env Evd.empty evd c; + evd, c + else evd, c (** Entry points of the high-level type synthesis algorithm *) |