about summary refs log tree commit diff stats
path: root/edit
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 /edit
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 'edit')
-rw-r--r--edit/005-sandbox.mu4
-rw-r--r--edit/006-sandbox-edit.mu6
-rw-r--r--edit/011-editor-undo.mu18
3 files changed, 14 insertions, 14 deletions
diff --git a/edit/005-sandbox.mu b/edit/005-sandbox.mu
index 4aad213b..c255865a 100644
--- a/edit/005-sandbox.mu
+++ b/edit/005-sandbox.mu
@@ -458,7 +458,7 @@ scenario run-instruction-manages-screen-per-sandbox [
   # left editor is empty
   1:address:array:character <- new []
   # right editor contains an instruction
-  2:address:array:character <- new [print-integer screen:address, 4]
+  2:address:array:character <- new [print-integer screen, 4]
   3:address:programming-environment-data <- new-programming-environment screen:address, 1:address:array:character, 2:address:array:character
   # run the code in the editor
   assume-console [
@@ -473,7 +473,7 @@ scenario run-instruction-manages-screen-per-sandbox [
     .                                                  ┊                                                 .
     .┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┊━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━.
     .                                                  ┊                                                x.
-    .                                                  ┊print-integer screen:address, 4                  .
+    .                                                  ┊print-integer screen, 4                          .
     .                                                  ┊screen:                                          .
     .                                                  ┊  .4                             .               .
     .                                                  ┊  .                              .               .
diff --git a/edit/006-sandbox-edit.mu b/edit/006-sandbox-edit.mu
index 90be2de7..861d9bcd 100644
--- a/edit/006-sandbox-edit.mu
+++ b/edit/006-sandbox-edit.mu
@@ -132,7 +132,7 @@ scenario sandbox-with-print-can-be-edited [
   # left editor is empty
   1:address:array:character <- new []
   # right editor contains an instruction
-  2:address:array:character <- new [print-integer screen:address, 4]
+  2:address:array:character <- new [print-integer screen, 4]
   3:address:programming-environment-data <- new-programming-environment screen:address, 1:address:array:character, 2:address:array:character
   # run the sandbox
   assume-console [
@@ -144,7 +144,7 @@ scenario sandbox-with-print-can-be-edited [
     .                                                  ┊                                                 .
     .┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┊━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━.
     .                                                  ┊                                                x.
-    .                                                  ┊print-integer screen:address, 4                  .
+    .                                                  ┊print-integer screen, 4                          .
     .                                                  ┊screen:                                          .
     .                                                  ┊  .4                             .               .
     .                                                  ┊  .                              .               .
@@ -163,7 +163,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/edit/011-editor-undo.mu b/edit/011-editor-undo.mu
index 217cbd20..fe44110f 100644
--- a/edit/011-editor-undo.mu
+++ b/edit/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