From 73c5ecd3d038b4143910762c0132e147c56a85a2 Mon Sep 17 00:00:00 2001 From: ppedrot Date: Sun, 6 Oct 2013 19:09:35 +0000 Subject: Removing uses of Evar.add in class-related functions. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16852 85f007b7-540e-0410-9357-904b9bb8a0f7 --- pretyping/typeclasses_errors.ml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'pretyping/typeclasses_errors.ml') diff --git a/pretyping/typeclasses_errors.ml b/pretyping/typeclasses_errors.ml index 89eb217d28..a6a9a75c5a 100644 --- a/pretyping/typeclasses_errors.ml +++ b/pretyping/typeclasses_errors.ml @@ -22,7 +22,8 @@ type typeclass_error = | NotAClass of constr | UnboundMethod of global_reference * Id.t Loc.located (* Class name, method *) | NoInstance of Id.t Loc.located * constr list - | UnsatisfiableConstraints of evar_map * (existential_key * Evar_kinds.t) option + | UnsatisfiableConstraints of + evar_map * (existential_key * Evar_kinds.t) option * Evar.Set.t option | MismatchedContextInstance of contexts * constr_expr list * rel_context (* found, expected *) exception TypeClassError of env * typeclass_error @@ -35,14 +36,15 @@ let unbound_method env cid id = typeclass_error env (UnboundMethod (cid, id)) let no_instance env id args = typeclass_error env (NoInstance (id, args)) -let unsatisfiable_constraints env evd ev = +let unsatisfiable_constraints env evd ev comp = match ev with | None -> - raise (TypeClassError (env, UnsatisfiableConstraints (evd, None))) + let err = UnsatisfiableConstraints (evd, None, comp) in + raise (TypeClassError (env, err)) | Some ev -> let loc, kind = Evd.evar_source ev evd in - let err = TypeClassError (env, UnsatisfiableConstraints (evd, Some (ev, kind))) in - Loc.raise loc err + let err = UnsatisfiableConstraints (evd, Some (ev, kind), comp) in + Loc.raise loc (TypeClassError (env, err)) let mismatched_ctx_inst env c n m = typeclass_error env (MismatchedContextInstance (c, n, m)) -- cgit v1.2.3