Fix - check number of arguments in function calls
[tiger.ml.git] / compiler / src / lib / tiger / tiger_error.mli
index 81a87e8..9090ad4 100644 (file)
@@ -11,6 +11,7 @@ type t =
   | Id_not_a_function of {id    : Sym.t; pos : Pos.t}
   | No_such_field_in_record of {field : Sym.t; record : Typ.t; pos : Pos.t}
   | Exp_not_a_record  of {ty    : Typ.t; pos : Pos.t}
+  | Exp_not_an_array  of {ty    : Typ.t; pos : Pos.t}
   | Wrong_type of
       { expected : Typ.t
       ; given    : Typ.t
@@ -27,6 +28,11 @@ type t =
       ; ty       : Typ.t
       ; pos      : Pos.t
       }
+  | Wrong_type_used_as_array of
+      { ty_id    : Sym.t
+      ; ty       : Typ.t
+      ; pos      : Pos.t
+      }
   | Wrong_type_of_field_value of
       { field_id : Sym.t
       ; expected : Typ.t
@@ -64,4 +70,11 @@ val raise : t -> 'a
 
 val to_string : t -> string
 
-val is_unknown_id : t -> bool
+val is_unknown_id   : t -> bool
+val is_unknown_type : t -> bool
+val is_wrong_type   : t -> bool
+val is_wrong_number_of_args : t -> bool
+val is_invalid_syntax : t -> bool
+val is_not_a_record : t -> bool
+val is_not_an_array : t -> bool
+val is_no_such_field_in_record : t -> bool
This page took 0.024916 seconds and 4 git commands to generate.