about summary refs log tree commit diff stats
path: root/070text.mu
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-03-21 02:53:34 -0700
committerKartik K. Agaram <vc@akkartik.com>2016-03-21 02:53:34 -0700
commitd57bf669c20f1936af8674d549bfb01c01f68f4f (patch)
tree0d10ba2f55f1d7725c193871900ffb3152564d66 /070text.mu
parentacc4792d2f7c787aad064876a1eb2d00bdf076b2 (diff)
downloadmu-d57bf669c20f1936af8674d549bfb01c01f68f4f.tar.gz
2804 - support stashing arrays
Now to extend 'stash' for arrays, just extend array-to-text-line instead
and perform the lookup inside it.
Diffstat (limited to '070text.mu')
-rw-r--r--070text.mu7
1 files changed, 7 insertions, 0 deletions
diff --git a/070text.mu b/070text.mu
index b69db18a..24317a59 100644
--- a/070text.mu
+++ b/070text.mu
@@ -8,6 +8,13 @@ def to-text-line x:_elem -> y:address:shared:array:character [
   y <- to-text x
 ]
 
+# variant for arrays (since we can't pass them around otherwise)
+def array-to-text-line x:address:shared:array:_elem -> y:address:shared:array:character [
+  local-scope
+  load-ingredients
+  y <- to-text *x
+]
+
 # to-text on text is just the identity function
 def to-text x:address:shared:array:character -> y:address:shared:array:character [
   local-scope