diff options
author | msozeau <msozeau@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2008-05-23 11:47:43 +0000 |
---|---|---|
committer | msozeau <msozeau@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2008-05-23 11:47:43 +0000 |
commit | 97f2cb04e369e07dc87dc15d4871b736776614bd (patch) | |
tree | 47cb65cf28136895ee942f36ba7cde8d214e8217 /pretyping/typeclasses_errors.ml | |
parent | 81f12192810bdf825cee82658a36214740d1a75b (diff) |
- Fix bug #1858, Hint Unfold calling the wrong locate function.
- Fix typeclass interface: instance_constructor now takes the instance
constrs as argument to build and return the corresponding term and
type.
- Better typeclass error reporting when defining fixpoints.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@10975 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'pretyping/typeclasses_errors.ml')
-rw-r--r-- | pretyping/typeclasses_errors.ml | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/pretyping/typeclasses_errors.ml b/pretyping/typeclasses_errors.ml index dc3f81f56..aed42aa04 100644 --- a/pretyping/typeclasses_errors.ml +++ b/pretyping/typeclasses_errors.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id:$ i*) +(*i $Id$ i*) (*i*) open Names @@ -41,6 +41,10 @@ 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 evm = typeclass_error env (UnsatisfiableConstraints evm) +let unsatisfiable_constraints env evd = + let evd = Evd.undefined_evars evd in + let ev = List.hd (Evd.dom (Evd.evars_of evd)) in + let loc, _ = Evd.evar_source ev evd in + raise (Stdpp.Exc_located (loc, TypeClassError (env, UnsatisfiableConstraints evd))) let mismatched_ctx_inst env c n m = typeclass_error env (MismatchedContextInstance (c, n, m)) |