From 0c0472862f5c1e543e6c5614a4cd112ac7d4cc13 Mon Sep 17 00:00:00 2001
From: Eduardo Julian
Date: Sat, 14 Jul 2018 02:59:41 -0400
Subject: - New syntax for bit values: "#0" and "#1", instead of "false" and
"true". - Small improvements to lux-mode.
---
stdlib/source/lux.lux | 262 +++++++++++----------
stdlib/source/lux/concurrency/actor.lux | 12 +-
stdlib/source/lux/concurrency/promise.lux | 8 +-
stdlib/source/lux/concurrency/semaphore.lux | 12 +-
stdlib/source/lux/concurrency/stm.lux | 4 +-
stdlib/source/lux/control/contract.lux | 2 +-
stdlib/source/lux/control/equivalence.lux | 2 +-
stdlib/source/lux/control/interval.lux | 4 +-
stdlib/source/lux/control/parser.lux | 2 +-
stdlib/source/lux/control/predicate.lux | 4 +-
stdlib/source/lux/data/bit.lux | 18 +-
stdlib/source/lux/data/collection/array.lux | 6 +-
stdlib/source/lux/data/collection/bits.lux | 4 +-
stdlib/source/lux/data/collection/dictionary.lux | 10 +-
.../lux/data/collection/dictionary/ordered.lux | 22 +-
.../lux/data/collection/dictionary/plist.lux | 4 +-
stdlib/source/lux/data/collection/list.lux | 16 +-
.../source/lux/data/collection/queue/priority.lux | 2 +-
stdlib/source/lux/data/collection/row.lux | 6 +-
stdlib/source/lux/data/collection/sequence.lux | 4 +-
stdlib/source/lux/data/collection/tree/finger.lux | 14 +-
.../lux/data/collection/tree/rose/zipper.lux | 4 +-
stdlib/source/lux/data/format/binary.lux | 4 +-
stdlib/source/lux/data/format/json.lux | 20 +-
stdlib/source/lux/data/format/xml.lux | 2 +-
stdlib/source/lux/data/maybe.lux | 4 +-
stdlib/source/lux/data/number.lux | 18 +-
stdlib/source/lux/data/text.lux | 18 +-
stdlib/source/lux/data/text/lexer.lux | 4 +-
stdlib/source/lux/data/text/regex.lux | 8 +-
stdlib/source/lux/host.jvm.lux | 26 +-
stdlib/source/lux/language/compiler/analysis.lux | 4 +-
.../language/compiler/analysis/case/coverage.lux | 24 +-
.../lux/language/compiler/analysis/module.lux | 10 +-
.../compiler/extension/analysis/host.jvm.lux | 12 +-
stdlib/source/lux/language/compiler/meta/cache.lux | 6 +-
stdlib/source/lux/language/compiler/synthesis.lux | 8 +-
.../lux/language/compiler/synthesis/case.lux | 8 +-
.../lux/language/compiler/synthesis/expression.lux | 2 +-
.../lux/language/compiler/synthesis/function.lux | 4 +-
.../lux/language/compiler/synthesis/loop.lux | 8 +-
.../compiler/translation/scheme/runtime.jvm.lux | 12 +-
stdlib/source/lux/language/host/scheme.lux | 4 +-
stdlib/source/lux/language/reference.lux | 6 +-
stdlib/source/lux/language/syntax.lux | 14 +-
stdlib/source/lux/language/type.lux | 12 +-
stdlib/source/lux/language/type/check.lux | 26 +-
stdlib/source/lux/macro.lux | 18 +-
stdlib/source/lux/macro/code.lux | 2 +-
stdlib/source/lux/macro/poly.lux | 2 +-
stdlib/source/lux/macro/poly/equivalence.lux | 4 +-
stdlib/source/lux/macro/syntax.lux | 17 +-
stdlib/source/lux/macro/syntax/common/reader.lux | 10 +-
stdlib/source/lux/math/logic/continuous.lux | 36 +--
stdlib/source/lux/math/logic/fuzzy.lux | 30 +--
stdlib/source/lux/test.lux | 16 +-
stdlib/source/lux/time/date.lux | 8 +-
stdlib/source/lux/time/duration.lux | 3 +-
stdlib/source/lux/type/abstract.lux | 2 +-
stdlib/source/lux/type/implicit.lux | 4 +-
stdlib/source/lux/world/file.lux | 10 +-
stdlib/test/test/lux.lux | 18 +-
stdlib/test/test/lux/cli.lux | 14 +-
stdlib/test/test/lux/concurrency/actor.lux | 2 +-
stdlib/test/test/lux/concurrency/promise.lux | 52 ++--
stdlib/test/test/lux/concurrency/semaphore.lux | 8 +-
stdlib/test/test/lux/control/equivalence.lux | 2 +-
stdlib/test/test/lux/control/parser.lux | 34 +--
stdlib/test/test/lux/control/reader.lux | 4 +-
stdlib/test/test/lux/control/region.lux | 4 +-
stdlib/test/test/lux/control/state.lux | 2 +-
stdlib/test/test/lux/control/writer.lux | 4 +-
stdlib/test/test/lux/data/bit.lux | 2 +-
stdlib/test/test/lux/data/collection/array.lux | 14 +-
.../test/test/lux/data/collection/dictionary.lux | 16 +-
.../lux/data/collection/dictionary/ordered.lux | 10 +-
stdlib/test/test/lux/data/collection/list.lux | 4 +-
stdlib/test/test/lux/data/collection/queue.lux | 2 +-
.../test/test/lux/data/collection/set/ordered.lux | 8 +-
.../test/lux/data/collection/tree/rose/zipper.lux | 16 +-
stdlib/test/test/lux/data/error.lux | 18 +-
stdlib/test/test/lux/data/format/json.lux | 6 +-
stdlib/test/test/lux/data/format/xml.lux | 12 +-
stdlib/test/test/lux/data/ident.lux | 4 +-
stdlib/test/test/lux/data/maybe.lux | 4 +-
stdlib/test/test/lux/data/number.lux | 32 +--
stdlib/test/test/lux/data/number/ratio.lux | 2 +-
stdlib/test/test/lux/data/sum.lux | 4 +-
stdlib/test/test/lux/data/text.lux | 6 +-
stdlib/test/test/lux/data/text/format.lux | 4 +-
stdlib/test/test/lux/data/text/lexer.lux | 28 +--
stdlib/test/test/lux/data/text/regex.lux | 12 +-
stdlib/test/test/lux/host.jvm.lux | 12 +-
.../test/lux/language/compiler/analysis/case.lux | 10 +-
.../lux/language/compiler/analysis/function.lux | 2 +-
.../lux/language/compiler/analysis/primitive.lux | 4 +-
.../compiler/analysis/procedure/common.lux | 16 +-
.../lux/language/compiler/analysis/reference.lux | 16 +-
.../lux/language/compiler/analysis/structure.lux | 20 +-
.../test/lux/language/compiler/synthesis/case.lux | 10 +-
.../lux/language/compiler/synthesis/function.lux | 10 +-
.../lux/language/compiler/synthesis/primitive.lux | 4 +-
.../lux/language/compiler/synthesis/structure.lux | 4 +-
stdlib/test/test/lux/language/syntax.lux | 26 +-
stdlib/test/test/lux/language/type.lux | 16 +-
stdlib/test/test/lux/language/type/check.lux | 10 +-
stdlib/test/test/lux/macro/code.lux | 24 +-
stdlib/test/test/lux/macro/poly/functor.lux | 2 +-
stdlib/test/test/lux/macro/syntax.lux | 52 ++--
stdlib/test/test/lux/math/logic/continuous.lux | 10 +-
stdlib/test/test/lux/math/logic/fuzzy.lux | 34 +--
stdlib/test/test/lux/math/modular.lux | 10 +-
stdlib/test/test/lux/time/date.lux | 2 +-
stdlib/test/test/lux/time/duration.lux | 2 +-
stdlib/test/test/lux/time/instant.lux | 2 +-
stdlib/test/test/lux/type/object/protocol.lux | 2 +-
stdlib/test/test/lux/world/blob.lux | 4 +-
stdlib/test/test/lux/world/file.lux | 22 +-
stdlib/test/test/lux/world/net/tcp.lux | 2 +-
stdlib/test/test/lux/world/net/udp.lux | 2 +-
120 files changed, 769 insertions(+), 757 deletions(-)
(limited to 'stdlib')
diff --git a/stdlib/source/lux.lux b/stdlib/source/lux.lux
index 2f2649758..226545576 100644
--- a/stdlib/source/lux.lux
+++ b/stdlib/source/lux.lux
@@ -1,4 +1,3 @@
-## Basic types
("lux def" dummy-cursor
("lux check" (+2 (+0 "#Text" (+0))
(+2 (+0 "#I64" (+1 (+0 "#Nat" (+0)) (+0)))
@@ -6,7 +5,7 @@
["" +0 +0])
[["" +0 +0]
(+10 (+1 [[["" +0 +0] (+7 ["lux" "export?"])]
- [["" +0 +0] (+0 true)]]
+ [["" +0 +0] (+0 #1)]]
(+0)))])
## (type: Any
@@ -16,9 +15,9 @@
(+8 (+0) (+4 +1)))
[dummy-cursor
(+10 (+1 [[dummy-cursor (+7 ["lux" "type?"])]
- [dummy-cursor (+0 true)]]
+ [dummy-cursor (+0 #1)]]
(+1 [[dummy-cursor (+7 ["lux" "export?"])]
- [dummy-cursor (+0 true)]]
+ [dummy-cursor (+0 #1)]]
(+1 [[dummy-cursor (+7 ["lux" "doc"])]
[dummy-cursor (+5 "The type of things whose type does not matter.
@@ -32,9 +31,9 @@
(+7 (+0) (+4 +1)))
[dummy-cursor
(+10 (+1 [[dummy-cursor (+7 ["lux" "type?"])]
- [dummy-cursor (+0 true)]]
+ [dummy-cursor (+0 #1)]]
(+1 [[dummy-cursor (+7 ["lux" "export?"])]
- [dummy-cursor (+0 true)]]
+ [dummy-cursor (+0 #1)]]
(+1 [[dummy-cursor (+7 ["lux" "doc"])]
[dummy-cursor (+5 "The type of things whose type is unknown or undefined.
@@ -54,9 +53,9 @@
(+9 (+4 +1) (+4 +0))))))
[dummy-cursor
(+10 (+1 [[dummy-cursor (+7 ["lux" "type?"])]
- [dummy-cursor (+0 true)]]
+ [dummy-cursor (+0 #1)]]
(+1 [[dummy-cursor (+7 ["lux" "export?"])]
- [dummy-cursor (+0 true)]]
+ [dummy-cursor (+0 #1)]]
(+1 [[dummy-cursor (+7 ["lux" "tags"])]
[dummy-cursor (+9 (+1 [dummy-cursor (+5 "Nil")] (+1 [dummy-cursor (+5 "Cons")] (+0))))]]
(+1 [[dummy-cursor (+7 ["lux" "type-args"])]
@@ -70,9 +69,9 @@
(+0 "#Bit" #Nil))
[dummy-cursor
(+10 (#Cons [[dummy-cursor (+7 ["lux" "type?"])]
- [dummy-cursor (+0 true)]]
+ [dummy-cursor (+0 #1)]]
(#Cons [[dummy-cursor (+7 ["lux" "export?"])]
- [dummy-cursor (+0 true)]]
+ [dummy-cursor (+0 #1)]]
(#Cons [[dummy-cursor (+7 ["lux" "doc"])]
[dummy-cursor (+5 "Your standard, run-of-the-mill boolean values (as bits).")]]
#Nil))))])
@@ -83,9 +82,9 @@
(+0 "#I64" (#Cons (+4 +1) #Nil))))
[dummy-cursor
(+10 (#Cons [[dummy-cursor (+7 ["lux" "type?"])]
- [dummy-cursor (+0 true)]]
+ [dummy-cursor (+0 #1)]]
(#Cons [[dummy-cursor (+7 ["lux" "export?"])]
- [dummy-cursor (+0 true)]]
+ [dummy-cursor (+0 #1)]]
(#Cons [[dummy-cursor (+7 ["lux" "doc"])]
[dummy-cursor (+5 "64-bit integers without any semantics.")]]
#Nil))))])
@@ -95,9 +94,9 @@
(+0 "#I64" (#Cons (+0 "#Nat" #Nil) #Nil)))
[dummy-cursor
(+10 (#Cons [[dummy-cursor (+7 ["lux" "type?"])]
- [dummy-cursor (+0 true)]]
+ [dummy-cursor (+0 #1)]]
(#Cons [[dummy-cursor (+7 ["lux" "export?"])]
- [dummy-cursor (+0 true)]]
+ [dummy-cursor (+0 #1)]]
(#Cons [[dummy-cursor (+7 ["lux" "doc"])]
[dummy-cursor (+5 "Natural numbers (unsigned integers).
@@ -109,9 +108,9 @@
(+0 "#I64" (#Cons (+0 "#Int" #Nil) #Nil)))
[dummy-cursor
(+10 (#Cons [[dummy-cursor (+7 ["lux" "type?"])]
- [dummy-cursor (+0 true)]]
+ [dummy-cursor (+0 #1)]]
(#Cons [[dummy-cursor (+7 ["lux" "export?"])]
- [dummy-cursor (+0 true)]]
+ [dummy-cursor (+0 #1)]]
(#Cons [[dummy-cursor (+7 ["lux" "doc"])]
[dummy-cursor (+5 "Your standard, run-of-the-mill integer numbers.")]]
#Nil))))])
@@ -121,9 +120,9 @@
(+0 "#I64" (#Cons (+0 "#Rev" #Nil) #Nil)))
[dummy-cursor
(+10 (#Cons [[dummy-cursor (+7 ["lux" "type?"])]
- [dummy-cursor (+0 true)]]
+ [dummy-cursor (+0 #1)]]
(#Cons [[dummy-cursor (+7 ["lux" "export?"])]
- [dummy-cursor (+0 true)]]
+ [dummy-cursor (+0 #1)]]
(#Cons [[dummy-cursor (+7 ["lux" "doc"])]
[dummy-cursor (+5 "Fractional numbers that live in the interval [0,1).
@@ -135,9 +134,9 @@
(+0 "#Frac" #Nil))
[dummy-cursor
(+10 (#Cons [[dummy-cursor (+7 ["lux" "type?"])]
- [dummy-cursor (+0 true)]]
+ [dummy-cursor (+0 #1)]]
(#Cons [[dummy-cursor (+7 ["lux" "export?"])]
- [dummy-cursor (+0 true)]]
+ [dummy-cursor (+0 #1)]]
(#Cons [[dummy-cursor (+7 ["lux" "doc"])]
[dummy-cursor (+5 "Your standard, run-of-the-mill floating-point (fractional) numbers.")]]
#Nil))))])
@@ -147,9 +146,9 @@
(+0 "#Text" #Nil))
[dummy-cursor
(+10 (#Cons [[dummy-cursor (+7 ["lux" "type?"])]
- [dummy-cursor (+0 true)]]
+ [dummy-cursor (+0 #1)]]
(#Cons [[dummy-cursor (+7 ["lux" "export?"])]
- [dummy-cursor (+0 true)]]
+ [dummy-cursor (+0 #1)]]
(#Cons [[dummy-cursor (+7 ["lux" "doc"])]
[dummy-cursor (+5 "Your standard, run-of-the-mill string values.")]]
#Nil))))])
@@ -159,9 +158,9 @@
(+2 Text Text))
[dummy-cursor
(+10 (#Cons [[dummy-cursor (+7 ["lux" "type?"])]
- [dummy-cursor (+0 true)]]
+ [dummy-cursor (+0 #1)]]
(#Cons [[dummy-cursor (+7 ["lux" "export?"])]
- [dummy-cursor (+0 true)]]
+ [dummy-cursor (+0 #1)]]
(#Cons [[dummy-cursor (+7 ["lux" "doc"])]
[dummy-cursor (+5 "An identifier.
@@ -180,9 +179,9 @@
(+4 +1))))
[dummy-cursor
(+10 (#Cons [[dummy-cursor (+7 ["lux" "type?"])]
- [dummy-cursor (+0 true)]]
+ [dummy-cursor (+0 #1)]]
(#Cons [[dummy-cursor (+7 ["lux" "export?"])]
- [dummy-cursor (+0 true)]]
+ [dummy-cursor (+0 #1)]]
(#Cons [[dummy-cursor (+7 ["lux" "tags"])]
[dummy-cursor (+9 (#Cons [dummy-cursor (+5 "None")] (#Cons [dummy-cursor (+5 "Some")] #Nil)))]]
(#Cons [[dummy-cursor (+7 ["lux" "type-args"])]
@@ -238,9 +237,9 @@
("lux check type" (+9 (+4 +1) (+4 +0)))))
[dummy-cursor
(+10 (#Cons [[dummy-cursor (+7 ["lux" "type?"])]
- [dummy-cursor (+0 true)]]
+ [dummy-cursor (+0 #1)]]
(#Cons [[dummy-cursor (+7 ["lux" "export?"])]
- [dummy-cursor (+0 true)]]
+ [dummy-cursor (+0 #1)]]
(#Cons [[dummy-cursor (+7 ["lux" "tags"])]
[dummy-cursor (+9 (#Cons [dummy-cursor (+5 "Primitive")]
(#Cons [dummy-cursor (+5 "Sum")]
@@ -257,7 +256,7 @@
(#Cons [[dummy-cursor (+7 ["lux" "doc"])]
[dummy-cursor (+5 "This type represents the data-structures that are used to specify types themselves.")]]
(#Cons [[dummy-cursor (+7 ["lux" "type-rec?"])]
- [dummy-cursor (+0 true)]]
+ [dummy-cursor (+0 #1)]]
#Nil))))))])
## (type: Cursor
@@ -276,9 +275,9 @@
(#Cons [[dummy-cursor (+7 ["lux" "doc"])]
[dummy-cursor (+5 "Cursors are for specifying the location of Code nodes in Lux files during compilation.")]]
(#Cons [[dummy-cursor (+7 ["lux" "type?"])]
- [dummy-cursor (+0 true)]]
+ [dummy-cursor (+0 #1)]]
(#Cons [[dummy-cursor (+7 ["lux" "export?"])]
- [dummy-cursor (+0 true)]]
+ [dummy-cursor (+0 #1)]]
#Nil)))))])
## (type: (Ann m v)
@@ -300,9 +299,9 @@
(#Cons [[dummy-cursor (+7 ["lux" "type-args"])]
[dummy-cursor (+9 (#Cons [dummy-cursor (+5 "m")] (#Cons [dummy-cursor (+5 "v")] #Nil)))]]
(#Cons [[dummy-cursor (+7 ["lux" "type?"])]
- [dummy-cursor (+0 true)]]
+ [dummy-cursor (+0 #1)]]
(#Cons [[dummy-cursor (+7 ["lux" "export?"])]
- [dummy-cursor (+0 true)]]
+ [dummy-cursor (+0 #1)]]
#Nil))))))])
## (type: (Code' w)
@@ -367,9 +366,9 @@
(#Cons [[dummy-cursor (+7 ["lux" "type-args"])]
[dummy-cursor (+9 (#Cons [dummy-cursor (+5 "w")] #Nil))]]
(#Cons [[dummy-cursor (+7 ["lux" "type?"])]
- [dummy-cursor (+0 true)]]
+ [dummy-cursor (+0 #1)]]
(#Cons [[dummy-cursor (+7 ["lux" "export?"])]
- [dummy-cursor (+0 true)]]
+ [dummy-cursor (+0 #1)]]
#Nil)))))])
## (type: Code
@@ -383,9 +382,9 @@
(#Record (#Cons [[dummy-cursor (#Tag ["lux" "doc"])]
[dummy-cursor (#Text "The type of Code nodes for Lux syntax.")]]
(#Cons [[dummy-cursor (#Tag ["lux" "type?"])]
- [dummy-cursor (#Bit true)]]
+ [dummy-cursor (#Bit #1)]]
(#Cons [[dummy-cursor (#Tag ["lux" "export?"])]
- [dummy-cursor (#Bit true)]]
+ [dummy-cursor (#Bit #1)]]
#Nil))))])
("lux def" _ann
@@ -459,16 +458,16 @@
("lux def" default-def-meta-exported
("lux check" (#Apply (#Product Code Code) List)
(#Cons [(tag$ ["lux" "type?"])
- (bit$ true)]
+ (bit$ #1)]
(#Cons [(tag$ ["lux" "export?"])
- (bit$ true)]
+ (bit$ #1)]
#Nil)))
(record$ #Nil))
("lux def" default-def-meta-unexported
("lux check" (#Apply (#Product Code Code) List)
(#Cons [(tag$ ["lux" "type?"])
- (bit$ true)]
+ (bit$ #1)]
#Nil))
(record$ #Nil))
@@ -808,7 +807,7 @@
("lux def" default-macro-meta
("lux check" (#Apply (#Product Code Code) List)
(#Cons [(tag$ ["lux" "macro?"])
- (bit$ true)]
+ (bit$ #1)]
#Nil))
(record$ #Nil))
@@ -878,13 +877,13 @@
("lux check" (#Function Text Code)
([_ tag]
(tuple$ (#Cons [(meta-code ["lux" "Tag"] (tuple$ (#Cons (text$ "lux") (#Cons (text$ tag) #Nil))))
- (#Cons [(meta-code ["lux" "Bit"] (bit$ true))
+ (#Cons [(meta-code ["lux" "Bit"] (bit$ #1))
#Nil])]))))
(record$ #Nil))
("lux def" export-meta
("lux check" (#Product Code Code)
- [(tag$ ["lux" "export?"]) (bit$ true)])
+ [(tag$ ["lux" "export?"]) (bit$ #1)])
(record$ #Nil))
("lux def" export?-meta
@@ -1090,10 +1089,10 @@
#None
(#Cons [k v] env')
- ({true
+ ({#1
(#Some v)
- false
+ #0
(get-rep key env')}
(text/= k key))}
env))
@@ -1246,13 +1245,13 @@
(update-parameters body')) #Nil))))))
body
names)
- (return (#Cons ({[true _]
+ (return (#Cons ({[#1 _]
body'
[_ #Nil]
body'
- [false _]
+ [#0 _]
(replace-syntax (#Cons [self-name (make-parameter (n/* +2 (n/- +1 (list/size names))))]
#Nil)
body')}
@@ -1293,13 +1292,13 @@
(update-parameters body')) #Nil))))))
body
names)
- (return (#Cons ({[true _]
+ (return (#Cons ({[#1 _]
body'
[_ #Nil]
body'
- [false _]
+ [#0 _]
(replace-syntax (#Cons [self-name (make-parameter (n/* +2 (n/- +1 (list/size names))))]
#Nil)
body')}
@@ -1508,11 +1507,11 @@
(All [a]
(-> (-> a Bit) ($' List a) Bit))
({#Nil
- false
+ #0
(#Cons x xs')
- ({true true
- false (any? p xs')}
+ ({#1 #1
+ #0 (any? p xs')}
(p x))}
xs))
@@ -1718,14 +1717,14 @@
(list [(tag$ ["lux" "doc"])
(text$ "Picks which expression to evaluate based on a bit test value.
- (if true
+ (if #1
\"Oh, yeah!\"
\"Aw hell naw!\")
=> \"Oh, yeah!\"")])
({(#Cons test (#Cons then (#Cons else #Nil)))
- (return (list (form$ (list (record$ (list [(bit$ true) then]
- [(bit$ false) else]))
+ (return (list (form$ (list (record$ (list [(bit$ #1) then]
+ [(bit$ #0) else]))
test))))
_
@@ -1786,7 +1785,7 @@
({[_ (#Record def-meta)]
({(#Cons [key value] def-meta')
({[_ (#Tag [prefix' name'])]
- ({[true true]
+ ({[#1 #1]
(#Some value)
_
@@ -1834,7 +1833,7 @@
(def:''' (splice replace? untemplate elems)
#Nil
(-> Bit (-> Code ($' Meta Code)) ($' List Code) ($' Meta Code))
- ({true
+ ({#1
({#Nil
(return (tag$ ["lux" "Nil"]))
@@ -1865,7 +1864,7 @@
lastO
inits))}
(list/reverse elems))
- false
+ #0
(do Monad
[=elems (monad/map Monad untemplate elems)]
(wrap (untemplate-list =elems)))}
@@ -1897,10 +1896,10 @@
[_ [_ (#Text value)]]
(return (wrap-meta (form$ (list (tag$ ["lux" "Text"]) (text$ value)))))
- [false [_ (#Tag [module name])]]
+ [#0 [_ (#Tag [module name])]]
(return (wrap-meta (form$ (list (tag$ ["lux" "Tag"]) (tuple$ (list (text$ module) (text$ name)))))))
- [true [_ (#Tag [module name])]]
+ [#1 [_ (#Tag [module name])]]
(let' [module' ({""
subst
@@ -1909,7 +1908,7 @@
module)]
(return (wrap-meta (form$ (list (tag$ ["lux" "Tag"]) (tuple$ (list (text$ module') (text$ name))))))))
- [true [_ (#Symbol [module name])]]
+ [#1 [_ (#Symbol [module name])]]
(do Monad
[real-name ({""
(if (text/= "" subst)
@@ -1922,13 +1921,13 @@
#let [[module name] real-name]]
(return (wrap-meta (form$ (list (tag$ ["lux" "Symbol"]) (tuple$ (list (text$ module) (text$ name))))))))
- [false [_ (#Symbol [module name])]]
+ [#0 [_ (#Symbol [module name])]]
(return (wrap-meta (form$ (list (tag$ ["lux" "Symbol"]) (tuple$ (list (text$ module) (text$ name)))))))
- [true [_ (#Form (#Cons [[_ (#Symbol ["" "~"])] (#Cons [unquoted #Nil])]))]]
+ [#1 [_ (#Form (#Cons [[_ (#Symbol ["" "~"])] (#Cons [unquoted #Nil])]))]]
(return unquoted)
- [true [_ (#Form (#Cons [[_ (#Symbol ["" "~!"])] (#Cons [dependent #Nil])]))]]
+ [#1 [_ (#Form (#Cons [[_ (#Symbol ["" "~!"])] (#Cons [dependent #Nil])]))]]
(do Monad
[independent (untemplate replace? subst dependent)]
(wrap (wrap-meta (form$ (list (tag$ ["lux" "Form"])
@@ -1936,8 +1935,8 @@
(untemplate-text subst)
independent)))))))
- [true [_ (#Form (#Cons [[_ (#Symbol ["" "~'"])] (#Cons [keep-quoted #Nil])]))]]
- (untemplate false subst keep-quoted)
+ [#1 [_ (#Form (#Cons [[_ (#Symbol ["" "~'"])] (#Cons [keep-quoted #Nil])]))]]
+ (untemplate #0 subst keep-quoted)
[_ [meta (#Form elems)]]
(do Monad
@@ -2006,7 +2005,7 @@
({(#Cons template #Nil)
(do Monad
[current-module current-module-name
- =template (untemplate true current-module template)]
+ =template (untemplate #1 current-module template)]
(wrap (list (form$ (list (text$ "lux check")
(symbol$ ["lux" "Code"])
=template)))))
@@ -2023,7 +2022,7 @@
(~ body))))")])
({(#Cons template #Nil)
(do Monad
- [=template (untemplate true "" template)]
+ [=template (untemplate #1 "" template)]
(wrap (list (form$ (list (text$ "lux check") (symbol$ ["lux" "Code"]) =template)))))
_
@@ -2036,7 +2035,7 @@
(' \"YOLO\")")])
({(#Cons template #Nil)
(do Monad
- [=template (untemplate false "" template)]
+ [=template (untemplate #0 "" template)]
(wrap (list (form$ (list (text$ "lux check") (symbol$ ["lux" "Code"]) =template)))))
_
@@ -2189,7 +2188,7 @@
#Nil
(All [a]
(-> (-> a Bit) ($' List a) Bit))
- (list/fold (function' [_2 _1] (if _1 (p _2) false)) true xs))
+ (list/fold (function' [_2 _1] (if _1 (p _2) #0)) #1 xs))
(def:''' #export (n/= test subject)
(list [(tag$ ["lux" "doc"])
@@ -2221,19 +2220,19 @@
(let' [testH (high-bits test)
subjectH (high-bits subject)]
(if ("lux int <" subjectH testH)
- true
+ #1
(if ("lux i64 =" testH subjectH)
("lux int <"
(low-bits subject)
(low-bits test))
- false))))
+ #0))))
(def:''' #export (n/<= test subject)
(list [(tag$ ["lux" "doc"])
(text$ "Nat(ural) less-than-equal.")])
(-> Nat Nat Bit)
(if (n/< test subject)
- true
+ #1
("lux i64 =" test subject)))
(def:''' #export (n/> test subject)
@@ -2247,7 +2246,7 @@
(text$ "Nat(ural) greater-than-equal.")])
(-> Nat Nat Bit)
(if (n/< subject test)
- true
+ #1
("lux i64 =" test subject)))
(macro:' #export (do-template tokens)
@@ -2300,7 +2299,7 @@
(-> Rev Rev Bit)
(if (n/< ("lux coerce" Nat test)
("lux coerce" Nat subject))
- true
+ #1
("lux i64 =" test subject)))
(def:''' #export (r/> test subject)
@@ -2314,7 +2313,7 @@
(text$ "Rev(olution) greater-than-equal.")])
(-> Rev Rev Bit)
(if (r/< subject test)
- true
+ #1
("lux i64 =" test subject)))
(do-template [
@@ -2337,7 +2336,7 @@
(text$ <<=-doc>)])
(-> Bit)
(if ( subject test)
- true
+ #1
( subject test)))
(def:''' #export ( test subject)
@@ -2351,7 +2350,7 @@
(text$ <>=-doc>)])
(-> Bit)
(if ( test subject)
- true
+ #1
( subject test)))]
[ Int "lux i64 =" "lux int <" i/= i/< i/<= i/> i/>=
@@ -2539,7 +2538,7 @@
(def:''' (bit/encode x)
#Nil
(-> Bit Text)
- (if x "true" "false"))
+ (if x "#1" "#0"))
(def:''' (digit-to-text digit)
#Nil
@@ -2607,11 +2606,11 @@
(list [(tag$ ["lux" "doc"])
(text$ "## Bit negation.
- (not true) => false
+ (not #1) => #0
- (not false) => true")])
+ (not #0) => #1")])
(-> Bit Bit)
- (if x false true))
+ (if x #0 #1))
(def:''' (find-macro' modules current-module module name)
#Nil
@@ -2623,8 +2622,8 @@
gdef (let' [{#module-hash _ #module-aliases _ #definitions bindings #imports _ #tags tags #types types #module-annotations _ #module-state _} ("lux check" Module $module)]
(get name bindings))]
(let' [[def-type def-meta def-value] ("lux check" Definition gdef)]
- ({(#Some [_ (#Bit true)])
- ({(#Some [_ (#Bit true)])
+ ({(#Some [_ (#Bit #1)])
+ ({(#Some [_ (#Bit #1)])
(#Some ("lux coerce" Macro def-value))
_
@@ -2676,8 +2675,8 @@
(do Monad
[ident (normalize ident)
output (find-macro ident)]
- (wrap ({(#Some _) true
- #None false}
+ (wrap ({(#Some _) #1
+ #None #0}
output))))
(def:''' (list/join xs)
@@ -2859,8 +2858,8 @@
(def:''' (empty? xs)
#Nil
(All [a] (-> ($' List a) Bit))
- ({#Nil true
- _ false}
+ ({#Nil #1
+ _ #0}
xs))
(do-template [ ]
@@ -2979,10 +2978,10 @@
(macro:' (def:' tokens)
(let' [[export? tokens'] ({(#Cons [_ (#Tag ["" "export"])] tokens')
- [true tokens']
+ [#1 tokens']
_
- [false tokens]}
+ [#0 tokens]}
tokens)
parts (: (Maybe [Code (List Code) (Maybe Code) Code])
({(#Cons [_ (#Form (#Cons name args))] (#Cons type (#Cons body #Nil)))
@@ -3174,10 +3173,10 @@
(-> Weekday Bit)
(case day
(^or #Saturday #Sunday)
- true
+ #1
_
- false))")])
+ #0))")])
(case tokens
(^ (list& [_ (#Form patterns)] body branches))
(case patterns
@@ -3196,10 +3195,10 @@
(-> Code Bit)
(case code
[_ (#Symbol _)]
- true
+ #1
_
- false))
+ #0))
(macro:' #export (let tokens)
(list [(tag$ ["lux" "doc"])
@@ -3333,10 +3332,10 @@
(-> (List Code) [Bit (List Code)])
(case tokens
(#Cons [_ (#Tag [_ "export"])] tokens')
- [true tokens']
+ [#1 tokens']
_
- [false tokens]))
+ [#0 tokens]))
(def:' (export ?)
(-> Bit (List Code))
@@ -3466,7 +3465,7 @@
_ (` ((~ name) (~+ args))))]
(return (list (` (..def: (~+ (export exported?))
(~ def-sig)
- (~ (meta-code-merge (` {#.macro? true})
+ (~ (meta-code-merge (` {#.macro? #1})
meta))
..Macro
@@ -3528,7 +3527,7 @@
(function (_ [m-name m-type])
[(tag$ ["" m-name]) m-type]))
members))
- sig-meta (meta-code-merge (` {#.sig? true})
+ sig-meta (meta-code-merge (` {#.sig? #1})
meta)
usage (case args
#Nil
@@ -3569,8 +3568,8 @@
_
(fail )))]
- [and (if (~ pre) (~ post) false) "'and' requires >=1 clauses." "Short-circuiting \"and\".\n(and true false true) ## => false"]
- [or (if (~ pre) true (~ post)) "'or' requires >=1 clauses." "Short-circuiting \"or\".\n(or true false true) ## => true"])
+ [and (if (~ pre) (~ post) #0) "'and' requires >=1 clauses." "Short-circuiting \"and\".\n(and #1 #0 #1) ## => #0"]
+ [or (if (~ pre) #1 (~ post)) "'or' requires >=1 clauses." "Short-circuiting \"or\".\n(or #1 #0 #1) ## => #1"])
(def: (index-of part text)
(-> Text Text (Maybe Nat))
@@ -3952,7 +3951,7 @@
_
(` ((~ name) (~+ args))))]
(return (list (` (..def: (~+ (export exported?)) (~ usage)
- (~ (meta-code-merge (` {#.struct? true})
+ (~ (meta-code-merge (` {#.struct? #1})
meta))
(~ type)
(structure (~+ definitions)))))))
@@ -3978,10 +3977,10 @@
(let [[exported? tokens'] (export^ tokens)
[rec? tokens'] (case tokens'
(#Cons [_ (#Tag [_ "rec"])] tokens')
- [true tokens']
+ [#1 tokens']
_
- [false tokens'])
+ [#0 tokens'])
parts (: (Maybe [Text (List Code) Code (List Code)])
(case tokens'
(^ (list [_ (#Symbol "" name)] [meta-cursor (#Record meta-parts)] [type-cursor (#Record type-parts)]))
@@ -4015,10 +4014,10 @@
(case tags??
(#Some tags)
(` {#.tags [(~+ (list/map text$ tags))]
- #.type? true})
+ #.type? #1})
_
- (` {#.type? true})))
+ (` {#.type? #1})))
type' (: (Maybe Code)
(if rec?
(if (empty? args)
@@ -4038,7 +4037,7 @@
(#Some type'')
(return (list (` (..def: (~+ (export exported?)) (~ type-name)
(~ ($_ meta-code-merge (with-type-args args)
- (if rec? (' {#.type-rec? true}) (' {}))
+ (if rec? (' {#.type-rec? #1}) (' {}))
type-meta
meta))
Type
@@ -4236,7 +4235,7 @@
#let [[referral extra] referral+extra]
openings+extra (parse-openings extra)
#let [[openings extra] openings+extra]
- sub-imports (parse-imports true import-name extra)]
+ sub-imports (parse-imports #1 import-name extra)]
(wrap (list& {#import-name import-name
#import-alias (#Some (replace-all "." m-name alias))
#import-refer {#refer-defs referral
@@ -4250,7 +4249,7 @@
#let [[referral extra] referral+extra]
openings+extra (parse-openings extra)
#let [[openings extra] openings+extra]
- sub-imports (parse-imports true import-name extra)]
+ sub-imports (parse-imports #1 import-name extra)]
(wrap (case [referral openings]
[#Nothing #Nil] sub-imports
_ (list& {#import-name import-name
@@ -4280,7 +4279,7 @@
(List Text))
(function (_ [name [def-type def-meta def-value]])
(case (get-meta ["lux" "export?"] def-meta)
- (#Some [_ (#Bit true)])
+ (#Some [_ (#Bit #1)])
(list name)
_
@@ -4309,7 +4308,7 @@
(let [output (list/fold (function (_ case prev)
(or prev
(text/= case name)))
- false
+ #0
cases)]
output))
@@ -4882,7 +4881,7 @@
_
[(list) tokens]))]
current-module current-module-name
- imports (parse-imports false current-module _imports)
+ imports (parse-imports #0 current-module _imports)
#let [=imports (list/map (: (-> Importation Code)
(function (_ [m-name m-alias =refer])
(` [(~ (text$ m-name)) (~ (text$ (default "" m-alias)))])))
@@ -5523,20 +5522,20 @@
[ (do-template [ ]
[(compare )
(compare (:: Code/encode show ))
- (compare true (:: Equivalence = ))]
-
- [(bit true) "true" [_ (#.Bit true)]]
- [(bit false) "false" [_ (#.Bit false)]]
- [(int 123) "123" [_ (#.Int 123)]]
- [(frac 123.0) "123.0" [_ (#.Frac 123.0)]]
- [(text "\n") "\"\\n\"" [_ (#.Text "\n")]]
- [(tag ["yolo" "lol"]) "#yolo.lol" [_ (#.Tag ["yolo" "lol"])]]
- [(symbol ["yolo" "lol"]) "yolo.lol" [_ (#.Symbol ["yolo" "lol"])]]
- [(form (list (bit true) (int 123))) "(true 123)" (^ [_ (#.Form (list [_ (#.Bit true)] [_ (#.Int 123)]))])]
- [(tuple (list (bit true) (int 123))) "[true 123]" (^ [_ (#.Tuple (list [_ (#.Bit true)] [_ (#.Int 123)]))])]
- [(record (list [(bit true) (int 123)])) "{true 123}" (^ [_ (#.Record (list [[_ (#.Bit true)] [_ (#.Int 123)]]))])]
- [(local-tag "lol") "#lol" [_ (#.Tag ["" "lol"])]]
- [(local-symbol "lol") "lol" [_ (#.Symbol ["" "lol"])]]
+ (compare #1 (:: Equivalence = ))]
+
+ [(bit #1) "#1" [_ (#.Bit #1)]]
+ [(bit #0) "#0" [_ (#.Bit #0)]]
+ [(int 123) "123" [_ (#.Int 123)]]
+ [(frac 123.0) "123.0" [_ (#.Frac 123.0)]]
+ [(text "\n") "\"\\n\"" [_ (#.Text "\n")]]
+ [(tag ["yolo" "lol"]) "#yolo.lol" [_ (#.Tag ["yolo" "lol"])]]
+ [(symbol ["yolo" "lol"]) "yolo.lol" [_ (#.Symbol ["yolo" "lol"])]]
+ [(form (list (bit #1) (int 123))) "(#1 123)" (^ [_ (#.Form (list [_ (#.Bit #1)] [_ (#.Int 123)]))])]
+ [(tuple (list (bit #1) (int 123))) "[#1 123]" (^ [_ (#.Tuple (list [_ (#.Bit #1)] [_ (#.Int 123)]))])]
+ [(record (list [(bit #1) (int 123)])) "{#1 123}" (^ [_ (#.Record (list [[_ (#.Bit #1)] [_ (#.Int 123)]]))])]
+ [(local-tag "lol") "#lol" [_ (#.Tag ["" "lol"])]]
+ [(local-symbol "lol") "lol" [_ (#.Symbol ["" "lol"])]]
)]
(test-all ))))}
(case tokens
@@ -5652,7 +5651,7 @@
(return [expr binding])
_
- (return [level (` true)])
+ (return [level (` #1)])
))
(def: (multi-level-case^ levels)
@@ -5684,7 +5683,7 @@
"Useful in situations where the result of a branch depends on further refinements on the values being matched."
"For example:"
(case (split (size static) uri)
- (^multi (#.Some [chunk uri']) [(text/= static chunk) true])
+ (^multi (#.Some [chunk uri']) [(text/= static chunk) #1])
(match-uri endpoint? parts' uri')
_
@@ -6228,3 +6227,12 @@
(nat/encode line) separator
(nat/encode column))]
($_ "lux text concat" "[" fields "]")))
+
+(do-template [ ]
+ [(def: #export #0)
+ (def: #export #1)]
+
+ [false true]
+ [no yes]
+ [off on]
+ )
diff --git a/stdlib/source/lux/concurrency/actor.lux b/stdlib/source/lux/concurrency/actor.lux
index 570316334..cb35b0706 100644
--- a/stdlib/source/lux/concurrency/actor.lux
+++ b/stdlib/source/lux/concurrency/actor.lux
@@ -28,8 +28,8 @@
(exception: #export (dead {actor-name Text}
{message-name Text})
- (format " Actor: " actor-name "\n"
- "Message: " message-name "\n"))
+ (ex.report ["Actor" actor-name]
+ ["Message" message-name]))
## [Types]
(with-expansions
@@ -95,10 +95,10 @@
(All [s] (-> (Actor s) Bit))
(case (promise.poll (get@ #obituary (:representation actor)))
#.None
- true
+ #1
_
- false))
+ #0))
(def: #export (send message actor)
{#.doc "Communicate with an actor through message passing."}
@@ -115,12 +115,12 @@
(if resolved?
(do @
[_ (atom.write (product.right entry) (get@ #mailbox (:representation actor)))]
- (wrap true))
+ (wrap #1))
(recur |mailbox|)))
(#.Some [_ |mailbox|'])
(recur |mailbox|')))))
- (io/wrap false)))
+ (io/wrap #0)))
))
## [Values]
diff --git a/stdlib/source/lux/concurrency/promise.lux b/stdlib/source/lux/concurrency/promise.lux
index 0a03b2c9e..eaf913ac1 100644
--- a/stdlib/source/lux/concurrency/promise.lux
+++ b/stdlib/source/lux/concurrency/promise.lux
@@ -36,7 +36,7 @@
[(^@ old [_value _observers]) (atom.read promise)]
(case _value
(#.Some _)
- (wrap false)
+ (wrap #0)
#.None
(do @
@@ -46,7 +46,7 @@
(do @
[_ (monad.map @ (function (_ f) (f value))
_observers)]
- (wrap true))
+ (wrap #1))
(resolve value (:abstraction promise)))))))
(def: #export (await f (^:representation promise))
@@ -68,10 +68,10 @@
(All [a] (-> (Promise a) Bit))
(case (poll promise)
#.None
- false
+ #0
(#.Some _)
- true))
+ #1))
(structure: #export _ (Functor Promise)
(def: (map f fa)
diff --git a/stdlib/source/lux/concurrency/semaphore.lux b/stdlib/source/lux/concurrency/semaphore.lux
index 774acf5fa..b6c0ce69b 100644
--- a/stdlib/source/lux/concurrency/semaphore.lux
+++ b/stdlib/source/lux/concurrency/semaphore.lux
@@ -33,14 +33,14 @@
[state (atom.read semaphore)
#let [[ready? state'] (: [Bit State]
(case (get@ #open-positions state)
- +0 [false (update@ #waiting-list (|>> (#.Cons signal))
- state)]
- _ [true (update@ #open-positions dec
- state)]))]
+ +0 [#0 (update@ #waiting-list (|>> (#.Cons signal))
+ state)]
+ _ [#1 (update@ #open-positions dec
+ state)]))]
success? (atom.compare-and-swap state state' semaphore)
_ (if ready?
(promise.resolve [] signal)
- (wrap false))]
+ (wrap #0))]
(if success?
(wrap signal)
(recur signal)))))))
@@ -64,7 +64,7 @@
(do @
[_ (case ?signal
#.None
- (wrap true)
+ (wrap #1)
(#.Some signal)
(promise.resolve [] signal))]
diff --git a/stdlib/source/lux/concurrency/stm.lux b/stdlib/source/lux/concurrency/stm.lux
index 7af73b68d..88d0ed6ed 100644
--- a/stdlib/source/lux/concurrency/stm.lux
+++ b/stdlib/source/lux/concurrency/stm.lux
@@ -187,7 +187,7 @@
(def: commit-processor-flag
(Atom Bit)
- (atom false))
+ (atom #0))
(def: (issue-commit commit)
(-> Commit (IO Any))
@@ -219,7 +219,7 @@
(if flag
(wrap [])
(do @
- [was-first? (atom.compare-and-swap flag true commit-processor-flag)]
+ [was-first? (atom.compare-and-swap flag #1 commit-processor-flag)]
(if was-first?
(exec (|> (io.run (atom.read pending-commits))
(promise.await (function (recur [head tail])
diff --git a/stdlib/source/lux/control/contract.lux b/stdlib/source/lux/control/contract.lux
index 9b7427190..d7e054a9b 100644
--- a/stdlib/source/lux/control/contract.lux
+++ b/stdlib/source/lux/control/contract.lux
@@ -26,7 +26,7 @@
(syntax: #export (post test expr)
{#.doc (doc "Post-conditions."
"Given a predicate and an expression to run, evaluates the expression and then tests the output with the predicate."
- "If the predicate returns true, returns the value of the expression."
+ "If the predicate returns #1, returns the value of the expression."
"Otherwise, an error is raised."
(post i/even?
(i/+ 2 2)))}
diff --git a/stdlib/source/lux/control/equivalence.lux b/stdlib/source/lux/control/equivalence.lux
index eb869a81c..dea0e3fa6 100644
--- a/stdlib/source/lux/control/equivalence.lux
+++ b/stdlib/source/lux/control/equivalence.lux
@@ -22,7 +22,7 @@
(:: right = b y)
_
- false))))
+ #0))))
(def: #export (rec sub)
(All [a] (-> (-> (Equivalence a) (Equivalence a)) (Equivalence a)))
diff --git a/stdlib/source/lux/control/interval.lux b/stdlib/source/lux/control/interval.lux
index a1084290a..a7de8246f 100644
--- a/stdlib/source/lux/control/interval.lux
+++ b/stdlib/source/lux/control/interval.lux
@@ -151,7 +151,7 @@
(or (singleton? reference)
(and (inner? reference) (outer? sample)))
- false
+ #0
## (and (outer? reference) (inner? sample))
(let [(^open) reference]
@@ -166,7 +166,7 @@
(let [(^open) reference]
(and (not (:: Equivalence = reference sample))
(cond (singleton? sample)
- false
+ #0
(singleton? reference)
(nested? sample reference)
diff --git a/stdlib/source/lux/control/parser.lux b/stdlib/source/lux/control/parser.lux
index 7ad46dba8..fc42d5976 100644
--- a/stdlib/source/lux/control/parser.lux
+++ b/stdlib/source/lux/control/parser.lux
@@ -60,7 +60,7 @@
## [Parsers]
(def: #export (assert message test)
- {#.doc "Fails with the given message if the test is false."}
+ {#.doc "Fails with the given message if the test is #0."}
(All [s] (-> Text Bit (Parser s Any)))
(function (_ input)
(if test
diff --git a/stdlib/source/lux/control/predicate.lux b/stdlib/source/lux/control/predicate.lux
index 383d1b907..72fe8165f 100644
--- a/stdlib/source/lux/control/predicate.lux
+++ b/stdlib/source/lux/control/predicate.lux
@@ -18,8 +18,8 @@
( (left value)
(right value))))]
- [none false union or]
- [all true intersection and]
+ [none #0 union or]
+ [all #1 intersection and]
)
(do-template [ ]
diff --git a/stdlib/source/lux/data/bit.lux b/stdlib/source/lux/data/bit.lux
index 60cef178b..65bfad034 100644
--- a/stdlib/source/lux/data/bit.lux
+++ b/stdlib/source/lux/data/bit.lux
@@ -18,8 +18,8 @@
(def: eq Equivalence)
(def: (hash value)
(case value
- true +1
- false +0)))
+ #1 +1
+ #0 +0)))
(do-template [ ]
[(structure: #export (Monoid Bit)
@@ -27,21 +27,21 @@
(def: (compose x y)
( x y)))]
- [ Or@Monoid false or]
- [And@Monoid true and]
+ [ Or@Monoid #0 or]
+ [And@Monoid #1 and]
)
(structure: #export _ (Codec Text Bit)
(def: (encode x)
(if x
- "true"
- "false"))
+ "#1"
+ "#0"))
(def: (decode input)
(case input
- "true" (#.Right true)
- "false" (#.Right false)
- _ (#.Left "Wrong syntax for Bit."))))
+ "#1" (#.Right #1)
+ "#0" (#.Right #0)
+ _ (#.Left "Wrong syntax for Bit."))))
## [Values]
(def: #export complement
diff --git a/stdlib/source/lux/data/collection/array.lux b/stdlib/source/lux/data/collection/array.lux
index d8d4ce5fa..a4fe01a35 100644
--- a/stdlib/source/lux/data/collection/array.lux
+++ b/stdlib/source/lux/data/collection/array.lux
@@ -161,14 +161,14 @@
(and prev
(case [(read idx xs) (read idx ys)]
[#.None #.None]
- true
+ #1
[(#.Some x) (#.Some y)]
(:: Equivalence = x y)
_
- false)))
- true
+ #0)))
+ #1
(list.n/range +0 (dec sxs)))))
))
diff --git a/stdlib/source/lux/data/collection/bits.lux b/stdlib/source/lux/data/collection/bits.lux
index 24eaa44a6..05de58e37 100644
--- a/stdlib/source/lux/data/collection/bits.lux
+++ b/stdlib/source/lux/data/collection/bits.lux
@@ -98,7 +98,7 @@
("lux i64 =" empty-chunk)
.not)
(recur (inc idx)))
- false))))
+ #0))))
(def: #export (not input)
(-> Bits Bits)
@@ -165,4 +165,4 @@
(..chunk idx reference)
(..chunk idx sample))
(recur (inc idx)))
- true)))))
+ #1)))))
diff --git a/stdlib/source/lux/data/collection/dictionary.lux b/stdlib/source/lux/data/collection/dictionary.lux
index 5add5c74a..27ee863cc 100644
--- a/stdlib/source/lux/data/collection/dictionary.lux
+++ b/stdlib/source/lux/data/collection/dictionary.lux
@@ -275,10 +275,10 @@
(All [k v] (-> (Node k v) Bit))
(`` (case node
(#Base (~~ (static ..clean-bitmap)) _)
- true
+ #1
_
- false)))
+ #0)))
(def: (put' level hash key val Hash node)
(All [k v] (-> Level Hash-Code k v (Hash k) (Node k v) (Node k v)))
@@ -571,8 +571,8 @@
(def: #export (contains? key dict)
(All [k v] (-> k (Dictionary k v) Bit))
(case (get key dict)
- #.None false
- (#.Some _) true))
+ #.None #0
+ (#.Some _) #1))
(def: #export (put~ key val dict)
{#.doc "Only puts the KV-pair if the key is not already present."}
@@ -684,5 +684,5 @@
(:: Equivalence = tk sk)
_
- false))
+ #0))
(keys test)))))
diff --git a/stdlib/source/lux/data/collection/dictionary/ordered.lux b/stdlib/source/lux/data/collection/dictionary/ordered.lux
index 153c17a69..0af6bd341 100644
--- a/stdlib/source/lux/data/collection/dictionary/ordered.lux
+++ b/stdlib/source/lux/data/collection/dictionary/ordered.lux
@@ -77,7 +77,7 @@
(loop [node (get@ #root dict)]
(case node
#.None
- false
+ #0
(#.Some node)
(let [node-key (get@ #key node)]
@@ -472,7 +472,7 @@
[?root found?] (loop [?root (get@ #root dict)]
(case ?root
#.None
- [#.None false]
+ [#.None #0]
(#.Some root)
(let [root-key (get@ #key root)
@@ -480,13 +480,13 @@
(if (T/= root-key key)
[(prepend (get@ #left root)
(get@ #right root))
- true]
+ #1]
(let [go-left? (T/< root-key key)]
(case (recur (if go-left?
(get@ #left root)
(get@ #right root)))
- [#.None false]
- [#.None false]
+ [#.None #0]
+ [#.None #0]
[side-outcome _]
(if go-left?
@@ -494,20 +494,20 @@
(^multi (#.Some left)
[(get@ #color left) #Black])
[(#.Some (balance-left-remove root-key root-val side-outcome (get@ #right root)))
- false]
+ #0]
_
[(#.Some (red root-key root-val side-outcome (get@ #right root)))
- false])
+ #0])
(case (get@ #right root)
(^multi (#.Some right)
[(get@ #color right) #Black])
[(#.Some (balance-right-remove root-key root-val (get@ #left root) side-outcome))
- false]
+ #0]
_
[(#.Some (red root-key root-val (get@ #left root) side-outcome))
- false])
+ #0])
)))
))
))]
@@ -560,7 +560,7 @@
entriesS (entries sample)]
(case [entriesR entriesS]
[#.Nil #.Nil]
- true
+ #1
[(#.Cons [keyR valueR] entriesR') (#.Cons [keyS valueS] entriesS')]
(and (:: Equivalence = keyR keyS)
@@ -568,4 +568,4 @@
(recur entriesR' entriesS'))
_
- false)))))
+ #0)))))
diff --git a/stdlib/source/lux/data/collection/dictionary/plist.lux b/stdlib/source/lux/data/collection/dictionary/plist.lux
index 050185307..1f16dcd77 100644
--- a/stdlib/source/lux/data/collection/dictionary/plist.lux
+++ b/stdlib/source/lux/data/collection/dictionary/plist.lux
@@ -21,10 +21,10 @@
(All [a] (-> Text (PList a) Bit))
(case (get key properties)
(#.Some _)
- true
+ #1
#.None
- false))
+ #0))
(def: #export (put key val properties)
(All [a] (-> Text a (PList a) (PList a)))
diff --git a/stdlib/source/lux/data/collection/list.lux b/stdlib/source/lux/data/collection/list.lux
index c734c140b..111c9b00e 100644
--- a/stdlib/source/lux/data/collection/list.lux
+++ b/stdlib/source/lux/data/collection/list.lux
@@ -171,7 +171,7 @@
(list x)))
(def: #export (find p xs)
- {#.doc "Returns the first value in the list for which the predicate is true."}
+ {#.doc "Returns the first value in the list for which the predicate is #1."}
(All [a]
(-> (-> a Bit) (List a) (Maybe a)))
(case xs
@@ -248,8 +248,8 @@
output
output))))]
- [every? true and]
- [any? false or]
+ [every? #1 and]
+ [any? #0 or]
)
(def: #export (nth i xs)
@@ -271,14 +271,14 @@
(def: (= xs ys)
(case [xs ys]
[#.Nil #.Nil]
- true
+ #1
[(#.Cons x xs') (#.Cons y ys')]
(and (:: Equivalence = x y)
(= xs' ys'))
[_ _]
- false
+ #0
)))
(structure: #export Monoid (All [a]
@@ -354,13 +354,13 @@
(def: #export (empty? xs)
(All [a] (-> (List a) Bit))
(case xs
- #.Nil true
- _ false))
+ #.Nil #1
+ _ #0))
(def: #export (member? eq xs x)
(All [a] (-> (Equivalence a) (List a) a Bit))
(case xs
- #.Nil false
+ #.Nil #0
(#.Cons x' xs') (or (:: eq = x x')
(member? eq xs' x))))
diff --git a/stdlib/source/lux/data/collection/queue/priority.lux b/stdlib/source/lux/data/collection/queue/priority.lux
index dbf6dec75..11162ae8c 100644
--- a/stdlib/source/lux/data/collection/queue/priority.lux
+++ b/stdlib/source/lux/data/collection/queue/priority.lux
@@ -45,7 +45,7 @@
(All [a] (-> (Equivalence a) (Queue a) a Bit))
(case queue
#.None
- false
+ #0
(#.Some fingers)
(loop [node (get@ #finger.node fingers)]
diff --git a/stdlib/source/lux/data/collection/row.lux b/stdlib/source/lux/data/collection/row.lux
index 197e596e6..7ae37ebea 100644
--- a/stdlib/source/lux/data/collection/row.lux
+++ b/stdlib/source/lux/data/collection/row.lux
@@ -235,10 +235,10 @@
hierarchy (get@ #root vec)]
(case [(n/> branching-exponent level)
(array.read (branch-idx (i64.logical-right-shift level idx)) hierarchy)]
- [true (#.Some (#Hierarchy sub))]
+ [#1 (#.Some (#Hierarchy sub))]
(recur (level-down level) sub)
- [false (#.Some (#Base base))]
+ [#0 (#.Some (#Base base))]
(#.Some base)
[_ #.None]
@@ -357,7 +357,7 @@
(:: (array.Equivalence (Equivalence Equivalence)) = h1 h2)
_
- false)))
+ #0)))
(structure: #export (Equivalence Equivalence) (All [a] (-> (Equivalence a) (Equivalence (Row a))))
(def: (= v1 v2)
diff --git a/stdlib/source/lux/data/collection/sequence.lux b/stdlib/source/lux/data/collection/sequence.lux
index 0a2350324..9a8258de2 100644
--- a/stdlib/source/lux/data/collection/sequence.lux
+++ b/stdlib/source/lux/data/collection/sequence.lux
@@ -112,9 +112,9 @@
(def: #export (partition p xs)
{#.doc "Split a sequence in two based on a predicate.
- The left side contains all entries for which the predicate is true.
+ The left side contains all entries for which the predicate is #1.
- The right side contains all entries for which the predicate is false."}
+ The right side contains all entries for which the predicate is #0."}
(All [a] (-> (-> a Bit) (Sequence a) [(Sequence a) (Sequence a)]))
[(filter p xs) (filter (complement p) xs)])
diff --git a/stdlib/source/lux/data/collection/tree/finger.lux b/stdlib/source/lux/data/collection/tree/finger.lux
index b77fca2ec..3c449f57a 100644
--- a/stdlib/source/lux/data/collection/tree/finger.lux
+++ b/stdlib/source/lux/data/collection/tree/finger.lux
@@ -1,6 +1,8 @@
(.module:
[lux #*
- [control ["m" monoid]]
+ [control
+ ["m" monoid]
+ [predicate (#+ Predicate)]]
[data [text format]]])
(type: #export (Node m a)
@@ -51,11 +53,11 @@
(recur shifted-tag right)))))
#.None)))
-(def: #export (found? pred tree)
- (All [m a] (-> (-> m Bit) (Tree m a) Bit))
- (case (search pred tree)
+(def: #export (found? predicate tree)
+ (All [m a] (-> (Predicate m) (Tree m a) Bit))
+ (case (search predicate tree)
(#.Some _)
- true
+ #1
#.None
- false))
+ #0))
diff --git a/stdlib/source/lux/data/collection/tree/rose/zipper.lux b/stdlib/source/lux/data/collection/tree/rose/zipper.lux
index cdaba29fc..030ddb36e 100644
--- a/stdlib/source/lux/data/collection/tree/rose/zipper.lux
+++ b/stdlib/source/lux/data/collection/tree/rose/zipper.lux
@@ -60,10 +60,10 @@
(All [a] (-> (Zipper a) Bit))
(case (get@ #parent zipper)
#.None
- true
+ #1
_
- false))
+ #0))
(def: #export (down zipper)
(All [a] (-> (Zipper a) (Zipper a)))
diff --git a/stdlib/source/lux/data/format/binary.lux b/stdlib/source/lux/data/format/binary.lux
index a5dcde900..b0c2a8b65 100644
--- a/stdlib/source/lux/data/format/binary.lux
+++ b/stdlib/source/lux/data/format/binary.lux
@@ -156,8 +156,8 @@
(case (: Nat data)
(^template [ ]
(#error.Success [(inc offset) blob] ))
- ([+0 false]
- [+1 true])
+ ([+0 #0]
+ [+1 #1])
_
(ex.throw invalid-tag [+2 data]))
diff --git a/stdlib/source/lux/data/format/json.lux b/stdlib/source/lux/data/format/json.lux
index 4dfa6cb7d..261ff1330 100644
--- a/stdlib/source/lux/data/format/json.lux
+++ b/stdlib/source/lux/data/format/json.lux
@@ -54,7 +54,7 @@
(syntax: #export (json token)
{#.doc (doc "A simple way to produce JSON literals."
- (json true)
+ (json #1)
(json 123.456)
(json "Some text")
(json #null)
@@ -154,7 +154,7 @@
(def: (= x y)
(case [x y]
[#Null #Null]
- true
+ #1
(^template [ ]
[( x') ( y')]
@@ -167,12 +167,12 @@
(and (n/= (row.size xs) (row.size ys))
(list/fold (function (_ idx prev)
(and prev
- (maybe.default false
+ (maybe.default #0
(do maybe.Monad
[x' (row.nth idx xs)
y' (row.nth idx ys)]
(wrap (= x' y'))))))
- true
+ #1
(list.indices (row.size xs))))
[(#Object xs) (#Object ys)]
@@ -180,13 +180,13 @@
(list/fold (function (_ [xk xv] prev)
(and prev
(case (dict.get xk ys)
- #.None false
+ #.None #0
(#.Some yv) (= xv yv))))
- true
+ #1
(dict.entries xs)))
_
- false)))
+ #0)))
############################################################
############################################################
@@ -420,13 +420,13 @@
[_ (l.this )]
(wrap )))]
- [t~ "true" true]
- [f~ "false" false]
+ [true~ "true" #1]
+ [false~ "false" #0]
)
(def: boolean~
(l.Lexer Boolean)
- (p.either t~ f~))
+ (p.either true~ false~))
(def: number~
(l.Lexer Number)
diff --git a/stdlib/source/lux/data/format/xml.lux b/stdlib/source/lux/data/format/xml.lux
index fcdca14c8..6d6e93799 100644
--- a/stdlib/source/lux/data/format/xml.lux
+++ b/stdlib/source/lux/data/format/xml.lux
@@ -242,7 +242,7 @@
(list.every? (product.uncurry =))))
_
- false)))
+ #0)))
(type: #export (Reader a)
(p.Parser (List XML) a))
diff --git a/stdlib/source/lux/data/maybe.lux b/stdlib/source/lux/data/maybe.lux
index 90712968b..bc9d0af95 100644
--- a/stdlib/source/lux/data/maybe.lux
+++ b/stdlib/source/lux/data/maybe.lux
@@ -52,13 +52,13 @@
(def: (= mx my)
(case [mx my]
[#.None #.None]
- true
+ #1
[(#.Some x) (#.Some y)]
(:: Equivalence = x y)
_
- false)))
+ #0)))
(structure: #export (MaybeT Monad)
(All [M] (-> (Monad M) (Monad (All [a] (M (Maybe a))))))
diff --git a/stdlib/source/lux/data/number.lux b/stdlib/source/lux/data/number.lux
index cb322299c..7f591c85c 100644
--- a/stdlib/source/lux/data/number.lux
+++ b/stdlib/source/lux/data/number.lux
@@ -615,9 +615,9 @@
(if (f/= -1.0 sign) +1 +0)
dot-idx))
decimal-part (maybe.assume ("lux text clip" raw-bin (inc dot-idx) ("lux text size" raw-bin)))
- hex-output (|> ( false decimal-part)
+ hex-output (|> ( #0 decimal-part)
("lux text concat" ".")
- ("lux text concat" ( true whole-part))
+ ("lux text concat" ( #1 whole-part))
("lux text concat" (if (f/= -1.0 sign) "-" "")))]
hex-output))
@@ -672,10 +672,10 @@
(-> Text Bit)
(case ("lux text index" number "_" +0)
(#.Some +0)
- true
+ #1
_
- false))
+ #0))
(def: clean-underscores
(-> Text Text)
@@ -777,15 +777,15 @@
(def: (digits-to-text digits)
(-> Digits Text)
(loop [idx (dec i64.width)
- all-zeroes? true
+ all-zeroes? #1
output ""]
(if (i/>= 0 (:coerce Int idx))
(let [digit (digits-get idx digits)]
(if (and (n/= +0 digit)
all-zeroes?)
- (recur (dec idx) true output)
+ (recur (dec idx) #1 output)
(recur (dec idx)
- false
+ #0
("lux text concat"
(:: Codec encode (:coerce Int digit))
output))))
@@ -880,10 +880,10 @@
(let [length ("lux text size" input)
dotted? (case ("lux text index" input "." +0)
(#.Some +0)
- true
+ #1
_
- false)]
+ #0)]
(if (and dotted?
(n/<= (inc i64.width) length))
(case (|> ("lux text clip" input +1 length)
diff --git a/stdlib/source/lux/data/text.lux b/stdlib/source/lux/data/text.lux
index 8120f19d5..a5223c3e3 100644
--- a/stdlib/source/lux/data/text.lux
+++ b/stdlib/source/lux/data/text.lux
@@ -63,10 +63,10 @@
(-> Text Text Bit)
(case (index-of prefix x)
(#.Some +0)
- true
+ #1
_
- false))
+ #0))
(def: #export (ends-with? postfix x)
(-> Text Text Bit)
@@ -76,16 +76,16 @@
(n/+ (size postfix) n))
_
- false))
+ #0))
(def: #export (contains? sub text)
(-> Text Text Bit)
(case ("lux text index" text sub +0)
(#.Some _)
- true
+ #1
_
- false))
+ #0))
(def: #export (clip from to input)
(-> Nat Nat Text (Maybe Text))
@@ -202,8 +202,8 @@
(def: #export (empty? text)
(-> Text Bit)
(case text
- "" true
- _ false))
+ "" #1
+ _ #0))
(def: #export (enclose [left right] content)
{#.doc "Surrounds the given content text with left and right side additions."}
@@ -239,7 +239,7 @@
(^or (^ (char "\t")) (^ (char "\v"))
(^ (char " ")) (^ (char "\n"))
(^ (char "\r")) (^ (char "\f")))
- true
+ #1
_
- false))
+ #0))
diff --git a/stdlib/source/lux/data/text/lexer.lux b/stdlib/source/lux/data/text/lexer.lux
index d9b07db1e..3ece75c23 100644
--- a/stdlib/source/lux/data/text/lexer.lux
+++ b/stdlib/source/lux/data/text/lexer.lux
@@ -82,10 +82,10 @@
(function (_ (^@ input [offset tape]))
(case (text.index-of' reference offset tape)
(^multi (#.Some where) (n/= offset where))
- (#e.Success [[(n/+ (text.size reference) offset) tape] true])
+ (#e.Success [[(n/+ (text.size reference) offset) tape] #1])
_
- (#e.Success [input false]))))
+ (#e.Success [input #0]))))
(def: #export end
{#.doc "Ensure the lexer's input is empty."}
diff --git a/stdlib/source/lux/data/text/regex.lux b/stdlib/source/lux/data/text/regex.lux
index 107270225..94012c086 100644
--- a/stdlib/source/lux/data/text/regex.lux
+++ b/stdlib/source/lux/data/text/regex.lux
@@ -375,7 +375,7 @@
($_ p.either
(do p.Monad
[_ (l.this "(?:")
- [_ scoped] (re-alternative^ false re-scoped^ current-module)
+ [_ scoped] (re-alternative^ #0 re-scoped^ current-module)
_ (l.this ")")]
(wrap [#Non-Capturing scoped]))
(do p.Monad
@@ -385,18 +385,18 @@
[_ (l.this "(?<")
captured-name identifier-part^
_ (l.this ">")
- [num-captures pattern] (re-alternative^ true re-scoped^ current-module)
+ [num-captures pattern] (re-alternative^ #1 re-scoped^ current-module)
_ (l.this ")")]
(wrap [(#Capturing [(#.Some captured-name) num-captures]) pattern]))
(do p.Monad
[_ (l.this "(")
- [num-captures pattern] (re-alternative^ true re-scoped^ current-module)
+ [num-captures pattern] (re-alternative^ #1 re-scoped^ current-module)
_ (l.this ")")]
(wrap [(#Capturing [#.None num-captures]) pattern]))))
(def: (regex^ current-module)
(-> Text (l.Lexer Code))
- (:: p.Monad map product.right (re-alternative^ true re-scoped^ current-module)))
+ (:: p.Monad map product.right (re-alternative^ #1 re-scoped^ current-module)))
## [Syntax]
(syntax: #export (regex {pattern s.text})
diff --git a/stdlib/source/lux/host.jvm.lux b/stdlib/source/lux/host.jvm.lux
index 927f16c7d..118ae5a1f 100644
--- a/stdlib/source/lux/host.jvm.lux
+++ b/stdlib/source/lux/host.jvm.lux
@@ -281,11 +281,11 @@
(-> Primitive-Mode (List Type-Paramameter) Bit GenericType Code)
Code)
(case [name+params mode in-array?]
- (^multi [[prim #.Nil] #ManualPrM false]
+ (^multi [[prim #.Nil] #ManualPrM #0]
[(manual-primitive-to-type prim) (#.Some output)])
output
- (^multi [[prim #.Nil] #AutoPrM false]
+ (^multi [[prim #.Nil] #AutoPrM #0]
[(auto-primitive-to-type prim) (#.Some output)])
output
@@ -313,7 +313,7 @@
class->type')
(#GenericArray param)
- (let [=param (class->type' mode type-params true param)]
+ (let [=param (class->type' mode type-params #1 param)]
(` (.Array (~ =param))))
(^or (#GenericWildcard #.None) (#GenericWildcard (#.Some [#LowerBound _])))
@@ -325,7 +325,7 @@
(def: (class->type mode type-params class)
(-> Primitive-Mode (List Type-Paramameter) GenericType Code)
- (class->type' mode type-params false class))
+ (class->type' mode type-params #0 class))
(def: (type-param-type$ [name bounds])
(-> Type-Paramameter Code)
@@ -1298,7 +1298,7 @@
(#private baz java/lang/Object)
## Methods
(#public [] (new [value A]) []
- (exec (:= ::foo true)
+ (exec (:= ::foo #1)
(:= ::bar value)
(:= ::baz "")
[]))
@@ -1315,7 +1315,7 @@
"Fields and methods defined in the class can be used with special syntax."
"For example:"
"::resolved, for accessing the \"resolved\" field."
- "(:= ::resolved true) for modifying it."
+ "(:= ::resolved #1) for modifying it."
"(::new! []) for calling the class's constructor."
"(::resolve! container [value]) for calling the \"resolve\" method."
)}
@@ -1394,10 +1394,10 @@
{#.doc (doc "Test for null object reference."
(null? (null))
"=>"
- true
+ #1
(null? "YOLO")
"=>"
- false)}
+ #0)}
(-> (primitive "java.lang.Object") Bit)
("jvm object null?" obj))
@@ -1486,7 +1486,7 @@
(short-class-name full-name))
params' (list/map (|>> product.left code.local-symbol) params)]
(` (def: (~ (code.symbol ["" def-name]))
- {#.type? true
+ {#.type? #1
#..jvm-class (~ (code.text full-name))}
Type
(All [(~+ params')]
@@ -1590,8 +1590,8 @@
(def: (free-type-param? [name bounds])
(-> Type-Paramameter Bit)
(case bounds
- #.Nil true
- _ false))
+ #.Nil #1
+ _ #0))
(def: (type-param->type-arg [name _])
(-> Type-Paramameter Code)
@@ -1624,10 +1624,10 @@
(-> Text Bit)
(case class
(^or "byte" "short" "int" "float")
- true
+ #1
_
- false))
+ #0))
(def: (auto-conv [class var])
(-> [Text Code] (List Code))
diff --git a/stdlib/source/lux/language/compiler/analysis.lux b/stdlib/source/lux/language/compiler/analysis.lux
index e9eb3b921..a2686d6bf 100644
--- a/stdlib/source/lux/language/compiler/analysis.lux
+++ b/stdlib/source/lux/language/compiler/analysis.lux
@@ -183,12 +183,12 @@
_
(#.Some {#lefts lefts
- #right? false
+ #right? #0
#value valueA}))
( (#Sum (#.Right valueA)))
(#.Some {#lefts lefts
- #right? true
+ #right? #1
#value valueA})
_
diff --git a/stdlib/source/lux/language/compiler/analysis/case/coverage.lux b/stdlib/source/lux/language/compiler/analysis/case/coverage.lux
index b718c382d..c19003df6 100644
--- a/stdlib/source/lux/language/compiler/analysis/case/coverage.lux
+++ b/stdlib/source/lux/language/compiler/analysis/case/coverage.lux
@@ -32,12 +32,12 @@
_
{#///.lefts lefts
- #///.right? false
+ #///.right? #0
#///.value valueP})
(#.Right valueP)
{#///.lefts lefts
- #///.right? true
+ #///.right? #1
#///.value valueP})))
## The coverage of a pattern-matching expression summarizes how well
@@ -64,10 +64,10 @@
(-> Coverage Bit)
(case coverage
(#Exhaustive _)
- true
+ #1
_
- false))
+ #0))
(def: #export (determine pattern)
(-> Pattern (Operation Coverage))
@@ -87,8 +87,8 @@
[#///.Frac]
[#///.Text])
- ## Bits are the exception, since there is only "true" and
- ## "false", which means it is possible for bit
+ ## Bits are the exception, since there is only "#1" and
+ ## "#0", which means it is possible for bit
## pattern-matching to become exhaustive if complementary parts meet.
(#///.Simple (#///.Bit value))
(operation/wrap (#Bit value))
@@ -149,7 +149,7 @@
(def: (= reference sample)
(case [reference sample]
[#Exhaustive #Exhaustive]
- true
+ #1
[(#Bit sideR) (#Bit sideS)]
(bit/= sideR sideS)
@@ -172,7 +172,7 @@
(list.zip2 flatR flatS))))
_
- false)))
+ #0)))
(open: "C/" Equivalence)
@@ -228,15 +228,15 @@
[(#Seq leftA rightA) (#Seq leftSF rightSF)]
(case [(C/= leftSF leftA) (C/= rightSF rightA)]
## There is nothing the addition adds to the coverage.
- [true true]
+ [#1 #1]
redundant-pattern
## The 2 sequences cannot possibly be merged.
- [false false]
+ [#0 #0]
(error/wrap (#Alt so-far addition))
## Same prefix
- [true false]
+ [#1 #0]
(do e.Monad
[rightM (merge rightA rightSF)]
(if (exhaustive? rightM)
@@ -247,7 +247,7 @@
(wrap (#Seq leftSF rightM))))
## Same suffix
- [false true]
+ [#0 #1]
(do e.Monad
[leftM (merge leftA leftSF)]
(wrap (#Seq leftM rightA))))
diff --git a/stdlib/source/lux/language/compiler/analysis/module.lux b/stdlib/source/lux/language/compiler/analysis/module.lux
index bdc4abf05..1ac2b4ac4 100644
--- a/stdlib/source/lux/language/compiler/analysis/module.lux
+++ b/stdlib/source/lux/language/compiler/analysis/module.lux
@@ -108,7 +108,7 @@
(|> state
(get@ #.modules)
(plist.get module)
- (case> (#.Some _) true #.None false)
+ (case> (#.Some _) #1 #.None #0)
[state] #e.Success))))
(def: #export (define name definition)
@@ -159,8 +159,8 @@
(case (|> state (get@ #.modules) (plist.get module-name))
(#.Some module)
(let [active? (case (get@ #.module-state module)
- #.Active true
- _ false)]
+ #.Active #1
+ _ #0)]
(if active?
(#e.Success [(update@ #.modules
(plist.put module-name (set@ #.module-state module))
@@ -180,8 +180,8 @@
(#.Some module)
(#e.Success [state
(case (get@ #.module-state module)
- true
- _ false)])
+ #1
+ _ #0)])
#.None
((///.throw unknown-module module-name) state)))))]
diff --git a/stdlib/source/lux/language/compiler/extension/analysis/host.jvm.lux b/stdlib/source/lux/language/compiler/extension/analysis/host.jvm.lux
index 876448b5b..da4d4461b 100644
--- a/stdlib/source/lux/language/compiler/extension/analysis/host.jvm.lux
+++ b/stdlib/source/lux/language/compiler/extension/analysis/host.jvm.lux
@@ -681,7 +681,7 @@
[