diff options
author | Kartik Agaram <vc@akkartik.com> | 2018-06-17 00:05:38 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2018-06-17 00:29:22 -0700 |
commit | dd66068298b0a11f2a1f195376cba98e0c8570b5 (patch) | |
tree | 06696728fd65cdf38a2ac571943e130e9d60c333 /lambda-to-mu.mu | |
parent | b89b822439f47a490a1b764e14a1ed1b73059cba (diff) | |
download | mu-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 'lambda-to-mu.mu')
-rw-r--r-- | lambda-to-mu.mu | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lambda-to-mu.mu b/lambda-to-mu.mu index 31edaf34..1d23cd46 100644 --- a/lambda-to-mu.mu +++ b/lambda-to-mu.mu @@ -56,14 +56,14 @@ def new-pair a:&:cell, b:&:cell -> result:&:cell [ def is-atom? x:&:cell -> result:bool [ local-scope load-inputs - return-unless x, 0/false + return-unless x, false _, result <- maybe-convert *x, atom:variant ] def is-pair? x:&:cell -> result:bool [ local-scope load-inputs - return-unless x, 0/false + return-unless x, false _, result <- maybe-convert *x, pair:variant ] @@ -97,7 +97,7 @@ def atom-match? x:&:cell, pat:text -> result:bool [ local-scope load-inputs s:text, is-atom?:bool <- maybe-convert *x, atom:variant - return-unless is-atom?, 0/false + return-unless is-atom?, false result <- equal pat, s ] |