diff options
Diffstat (limited to 'pretyping/pretype_errors.mli')
| -rw-r--r-- | pretyping/pretype_errors.mli | 48 |
1 files changed, 27 insertions, 21 deletions
diff --git a/pretyping/pretype_errors.mli b/pretyping/pretype_errors.mli index a48329bd18..ba8c0e4e77 100644 --- a/pretyping/pretype_errors.mli +++ b/pretyping/pretype_errors.mli @@ -13,10 +13,25 @@ open Rawterm (*s The type of errors raised by the pretyper *) -val error_var_not_found_loc : - loc -> path_kind -> identifier -> 'a - -val error_cant_find_case_type_loc : +type ml_case_error = + | MlCaseAbsurd + | MlCaseDependent + +type pretype_error = + (* Old Case *) + | MlCase of ml_case_error + | CantFindCaseType of constr + (* Unification *) + | OccurCheck of int * constr + | NotClean of int * constr + (* Pretyping *) + | VarNotFound of identifier + | UnexpectedType of constr * constr + | NotProduct of constr + +exception PretypeError of env * pretype_error + +val error_cant_find_case_type_loc : loc -> env -> constr -> 'a val error_ill_formed_branch_loc : @@ -38,29 +53,20 @@ val error_number_branches_loc : val error_case_not_inductive_loc : loc -> path_kind -> env -> constr -> constr -> 'b -(*s Pattern-matching errors *) - -val error_bad_pattern_loc : - loc -> path_kind -> constructor -> constr -> 'b +(*s Implicit arguments synthesis errors *) -val error_bad_constructor_loc : - loc -> path_kind -> constructor -> inductive -> 'b +val error_occur_check : env -> int -> constr -> 'a -val error_wrong_numarg_constructor_loc : - loc -> path_kind -> constructor_path -> int -> 'b +val error_not_clean : env -> int -> constr -> 'a -val error_wrong_predicate_arity_loc : - loc -> env -> constr -> constr -> constr -> 'b +(*s Ml Case errors *) -val error_needs_inversion : path_kind -> env -> constr -> constr -> 'a +val error_ml_case_loc : loc -> env -> ml_case_error -> 'a +(*s Pretyping errors *) -(*s Implicit arguments synthesis errors *) +val error_var_not_found_loc : loc -> identifier -> 'a val error_unexpected_type_loc : loc -> env -> constr -> constr -> 'b -val error_occur_check : path_kind -> env -> int -> constr -> 'a - -val error_not_clean : path_kind -> env -> int -> constr -> 'a - - +val error_not_product_loc : loc -> env -> constr -> 'a |
