comparison src/mono_print.sml @ 1107:52571ca9b777

Eta-expand bodies of transaction functions in Monoization, to enable later optimization
author Adam Chlipala <adamc@hcoop.net>
date Thu, 31 Dec 2009 18:07:53 -0500
parents 72670131dace
children 7a31e0cf25e9
comparison
equal deleted inserted replaced
1106:c9137606733a 1107:52571ca9b777
204 | EField (e, x) => 204 | EField (e, x) =>
205 box [p_exp' true env e, 205 box [p_exp' true env e,
206 string ".", 206 string ".",
207 string x] 207 string x]
208 208
209 | ECase (e, pes, _) => parenIf true (box [string "case", 209 | ECase (e, pes, {result, ...}) => parenIf true (box [string "case",
210 space, 210 space,
211 p_exp env e, 211 p_exp env e,
212 space, 212 space,
213 string "of", 213 if !debug then
214 space, 214 box [string "return",
215 p_list_sep (box [space, string "|", space]) 215 space,
216 (fn (p, e) => box [p_pat env p, 216 p_typ env result,
217 space, 217 space]
218 string "=>", 218 else
219 space, 219 box [],
220 p_exp (E.patBinds env p) e]) pes]) 220 string "of",
221 space,
222 p_list_sep (box [space, string "|", space])
223 (fn (p, e) => box [p_pat env p,
224 space,
225 string "=>",
226 space,
227 p_exp (E.patBinds env p) e])
228 pes])
221 229
222 | EError (e, t) => box [string "(error", 230 | EError (e, t) => box [string "(error",
223 space, 231 space,
224 p_exp env e, 232 p_exp env e,
225 space, 233 space,