comparison src/cjrize.sml @ 102:5f04adf47f48

Writing HTML
author Adam Chlipala <adamc@hcoop.net>
date Thu, 10 Jul 2008 14:02:54 -0400
parents 717b6f8d8505
children d101cb1efe55
comparison
equal deleted inserted replaced
101:717b6f8d8505 102:5f04adf47f48
44 val compare = FlatUtil.Typ.compare 44 val compare = FlatUtil.Typ.compare
45 end) 45 end)
46 46
47 type t = int * int FM.map * (int * (string * L'.typ) list) list 47 type t = int * int FM.map * (int * (string * L'.typ) list) list
48 48
49 val empty = (0, FM.empty, []) 49 val empty : t = (1, FM.insert (FM.empty, (L.TRecord [], ErrorMsg.dummySpan), 0), [])
50 50
51 fun find ((n, m, ds), xts, xts') = 51 fun find ((n, m, ds), xts, xts') =
52 let 52 let
53 val t = (L.TRecord xts, ErrorMsg.dummySpan) 53 val t = (L.TRecord xts, ErrorMsg.dummySpan)
54 in 54 in
154 end) 154 end)
155 sm xes 155 sm xes
156 val (e, sm) = cifyExp (e, sm) 156 val (e, sm) = cifyExp (e, sm)
157 in 157 in
158 ((L'.ELet (xes, e), loc), sm) 158 ((L'.ELet (xes, e), loc), sm)
159 end
160
161 | L.EStrcat _ => raise Fail "Cjrize EStrcat"
162
163 | L.EWrite e =>
164 let
165 val (e, sm) = cifyExp (e, sm)
166 in
167 ((L'.EWrite e, loc), sm)
159 end 168 end
160 169
161 fun cifyDecl ((d, loc), sm) = 170 fun cifyDecl ((d, loc), sm) =
162 case d of 171 case d of
163 L.DVal (x, n, t, e) => 172 L.DVal (x, n, t, e) =>