aboutsummaryrefslogtreecommitdiff
path: root/kernel/type_errors.mli
diff options
context:
space:
mode:
authorfilliatr1999-08-26 09:58:19 +0000
committerfilliatr1999-08-26 09:58:19 +0000
commitd410804226ddeb15ab05af5298502ef29efbd0d8 (patch)
tree98ad9f8c69d3d1ead1547e173fd071a23bf2deb3 /kernel/type_errors.mli
parentab00c680d097bb067f135b0ab149b224db0787a7 (diff)
- abstraction
- univers fonctionnels - erreurs de typage maintenant sous forme d'exception, déclarées dans Type_errors git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@24 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'kernel/type_errors.mli')
-rw-r--r--kernel/type_errors.mli71
1 files changed, 71 insertions, 0 deletions
diff --git a/kernel/type_errors.mli b/kernel/type_errors.mli
new file mode 100644
index 0000000000..cec8b78184
--- /dev/null
+++ b/kernel/type_errors.mli
@@ -0,0 +1,71 @@
+
+(* $Id$ *)
+
+open Pp
+open Names
+open Term
+open Sign
+open Environ
+
+(* Type errors. *)
+
+type type_error =
+ | UnboundRel of int
+ | CantExecute of constr
+ | NotAType of constr
+ | BadAssumption of constr
+ | ReferenceVariables of identifier
+ | ElimArity of constr * constr list * constr * constr * constr
+ * (constr * constr * string) option
+ | CaseNotInductive of constr * constr
+ | NumberBranches of constr * constr * int
+ | IllFormedBranch of constr * int * constr * constr
+ | Generalization of (name * typed_type) * constr
+ | ActualType of unsafe_judgment * unsafe_judgment
+ | CantAply of string * unsafe_judgment * unsafe_judgment list
+ | IllFormedRecBody of std_ppcmds * name list * int * constr array
+ | IllTypedRecBody of int * name list * unsafe_judgment array
+ * typed_type array
+
+exception TypeError of path_kind * environment * type_error
+
+val error_unbound_rel : path_kind -> 'a unsafe_env -> int -> 'b
+
+val error_cant_execute : path_kind -> 'a unsafe_env -> constr -> 'b
+
+val error_not_type : path_kind -> 'a unsafe_env -> constr -> 'b
+
+val error_assumption : path_kind -> 'a unsafe_env -> constr -> 'b
+
+val error_reference_variables : path_kind -> 'a unsafe_env -> identifier -> 'b
+
+val error_elim_arity :
+ path_kind -> 'a unsafe_env -> constr -> constr list -> constr
+ -> constr -> constr -> (constr * constr * string) option -> 'b
+
+val error_case_not_inductive :
+ path_kind -> 'a unsafe_env -> constr -> constr -> 'b
+
+val error_number_branches :
+ path_kind -> 'a unsafe_env -> constr -> constr -> int -> 'b
+
+val error_ill_formed_branch :
+ path_kind -> 'a unsafe_env -> constr -> int -> constr -> constr -> 'b
+
+val error_generalization :
+ path_kind -> 'a unsafe_env -> name * typed_type -> constr -> 'b
+
+val error_actual_type :
+ path_kind -> 'a unsafe_env -> unsafe_judgment -> unsafe_judgment -> 'b
+
+val error_cant_apply :
+ path_kind -> 'a unsafe_env -> string -> unsafe_judgment
+ -> unsafe_judgment list -> 'b
+
+val error_ill_formed_rec_body :
+ path_kind -> 'a unsafe_env -> std_ppcmds
+ -> name list -> int -> constr array -> 'b
+
+val error_ill_typed_rec_body :
+ path_kind -> 'a unsafe_env -> int -> name list -> unsafe_judgment array
+ -> typed_type array -> 'b