about summary refs log tree commit diff stats
path: root/mu.arc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-03-09 21:26:13 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-03-09 21:26:13 -0700
commitab67ac1354e82b4843c9b68df05bfb65f67f54d0 (patch)
treead9f374f3c02e1d7092d60a39cd70b25f95a3d4a /mu.arc
parentf9e9a6f86ae432cdc7a7389468771d1704b71a64 (diff)
downloadmu-ab67ac1354e82b4843c9b68df05bfb65f67f54d0.tar.gz
879 - debug prints shouldn't mess up interactive runs
Diffstat (limited to 'mu.arc')
-rw-r--r--mu.arc31
1 files changed, 18 insertions, 13 deletions
diff --git a/mu.arc b/mu.arc
index ee59472b..2328197c 100644
--- a/mu.arc
+++ b/mu.arc
@@ -848,19 +848,19 @@
 ;?                        (write (m arg.0))  (pr " => ")  (prn (type (m arg.0)))
                        (if (no ($.current-charterm))
                          (pr (m arg.0))
-                         (caselet x (m arg.0)
-                           ; todo: test these exceptions
-                           #\newline
-                             (pr "\r\n")
-                           #\backspace
-                             ; backspace doesn't clear after moving the cursor
-                             (pr "\b \b")
-                           ctrl-c
-                             (do ($.close-charterm)
-                                 (die "interrupted"))
-                           ;else
-                             (pr x)))
-                       )
+                         (unless disable-debug-prints-in-console-mode*
+                           (caselet x (m arg.0)
+                             #\newline
+                               (pr "\r\n")
+                             #\backspace
+                               ; backspace doesn't clear after moving the cursor
+                               (pr "\b \b")
+                             ctrl-c
+                               (do ($.close-charterm)
+                                   (die "interrupted"))
+                             ;else
+                               (pr x)))
+                          ))
                 $eval
                   (new-string:repr:eval:read:to-arc-string (m arg.0))
 ;?                   (let x (to-arc-string (m arg.0)) ;? 1
@@ -1753,6 +1753,11 @@
   (= scheduler-switch-table* nil)
   )
 
+(= disable-debug-prints-in-console-mode* nil)
+(def test-only-settings ()
+  (set allow-raw-addresses*)
+  (set disable-debug-prints-in-console-mode*))
+
 (def routine-that-ran (f)
   (find [some [is f _!fn-name] stack._]
         completed-routines*))