84d4317eeaea1758430fe682d6cece5a3a5c07b3
[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_not_a_function of {id : Sym.t; pos : Pos.t}
11 | Wrong_type_of_expression_in_var_dec of
12 { var_id : Sym.t
13 ; expected : Typ.t
14 ; given : Typ.t
15 ; pos : Pos.t
16 }
17 | Wrong_type_used_as_record of
18 { ty_id : Sym.t
19 ; ty : Typ.t
20 ; pos : Pos.t
21 }
22 | Wrong_type_of_field_value of
23 { field_id : Sym.t
24 ; expected : Typ.t
25 ; given : Typ.t
26 ; pos : Pos.t
27 }
28 | Wrong_type_of_arg of
29 { func : Sym.t
30 ; expected : Typ.t
31 ; given : Typ.t
32 ; pos : Pos.t
33 }
34 | Wrong_number_of_args of
35 { func : Sym.t
36 ; expected : int
37 ; given : int
38 ; pos : Pos.t
39 }
40 | Invalid_operand_type of
41 { oper : Abs.oper
42 ; valid : string list
43 ; given : Typ.t
44 ; pos : Pos.t
45 }
46 | Different_operand_types of
47 { oper : Abs.oper
48 ; left : Typ.t
49 ; right : Typ.t
50 ; pos : Pos.t
51 }
52
53 exception T of t
54
55 val raise : t -> 'a
56
57 val to_string : t -> string
58
59 val is_unknown_id : t -> bool
This page took 0.045604 seconds and 3 git commands to generate.