Switch Type.unique implementation from ref to Symbol
[tiger.ml.git] / compiler / src / lib / tiger / tiger_env_type.mli
... / ...
CommitLineData
1module Sym = Tiger_symbol
2
3type unique
4
5type t =
6 | Unit
7 | Nil
8 | Int
9 | String
10 | Record of
11 { unique : unique
12 ; fields : record_fields
13 }
14 | Array of
15 { unique : unique
16 ; ty : t
17 }
18 | Name of Sym.t * t option ref
19and record_fields =
20 (Sym.t * t) list
21
22type env =
23 (Sym.t, t ) Tiger_map.t
24
25val built_in : env
26
27val is_equal : t -> t -> bool
28
29val is_int : t -> bool
30val is_string : t -> bool
31val is_array : t -> bool
32val is_record : t -> bool
33val is_name : t -> bool
34
35val if_record : t -> f:(record_fields -> 'a) -> otherwise:(unit -> 'a) -> 'a
36val if_array : t -> f:(t -> 'a) -> otherwise:(unit -> 'a) -> 'a
37
38val new_record : name:Sym.t -> fields:record_fields -> t
39val new_array : name:Sym.t -> ty:t -> t
40
41val to_string : t -> string
This page took 0.018407 seconds and 4 git commands to generate.