Commit | Line | Data |
---|---|---|
b9b456cc SK |
1 | module Abs = Tiger_absyn |
2 | module Pos = Tiger_position | |
3 | module Sym = Tiger_symbol | |
4 | module Typ = Tiger_env_type | |
5 | ||
c16dd441 | 6 | type t = |
b9b456cc SK |
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} | |
523e2b06 | 10 | | Id_is_a_function of {id : Sym.t; pos : Pos.t} |
b9b456cc | 11 | | Id_not_a_function of {id : Sym.t; pos : Pos.t} |
523e2b06 SK |
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} | |
161a300d | 14 | | Exp_not_an_array of {ty : Typ.t; pos : Pos.t} |
523e2b06 SK |
15 | | Wrong_type of |
16 | { expected : Typ.t | |
17 | ; given : Typ.t | |
18 | ; pos : Pos.t | |
19 | } | |
c16dd441 | 20 | | Wrong_type_of_expression_in_var_dec of |
b9b456cc SK |
21 | { var_id : Sym.t |
22 | ; expected : Typ.t | |
23 | ; given : Typ.t | |
24 | ; pos : Pos.t | |
c16dd441 SK |
25 | } |
26 | | Wrong_type_used_as_record of | |
b9b456cc SK |
27 | { ty_id : Sym.t |
28 | ; ty : Typ.t | |
29 | ; pos : Pos.t | |
c16dd441 SK |
30 | } |
31 | | Wrong_type_of_field_value of | |
b9b456cc SK |
32 | { field_id : Sym.t |
33 | ; expected : Typ.t | |
34 | ; given : Typ.t | |
35 | ; pos : Pos.t | |
c16dd441 SK |
36 | } |
37 | | Wrong_type_of_arg of | |
b9b456cc SK |
38 | { func : Sym.t |
39 | ; expected : Typ.t | |
40 | ; given : Typ.t | |
41 | ; pos : Pos.t | |
c16dd441 SK |
42 | } |
43 | | Wrong_number_of_args of | |
b9b456cc | 44 | { func : Sym.t |
c16dd441 SK |
45 | ; expected : int |
46 | ; given : int | |
b9b456cc | 47 | ; pos : Pos.t |
c16dd441 SK |
48 | } |
49 | | Invalid_operand_type of | |
b9b456cc | 50 | { oper : Abs.oper |
c16dd441 | 51 | ; valid : string list |
b9b456cc SK |
52 | ; given : Typ.t |
53 | ; pos : Pos.t | |
c16dd441 SK |
54 | } |
55 | | Different_operand_types of | |
b9b456cc SK |
56 | { oper : Abs.oper |
57 | ; left : Typ.t | |
58 | ; right : Typ.t | |
59 | ; pos : Pos.t | |
c16dd441 | 60 | } |
7c14a966 | 61 | |
c16dd441 SK |
62 | exception T of t |
63 | ||
64 | val raise : t -> 'a | |
65 | ||
66 | val to_string : t -> string | |
5da420a8 SK |
67 | |
68 | val is_unknown_id : t -> bool |