diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-02-01 00:15:43 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-02-01 00:15:43 -0800 |
commit | 7d2c2d55e83325a5efb66af0a033b94583fca70e (patch) | |
tree | 0bade19ad9230f2aa6076440548b50456c9f6fd8 /channel.mu | |
parent | 48a74397fb1a967fffa67ffb80005d94ed2ac60c (diff) | |
download | mu-7d2c2d55e83325a5efb66af0a033b94583fca70e.tar.gz |
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.
Diffstat (limited to 'channel.mu')
-rw-r--r-- | channel.mu | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/channel.mu b/channel.mu index 88055398..61151833 100644 --- a/channel.mu +++ b/channel.mu @@ -8,9 +8,9 @@ (done?:boolean <- less-than n:integer 5:literal) (break-unless done?:boolean) ; other threads might get between these prints - (print-primitive-to-host (("produce: " literal))) + ($print (("produce: " literal))) (print-integer nil:literal/terminal n:integer) - (print-primitive-to-host (("\n" literal))) + ($print (("\n" literal))) ; 'box' n into a dynamically typed 'tagged value' because that's what ; channels take (n2:integer <- copy n:integer) @@ -31,9 +31,9 @@ ; unbox the tagged value into an integer (n2:integer <- maybe-coerce x:tagged-value integer:literal) ; other threads might get between these prints - (print-primitive-to-host (("consume: " literal))) + ($print (("consume: " literal))) (print-integer nil:literal/terminal n2:integer) - (print-primitive-to-host (("\n" literal))) + ($print (("\n" literal))) (loop) } ]) |