From f5e644a53c69392f94eae01dd71ab79b4700a892 Mon Sep 17 00:00:00 2001 From: herbelin Date: Sun, 17 Feb 2013 14:56:11 +0000 Subject: A more informative message when the elimination predicate for destruct, rewrite, etc. is not well-typed. Also added support for a more informative message when the elimination predicate is not well-formed while using the smart "second-order" unification algorithm. However the "abstract_list_all" algorithm seems to remain more informative though, so we still use this algorithm for reporting about ill-typed predicates. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16207 85f007b7-540e-0410-9357-904b9bb8a0f7 --- pretyping/pretype_errors.ml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pretyping/pretype_errors.ml') diff --git a/pretyping/pretype_errors.ml b/pretyping/pretype_errors.ml index ec808de0f..f5870a8c0 100644 --- a/pretyping/pretype_errors.ml +++ b/pretyping/pretype_errors.ml @@ -39,7 +39,7 @@ type pretype_error = | CannotUnifyBindingType of constr * constr | CannotGeneralize of constr | NoOccurrenceFound of constr * Id.t option - | CannotFindWellTypedAbstraction of constr * constr list + | CannotFindWellTypedAbstraction of constr * constr list * (env * type_error) option | WrongAbstractionType of Name.t * constr * types * types | AbstractionOverMeta of Name.t * Name.t | NonLinearUnification of Name.t * constr @@ -162,8 +162,8 @@ let error_cannot_unify_local env sigma (m,n,sn) = let error_cannot_coerce env sigma (m,n) = raise (PretypeError (env, sigma,CannotUnify (m,n,None))) -let error_cannot_find_well_typed_abstraction env sigma p l = - raise (PretypeError (env, sigma,CannotFindWellTypedAbstraction (p,l))) +let error_cannot_find_well_typed_abstraction env sigma p l e = + raise (PretypeError (env, sigma,CannotFindWellTypedAbstraction (p,l,e))) let error_wrong_abstraction_type env sigma na a p l = raise (PretypeError (env, sigma,WrongAbstractionType (na,a,p,l))) -- cgit v1.2.3