diff options
author | herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2013-02-17 14:56:11 +0000 |
---|---|---|
committer | herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2013-02-17 14:56:11 +0000 |
commit | f5e644a53c69392f94eae01dd71ab79b4700a892 (patch) | |
tree | 592ea17a9580bede8e1aa7dc6dbd878e4e190e63 /pretyping/pretype_errors.ml | |
parent | 358c68e60a4a82dbce209559b94858e917590787 (diff) |
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
Diffstat (limited to 'pretyping/pretype_errors.ml')
-rw-r--r-- | pretyping/pretype_errors.ml | 6 |
1 files changed, 3 insertions, 3 deletions
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))) |