From 0ca56ed853c3d9bc8c26d1b014d8b665363fc2d0 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Thu, 15 Sep 2016 01:01:58 -0700 Subject: 3355 --- html/edit/011-errors.mu.html | 112 +++++++++++++++++++++---------------------- 1 file changed, 56 insertions(+), 56 deletions(-) (limited to 'html/edit/011-errors.mu.html') diff --git a/html/edit/011-errors.mu.html b/html/edit/011-errors.mu.html index b9f46f1b..6d0117bb 100644 --- a/html/edit/011-errors.mu.html +++ b/html/edit/011-errors.mu.html @@ -36,7 +36,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color ## handling malformed programs container programming-environment-data [ - recipe-errors:address:array:character + recipe-errors:text ] # copy code from recipe editor, persist, load into mu, save any errors @@ -44,9 +44,9 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color 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 { @@ -60,7 +60,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color 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 @@ -69,7 +69,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color 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 } @@ -102,21 +102,21 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color 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 } ] container sandbox-data [ - errors:address:array:character + errors:text ] 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 @@ -140,7 +140,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color # 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 @@ -152,12 +152,12 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color 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 ] @@ -192,9 +192,9 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color 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 @@ -216,9 +216,9 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color 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 @@ -243,9 +243,9 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color 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 ] @@ -278,14 +278,14 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color 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 ] @@ -326,12 +326,12 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color 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 @@ -385,12 +385,12 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color 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 ] @@ -411,12 +411,12 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color 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 ] @@ -438,14 +438,14 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color 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 ] @@ -470,15 +470,15 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color 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 ] @@ -505,13 +505,13 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color 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 ] @@ -551,10 +551,10 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color 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 @@ -614,10 +614,10 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color 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 @@ -645,14 +645,14 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color 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 @@ -676,7 +676,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color 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 @@ -684,8 +684,8 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color _, 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 -- cgit 1.4.1-2-gfad0