about summary refs log tree commit diff stats
path: root/065duplex_list.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 /065duplex_list.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 '065duplex_list.mu')
-rw-r--r--065duplex_list.mu6
1 files changed, 3 insertions, 3 deletions
diff --git a/065duplex_list.mu b/065duplex_list.mu
index bf0c896a..129da96c 100644
--- a/065duplex_list.mu
+++ b/065duplex_list.mu
@@ -591,15 +591,15 @@ def match x:&:duplex-list:_elem, y:&:@:_elem -> result:bool [
     done?:bool <- greater-or-equal i, max
     break-if done?
     expected:_elem <- index *y, i
-    return-unless x, 0/no-match
+    return-unless x, false/no-match
     curr:_elem <- first x
     curr-matches?:bool <- equal curr, expected
-    return-unless curr-matches?, 0/no-match
+    return-unless curr-matches?, false/no-match
     x <- next x
     i <- add i, 1
     loop
   }
-  return 1/successful-match
+  return true/successful-match
 ]
 
 scenario duplex-list-match [