support current_goals_markers ref variable for print_current_goals;
authorwenzelm
Thu, 22 Oct 1998 20:07:42 +0200
changeset 5729 5d66410cceae
parent 5728 1d1175ef2d56
child 5730 82a7aa74a631
support current_goals_markers ref variable for print_current_goals;
src/Pure/goals.ML
src/Pure/locale.ML
--- a/src/Pure/goals.ML	Thu Oct 22 12:35:40 1998 +0200
+++ b/src/Pure/goals.ML	Thu Oct 22 20:07:42 1998 +0200
@@ -42,6 +42,7 @@
   val goal		: theory -> string -> thm list
   val goalw		: theory -> thm list -> string -> thm list
   val goalw_cterm	: thm list -> cterm -> thm list
+  val current_goals_markers: (string * string * string) ref
   val print_current_goals_default: (int -> int -> thm -> unit)
   val print_current_goals_fn : (int -> int -> thm -> unit) ref
   val pop_proof		: unit -> thm list
@@ -271,8 +272,15 @@
 
 
 (*Print goals of current level*)
+val current_goals_markers = ref ("", "", "");
+
 fun print_current_goals_default n max th =
-  (writeln ("Level " ^ string_of_int n); print_goals max th);
+  let val ref (begin_state, end_state, begin_goal) = current_goals_markers in
+    writeln begin_state;
+    writeln ("Level " ^ string_of_int n);
+    Locale.print_goals_marker begin_goal max th;
+    writeln end_state
+  end;
 
 val print_current_goals_fn = ref print_current_goals_default;
 
--- a/src/Pure/locale.ML	Thu Oct 22 12:35:40 1998 +0200
+++ b/src/Pure/locale.ML	Thu Oct 22 20:07:42 1998 +0200
@@ -19,6 +19,7 @@
 sig
   val print_locales: theory -> unit
   val print_goals: int -> thm -> unit
+  val print_goals_marker: string -> int -> thm -> unit
 end;
 
 signature LOCALE =
@@ -476,7 +477,7 @@
 
 in
 
-  fun print_goals maxgoals state =
+  fun print_goals_marker begin_goal maxgoals state =
     let
       val {sign, ...} = rep_thm state;
 
@@ -505,7 +506,7 @@
 
       fun print_subgoals (_, []) = ()
         | print_subgoals (n, A :: As) = (Pretty.writeln (Pretty.blk (0,
-            [Pretty.str (" " ^ string_of_int n ^ ". "), prt_term A]));
+            [Pretty.str (begin_goal ^ " " ^ string_of_int n ^ ". "), prt_term A]));
               print_subgoals (n + 1, As));
 
       val print_ffpairs =
@@ -540,6 +541,8 @@
      (! show_types orelse ! show_sorts, ! show_sorts)
   end;
 
+  val print_goals = print_goals_marker "";
+
 end;