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.mli | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'pretyping/pretype_errors.mli') diff --git a/pretyping/pretype_errors.mli b/pretyping/pretype_errors.mli index 36ae6c13fc..ee79651316 100644 --- a/pretyping/pretype_errors.mli +++ b/pretyping/pretype_errors.mli @@ -13,6 +13,7 @@ open Sign open Environ open Glob_term open Inductiveops +open Type_errors (** {6 The type of errors raised by the pretyper } *) @@ -41,7 +42,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 @@ -49,7 +50,7 @@ type pretype_error = | VarNotFound of Id.t | UnexpectedType of constr * constr | NotProduct of constr - | TypingError of Type_errors.type_error + | TypingError of type_error exception PretypeError of env * Evd.evar_map * pretype_error @@ -105,7 +106,7 @@ val error_cannot_unify : env -> Evd.evar_map -> ?reason:unification_error -> val error_cannot_unify_local : env -> Evd.evar_map -> constr * constr * constr -> 'b val error_cannot_find_well_typed_abstraction : env -> Evd.evar_map -> - constr -> constr list -> 'b + constr -> constr list -> (env * type_error) option -> 'b val error_wrong_abstraction_type : env -> Evd.evar_map -> Name.t -> constr -> types -> types -> 'b -- cgit v1.2.3