Abandon -classic-display
[tiger.ml.git] / compiler / src / lib / tiger / tiger_error.mli
CommitLineData
b9b456cc
SK
1module Abs = Tiger_absyn
2module Pos = Tiger_position
3module Sym = Tiger_symbol
4module Typ = Tiger_env_type
5
c16dd441 6type 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}
10 | Id_not_a_function of {id : Sym.t; pos : Pos.t}
c16dd441 11 | Wrong_type_of_expression_in_var_dec of
b9b456cc
SK
12 { var_id : Sym.t
13 ; expected : Typ.t
14 ; given : Typ.t
15 ; pos : Pos.t
c16dd441
SK
16 }
17 | Wrong_type_used_as_record of
b9b456cc
SK
18 { ty_id : Sym.t
19 ; ty : Typ.t
20 ; pos : Pos.t
c16dd441
SK
21 }
22 | Wrong_type_of_field_value of
b9b456cc
SK
23 { field_id : Sym.t
24 ; expected : Typ.t
25 ; given : Typ.t
26 ; pos : Pos.t
c16dd441
SK
27 }
28 | Wrong_type_of_arg of
b9b456cc
SK
29 { func : Sym.t
30 ; expected : Typ.t
31 ; given : Typ.t
32 ; pos : Pos.t
c16dd441
SK
33 }
34 | Wrong_number_of_args of
b9b456cc 35 { func : Sym.t
c16dd441
SK
36 ; expected : int
37 ; given : int
b9b456cc 38 ; pos : Pos.t
c16dd441
SK
39 }
40 | Invalid_operand_type of
b9b456cc 41 { oper : Abs.oper
c16dd441 42 ; valid : string list
b9b456cc
SK
43 ; given : Typ.t
44 ; pos : Pos.t
c16dd441
SK
45 }
46 | Different_operand_types of
b9b456cc
SK
47 { oper : Abs.oper
48 ; left : Typ.t
49 ; right : Typ.t
50 ; pos : Pos.t
c16dd441 51 }
7c14a966 52
c16dd441
SK
53exception T of t
54
55val raise : t -> 'a
56
57val to_string : t -> string
5da420a8
SK
58
59val is_unknown_id : t -> bool
This page took 0.035044 seconds and 4 git commands to generate.