Escape newline in strings
[tiger.ml.git] / compiler / src / lib / tiger / tiger_env.ml
1 module Map = Tiger_map
2 module Type = Tiger_env_type
3 module Value = Tiger_env_value
4
5 type t =
6 { typs : Type.env
7 ; vals : Value.env
8 }
9
10 let base =
11 { typs = Type.built_in
12 ; vals = Value.built_in
13 }
14
15 let get_typ {typs; _} k =
16 Map.get typs ~k
17
18 let get_val {vals; _} k =
19 Map.get vals ~k
20
21 let set_typ t k v =
22 {t with typs = Map.set t.typs ~k ~v}
23
24 let set_val t k v =
25 {t with vals = Map.set t.vals ~k ~v}
This page took 0.071052 seconds and 4 git commands to generate.