--- a/src/Pure/Isar/isar_cmd.ML Sat Mar 30 11:43:17 2013 +0100
+++ b/src/Pure/Isar/isar_cmd.ML Sat Mar 30 12:13:39 2013 +0100
@@ -394,7 +394,7 @@
|> Pretty.chunks2 |> Pretty.string_of;
fun string_of_thms ctxt args =
- Pretty.string_of (Display.pretty_thms ctxt (Attrib.eval_thms ctxt args));
+ Pretty.string_of (Proof_Context.pretty_fact ctxt ("", Attrib.eval_thms ctxt args));
fun string_of_prfs full state arg =
Pretty.string_of
--- a/src/Pure/Isar/proof_context.ML Sat Mar 30 11:43:17 2013 +0100
+++ b/src/Pure/Isar/proof_context.ML Sat Mar 30 12:13:39 2013 +0100
@@ -342,11 +342,16 @@
fun pretty_fact_name ctxt a =
Pretty.block [Pretty.mark_str (markup_fact ctxt a, extern_fact ctxt a), Pretty.str ":"];
-fun pretty_fact ctxt ("", ths) = Display.pretty_thms ctxt ths
- | pretty_fact ctxt (a, [th]) = Pretty.block
- [pretty_fact_name ctxt a, Pretty.brk 1, Display.pretty_thm ctxt th]
- | pretty_fact ctxt (a, ths) = Pretty.block
- (Pretty.fbreaks (pretty_fact_name ctxt a :: map (Display.pretty_thm ctxt) ths));
+fun pretty_fact ctxt =
+ let
+ val pretty_thm = Display.pretty_thm ctxt;
+ val pretty_thms = map (Pretty.item o single o pretty_thm);
+ in
+ fn ("", [th]) => pretty_thm th
+ | ("", ths) => Pretty.blk (0, Pretty.fbreaks (pretty_thms ths))
+ | (a, [th]) => Pretty.block [pretty_fact_name ctxt a, Pretty.brk 1, pretty_thm th]
+ | (a, ths) => Pretty.block (Pretty.fbreaks (pretty_fact_name ctxt a :: pretty_thms ths))
+ end;
--- a/src/Pure/display.ML Sat Mar 30 11:43:17 2013 +0100
+++ b/src/Pure/display.ML Sat Mar 30 12:13:39 2013 +0100
@@ -25,7 +25,6 @@
val string_of_thm: Proof.context -> thm -> string
val string_of_thm_global: theory -> thm -> string
val string_of_thm_without_context: thm -> string
- val pretty_thms: Proof.context -> thm list -> Pretty.T
val pretty_full_theory: bool -> theory -> Pretty.T list
end;
@@ -91,12 +90,6 @@
val string_of_thm_without_context = Pretty.string_of o pretty_thm_without_context;
-(* multiple theorems *)
-
-fun pretty_thms ctxt [th] = pretty_thm ctxt th
- | pretty_thms ctxt ths = Pretty.blk (0, Pretty.fbreaks (map (pretty_thm ctxt) ths));
-
-
(** print theory **)