aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--pretyping/pretyping.ml8
-rw-r--r--tactics/class_tactics.ml49
2 files changed, 12 insertions, 5 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 *)
diff --git a/tactics/class_tactics.ml4 b/tactics/class_tactics.ml4
index bbd29e665..48c94a074 100644
--- a/tactics/class_tactics.ml4
+++ b/tactics/class_tactics.ml4
@@ -134,6 +134,11 @@ type search_state = {
dblist : Auto.Hint_db.t list;
localdb : Auto.Hint_db.t list }
+let filter_hyp t =
+ match kind_of_term t with
+ | Evar _ | Meta _ | Sort _ -> false
+ | _ -> true
+
module SearchProblem = struct
type state = search_state
@@ -203,8 +208,8 @@ module SearchProblem = struct
(List.map
(fun id -> (Eauto.e_give_exact_constr (mkVar id), 0,
(str "exact" ++ spc () ++ pr_id id)))
-(* (List.filter (fun id -> filt (pf_get_hyp_typ g id)) *)
- (pf_ids_of_hyps g))
+ (List.filter (fun id -> filter_hyp (pf_get_hyp_typ g id))
+ (pf_ids_of_hyps g)))
in
List.map (fun (res,pri,pp) -> { s with tacres = res; pri = 0;
last_tactic = pp; localdb = List.tl s.localdb }) l