setmp_thread_data: do nothing if Output.debugging;
authorwenzelm
Wed, 14 May 2008 14:43:38 +0200
changeset 26890 f9ec18f7c0f6
parent 26889 ccea41fb5c39
child 26891 bfa1944e5238
setmp_thread_data: do nothing if Output.debugging;
src/Pure/General/position.ML
--- a/src/Pure/General/position.ML	Wed May 14 14:43:37 2008 +0200
+++ b/src/Pure/General/position.ML	Wed May 14 14:43:38 2008 +0200
@@ -102,7 +102,10 @@
 local val tag = Universal.tag () : T Universal.tag in
 
 fun thread_data () = the_default none (Multithreading.get_data tag);
-fun setmp_thread_data pos = Library.setmp_thread_data tag (thread_data ()) pos;
+
+fun setmp_thread_data pos f x =
+  if ! Output.debugging then f x
+  else Library.setmp_thread_data tag (thread_data ()) pos f x;
 
 fun setmp_thread_data_seq pos f seq =
   setmp_thread_data pos f seq |> Seq.wrap (fn pull => setmp_thread_data pos pull ());