diff options
| author | Matthieu Sozeau | 2015-02-12 16:43:28 +0100 |
|---|---|---|
| committer | Matthieu Sozeau | 2015-02-16 17:34:39 +0100 |
| commit | cce1b6f06f9802f4d7c977322cec654ad2582d63 (patch) | |
| tree | 396f17b9e151eb753aaeb1608d15d668c46335cc | |
| parent | 100d50d7cde05334940378a1e6483cae975b93a5 (diff) | |
Fix bug #3960: potential evar instance categorized as an unresolvable
goal in Instance. Also remove some dead code.
| -rw-r--r-- | pretyping/typeclasses.ml | 9 | ||||
| -rw-r--r-- | pretyping/typeclasses.mli | 2 | ||||
| -rw-r--r-- | toplevel/classes.ml | 4 |
3 files changed, 2 insertions, 13 deletions
diff --git a/pretyping/typeclasses.ml b/pretyping/typeclasses.ml index b64ccf60dd..18e83056bd 100644 --- a/pretyping/typeclasses.ml +++ b/pretyping/typeclasses.ml @@ -483,15 +483,6 @@ let is_instance = function is_class (IndRef ind) | _ -> false -let is_implicit_arg = function -| Evar_kinds.GoalEvar -> false -| _ -> true - (* match k with *) - (* ImplicitArg (ref, (n, id), b) -> true *) - (* | InternalHole -> true *) - (* | _ -> false *) - - (* To embed a boolean for resolvability status. This is essentially a hack to mark which evars correspond to goals and do not need to be resolved when we have nested [resolve_all_evars] diff --git a/pretyping/typeclasses.mli b/pretyping/typeclasses.mli index 1a0b6696a8..b3170b9702 100644 --- a/pretyping/typeclasses.mli +++ b/pretyping/typeclasses.mli @@ -77,8 +77,6 @@ val instance_priority : instance -> int option val is_class : global_reference -> bool val is_instance : global_reference -> bool -val is_implicit_arg : Evar_kinds.t -> bool - (** Returns the term and type for the given instance of the parameters and fields of the type class. *) diff --git a/toplevel/classes.ml b/toplevel/classes.ml index f44ac36788..01b560d0c4 100644 --- a/toplevel/classes.ml +++ b/toplevel/classes.ml @@ -165,7 +165,7 @@ let new_instance ?(abstract=false) ?(global=false) poly ctx (instid, bk, cl) pro in let env' = push_rel_context ctx env in evars := Evarutil.nf_evar_map !evars; - evars := resolve_typeclasses ~filter:Typeclasses.no_goals ~fail:true env !evars; + evars := resolve_typeclasses ~filter:Typeclasses.all_evars ~fail:true env !evars; let subst = List.map (Evarutil.nf_evar !evars) subst in if abstract then begin @@ -232,7 +232,7 @@ let new_instance ?(abstract=false) ?(global=false) poly ctx (instid, bk, cl) pro k.cl_projs; c :: props, rest' with Not_found -> - (CHole (Loc.ghost, Some Evar_kinds.GoalEvar, Misctypes.IntroAnonymous, None) :: props), rest + (CHole (Loc.ghost, None(* Some Evar_kinds.GoalEvar *), Misctypes.IntroAnonymous, None) :: props), rest else props, rest) ([], props) k.cl_props in |
