about summary refs log tree commit diff stats
path: root/mu.arc.t
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2014-10-10 20:26:06 -0700
committerKartik K. Agaram <vc@akkartik.com>2014-10-10 20:26:06 -0700
commit3861662698abb144b65478237d7a932180dfb710 (patch)
tree17b2ff211781a041b5980730d574654f5a434dc8 /mu.arc.t
parent526d5d3f13fa57c6a5658f119cdf43757f40eebe (diff)
downloadmu-3861662698abb144b65478237d7a932180dfb710.tar.gz
128
Diffstat (limited to 'mu.arc.t')
-rw-r--r--mu.arc.t10
1 files changed, 3 insertions, 7 deletions
diff --git a/mu.arc.t b/mu.arc.t
index bff33bf8..ee32202d 100644
--- a/mu.arc.t
+++ b/mu.arc.t
@@ -599,21 +599,17 @@
 ; dynamically typed values, which save type information in memory rather than
 ; in the code to use them. This will let us do things like create heterogenous
 ; lists containing both integers and strings.
-;
-; Open question: should maybe-coerce to type integer return an integer or
-; integer-address on success? Given that types and their addresses have no
-; systematic relation, we should probably be more explicit.
 
 (reset)
 (new-trace "tagged-value")
 (add-fns
   '((test1
-      ((1 type) <- copy (integer literal))
+      ((1 type) <- copy (integer-address literal))
       ((2 integer-address) <- copy (3 literal))
-      ((3 integer-address) (4 boolean) <- maybe-coerce (1 tagged-value) (integer literal)))))
+      ((3 integer-address) (4 boolean) <- maybe-coerce (1 tagged-value) (integer-address literal)))))
 (run 'test1)
 ;? (prn memory*)
-(if (~iso memory* (obj 1 'integer  2 3  3 3  4 t))
+(if (~iso memory* (obj 1 'integer-address  2 3  3 3  4 t))
   (prn "F - 'maybe-coerce' copies value only if type tag matches"))
 
 ; Just like the table of types is centralized, functions are conceptualized as