comparison src/mono_print.sml @ 1254:935a981f4380

Merge
author Adam Chlipala <adamc@hcoop.net>
date Thu, 06 May 2010 13:57:01 -0400
parents a2cd6664f57f
children 3d06e0f7a6f3
comparison
equal deleted inserted replaced
1198:b52929351402 1254:935a981f4380
410 | (x, _, SOME t) => box [if !debug then (string (x ^ "__" ^ Int.toString n)) 410 | (x, _, SOME t) => box [if !debug then (string (x ^ "__" ^ Int.toString n))
411 else string x, space, string "of", space, p_typ env t]) 411 else string x, space, string "of", space, p_typ env t])
412 cons] 412 cons]
413 end 413 end
414 414
415 fun p_policy env pol =
416 case pol of
417 PolClient e => box [string "sendClient",
418 space,
419 p_exp env e]
420 | PolInsert e => box [string "mayInsert",
421 space,
422 p_exp env e]
423 | PolDelete e => box [string "mayDelete",
424 space,
425 p_exp env e]
426 | PolUpdate e => box [string "mayUpdate",
427 space,
428 p_exp env e]
429 | PolSequence e => box [string "sendOwnIds",
430 space,
431 p_exp env e]
432
415 fun p_decl env (dAll as (d, _) : decl) = 433 fun p_decl env (dAll as (d, _) : decl) =
416 case d of 434 case d of
417 DDatatype x => box [string "datatype", 435 DDatatype x => box [string "datatype",
418 space, 436 space,
419 p_list_sep (box [space, string "and", space]) (p_datatype (E.declBinds env dAll)) x] 437 p_list_sep (box [space, string "and", space]) (p_datatype (E.declBinds env dAll)) x]
504 p_exp env e1, 522 p_exp env e1,
505 space, 523 space,
506 string "=", 524 string "=",
507 space, 525 space,
508 p_exp env e2] 526 p_exp env e2]
527 | DPolicy p => box [string "policy",
528 space,
529 p_policy env p]
509 530
510 531
511 fun p_file env file = 532 fun p_file env file =
512 let 533 let
513 val (pds, _) = ListUtil.foldlMap (fn (d, env) => 534 val (pds, _) = ListUtil.foldlMap (fn (d, env) =>