X-Git-Url: https://git.xandkar.net/?a=blobdiff_plain;f=compiler%2Fsrc%2Flib%2Ftiger%2Ftiger_env_type.mli;fp=compiler%2Fsrc%2Flib%2Ftiger%2Ftiger_env_type.mli;h=825750c218fff6d765d9a37689a42e90dfe120db;hb=c0bdf964d389a2b9465fad44aa1f1f849c72140f;hp=0000000000000000000000000000000000000000;hpb=b762cacb0f9df0b034bb75e67c4b64151e338e92;p=tiger.ml.git diff --git a/compiler/src/lib/tiger/tiger_env_type.mli b/compiler/src/lib/tiger/tiger_env_type.mli new file mode 100644 index 0000000..825750c --- /dev/null +++ b/compiler/src/lib/tiger/tiger_env_type.mli @@ -0,0 +1,31 @@ +type unique + +type t = + | Unit + | Nil + | Int + | String + | Record of + { unique : unique + ; fields : (Tiger_symbol.t * t) list + } + | Array of + { unique : unique + ; ty : t + } + | Name of Tiger_symbol.t * t option ref + +type env = + (Tiger_symbol.t, t ) Tiger_map.t + +val built_in : env + +val is_equal : t -> t -> bool +val is_record : t -> bool +val is_int : t -> bool +val is_name : t -> bool + +val new_record : (Tiger_symbol.t * t) list -> t +val new_array : t -> t + +val to_string : t -> string