From 7d2c2d55e83325a5efb66af0a033b94583fca70e Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sun, 1 Feb 2015 00:15:43 -0800 Subject: 690 - convention: '$' commands for debugging only Swap printing generalized objects using arc's infrastructure to be the $-prefixed debug helper, while the erstwhile $print-key-to-host becomes the primitive print-character to host. --- repl.mu | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'repl.mu') diff --git a/repl.mu b/repl.mu index 6d223f19..3cb3cd16 100644 --- a/repl.mu +++ b/repl.mu @@ -10,9 +10,9 @@ (x:tagged-value in:channel-address/deref <- read in:channel-address) (c:character <- maybe-coerce x:tagged-value character:literal) (assert c:character "read-expression: non-character in stdin") -;? (print-primitive-to-host (("key: " literal))) ;? 1 -;? (print-primitive-to-host c:character) ;? 2 -;? (print-primitive-to-host (("$\n" literal))) ;? 2 +;? ($print (("key: " literal))) ;? 1 +;? ($print c:character) ;? 2 +;? ($print (("$\n" literal))) ;? 2 (result:buffer-address <- append result:buffer-address c:character) ; parse comment { begin @@ -43,7 +43,7 @@ { begin (newline?:boolean <- equal c:character ((#\newline literal))) (break-unless newline?:boolean) -;? (print-primitive-to-host (("AAA" literal))) ;? 1 +;? ($print (("AAA" literal))) ;? 1 (end-expression?:boolean <- lesser-or-equal open-parens:integer 0:literal) (break-if end-expression?:boolean 2:blocks) } @@ -52,7 +52,7 @@ ; don't return if there's no non-whitespace in result (loop) } -;? (print-primitive-to-host (("BAA" literal))) ;? 1 +;? ($print (("BAA" literal))) ;? 1 (s:string-address <- get result:buffer-address/deref data:offset) (reply s:string-address) ]) @@ -93,7 +93,7 @@ (buffered-stdin:channel-address <- init-channel 1:literal) (fork-helper buffer-stdin:fn nil:literal/globals nil:literal/limit stdin:channel-address buffered-stdin:channel-address) { begin - (print-primitive-to-host (("anarki> " literal))) + ($print (("anarki> " literal))) (s:string-address <- read-expression buffered-stdin:channel-address) (retro-mode) ; print errors cleanly (t:string-address <- $eval s:string-address) -- cgit 1.4.1-2-gfad0