src/Pure/Isar/proof_display.ML
changeset 59184 830bb7ddb3ab
parent 57605 8e0a7eaffe47
child 60924 610794dff23c
equal deleted inserted replaced
59183:ec83638b6bfb 59184:830bb7ddb3ab
   146 in
   146 in
   147 
   147 
   148 fun print_results do_print pos ctxt ((kind, name), facts) =
   148 fun print_results do_print pos ctxt ((kind, name), facts) =
   149   if not do_print orelse kind = "" then ()
   149   if not do_print orelse kind = "" then ()
   150   else if name = "" then
   150   else if name = "" then
   151     (Pretty.writeln o Pretty.mark Markup.state)
   151     (Output.state o Pretty.string_of)
   152       (Pretty.block (position_markup pos (Pretty.keyword1 kind) :: Pretty.brk 1 ::
   152       (Pretty.block (position_markup pos (Pretty.keyword1 kind) :: Pretty.brk 1 ::
   153         pretty_facts ctxt facts))
   153         pretty_facts ctxt facts))
   154   else
   154   else
   155     (Pretty.writeln o Pretty.mark Markup.state)
   155     (Output.state o Pretty.string_of)
   156       (case facts of
   156       (case facts of
   157         [fact] => Pretty.blk (1, [pretty_fact_name pos (kind, name), Pretty.fbrk,
   157         [fact] => Pretty.blk (1, [pretty_fact_name pos (kind, name), Pretty.fbrk,
   158           Proof_Context.pretty_fact ctxt fact])
   158           Proof_Context.pretty_fact ctxt fact])
   159       | _ => Pretty.blk (1, [pretty_fact_name pos (kind, name), Pretty.fbrk,
   159       | _ => Pretty.blk (1, [pretty_fact_name pos (kind, name), Pretty.fbrk,
   160           Pretty.blk (1, Pretty.str "(" :: pretty_facts ctxt facts @ [Pretty.str ")"])]));
   160           Pretty.blk (1, Pretty.str "(" :: pretty_facts ctxt facts @ [Pretty.str ")"])]));
   180 
   180 
   181 in
   181 in
   182 
   182 
   183 fun print_consts do_print pos ctxt pred cs =
   183 fun print_consts do_print pos ctxt pred cs =
   184   if not do_print orelse null cs then ()
   184   if not do_print orelse null cs then ()
   185   else Pretty.writeln (Pretty.mark Markup.state (pretty_consts pos ctxt pred cs));
   185   else Output.state (Pretty.string_of (pretty_consts pos ctxt pred cs));
   186 
   186 
   187 end;
   187 end;
   188 
   188 
   189 end;
   189 end;