comparison src/mono_print.sml @ 1199:c316ca3c9ec6

Pushing policies through
author Adam Chlipala <adamc@hcoop.net>
date Sun, 04 Apr 2010 12:29:34 -0400
parents 7a31e0cf25e9
children 648e6b087dfb
comparison
equal deleted inserted replaced
1197:6d8e3dcb9713 1199:c316ca3c9ec6
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 PolQuery e => box [string "query",
418 space,
419 p_exp env e]
420
415 fun p_decl env (dAll as (d, _) : decl) = 421 fun p_decl env (dAll as (d, _) : decl) =
416 case d of 422 case d of
417 DDatatype x => box [string "datatype", 423 DDatatype x => box [string "datatype",
418 space, 424 space,
419 p_list_sep (box [space, string "and", space]) (p_datatype (E.declBinds env dAll)) x] 425 p_list_sep (box [space, string "and", space]) (p_datatype (E.declBinds env dAll)) x]
504 p_exp env e1, 510 p_exp env e1,
505 space, 511 space,
506 string "=", 512 string "=",
507 space, 513 space,
508 p_exp env e2] 514 p_exp env e2]
515 | DPolicy p => box [string "policy",
516 space,
517 p_policy env p]
509 518
510 519
511 fun p_file env file = 520 fun p_file env file =
512 let 521 let
513 val (pds, _) = ListUtil.foldlMap (fn (d, env) => 522 val (pds, _) = ListUtil.foldlMap (fn (d, env) =>