about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-09-17 00:10:28 -0700
committerKartik K. Agaram <vc@akkartik.com>2016-09-17 00:12:08 -0700
commitd559f68b2fbc35ca7fa42e2e50cf13663cfb8ba1 (patch)
treee63dc24d975b701ee96968d9135a1c2c31f88781
parent7c9def3c5a35c07afdc95b383d6ff85a7c16ef0b (diff)
downloadmu-d559f68b2fbc35ca7fa42e2e50cf13663cfb8ba1.tar.gz
3377
-rw-r--r--060rewrite_literal_string.cc4
-rw-r--r--063array.mu4
-rw-r--r--069hash.cc10
-rw-r--r--089scenario_filesystem.cc16
-rw-r--r--101run_sandboxed.cc50
-rw-r--r--lambda_to_mu.mu14
6 files changed, 49 insertions, 49 deletions
diff --git a/060rewrite_literal_string.cc b/060rewrite_literal_string.cc
index 92abeca3..64a2c5fb 100644
--- a/060rewrite_literal_string.cc
+++ b/060rewrite_literal_string.cc
@@ -4,7 +4,7 @@
 def main [
   1:number/raw <- foo [abc]
 ]
-def foo x:address:array:character -> n:number [
+def foo x:text -> n:number [
   local-scope
   load-ingredients
   n <- length *x
@@ -46,7 +46,7 @@ void rewrite_literal_string_to_text(recipe_ordinal r) {
         if (!is_literal_text(inst.ingredients.at(j))) continue;
         instruction def;
         ostringstream ingredient_name;
-        ingredient_name << inst.name << '_' << i << '_' << j << ":address:array:character";
+        ingredient_name << inst.name << '_' << i << '_' << j << ":text";
         def.name = "new";
         def.ingredients.push_back(inst.ingredients.at(j));
         def.products.push_back(reagent(ingredient_name.str()));
diff --git a/063array.mu b/063array.mu
index 8272a865..fcc1c153 100644
--- a/063array.mu
+++ b/063array.mu
@@ -1,7 +1,7 @@
 scenario array-from-args [
   run [
     local-scope
-    x:address:array:character <- new-array 0, 1, 2
+    x:text <- new-array 0, 1, 2
     10:array:character/raw <- copy *x
   ]
   memory-should-contain [
@@ -13,7 +13,7 @@ scenario array-from-args [
 ]
 
 # create an array out of a list of scalar args
-def new-array -> result:address:array:character [
+def new-array -> result:text [
   local-scope
   capacity:number <- copy 0
   {
diff --git a/069hash.cc b/069hash.cc
index 80fb8455..0b7f4386 100644
--- a/069hash.cc
+++ b/069hash.cc
@@ -210,8 +210,8 @@ def main [
   13:number <- copy 99
   2:number <- hash 10:array:number/unsafe
   return-unless 2:number
-  3:address:array:character <- new [abc]
-  4:number <- hash 3:address:array:character
+  3:text <- new [abc]
+  4:number <- hash 3:text
   return-unless 4:number
   5:boolean <- equal 2:number, 4:number
 ]
@@ -337,9 +337,9 @@ def main [
 
 :(scenario hash_matches_old_version)
 def main [
-  1:address:array:character <- new [abc]
-  2:number <- hash 1:address:array:character
-  3:number <- hash_old 1:address:array:character
+  1:text <- new [abc]
+  2:number <- hash 1:text
+  3:number <- hash_old 1:text
   4:boolean <- equal 2:number, 3:number
 ]
 +mem: storing 1 in location 4
diff --git a/089scenario_filesystem.cc b/089scenario_filesystem.cc
index f96b9f42..2b6f82a5 100644
--- a/089scenario_filesystem.cc
+++ b/089scenario_filesystem.cc
@@ -22,19 +22,19 @@ scenario assume-filesystem [
   ]
   data:address:array:file-mapping <- get *filesystem:address:filesystem, data:offset
   file1:file-mapping <- index *data, 0
-  file1-name:address:array:character <- get file1, name:offset
+  file1-name:text <- get file1, name:offset
   10:array:character/raw <- copy *file1-name
-  file1-contents:address:array:character <- get file1, contents:offset
+  file1-contents:text <- get file1, contents:offset
   100:array:character/raw <- copy *file1-contents
   file2:file-mapping <- index *data, 1
-  file2-name:address:array:character <- get file2, name:offset
+  file2-name:text <- get file2, name:offset
   30:array:character/raw <- copy *file2-name
-  file2-contents:address:array:character <- get file2, contents:offset
+  file2-contents:text <- get file2, contents:offset
   40:array:character/raw <- copy *file2-contents
   file3:file-mapping <- index *data, 2
-  file3-name:address:array:character <- get file3, name:offset
+  file3-name:text <- get file3, name:offset
   50:array:character/raw <- copy *file3-name
-  file3-contents:address:array:character <- get file3, contents:offset
+  file3-contents:text <- get file3, contents:offset
   60:array:character/raw <- copy *file3-contents
   memory-should-contain [
     10:array:character <- [a]
@@ -61,9 +61,9 @@ scenario assume-filesystem [
   ]
   data:address:array:file-mapping <- get *filesystem:address:filesystem, data:offset
   file1:file-mapping <- index *data, 0
-  file1-name:address:array:character <- get file1, name:offset
+  file1-name:text <- get file1, name:offset
   10:array:character/raw <- copy *file1-name
-  file1-contents:address:array:character <- get file1, contents:offset
+  file1-contents:text <- get file1, contents:offset
   20:array:character/raw <- copy *file1-contents
   memory-should-contain [
     10:array:character <- [a]
diff --git a/101run_sandboxed.cc b/101run_sandboxed.cc
index b1be48e0..3564218a 100644
--- a/101run_sandboxed.cc
+++ b/101run_sandboxed.cc
@@ -4,16 +4,16 @@
 :(scenario run_interactive_code)
 def main [
   1:number/raw <- copy 0
-  2:address:array:character <- new [1:number/raw <- copy 34]
-  run-sandboxed 2:address:array:character
+  2:text <- new [1:number/raw <- copy 34]
+  run-sandboxed 2:text
   3:number/raw <- copy 1:number/raw
 ]
 +mem: storing 34 in location 3
 
 :(scenario run_interactive_empty)
 def main [
-  1:address:array:character <- copy 0/unsafe
-  2:address:array:character <- run-sandboxed 1:address:array:character
+  1:text <- copy 0/unsafe
+  2:text <- run-sandboxed 1:text
 ]
 # result is null
 +mem: storing 0 in location 2
@@ -202,9 +202,9 @@ load(string(
   "stash instructions-run [instructions run]\n" +
   "sandbox-state:number <- routine-state routine-id\n" +
   "completed?:boolean <- equal sandbox-state, 1/completed\n" +
-  "output:address:array:character <- $most-recent-products\n" +
-  "errors:address:array:character <- save-errors\n" +
-  "stashes:address:array:character <- save-app-trace\n" +
+  "output:text <- $most-recent-products\n" +
+  "errors:text <- save-errors\n" +
+  "stashes:text <- save-app-trace\n" +
   "$cleanup-run-sandboxed\n" +
   "return output, errors, screen, stashes, completed?\n" +
 "]\n");
@@ -215,10 +215,10 @@ load(string(
 
 :(scenario run_interactive_comments)
 def main [
-  1:address:array:character <- new [# ab
+  1:text <- new [# ab
 add 2, 2]
-  2:address:array:character <- run-sandboxed 1:address:array:character
-  3:array:character <- copy *2:address:array:character
+  2:text <- run-sandboxed 1:text
+  3:array:character <- copy *2:text
 ]
 +mem: storing 52 in location 4
 
@@ -312,9 +312,9 @@ case _CLEANUP_RUN_SANDBOXED: {
 :(scenario "run_interactive_converts_result_to_text")
 def main [
   # try to interactively add 2 and 2
-  1:address:array:character <- new [add 2, 2]
-  2:address:array:character <- run-sandboxed 1:address:array:character
-  10:array:character <- copy 2:address:array:character/lookup
+  1:text <- new [add 2, 2]
+  2:text <- run-sandboxed 1:text
+  10:array:character <- copy 2:text/lookup
 ]
 # first letter in the output should be '4' in unicode
 +mem: storing 52 in location 11
@@ -322,13 +322,13 @@ def main [
 :(scenario "run_interactive_returns_text")
 def main [
   # try to interactively add 2 and 2
-  1:address:array:character <- new [
-    x:address:array:character <- new [a]
-    y:address:array:character <- new [b]
-    z:address:array:character <- append x:address:array:character, y:address:array:character
+  1:text <- new [
+    x:text <- new [a]
+    y:text <- new [b]
+    z:text <- append x:text, y:text
   ]
-  2:address:array:character <- run-sandboxed 1:address:array:character
-  10:array:character <- copy 2:address:array:character/lookup
+  2:text <- run-sandboxed 1:text
+  10:array:character <- copy 2:text/lookup
 ]
 # output contains "ab"
 +mem: storing 97 in location 11
@@ -337,10 +337,10 @@ def main [
 :(scenario "run_interactive_returns_errors")
 def main [
   # run a command that generates an error
-  1:address:array:character <- new [x:number <- copy 34
+  1:text <- new [x:number <- copy 34
 get x:number, foo:offset]
-  2:address:array:character, 3:address:array:character <- run-sandboxed 1:address:array:character
-  10:array:character <- copy 3:address:array:character/lookup
+  2:text, 3:text <- run-sandboxed 1:text
+  10:array:character <- copy 3:text/lookup
 ]
 # error should be "unknown element foo in container number"
 +mem: storing 117 in location 11
@@ -355,7 +355,7 @@ def main [
   1:address:array:number <- new [a:number <- copy 0  # abc
 b:number <- copy 0
 ]
-  2:address:array:character, 3:address:array:character <- run-sandboxed 1:address:array:character
+  2:text, 3:text <- run-sandboxed 1:text
 ]
 # no errors
 +mem: storing 0 in location 3
@@ -502,7 +502,7 @@ case RELOAD: {
 :(scenario reload_continues_past_error)
 def main [
   local-scope
-  x:address:array:character <- new [recipe foo [
+  x:text <- new [recipe foo [
   get 1234:number, foo:offset
 ]]
   reload x
@@ -514,7 +514,7 @@ def main [
 # define a container and try to create it (merge requires knowing container size)
 def main [
   local-scope
-  x:address:array:character <- new [
+  x:text <- new [
     container foo [
       x:number
       y:number
diff --git a/lambda_to_mu.mu b/lambda_to_mu.mu
index ed3cd72c..19fa7a1d 100644
--- a/lambda_to_mu.mu
+++ b/lambda_to_mu.mu
@@ -13,7 +13,7 @@ result <- add a t1]
   ]
 ]
 
-def lambda-to-mu in:address:array:character -> out:address:array:character [
+def lambda-to-mu in:text -> out:text [
   local-scope
   load-ingredients
   out <- copy 0
@@ -33,7 +33,7 @@ container pair [
   rest:address:cell
 ]
 
-def new-atom name:address:array:character -> result:address:cell [
+def new-atom name:text -> result:address:cell [
   local-scope
   load-ingredients
   result <- new cell:type
@@ -87,7 +87,7 @@ scenario pair-is-not-atom [
   ]
 ]
 
-def atom-match? x:address:cell, pat:address:array:character -> result:boolean [
+def atom-match? x:address:cell, pat:text -> result:boolean [
   local-scope
   load-ingredients
   s:text, is-atom?:boolean <- maybe-convert *x, atom:variant
@@ -167,7 +167,7 @@ scenario cell-operations-on-pair [
 
 ## convert lambda text to a tree of cells
 
-def parse in:address:array:character -> out:address:cell [
+def parse in:text -> out:address:cell [
   local-scope
   load-ingredients
   s:address:stream:character <- new-stream in
@@ -279,7 +279,7 @@ def skip-whitespace in:address:stream:character -> in:address:stream:character [
   }
 ]
 
-def to-text x:address:cell -> out:address:array:character [
+def to-text x:address:cell -> out:text [
   local-scope
   load-ingredients
   buf:address:buffer <- new-buffer 30
@@ -566,7 +566,7 @@ scenario parse-dotted-list-of-more-than-two-atoms [
 
 ## convert tree of cells to mu text
 
-def to-mu in:address:cell -> out:address:array:character [
+def to-mu in:address:cell -> out:text [
   local-scope
   load-ingredients
   buf:address:buffer <- new-buffer 30
@@ -574,7 +574,7 @@ def to-mu in:address:cell -> out:address:array:character [
   out <- buffer-to-array buf
 ]
 
-def to-mu in:address:cell, buf:address:buffer -> buf:address:buffer, result-name:address:array:character [
+def to-mu in:address:cell, buf:address:buffer -> buf:address:buffer, result-name:text [
   local-scope
   load-ingredients
   # null cell? no change.