Test for semantic errors
[tiger.ml.git] / compiler / src / lib / tiger / tiger_error.mli
1 type t =
2 | Invalid_syntax of Tiger_position.t
3 | Unknown_id of {id : Tiger_symbol.t; pos : Tiger_position.t}
4 | Unknown_type of {ty_id : Tiger_symbol.t; pos : Tiger_position.t}
5 | Id_not_a_function of {id : Tiger_symbol.t; pos : Tiger_position.t}
6 | Wrong_type_of_expression_in_var_dec of
7 { var_id : Tiger_symbol.t
8 ; expected : Tiger_env_type.t
9 ; given : Tiger_env_type.t
10 ; pos : Tiger_position.t
11 }
12 | Wrong_type_used_as_record of
13 { ty_id : Tiger_symbol.t
14 ; ty : Tiger_env_type.t
15 ; pos : Tiger_position.t
16 }
17 | Wrong_type_of_field_value of
18 { field_id : Tiger_symbol.t
19 ; expected : Tiger_env_type.t
20 ; given : Tiger_env_type.t
21 ; pos : Tiger_position.t
22 }
23 | Wrong_type_of_arg of
24 { func : Tiger_symbol.t
25 ; expected : Tiger_env_type.t
26 ; given : Tiger_env_type.t
27 ; pos : Tiger_position.t
28 }
29 | Wrong_number_of_args of
30 { func : Tiger_symbol.t
31 ; expected : int
32 ; given : int
33 ; pos : Tiger_position.t
34 }
35 | Invalid_operand_type of
36 { oper : Tiger_absyn.oper
37 ; valid : string list
38 ; given : Tiger_env_type.t
39 ; pos : Tiger_position.t
40 }
41 | Different_operand_types of
42 { oper : Tiger_absyn.oper
43 ; left : Tiger_env_type.t
44 ; right : Tiger_env_type.t
45 ; pos : Tiger_position.t
46 }
47
48 exception T of t
49
50 val raise : t -> 'a
51
52 val to_string : t -> string
53
54 val is_unknown_id : t -> bool
This page took 0.075027 seconds and 4 git commands to generate.