comparison src/cjr_print.sml @ 106:d101cb1efe55

More with attributes and efficient serialization
author Adam Chlipala <adamc@hcoop.net>
date Thu, 10 Jul 2008 15:49:14 -0400
parents 5f04adf47f48
children 813e5a52063d
comparison
equal deleted inserted replaced
105:da760c34f5ed 106:d101cb1efe55
144 144
145 | EWrite e => box [string "(lw_write(", 145 | EWrite e => box [string "(lw_write(",
146 p_exp env e, 146 p_exp env e,
147 string "), lw_unit_v)"] 147 string "), lw_unit_v)"]
148 148
149 | ESeq (e1, e2) => box [string "(",
150 p_exp env e1,
151 string ",",
152 space,
153 p_exp env e2,
154 string ")"]
155
149 and p_exp env = p_exp' false env 156 and p_exp env = p_exp' false env
150 157
151 fun p_decl env ((d, _) : decl) = 158 fun p_decl env ((d, _) : decl) =
152 case d of 159 case d of
153 DStruct (n, xts) => 160 DStruct (n, xts) =>
175 string ";"] 182 string ";"]
176 | DFun (n, x, dom, ran, e) => 183 | DFun (n, x, dom, ran, e) =>
177 let 184 let
178 val env' = E.pushERel env x dom 185 val env' = E.pushERel env x dom
179 in 186 in
180 box [p_typ env ran, 187 box [string "static",
188 space,
189 p_typ env ran,
181 space, 190 space,
182 string ("__lwc_" ^ Int.toString n), 191 string ("__lwc_" ^ Int.toString n),
183 string "(", 192 string "(",
184 p_typ env dom, 193 p_typ env dom,
185 space, 194 space,