diff options
author | ppedrot <ppedrot@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2013-10-06 19:09:35 +0000 |
---|---|---|
committer | ppedrot <ppedrot@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2013-10-06 19:09:35 +0000 |
commit | 73c5ecd3d038b4143910762c0132e147c56a85a2 (patch) | |
tree | 34597eb595faa44d111ffba10b91252a9857df4b /pretyping/typeclasses_errors.ml | |
parent | 49d4bfb1f40cbcb06902094d5f6b7a6340eae1dd (diff) |
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
Diffstat (limited to 'pretyping/typeclasses_errors.ml')
-rw-r--r-- | pretyping/typeclasses_errors.ml | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/pretyping/typeclasses_errors.ml b/pretyping/typeclasses_errors.ml index 89eb217d2..a6a9a75c5 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)) |