src/Pure/tctical.ML
changeset 5957 9c0c69ab7d02
parent 5956 ab4d13e9e77a
child 5997 4d00bbd3d3ac
equal deleted inserted replaced
5956:ab4d13e9e77a 5957:9c0c69ab7d02
   196     (fn st => 
   196     (fn st => 
   197      (print_goals (!goals_limit) st; Seq.single st));
   197      (print_goals (!goals_limit) st; Seq.single st));
   198 
   198 
   199 (*Pause until a line is typed -- if non-empty then fail. *)
   199 (*Pause until a line is typed -- if non-empty then fail. *)
   200 fun pause_tac st =  
   200 fun pause_tac st =  
   201   (writeln "** Press RETURN to continue: ";
   201   (writeln "** Press RETURN to continue:";
   202    if TextIO.inputLine TextIO.stdIn = "\n" then Seq.single st
   202    if TextIO.inputLine TextIO.stdIn = "\n" then Seq.single st
   203    else (writeln "Goodbye";  Seq.empty));
   203    else (writeln "Goodbye";  Seq.empty));
   204 
   204 
   205 exception TRACE_EXIT of thm
   205 exception TRACE_EXIT of thm
   206 and TRACE_QUIT;
   206 and TRACE_QUIT;
   230 
   230 
   231 (*Extract from a tactic, a thm->thm seq function that handles tracing*)
   231 (*Extract from a tactic, a thm->thm seq function that handles tracing*)
   232 fun tracify flag tac st =
   232 fun tracify flag tac st =
   233   if !flag andalso not (!suppress_tracing)
   233   if !flag andalso not (!suppress_tracing)
   234            then (print_goals (!goals_limit) st;
   234            then (print_goals (!goals_limit) st;
   235                  writeln "** Press RETURN to continue: ";
   235                  writeln "** Press RETURN to continue:";
   236                  exec_trace_command flag (tac,st))
   236                  exec_trace_command flag (tac,st))
   237   else tac st;
   237   else tac st;
   238 
   238 
   239 (*Create a tactic whose outcome is given by seqf, handling TRACE_EXIT*)
   239 (*Create a tactic whose outcome is given by seqf, handling TRACE_EXIT*)
   240 fun traced_tac seqf st = 
   240 fun traced_tac seqf st =