about summary refs log tree commit diff stats
path: root/sandbox
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-10-05 18:40:51 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-10-05 18:40:51 -0700
commitd135851ef94bf15f258b779098404ef6adac92b6 (patch)
tree486b24923abc700b3ff2e41d6f9a1220c31e79d7 /sandbox
parent745e8bdd7ad66ebfb0a282f820c93d3a544b2afe (diff)
downloadmu-d135851ef94bf15f258b779098404ef6adac92b6.tar.gz
2247 - type-check products of non-primitive recipes
We still can't check ingredient types, and even this is still a run-time
check. We'll need to start tracking recipe signatures at some point.

I've had to introduce a hack called /skiptypecheck. Time to get generics
working.
Diffstat (limited to 'sandbox')
-rw-r--r--sandbox/005-sandbox.mu4
-rw-r--r--sandbox/006-sandbox-edit.mu6
-rw-r--r--sandbox/011-editor-undo.mu18
3 files changed, 14 insertions, 14 deletions
diff --git a/sandbox/005-sandbox.mu b/sandbox/005-sandbox.mu
index b4a6b013..a06f3076 100644
--- a/sandbox/005-sandbox.mu
+++ b/sandbox/005-sandbox.mu
@@ -391,7 +391,7 @@ scenario run-instruction-manages-screen-per-sandbox [
   $close-trace  # trace too long
   assume-screen 50/width, 20/height
   # editor contains an instruction
-  1:address:array:character <- new [print-integer screen:address, 4]
+  1:address:array:character <- new [print-integer screen, 4]
   2:address:programming-environment-data <- new-programming-environment screen:address, 1:address:array:character
   # run the code in the editor
   assume-console [
@@ -406,7 +406,7 @@ scenario run-instruction-manages-screen-per-sandbox [
     .                                                  .
     .━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━.
     .                                                 x.
-    .print-integer screen:address, 4                   .
+    .print-integer screen, 4                           .
     .screen:                                           .
     .  .4                             .                .
     .  .                              .                .
diff --git a/sandbox/006-sandbox-edit.mu b/sandbox/006-sandbox-edit.mu
index 15872675..5a628f3a 100644
--- a/sandbox/006-sandbox-edit.mu
+++ b/sandbox/006-sandbox-edit.mu
@@ -128,7 +128,7 @@ scenario sandbox-with-print-can-be-edited [
   $close-trace  # trace too long
   assume-screen 50/width, 20/height
   # run a print instruction
-  1:address:array:character <- new [print-integer screen:address, 4]
+  1:address:array:character <- new [print-integer screen, 4]
   2:address:programming-environment-data <- new-programming-environment screen:address, 1:address:array:character
   # run the sandbox
   assume-console [
@@ -142,7 +142,7 @@ scenario sandbox-with-print-can-be-edited [
     .                                                  .
     .━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━.
     .                                                 x.
-    .print-integer screen:address, 4                   .
+    .print-integer screen, 4                           .
     .screen:                                           .
     .  .4                             .                .
     .  .                              .                .
@@ -168,7 +168,7 @@ scenario sandbox-with-print-can-be-edited [
   ]
   screen-should-contain [
     .                               run (F4)           .
-    .print-integer screen:address, 4                   .
+    .print-integer screen, 4                           .
     .━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━.
     .                                                  .
     .                                                  .
diff --git a/sandbox/011-editor-undo.mu b/sandbox/011-editor-undo.mu
index 217cbd20..fe44110f 100644
--- a/sandbox/011-editor-undo.mu
+++ b/sandbox/011-editor-undo.mu
@@ -67,10 +67,10 @@ after <handle-special-character> [
     break-unless undo?
     undo:address:address:list <- get-address *editor, undo:offset
     break-unless *undo
-    op:address:operation <- first *undo
+    op:address:operation/skiptypecheck <- first *undo
     *undo <- rest *undo
     redo:address:address:list <- get-address *editor, redo:offset
-    *redo <- push op, *redo
+    *redo/skiptypecheck <- push op, *redo
     <handle-undo>
     reply screen/same-as-ingredient:0, editor/same-as-ingredient:1, 1/go-render
   }
@@ -83,10 +83,10 @@ after <handle-special-character> [
     break-unless redo?
     redo:address:address:list <- get-address *editor, redo:offset
     break-unless *redo
-    op:address:operation <- first *redo
+    op:address:operation/skiptypecheck <- first *redo
     *redo <- rest *redo
     undo:address:address:list <- get-address *editor, undo:offset
-    *undo <- push op, *undo
+    *undo/skiptypecheck <- push op, *undo
     <handle-redo>
     reply screen/same-as-ingredient:0, editor/same-as-ingredient:1, 1/go-render
   }
@@ -144,7 +144,7 @@ before <insert-character-end> [
   {
     # if previous operation was an insert, coalesce this operation with it
     break-unless *undo
-    op:address:operation <- first *undo
+    op:address:operation/skiptypecheck <- first *undo
     typing:address:insert-operation <- maybe-convert *op, typing:variant
     break-unless typing
     previous-coalesce-tag:number <- get *typing, tag:offset
@@ -194,7 +194,7 @@ recipe add-operation [
   editor:address:editor-data <- next-ingredient
   op:address:operation <- next-ingredient
   undo:address:address:list:address:operation <- get-address *editor, undo:offset
-  *undo <- push op *undo
+  *undo/skiptypecheck <- push op *undo
   redo:address:address:list:address:operation <- get-address *editor, redo:offset
   *redo <- copy 0
   reply editor/same-as-ingredient:0
@@ -715,7 +715,7 @@ before <move-cursor-end> [
     # tag, coalesce with it
     undo:address:address:list <- get-address *editor, undo:offset
     break-unless *undo
-    op:address:operation <- first *undo
+    op:address:operation/skiptypecheck <- first *undo
     move:address:move-operation <- maybe-convert *op, move:variant
     break-unless move
     previous-coalesce-tag:number <- get *move, tag:offset
@@ -1600,7 +1600,7 @@ before <backspace-character-end> [
     {
       # if previous operation was an insert, coalesce this operation with it
       break-unless *undo
-      op:address:operation <- first *undo
+      op:address:operation/skiptypecheck <- first *undo
       deletion:address:delete-operation <- maybe-convert *op, delete:variant
       break-unless deletion
       previous-coalesce-tag:number <- get *deletion, tag:offset
@@ -1822,7 +1822,7 @@ before <delete-character-end> [
     {
       # if previous operation was an insert, coalesce this operation with it
       break-unless *undo
-      op:address:operation <- first *undo
+      op:address:operation/skiptypecheck <- first *undo
       deletion:address:delete-operation <- maybe-convert *op, delete:variant
       break-unless deletion
       previous-coalesce-tag:number <- get *deletion, tag:offset