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 ")"])])); |