about summary refs log tree commit diff stats
path: root/edit/011-errors.mu
diff options
context:
space:
mode:
Diffstat (limited to 'edit/011-errors.mu')
-rw-r--r--edit/011-errors.mu108
1 files changed, 54 insertions, 54 deletions
diff --git a/edit/011-errors.mu b/edit/011-errors.mu
index 774aedb1..6498d9a5 100644
--- a/edit/011-errors.mu
+++ b/edit/011-errors.mu
@@ -9,9 +9,9 @@ def! update-recipes env:address:programming-environment-data, screen:address:scr
   local-scope
   load-ingredients
   recipes:address:editor-data <- get *env, recipes:offset
-  in:address:array:character <- editor-contents recipes
+  in:text <- editor-contents recipes
   save [recipes.mu], in
-  recipe-errors:address:array:character <- reload in
+  recipe-errors:text <- reload in
   *env <- put *env, recipe-errors:offset, recipe-errors
   # if recipe editor has errors, stop
   {
@@ -25,7 +25,7 @@ def! update-recipes env:address:programming-environment-data, screen:address:scr
 
 before <render-components-end> [
   trace 11, [app], [render status]
-  recipe-errors:address:array:character <- get *env, recipe-errors:offset
+  recipe-errors:text <- get *env, recipe-errors:offset
   {
     break-unless recipe-errors
     update-status screen, [errors found     ], 1/red
@@ -34,7 +34,7 @@ before <render-components-end> [
 
 before <render-recipe-components-end> [
   {
-    recipe-errors:address:array:character <- get *env, recipe-errors:offset
+    recipe-errors:text <- get *env, recipe-errors:offset
     break-unless recipe-errors
     row, screen <- render-text screen, recipe-errors, left, right, 1/red, row
   }
@@ -67,8 +67,8 @@ before <render-components-end> [
     error-index:number <- get *env, error-index:offset
     sandboxes-completed-successfully?:boolean <- equal error-index, -1
     break-if sandboxes-completed-successfully?
-    error-index-text:address:array:character <- to-text error-index
-    status:address:array:character <- interpolate [errors found (_)    ], error-index-text
+    error-index-text:text <- to-text error-index
+    status:text <- interpolate [errors found (_)    ], error-index-text
     update-status screen, status, 1/red
   }
 ]
@@ -80,8 +80,8 @@ container sandbox-data [
 def! update-sandbox sandbox:address:sandbox-data, env:address:programming-environment-data, idx:number -> sandbox:address:sandbox-data, env:address:programming-environment-data [
   local-scope
   load-ingredients
-  data:address:array:character <- get *sandbox, data:offset
-  response:address:array:character, errors:address:array:character, fake-screen:address:screen, trace:address:array:character, completed?:boolean <- run-sandboxed data
+  data:text <- get *sandbox, data:offset
+  response:text, errors:text, fake-screen:address:screen, trace:text, completed?:boolean <- run-sandboxed data
   *sandbox <- put *sandbox, response:offset, response
   *sandbox <- put *sandbox, errors:offset, errors
   *sandbox <- put *sandbox, screen:offset, fake-screen
@@ -105,7 +105,7 @@ def! update-sandbox sandbox:address:sandbox-data, env:address:programming-enviro
 # make sure we render any trace
 after <render-sandbox-trace-done> [
   {
-    sandbox-errors:address:array:character <- get *sandbox, errors:offset
+    sandbox-errors:text <- get *sandbox, errors:offset
     break-unless sandbox-errors
     *sandbox <- put *sandbox, response-starting-row-on-screen:offset, 0  # no response
     row, screen <- render-text screen, sandbox-errors, left, right, 1/red, row
@@ -117,12 +117,12 @@ after <render-sandbox-trace-done> [
 scenario run-shows-errors-in-get [
   trace-until 100/app  # trace too long
   assume-screen 100/width, 15/height
-  1:address:array:character <- new [ 
+  1:text <- new [ 
 recipe foo [
   get 123:number, foo:offset
 ]]
-  2:address:array:character <- new [foo]
-  3:address:programming-environment-data <- new-programming-environment screen:address:screen, 1:address:array:character, 2:address:array:character
+  2:text <- new [foo]
+  3:address:programming-environment-data <- new-programming-environment screen:address:screen, 1:text, 2:text
   assume-console [
     press F4
   ]
@@ -157,9 +157,9 @@ recipe foo [
 scenario run-updates-status-with-first-erroneous-sandbox [
   trace-until 100/app  # trace too long
   assume-screen 100/width, 15/height
-  1:address:array:character <- new []
-  2:address:array:character <- new []
-  3:address:programming-environment-data <- new-programming-environment screen:address:screen, 1:address:array:character, 2:address:array:character
+  1:text <- new []
+  2:text <- new []
+  3:address:programming-environment-data <- new-programming-environment screen:address:screen, 1:text, 2:text
   assume-console [
     left-click 3, 80
     # create invalid sandbox 1
@@ -181,9 +181,9 @@ scenario run-updates-status-with-first-erroneous-sandbox [
 scenario run-updates-status-with-first-erroneous-sandbox-2 [
   trace-until 100/app  # trace too long
   assume-screen 100/width, 15/height
-  1:address:array:character <- new []
-  2:address:array:character <- new []
-  3:address:programming-environment-data <- new-programming-environment screen:address:screen, 1:address:array:character, 2:address:array:character
+  1:text <- new []
+  2:text <- new []
+  3:address:programming-environment-data <- new-programming-environment screen:address:screen, 1:text, 2:text
   assume-console [
     left-click 3, 80
     # create invalid sandbox 2
@@ -208,9 +208,9 @@ scenario run-updates-status-with-first-erroneous-sandbox-2 [
 scenario run-hides-errors-from-past-sandboxes [
   trace-until 100/app  # trace too long
   assume-screen 100/width, 15/height
-  1:address:array:character <- new []
-  2:address:array:character <- new [get foo, x:offset]  # invalid
-  3:address:programming-environment-data <- new-programming-environment screen:address:screen, 1:address:array:character, 2:address:array:character
+  1:text <- new []
+  2:text <- new [get foo, x:offset]  # invalid
+  3:address:programming-environment-data <- new-programming-environment screen:address:screen, 1:text, 2:text
   assume-console [
     press F4  # generate error
   ]
@@ -243,14 +243,14 @@ scenario run-updates-errors-for-shape-shifting-recipes [
   trace-until 100/app  # trace too long
   assume-screen 100/width, 15/height
   # define a shape-shifting recipe with an error
-  1:address:array:character <- new [recipe foo x:_elem -> z:_elem [
+  1:text <- new [recipe foo x:_elem -> z:_elem [
 local-scope
 load-ingredients
 y:address:number <- copy 0
 z <- add x, y
 ]]
-  2:address:array:character <- new [foo 2]
-  3:address:programming-environment-data <- new-programming-environment screen:address:screen, 1:address:array:character, 2:address:array:character
+  2:text <- new [foo 2]
+  3:address:programming-environment-data <- new-programming-environment screen:address:screen, 1:text, 2:text
   assume-console [
     press F4
   ]
@@ -291,12 +291,12 @@ scenario run-avoids-spurious-errors-on-reloading-shape-shifting-recipes [
   trace-until 100/app  # trace too long
   assume-screen 100/width, 15/height
   # overload a well-known shape-shifting recipe
-  1:address:array:character <- new [recipe length l:address:list:_elem -> n:number [
+  1:text <- new [recipe length l:address:list:_elem -> n:number [
 ]]
   # call code that uses other variants of it, but not it itself
-  2:address:array:character <- new [x:address:list:number <- copy 0
+  2:text <- new [x:address:list:number <- copy 0
 to-text x]
-  3:address:programming-environment-data <- new-programming-environment screen:address:screen, 1:address:array:character, 2:address:array:character
+  3:address:programming-environment-data <- new-programming-environment screen:address:screen, 1:text, 2:text
   # run it once
   assume-console [
     press F4
@@ -350,12 +350,12 @@ to-text x]
 scenario run-shows-missing-type-errors [
   trace-until 100/app  # trace too long
   assume-screen 100/width, 15/height
-  1:address:array:character <- new [ 
+  1:text <- new [ 
 recipe foo [
   x <- copy 0
 ]]
-  2:address:array:character <- new [foo]
-  3:address:programming-environment-data <- new-programming-environment screen:address:screen, 1:address:array:character, 2:address:array:character
+  2:text <- new [foo]
+  3:address:programming-environment-data <- new-programming-environment screen:address:screen, 1:text, 2:text
   assume-console [
     press F4
   ]
@@ -376,12 +376,12 @@ scenario run-shows-unbalanced-bracket-errors [
   trace-until 100/app  # trace too long
   assume-screen 100/width, 15/height
   # recipe is incomplete (unbalanced '[')
-  1:address:array:character <- new [ 
+  1:text <- new [ 
 recipe foo \\[
   x <- copy 0
 ]
-  2:address:array:character <- new [foo]
-  3:address:programming-environment-data <- new-programming-environment screen:address:screen, 1:address:array:character, 2:address:array:character
+  2:text <- new [foo]
+  3:address:programming-environment-data <- new-programming-environment screen:address:screen, 1:text, 2:text
   assume-console [
     press F4
   ]
@@ -403,14 +403,14 @@ recipe foo \\[
 scenario run-shows-get-on-non-container-errors [
   trace-until 100/app  # trace too long
   assume-screen 100/width, 15/height
-  1:address:array:character <- new [ 
+  1:text <- new [ 
 recipe foo [
   local-scope
   x:address:point <- new point:type
   get x:address:point, 1:offset
 ]]
-  2:address:array:character <- new [foo]
-  3:address:programming-environment-data <- new-programming-environment screen:address:screen, 1:address:array:character, 2:address:array:character
+  2:text <- new [foo]
+  3:address:programming-environment-data <- new-programming-environment screen:address:screen, 1:text, 2:text
   assume-console [
     press F4
   ]
@@ -435,15 +435,15 @@ recipe foo [
 scenario run-shows-non-literal-get-argument-errors [
   trace-until 100/app  # trace too long
   assume-screen 100/width, 15/height
-  1:address:array:character <- new [ 
+  1:text <- new [ 
 recipe foo [
   local-scope
   x:number <- copy 0
   y:address:point <- new point:type
   get *y:address:point, x:number
 ]]
-  2:address:array:character <- new [foo]
-  3:address:programming-environment-data <- new-programming-environment screen:address:screen, 1:address:array:character, 2:address:array:character
+  2:text <- new [foo]
+  3:address:programming-environment-data <- new-programming-environment screen:address:screen, 1:text, 2:text
   assume-console [
     press F4
   ]
@@ -470,13 +470,13 @@ scenario run-shows-errors-everytime [
   trace-until 100/app  # trace too long
   # try to run a file with an error
   assume-screen 100/width, 15/height
-  1:address:array:character <- new [ 
+  1:text <- new [ 
 recipe foo [
   local-scope
   x:number <- copy y:number
 ]]
-  2:address:array:character <- new [foo]
-  3:address:programming-environment-data <- new-programming-environment screen:address:screen, 1:address:array:character, 2:address:array:character
+  2:text <- new [foo]
+  3:address:programming-environment-data <- new-programming-environment screen:address:screen, 1:text, 2:text
   assume-console [
     press F4
   ]
@@ -516,10 +516,10 @@ scenario run-instruction-and-print-errors [
   trace-until 100/app  # trace too long
   assume-screen 100/width, 10/height
   # left editor is empty
-  1:address:array:character <- new []
+  1:text <- new []
   # right editor contains an illegal instruction
-  2:address:array:character <- new [get 1234:number, foo:offset]
-  3:address:programming-environment-data <- new-programming-environment screen:address:screen, 1:address:array:character, 2:address:array:character
+  2:text <- new [get 1234:number, foo:offset]
+  3:address:programming-environment-data <- new-programming-environment screen:address:screen, 1:text, 2:text
   # run the code in the editors
   assume-console [
     press F4
@@ -579,10 +579,10 @@ scenario run-instruction-and-print-errors-only-once [
   trace-until 100/app  # trace too long
   assume-screen 100/width, 10/height
   # left editor is empty
-  1:address:array:character <- new []
+  1:text <- new []
   # right editor contains an illegal instruction
-  2:address:array:character <- new [get 1234:number, foo:offset]
-  3:address:programming-environment-data <- new-programming-environment screen:address:screen, 1:address:array:character, 2:address:array:character
+  2:text <- new [get 1234:number, foo:offset]
+  3:address:programming-environment-data <- new-programming-environment screen:address:screen, 1:text, 2:text
   # run the code in the editors multiple times
   assume-console [
     press F4
@@ -610,14 +610,14 @@ scenario sandbox-can-handle-infinite-loop [
   trace-until 100/app  # trace too long
   assume-screen 100/width, 20/height
   # left editor is empty
-  1:address:array:character <- new [recipe foo [
+  1:text <- new [recipe foo [
   {
     loop
   }
 ]]
   # right editor contains an instruction
-  2:address:array:character <- new [foo]
-  3:address:programming-environment-data <- new-programming-environment screen:address:screen, 1:address:array:character, 2:address:array:character
+  2:text <- new [foo]
+  3:address:programming-environment-data <- new-programming-environment screen:address:screen, 1:text, 2:text
   # run the sandbox
   assume-console [
     press F4
@@ -641,7 +641,7 @@ scenario sandbox-with-errors-shows-trace [
   trace-until 100/app  # trace too long
   assume-screen 100/width, 10/height
   # generate a stash and a error
-  1:address:array:character <- new [recipe foo [
+  1:text <- new [recipe foo [
 local-scope
 a:number <- next-ingredient
 b:number <- next-ingredient
@@ -649,8 +649,8 @@ stash [dividing by], b
 _, c:number <- divide-with-remainder a, b
 reply b
 ]]
-  2:address:array:character <- new [foo 4, 0]
-  3:address:programming-environment-data <- new-programming-environment screen:address:screen, 1:address:array:character, 2:address:array:character
+  2:text <- new [foo 4, 0]
+  3:address:programming-environment-data <- new-programming-environment screen:address:screen, 1:text, 2:text
   # run
   assume-console [
     press F4