comparison src/source_print.sml @ 2009:799be3911ce3

Monadic bind supports patterns
author Adam Chlipala <adam@chlipala.net>
date Fri, 02 May 2014 17:16:02 -0400
parents d6b0ee53dc93
children 403f0cc65b9c
comparison
equal deleted inserted replaced
2008:93ff76058825 2009:799be3911ce3
275 p_exp e]) 275 p_exp e])
276 | EDisjointApp e => parenIf par (box [p_exp e, 276 | EDisjointApp e => parenIf par (box [p_exp e,
277 space, 277 space,
278 string "!"]) 278 string "!"])
279 279
280 | ERecord xes => box [string "{", 280 | ERecord (xes, flex) => box [string "{",
281 p_list (fn (x, e) => 281 p_list (fn (x, e) =>
282 box [p_name x, 282 box [p_name x,
283 space, 283 space,
284 string "=", 284 string "=",
285 space, 285 space,
286 p_exp e]) xes, 286 p_exp e]) xes,
287 string "}"] 287 if flex then
288 box [string ",",
289 space,
290 string "..."]
291 else
292 box [],
293 string "}"]
288 | EField (e, c) => box [p_exp' true e, 294 | EField (e, c) => box [p_exp' true e,
289 string ".", 295 string ".",
290 p_con' true c] 296 p_con' true c]
291 | EConcat (e1, e2) => parenIf par (box [p_exp' true e1, 297 | EConcat (e1, e2) => parenIf par (box [p_exp' true e1,
292 space, 298 space,