X-Git-Url: https://git.xandkar.net/?p=tiger.ml.git;a=blobdiff_plain;f=compiler%2Fsrc%2Flib%2Ftiger%2Ftiger_env_type.mli;h=faeb84ac037afc40673cd8d28bab3693a7ad2892;hp=825750c218fff6d765d9a37689a42e90dfe120db;hb=523e2b063b9ba20329af61e18dc9a5ccbaca06a0;hpb=1e835a256b232c01f8af88f78782829764353f70 diff --git a/compiler/src/lib/tiger/tiger_env_type.mli b/compiler/src/lib/tiger/tiger_env_type.mli index 825750c..faeb84a 100644 --- a/compiler/src/lib/tiger/tiger_env_type.mli +++ b/compiler/src/lib/tiger/tiger_env_type.mli @@ -7,13 +7,15 @@ type t = | String | Record of { unique : unique - ; fields : (Tiger_symbol.t * t) list + ; fields : record_fields } | Array of { unique : unique ; ty : t } | Name of Tiger_symbol.t * t option ref +and record_fields = + (Tiger_symbol.t * t) list type env = (Tiger_symbol.t, t ) Tiger_map.t @@ -21,11 +23,16 @@ type env = val built_in : env val is_equal : t -> t -> bool -val is_record : t -> bool + val is_int : t -> bool +val is_string : t -> bool +val is_array : t -> bool +val is_record : t -> bool val is_name : t -> bool -val new_record : (Tiger_symbol.t * t) list -> t +val if_record : t -> f:(record_fields -> 'a) -> otherwise:(unit -> 'a) -> 'a + +val new_record : record_fields -> t val new_array : t -> t val to_string : t -> string