92fde5d73cea5983388984c29240981224bf7f3f
[tiger.ml.git] / compiler / src / lib / tiger / tiger_error.mli
1 module Abs = Tiger_absyn
2 module Pos = Tiger_position
3 module Sym = Tiger_symbol
4 module Typ = Tiger_env_type
5
6 type t =
7 | Invalid_syntax of Pos.t
8 | Unknown_id of {id : Sym.t; pos : Pos.t}
9 | Unknown_type of {ty_id : Sym.t; pos : Pos.t}
10 | Id_is_a_function of {id : Sym.t; pos : Pos.t}
11 | Id_not_a_function of {id : Sym.t; pos : Pos.t}
12 | No_such_field_in_record of {field : Sym.t; record : Typ.t; pos : Pos.t}
13 | Exp_not_a_record of {ty : Typ.t; pos : Pos.t}
14 | Exp_not_an_array of {ty : Typ.t; pos : Pos.t}
15 | Wrong_type of
16 { expected : Typ.t
17 ; given : Typ.t
18 ; pos : Pos.t
19 }
20 | Wrong_type_of_expression_in_var_dec of
21 { var_id : Sym.t
22 ; expected : Typ.t
23 ; given : Typ.t
24 ; pos : Pos.t
25 }
26 | Wrong_type_used_as_record of
27 { ty_id : Sym.t
28 ; ty : Typ.t
29 ; pos : Pos.t
30 }
31 | Wrong_type_of_field_value of
32 { field_id : Sym.t
33 ; expected : Typ.t
34 ; given : Typ.t
35 ; pos : Pos.t
36 }
37 | Wrong_type_of_arg of
38 { func : Sym.t
39 ; expected : Typ.t
40 ; given : Typ.t
41 ; pos : Pos.t
42 }
43 | Wrong_number_of_args of
44 { func : Sym.t
45 ; expected : int
46 ; given : int
47 ; pos : Pos.t
48 }
49 | Invalid_operand_type of
50 { oper : Abs.oper
51 ; valid : string list
52 ; given : Typ.t
53 ; pos : Pos.t
54 }
55 | Different_operand_types of
56 { oper : Abs.oper
57 ; left : Typ.t
58 ; right : Typ.t
59 ; pos : Pos.t
60 }
61
62 exception T of t
63
64 val raise : t -> 'a
65
66 val to_string : t -> string
67
68 val is_unknown_id : t -> bool
This page took 0.0456 seconds and 3 git commands to generate.