From dd66068298b0a11f2a1f195376cba98e0c8570b5 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Sun, 17 Jun 2018 00:05:38 -0700 Subject: 4261 - start using literals for 'true' and 'false' They uncovered one bug: in edit/003-shortcuts.mu 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. --- edit/004-programming-environment.mu | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'edit/004-programming-environment.mu') 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 ] @@ -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 } } -- cgit 1.4.1-2-gfad0