about summary refs log tree commit diff stats
path: root/edit/004-programming-environment.mu
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2018-06-17 00:05:38 -0700
committerKartik Agaram <vc@akkartik.com>2018-06-17 00:29:22 -0700
commitdd66068298b0a11f2a1f195376cba98e0c8570b5 (patch)
tree06696728fd65cdf38a2ac571943e130e9d60c333 /edit/004-programming-environment.mu
parentb89b822439f47a490a1b764e14a1ed1b73059cba (diff)
downloadmu-dd66068298b0a11f2a1f195376cba98e0c8570b5.tar.gz
4261 - start using literals for 'true' and 'false'
They uncovered one bug: in edit/003-shortcuts.mu
  <scroll-down> was returning 0 for an address in one place where I
  thought it was returning 0 for a boolean.

Now we've eliminated this bad interaction between tangling and punning
literals.
Diffstat (limited to 'edit/004-programming-environment.mu')
-rw-r--r--edit/004-programming-environment.mu10
1 files changed, 5 insertions, 5 deletions
diff --git a/edit/004-programming-environment.mu b/edit/004-programming-environment.mu
index 669335ff..1065dd64 100644
--- a/edit/004-programming-environment.mu
+++ b/edit/004-programming-environment.mu
@@ -32,7 +32,7 @@ def new-programming-environment resources:&:resources, screen:&:screen, test-san
   current-sandbox:&:editor <- new-editor test-sandbox-editor-contents, sandbox-left, width/right
   *result <- put *result, recipes:offset, recipes
   *result <- put *result, current-sandbox:offset, current-sandbox
-  *result <- put *result, sandbox-in-focus?:offset, 0/false
+  *result <- put *result, sandbox-in-focus?:offset, false
   <programming-environment-initialization>
 ]
 
@@ -45,8 +45,8 @@ def event-loop screen:&:screen, console:&:console, env:&:environment, resources:
   # if we fall behind we'll stop updating the screen, but then we have to
   # render the entire screen when we catch up.
   # todo: test this
-  render-recipes-on-no-more-events?:bool <- copy 0/false
-  render-sandboxes-on-no-more-events?:bool <- copy 0/false
+  render-recipes-on-no-more-events?:bool <- copy false
+  render-sandboxes-on-no-more-events?:bool <- copy false
   {
     # looping over each (keyboard or touch) event as it occurs
     +next-event
@@ -113,12 +113,12 @@ def event-loop screen:&:screen, console:&:console, env:&:environment, resources:
         break-if more-events?
         {
           break-unless render-recipes-on-no-more-events?
-          render-recipes-on-no-more-events? <- copy 0/false
+          render-recipes-on-no-more-events? <- copy false
           screen <- render-recipes screen, env, render
         }
         {
           break-unless render-sandboxes-on-no-more-events?
-          render-sandboxes-on-no-more-events? <- copy 0/false
+          render-sandboxes-on-no-more-events? <- copy false
           screen <- render-sandbox-side screen, env, render
         }
       }