aboutsummaryrefslogtreecommitdiffhomepage
path: root/pretyping/pretype_errors.mli
blob: 7d93dbb1801f6da802c7f9065fad2b63da0d6223 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69

(*i $Id$ i*)

(*i*)
open Pp
open Names
open Term
open Sign
open Environ
open Type_errors
open Rawterm
(*i*)

(*s The type of errors raised by the pretyper *)

val error_var_not_found_loc :
  loc -> path_kind -> identifier -> 'a

val error_global_not_found_loc :
  loc -> qualid -> 'a

val error_cant_find_case_type_loc : 
  loc -> env -> constr -> 'a

val error_ill_formed_branch_loc : 
  loc -> path_kind -> env -> constr -> int -> constr -> constr -> 'b

val error_actual_type_loc :
  loc -> env -> constr -> constr -> constr -> 'b

val error_cant_apply_not_functional_loc : 
  loc -> env -> unsafe_judgment -> unsafe_judgment list -> 'b

val error_cant_apply_bad_type_loc : 
  loc -> env -> int * constr * constr -> 
      unsafe_judgment -> unsafe_judgment list -> 'b

val error_number_branches_loc : 
  loc -> path_kind -> env -> constr -> constr -> int -> 'b

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

val error_bad_constructor_loc : 
  loc -> path_kind -> constructor -> inductive -> 'b

val error_wrong_numarg_constructor_loc : 
  loc -> path_kind -> constructor_path -> int -> 'b

val error_wrong_predicate_arity_loc :
  loc -> path_kind -> env -> constr -> int -> int -> 'b

val error_needs_inversion : path_kind -> env -> constr -> constr -> 'a


(*s Implicit arguments synthesis errors *)

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