aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang/translation
diff options
context:
space:
mode:
authorEduardo Julian2018-07-13 22:01:32 -0400
committerEduardo Julian2018-07-13 22:01:32 -0400
commit69fefab57c40f323d759dc444dbcebad15071585 (patch)
treedb08a3ea37c7818c8a98fc995d3c19440141b700 /new-luxc/source/luxc/lang/translation
parent6acf4ffc362c0f8ef77d96f8cfe991adb2d9a0eb (diff)
Re-named "Bool" type to "Bit".
Diffstat (limited to 'new-luxc/source/luxc/lang/translation')
-rw-r--r--new-luxc/source/luxc/lang/translation/common-lisp/case.jvm.lux4
-rw-r--r--new-luxc/source/luxc/lang/translation/common-lisp/eval.jvm.lux2
-rw-r--r--new-luxc/source/luxc/lang/translation/common-lisp/expression.jvm.lux4
-rw-r--r--new-luxc/source/luxc/lang/translation/common-lisp/primitive.jvm.lux4
-rw-r--r--new-luxc/source/luxc/lang/translation/common-lisp/runtime.jvm.lux4
-rw-r--r--new-luxc/source/luxc/lang/translation/common-lisp/structure.jvm.lux2
-rw-r--r--new-luxc/source/luxc/lang/translation/js/case.jvm.lux4
-rw-r--r--new-luxc/source/luxc/lang/translation/js/expression.jvm.lux4
-rw-r--r--new-luxc/source/luxc/lang/translation/js/primitive.jvm.lux4
-rw-r--r--new-luxc/source/luxc/lang/translation/js/runtime.jvm.lux4
-rw-r--r--new-luxc/source/luxc/lang/translation/js/structure.jvm.lux2
-rw-r--r--new-luxc/source/luxc/lang/translation/jvm/case.jvm.lux2
-rw-r--r--new-luxc/source/luxc/lang/translation/jvm/expression.jvm.lux6
-rw-r--r--new-luxc/source/luxc/lang/translation/jvm/function.jvm.lux2
-rw-r--r--new-luxc/source/luxc/lang/translation/jvm/imports.jvm.lux4
-rw-r--r--new-luxc/source/luxc/lang/translation/jvm/loop.jvm.lux2
-rw-r--r--new-luxc/source/luxc/lang/translation/jvm/primitive.jvm.lux4
-rw-r--r--new-luxc/source/luxc/lang/translation/jvm/procedure/host.jvm.lux16
-rw-r--r--new-luxc/source/luxc/lang/translation/jvm/structure.jvm.lux4
-rw-r--r--new-luxc/source/luxc/lang/translation/lua/case.jvm.lux4
-rw-r--r--new-luxc/source/luxc/lang/translation/lua/expression.jvm.lux4
-rw-r--r--new-luxc/source/luxc/lang/translation/lua/primitive.jvm.lux8
-rw-r--r--new-luxc/source/luxc/lang/translation/lua/runtime.jvm.lux4
-rw-r--r--new-luxc/source/luxc/lang/translation/lua/structure.jvm.lux2
-rw-r--r--new-luxc/source/luxc/lang/translation/php/case.jvm.lux6
-rw-r--r--new-luxc/source/luxc/lang/translation/php/expression.jvm.lux4
-rw-r--r--new-luxc/source/luxc/lang/translation/php/primitive.jvm.lux4
-rw-r--r--new-luxc/source/luxc/lang/translation/php/runtime.jvm.lux4
-rw-r--r--new-luxc/source/luxc/lang/translation/php/structure.jvm.lux2
-rw-r--r--new-luxc/source/luxc/lang/translation/python/case.jvm.lux6
-rw-r--r--new-luxc/source/luxc/lang/translation/python/expression.jvm.lux4
-rw-r--r--new-luxc/source/luxc/lang/translation/python/primitive.jvm.lux4
-rw-r--r--new-luxc/source/luxc/lang/translation/python/runtime.jvm.lux4
-rw-r--r--new-luxc/source/luxc/lang/translation/python/structure.jvm.lux2
-rw-r--r--new-luxc/source/luxc/lang/translation/r/case.jvm.lux4
-rw-r--r--new-luxc/source/luxc/lang/translation/r/expression.jvm.lux4
-rw-r--r--new-luxc/source/luxc/lang/translation/r/primitive.jvm.lux4
-rw-r--r--new-luxc/source/luxc/lang/translation/r/runtime.jvm.lux4
-rw-r--r--new-luxc/source/luxc/lang/translation/r/structure.jvm.lux2
-rw-r--r--new-luxc/source/luxc/lang/translation/ruby/case.jvm.lux4
-rw-r--r--new-luxc/source/luxc/lang/translation/ruby/expression.jvm.lux4
-rw-r--r--new-luxc/source/luxc/lang/translation/ruby/primitive.jvm.lux8
-rw-r--r--new-luxc/source/luxc/lang/translation/ruby/runtime.jvm.lux4
-rw-r--r--new-luxc/source/luxc/lang/translation/ruby/structure.jvm.lux2
-rw-r--r--new-luxc/source/luxc/lang/translation/scheme/eval.jvm.lux2
45 files changed, 93 insertions, 89 deletions
diff --git a/new-luxc/source/luxc/lang/translation/common-lisp/case.jvm.lux b/new-luxc/source/luxc/lang/translation/common-lisp/case.jvm.lux
index 9d781429e..373d23ae4 100644
--- a/new-luxc/source/luxc/lang/translation/common-lisp/case.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/common-lisp/case.jvm.lux
@@ -29,7 +29,7 @@
bodyO))))
(def: #export (translate-record-get translate valueS pathP)
- (-> (-> Synthesis (Meta Expression)) Synthesis (List [Nat Bool])
+ (-> (-> Synthesis (Meta Expression)) Synthesis (List [Nat Bit])
(Meta Expression))
(do macro.Monad<Meta>
[valueO (translate valueS)]
@@ -115,7 +115,7 @@
[_ (<tag> value)]
(meta/wrap (_.when (|> value <format> (<=> cursor-top) _.not)
fail-pm!)))
- ([#.Bool _.bool _.equal]
+ ([#.Bit _.bool _.equal]
[#.Nat (<| _.int (:coerce Int)) _.=]
[#.Int _.int _.=]
[#.Rev (<| _.int (:coerce Int)) _.=]
diff --git a/new-luxc/source/luxc/lang/translation/common-lisp/eval.jvm.lux b/new-luxc/source/luxc/lang/translation/common-lisp/eval.jvm.lux
index a10fa0d5d..c88e83ed5 100644
--- a/new-luxc/source/luxc/lang/translation/common-lisp/eval.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/common-lisp/eval.jvm.lux
@@ -85,7 +85,7 @@
(#e.Success output)))))
(def: (variant tag flag value)
- (-> Nat Bool Any Any)
+ (-> Nat Bit Any Any)
[(Long::intValue [] (:coerce Long tag))
(: Any
(if flag
diff --git a/new-luxc/source/luxc/lang/translation/common-lisp/expression.jvm.lux b/new-luxc/source/luxc/lang/translation/common-lisp/expression.jvm.lux
index 4e0c617b4..d3761ff6b 100644
--- a/new-luxc/source/luxc/lang/translation/common-lisp/expression.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/common-lisp/expression.jvm.lux
@@ -38,14 +38,14 @@
(^template [<tag> <generator>]
[_ (<tag> value)]
(<generator> value))
- ([#.Bool primitiveT.translate-bool]
+ ([#.Bit primitiveT.translate-bit]
[#.Nat primitiveT.translate-nat]
[#.Int primitiveT.translate-int]
[#.Rev primitiveT.translate-rev]
[#.Frac primitiveT.translate-frac]
[#.Text primitiveT.translate-text])
- (^code ((~ [_ (#.Nat tag)]) (~ [_ (#.Bool last?)]) (~ valueS)))
+ (^code ((~ [_ (#.Nat tag)]) (~ [_ (#.Bit last?)]) (~ valueS)))
(structureT.translate-variant translate tag last? valueS)
(^code [(~ singleton)])
diff --git a/new-luxc/source/luxc/lang/translation/common-lisp/primitive.jvm.lux b/new-luxc/source/luxc/lang/translation/common-lisp/primitive.jvm.lux
index 1c8c17bed..7556e6ebb 100644
--- a/new-luxc/source/luxc/lang/translation/common-lisp/primitive.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/common-lisp/primitive.jvm.lux
@@ -5,8 +5,8 @@
[//]
(// [".T" runtime]))
-(def: #export translate-bool
- (-> Bool (Meta Expression))
+(def: #export translate-bit
+ (-> Bit (Meta Expression))
(|>> _.bool meta/wrap))
(def: #export translate-int
diff --git a/new-luxc/source/luxc/lang/translation/common-lisp/runtime.jvm.lux b/new-luxc/source/luxc/lang/translation/common-lisp/runtime.jvm.lux
index cd12328e2..43c1fd2a0 100644
--- a/new-luxc/source/luxc/lang/translation/common-lisp/runtime.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/common-lisp/runtime.jvm.lux
@@ -19,7 +19,7 @@
(def: #export unit Expression (_.string //.unit))
(def: (flag value)
- (-> Bool Expression)
+ (-> Bit Expression)
(if value
(_.string "")
_.nil))
@@ -32,7 +32,7 @@
value))
(def: #export (variant tag last? value)
- (-> Nat Bool Expression Expression)
+ (-> Nat Bit Expression Expression)
(variant' (_.int (:coerce Int tag)) (flag last?) value))
(def: #export none
diff --git a/new-luxc/source/luxc/lang/translation/common-lisp/structure.jvm.lux b/new-luxc/source/luxc/lang/translation/common-lisp/structure.jvm.lux
index fe7009627..dcf7e5693 100644
--- a/new-luxc/source/luxc/lang/translation/common-lisp/structure.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/common-lisp/structure.jvm.lux
@@ -25,7 +25,7 @@
(wrap (_.vector elemsT+)))))
(def: #export (translate-variant translate tag tail? valueS)
- (-> (-> Synthesis (Meta Expression)) Nat Bool Synthesis (Meta Expression))
+ (-> (-> Synthesis (Meta Expression)) Nat Bit Synthesis (Meta Expression))
(do macro.Monad<Meta>
[valueT (translate valueS)]
(wrap (runtimeT.variant tag tail? valueT))))
diff --git a/new-luxc/source/luxc/lang/translation/js/case.jvm.lux b/new-luxc/source/luxc/lang/translation/js/case.jvm.lux
index fc01a9d7c..e8fdcb00c 100644
--- a/new-luxc/source/luxc/lang/translation/js/case.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/js/case.jvm.lux
@@ -25,7 +25,7 @@
"})()"))))
(def: #export (translate-record-get translate valueS path)
- (-> (-> ls.Synthesis (Meta Expression)) ls.Synthesis (List [Nat Bool])
+ (-> (-> ls.Synthesis (Meta Expression)) ls.Synthesis (List [Nat Bit])
(Meta Expression))
(do macro.Monad<Meta>
[valueJS (translate valueS)]
@@ -105,7 +105,7 @@
(^template [<tag> <format>]
[_ (<tag> value)]
(meta/wrap (format "if(" peek-cursor " !== " (<format> value) ") { " fail-pattern-matching " }")))
- ([#.Bool %b]
+ ([#.Bit %b]
[#.Frac %f]
[#.Text %t])
diff --git a/new-luxc/source/luxc/lang/translation/js/expression.jvm.lux b/new-luxc/source/luxc/lang/translation/js/expression.jvm.lux
index 8a5e73c75..544dd1eca 100644
--- a/new-luxc/source/luxc/lang/translation/js/expression.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/js/expression.jvm.lux
@@ -42,14 +42,14 @@
(^template [<tag> <generator>]
[_ (<tag> value)]
(<generator> value))
- ([#.Bool primitiveT.translate-bool]
+ ([#.Bit primitiveT.translate-bit]
[#.Nat primitiveT.translate-nat]
[#.Int primitiveT.translate-int]
[#.Rev primitiveT.translate-rev]
[#.Frac primitiveT.translate-frac]
[#.Text primitiveT.translate-text])
- (^code ((~ [_ (#.Nat tag)]) (~ [_ (#.Bool last?)]) (~ valueS)))
+ (^code ((~ [_ (#.Nat tag)]) (~ [_ (#.Bit last?)]) (~ valueS)))
(structureT.translate-variant translate tag last? valueS)
(^code [(~+ members)])
diff --git a/new-luxc/source/luxc/lang/translation/js/primitive.jvm.lux b/new-luxc/source/luxc/lang/translation/js/primitive.jvm.lux
index 753f1ce45..e69291007 100644
--- a/new-luxc/source/luxc/lang/translation/js/primitive.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/js/primitive.jvm.lux
@@ -9,8 +9,8 @@
(// [".T" runtime])
(luxc (lang (host [js #+ JS Expression Statement]))))
-(def: #export translate-bool
- (-> Bool (Meta Expression))
+(def: #export translate-bit
+ (-> Bit (Meta Expression))
(|>> %b meta/wrap))
(def: low-mask Nat (dec (bit.left-shift +32 +1)))
diff --git a/new-luxc/source/luxc/lang/translation/js/runtime.jvm.lux b/new-luxc/source/luxc/lang/translation/js/runtime.jvm.lux
index 9840bba1f..8adfd22bf 100644
--- a/new-luxc/source/luxc/lang/translation/js/runtime.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/js/runtime.jvm.lux
@@ -14,7 +14,7 @@
(def: #export unit Expression (%t //.unit))
(def: (flag value)
- (-> Bool JS)
+ (-> Bit JS)
(if value
(%t "")
"null"))
@@ -26,7 +26,7 @@
[//.variant-value-field value])))
(def: #export (variant tag last? value)
- (-> Nat Bool Expression Expression)
+ (-> Nat Bit Expression Expression)
(variant' (%i (.int tag)) (flag last?) value))
(def: none
diff --git a/new-luxc/source/luxc/lang/translation/js/structure.jvm.lux b/new-luxc/source/luxc/lang/translation/js/structure.jvm.lux
index df7215dba..580f48807 100644
--- a/new-luxc/source/luxc/lang/translation/js/structure.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/js/structure.jvm.lux
@@ -25,7 +25,7 @@
(wrap (format "[" (text.join-with "," elemsT+) "]")))))
(def: #export (translate-variant translate tag tail? valueS)
- (-> (-> Synthesis (Meta Expression)) Nat Bool Synthesis (Meta Expression))
+ (-> (-> Synthesis (Meta Expression)) Nat Bit Synthesis (Meta Expression))
(do macro.Monad<Meta>
[valueT (translate valueS)]
(wrap (runtimeT.variant tag tail? valueT))))
diff --git a/new-luxc/source/luxc/lang/translation/jvm/case.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/case.jvm.lux
index 18309b0e5..d29b9ae7c 100644
--- a/new-luxc/source/luxc/lang/translation/jvm/case.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/jvm/case.jvm.lux
@@ -73,7 +73,7 @@
(macro/wrap (|>> peekI
($i.ASTORE register)))
- [_ (#.Bool value)]
+ [_ (#.Bit value)]
(macro/wrap (let [jumpI (if value $i.IFEQ $i.IFNE)]
(|>> peekI
($i.unwrap #$.Boolean)
diff --git a/new-luxc/source/luxc/lang/translation/jvm/expression.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/expression.jvm.lux
index a587d2e5b..b6fed434e 100644
--- a/new-luxc/source/luxc/lang/translation/jvm/expression.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/jvm/expression.jvm.lux
@@ -32,8 +32,8 @@
(def: #export (translate synthesis)
(-> Synthesis (Meta $.Inst))
(case synthesis
- (^ (//synthesis.bool value))
- (primitiveT.translate-bool value)
+ (^ (//synthesis.bit value))
+ (primitiveT.translate-bit value)
(^ (//synthesis.i64 value))
(primitiveT.translate-i64 value)
@@ -44,7 +44,7 @@
(^ (//synthesis.text value))
(primitiveT.translate-text value)
- (^code ((~ [_ (#.Nat tag)]) (~ [_ (#.Bool last?)]) (~ valueS)))
+ (^code ((~ [_ (#.Nat tag)]) (~ [_ (#.Bit last?)]) (~ valueS)))
(structureT.translate-variant translate tag last? valueS)
(^code [(~+ members)])
diff --git a/new-luxc/source/luxc/lang/translation/jvm/function.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/function.jvm.lux
index 70eedf738..062cf5d52 100644
--- a/new-luxc/source/luxc/lang/translation/jvm/function.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/jvm/function.jvm.lux
@@ -23,7 +23,7 @@
(def: $Object $.Type ($t.class "java.lang.Object" (list)))
(def: (poly-arg? arity)
- (-> ls.Arity Bool)
+ (-> ls.Arity Bit)
(n/> +1 arity))
(def: (reset-method class)
diff --git a/new-luxc/source/luxc/lang/translation/jvm/imports.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/imports.jvm.lux
index 22fdfbece..820024153 100644
--- a/new-luxc/source/luxc/lang/translation/jvm/imports.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/jvm/imports.jvm.lux
@@ -66,7 +66,7 @@
(<| (Future::get [])
promise-to-future
(do promise.Monad<Promise>
- [[new? future] (stm.commit (: (STM [Bool (CompletableFuture (Error Lux))])
+ [[new? future] (stm.commit (: (STM [Bit (CompletableFuture (Error Lux))])
(do stm.Monad<STM>
[current-compilations (stm.read compilations)]
(case (dict.get dependency current-compilations)
@@ -87,7 +87,7 @@
(wrap future)))))
(def: compiled?
- (-> Module Bool)
+ (-> Module Bit)
(|>> (get@ #.module-state)
(case>
(^or #.Cached #.Compiled)
diff --git a/new-luxc/source/luxc/lang/translation/jvm/loop.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/loop.jvm.lux
index f48ab149a..120a3e384 100644
--- a/new-luxc/source/luxc/lang/translation/jvm/loop.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/jvm/loop.jvm.lux
@@ -19,7 +19,7 @@
[".T" reference]))
(def: (constant? register changeS)
- (-> Register ls.Synthesis Bool)
+ (-> Register ls.Synthesis Bit)
(case changeS
(^multi (^code ((~ [_ (#.Int var)])))
(i/= (variableL.local register)
diff --git a/new-luxc/source/luxc/lang/translation/jvm/primitive.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/primitive.jvm.lux
index 80a243852..250b0db52 100644
--- a/new-luxc/source/luxc/lang/translation/jvm/primitive.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/jvm/primitive.jvm.lux
@@ -12,8 +12,8 @@
["ls" synthesis]))
(// [".T" common]))
-(def: #export (translate-bool value)
- (-> Bool (Meta $.Inst))
+(def: #export (translate-bit value)
+ (-> Bit (Meta $.Inst))
(macro/wrap ($i.GETSTATIC "java.lang.Boolean"
(if value "TRUE" "FALSE")
($t.class "java.lang.Boolean" (list)))))
diff --git a/new-luxc/source/luxc/lang/translation/jvm/procedure/host.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/procedure/host.jvm.lux
index f6a0069f5..45cb67fb9 100644
--- a/new-luxc/source/luxc/lang/translation/jvm/procedure/host.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/jvm/procedure/host.jvm.lux
@@ -155,6 +155,10 @@
[double//% $i.DREM #$.Double #$.Double #$.Double]
)
+(def: boolean-class ($t.class "java.lang.Boolean" (list)))
+(def: falseI ($i.GETSTATIC "java.lang.Boolean" "FALSE" boolean-class))
+(def: trueI ($i.GETSTATIC "java.lang.Boolean" "TRUE" boolean-class))
+
(do-template [<name> <op> <unwrapX> <unwrapY> <wrap>]
[(def: (<name> [xI yI])
@.Binary
@@ -163,10 +167,10 @@
(|>> xI ($i.unwrap <unwrapX>)
yI ($i.unwrap <unwrapY>)
(<op> @then)
- ($i.GETSTATIC "java.lang.Boolean" "FALSE" ($t.class "java.lang.Boolean" (list)))
+ falseI
($i.GOTO @end)
($i.label @then)
- ($i.GETSTATIC "java.lang.Boolean" "TRUE" ($t.class "java.lang.Boolean" (list)))
+ trueI
($i.label @end))))]
[int//= $i.IF_ICMPEQ #$.Int #$.Int #$.Boolean]
@@ -186,10 +190,10 @@
<op>
($i.int <reference>)
($i.IF_ICMPEQ @then)
- ($i.GETSTATIC "java.lang.Boolean" "FALSE" ($t.class "java.lang.Boolean" (list)))
+ falseI
($i.GOTO @end)
($i.label @then)
- ($i.GETSTATIC "java.lang.Boolean" "TRUE" ($t.class "java.lang.Boolean" (list)))
+ trueI
($i.label @end))))]
[long//= $i.LCMP 0 #$.Long #$.Long #$.Boolean]
@@ -380,10 +384,10 @@
$i.with-label (function (_ @end))
(|>> objectI
($i.IFNULL @then)
- ($i.GETSTATIC "java.lang.Boolean" "FALSE" ($t.class "java.lang.Boolean" (list)))
+ falseI
($i.GOTO @end)
($i.label @then)
- ($i.GETSTATIC "java.lang.Boolean" "TRUE" ($t.class "java.lang.Boolean" (list)))
+ trueI
($i.label @end))))
(def: (object//synchronized [monitorI exprI])
diff --git a/new-luxc/source/luxc/lang/translation/jvm/structure.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/structure.jvm.lux
index fce1c6790..9d3e4d097 100644
--- a/new-luxc/source/luxc/lang/translation/jvm/structure.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/jvm/structure.jvm.lux
@@ -42,13 +42,13 @@
membersI))))
(def: (flagI tail?)
- (-> Bool $.Inst)
+ (-> Bit $.Inst)
(if tail?
($i.string "")
$i.NULL))
(def: #export (translate-variant translate tag tail? member)
- (-> (-> ls.Synthesis (Meta $.Inst)) Nat Bool ls.Synthesis (Meta $.Inst))
+ (-> (-> ls.Synthesis (Meta $.Inst)) Nat Bit ls.Synthesis (Meta $.Inst))
(do macro.Monad<Meta>
[memberI (translate member)]
(wrap (|>> ($i.int (.int tag))
diff --git a/new-luxc/source/luxc/lang/translation/lua/case.jvm.lux b/new-luxc/source/luxc/lang/translation/lua/case.jvm.lux
index 70d2330f4..af4e61b7c 100644
--- a/new-luxc/source/luxc/lang/translation/lua/case.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/lua/case.jvm.lux
@@ -30,7 +30,7 @@
(lua.return! bodyO)))))))
(def: #export (translate-record-get translate valueS path)
- (-> (-> ls.Synthesis (Meta Expression)) ls.Synthesis (List [Nat Bool])
+ (-> (-> ls.Synthesis (Meta Expression)) ls.Synthesis (List [Nat Bit])
(Meta Expression))
(do macro.Monad<Meta>
[valueO (translate valueS)]
@@ -105,7 +105,7 @@
([#.Nat (<| lua.int (:coerce Int))]
[#.Int lua.int]
[#.Rev (<| lua.int (:coerce Int))]
- [#.Bool lua.bool]
+ [#.Bit lua.bool]
[#.Frac lua.float]
[#.Text lua.string])
diff --git a/new-luxc/source/luxc/lang/translation/lua/expression.jvm.lux b/new-luxc/source/luxc/lang/translation/lua/expression.jvm.lux
index 9632d5708..0fefcc8ba 100644
--- a/new-luxc/source/luxc/lang/translation/lua/expression.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/lua/expression.jvm.lux
@@ -42,14 +42,14 @@
(^template [<tag> <generator>]
[_ (<tag> value)]
(<generator> value))
- ([#.Bool primitiveT.translate-bool]
+ ([#.Bit primitiveT.translate-bit]
[#.Nat primitiveT.translate-nat]
[#.Int primitiveT.translate-int]
[#.Rev primitiveT.translate-rev]
[#.Frac primitiveT.translate-frac]
[#.Text primitiveT.translate-text])
- (^code ((~ [_ (#.Nat tag)]) (~ [_ (#.Bool last?)]) (~ valueS)))
+ (^code ((~ [_ (#.Nat tag)]) (~ [_ (#.Bit last?)]) (~ valueS)))
(structureT.translate-variant translate tag last? valueS)
(^code [(~+ members)])
diff --git a/new-luxc/source/luxc/lang/translation/lua/primitive.jvm.lux b/new-luxc/source/luxc/lang/translation/lua/primitive.jvm.lux
index 4a6c78b04..230498fcb 100644
--- a/new-luxc/source/luxc/lang/translation/lua/primitive.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/lua/primitive.jvm.lux
@@ -6,13 +6,13 @@
[macro "meta/" Monad<Meta>])
(luxc (lang (host [lua #+ Lua Expression Statement]))))
-(def: #export translate-bool
- (-> Bool (Meta Expression))
- (|>> %b meta/wrap))
+(def: #export translate-bit
+ (-> Bit (Meta Expression))
+ (|>> lua.bool meta/wrap))
(def: #export translate-int
(-> Int (Meta Expression))
- (|>> %i meta/wrap))
+ (|>> lua.int meta/wrap))
(def: #export translate-frac
(-> Frac (Meta Expression))
diff --git a/new-luxc/source/luxc/lang/translation/lua/runtime.jvm.lux b/new-luxc/source/luxc/lang/translation/lua/runtime.jvm.lux
index 2c0dfec17..6be20a0e6 100644
--- a/new-luxc/source/luxc/lang/translation/lua/runtime.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/lua/runtime.jvm.lux
@@ -17,7 +17,7 @@
(def: #export unit Expression (%t //.unit))
(def: (flag value)
- (-> Bool Lua)
+ (-> Bit Lua)
(if value
(lua.string "")
lua.nil))
@@ -29,7 +29,7 @@
[//.variant-value-field value])))
(def: #export (variant tag last? value)
- (-> Nat Bool Expression Expression)
+ (-> Nat Bit Expression Expression)
(variant' (%i (.int tag)) (flag last?) value))
(def: none
diff --git a/new-luxc/source/luxc/lang/translation/lua/structure.jvm.lux b/new-luxc/source/luxc/lang/translation/lua/structure.jvm.lux
index c629b0cae..b6eeaa013 100644
--- a/new-luxc/source/luxc/lang/translation/lua/structure.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/lua/structure.jvm.lux
@@ -25,7 +25,7 @@
(wrap (format "{" (text.join-with "," elemsT+) "}")))))
(def: #export (translate-variant translate tag tail? valueS)
- (-> (-> Synthesis (Meta Expression)) Nat Bool Synthesis (Meta Expression))
+ (-> (-> Synthesis (Meta Expression)) Nat Bit Synthesis (Meta Expression))
(do macro.Monad<Meta>
[valueT (translate valueS)]
(wrap (runtimeT.variant tag tail? valueT))))
diff --git a/new-luxc/source/luxc/lang/translation/php/case.jvm.lux b/new-luxc/source/luxc/lang/translation/php/case.jvm.lux
index 0e0aecb7d..c438425ff 100644
--- a/new-luxc/source/luxc/lang/translation/php/case.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/php/case.jvm.lux
@@ -31,7 +31,7 @@
(_.nth (_.int 1))))))
(def: #export (translate-record-get translate valueS pathP)
- (-> (-> Synthesis (Meta Expression)) Synthesis (List [Nat Bool])
+ (-> (-> Synthesis (Meta Expression)) Synthesis (List [Nat Bit])
(Meta Expression))
(do macro.Monad<Meta>
[valueO (translate valueS)]
@@ -115,7 +115,7 @@
(meta/wrap (_.when! (_.not (_.= (|> value <format>) cursor-top))
fail-pm!)))
([#.Int _.int]
- [#.Bool _.bool]
+ [#.Bit _.bool]
[#.Frac _.float]
[#.Text _.string])
@@ -196,7 +196,7 @@
## TODO: Remove (let [inner recur]) once loops can have names.
(let [inner recur]
(case bodyS
- (^code ((~ [_ (#.Nat tag)]) (~ [_ (#.Bool last?)]) (~ valueS)))
+ (^code ((~ [_ (#.Nat tag)]) (~ [_ (#.Bit last?)]) (~ valueS)))
(inner valueS inner-variables)
(^code [(~+ members)])
diff --git a/new-luxc/source/luxc/lang/translation/php/expression.jvm.lux b/new-luxc/source/luxc/lang/translation/php/expression.jvm.lux
index 420775734..b7f9661e7 100644
--- a/new-luxc/source/luxc/lang/translation/php/expression.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/php/expression.jvm.lux
@@ -36,12 +36,12 @@
(^template [<tag> <generator>]
[_ (<tag> value)]
(|> value <generator>))
- ([#.Bool primitiveT.translate-bool]
+ ([#.Bit primitiveT.translate-bit]
[#.Int primitiveT.translate-int]
[#.Frac primitiveT.translate-frac]
[#.Text primitiveT.translate-text])
- (^code ((~ [_ (#.Nat tag)]) (~ [_ (#.Bool last?)]) (~ valueS)))
+ (^code ((~ [_ (#.Nat tag)]) (~ [_ (#.Bit last?)]) (~ valueS)))
(structureT.translate-variant translate tag last? valueS)
(^code [(~+ members)])
diff --git a/new-luxc/source/luxc/lang/translation/php/primitive.jvm.lux b/new-luxc/source/luxc/lang/translation/php/primitive.jvm.lux
index 6fcd675ce..061833c70 100644
--- a/new-luxc/source/luxc/lang/translation/php/primitive.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/php/primitive.jvm.lux
@@ -3,8 +3,8 @@
(lux [macro "meta/" Monad<Meta>])
(luxc (lang (host ["_" php #+ Computation]))))
-(def: #export translate-bool
- (-> Bool (Meta Computation))
+(def: #export translate-bit
+ (-> Bit (Meta Computation))
(|>> _.bool meta/wrap))
(def: #export translate-int
diff --git a/new-luxc/source/luxc/lang/translation/php/runtime.jvm.lux b/new-luxc/source/luxc/lang/translation/php/runtime.jvm.lux
index aeffe45e5..045f8ceb7 100644
--- a/new-luxc/source/luxc/lang/translation/php/runtime.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/php/runtime.jvm.lux
@@ -17,7 +17,7 @@
(def: #export unit Computation (_.string //.unit))
(def: (flag value)
- (-> Bool Computation)
+ (-> Bit Computation)
(if value
(_.string "")
_.null))
@@ -29,7 +29,7 @@
[(_.string //.variant-value-field) value])))
(def: #export (variant tag last? value)
- (-> Nat Bool Expression Computation)
+ (-> Nat Bit Expression Computation)
(variant' (_.int (.int tag))
(flag last?)
value))
diff --git a/new-luxc/source/luxc/lang/translation/php/structure.jvm.lux b/new-luxc/source/luxc/lang/translation/php/structure.jvm.lux
index a92340e92..229b0e31d 100644
--- a/new-luxc/source/luxc/lang/translation/php/structure.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/php/structure.jvm.lux
@@ -25,7 +25,7 @@
(wrap (_.array/* elemsT+)))))
(def: #export (translate-variant translate tag tail? valueS)
- (-> //.Translator Nat Bool Synthesis (Meta Computation))
+ (-> //.Translator Nat Bit Synthesis (Meta Computation))
(do macro.Monad<Meta>
[valueT (translate valueS)]
(wrap (runtimeT.variant tag tail? valueT))))
diff --git a/new-luxc/source/luxc/lang/translation/python/case.jvm.lux b/new-luxc/source/luxc/lang/translation/python/case.jvm.lux
index 8e5b16a88..809b32c23 100644
--- a/new-luxc/source/luxc/lang/translation/python/case.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/python/case.jvm.lux
@@ -30,7 +30,7 @@
(python.apply (list valueO))))))
(def: #export (translate-record-get translate valueS pathP)
- (-> (-> Synthesis (Meta Expression)) Synthesis (List [Nat Bool])
+ (-> (-> Synthesis (Meta Expression)) Synthesis (List [Nat Bit])
(Meta Expression))
(do macro.Monad<Meta>
[valueO (translate valueS)]
@@ -118,7 +118,7 @@
([#.Nat (<| python.int (:coerce Int))]
[#.Int python.int]
[#.Rev (<| python.int (:coerce Int))]
- [#.Bool python.bool]
+ [#.Bit python.bool]
[#.Frac python.float]
[#.Text python.string])
@@ -204,7 +204,7 @@
## TODO: Remove (let [inner recur]) once loops can have names.
(let [inner recur]
(case bodyS
- (^code ((~ [_ (#.Nat tag)]) (~ [_ (#.Bool last?)]) (~ valueS)))
+ (^code ((~ [_ (#.Nat tag)]) (~ [_ (#.Bit last?)]) (~ valueS)))
(inner valueS inner-variables)
(^code [(~+ members)])
diff --git a/new-luxc/source/luxc/lang/translation/python/expression.jvm.lux b/new-luxc/source/luxc/lang/translation/python/expression.jvm.lux
index a1abe59a6..62be95f27 100644
--- a/new-luxc/source/luxc/lang/translation/python/expression.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/python/expression.jvm.lux
@@ -41,14 +41,14 @@
(^template [<tag> <generator>]
[_ (<tag> value)]
(<generator> value))
- ([#.Bool primitiveT.translate-bool]
+ ([#.Bit primitiveT.translate-bit]
[#.Nat primitiveT.translate-nat]
[#.Int primitiveT.translate-int]
[#.Rev primitiveT.translate-rev]
[#.Frac primitiveT.translate-frac]
[#.Text primitiveT.translate-text])
- (^code ((~ [_ (#.Nat tag)]) (~ [_ (#.Bool last?)]) (~ valueS)))
+ (^code ((~ [_ (#.Nat tag)]) (~ [_ (#.Bit last?)]) (~ valueS)))
(structureT.translate-variant translate tag last? valueS)
(^code [(~+ members)])
diff --git a/new-luxc/source/luxc/lang/translation/python/primitive.jvm.lux b/new-luxc/source/luxc/lang/translation/python/primitive.jvm.lux
index 439404893..f88c34fce 100644
--- a/new-luxc/source/luxc/lang/translation/python/primitive.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/python/primitive.jvm.lux
@@ -3,8 +3,8 @@
(lux [macro "meta/" Monad<Meta>])
(luxc (lang (host [python #+ Expression Statement]))))
-(def: #export translate-bool
- (-> Bool (Meta Expression))
+(def: #export translate-bit
+ (-> Bit (Meta Expression))
(|>> python.bool meta/wrap))
(def: #export translate-int
diff --git a/new-luxc/source/luxc/lang/translation/python/runtime.jvm.lux b/new-luxc/source/luxc/lang/translation/python/runtime.jvm.lux
index fbd599c77..70ce11a94 100644
--- a/new-luxc/source/luxc/lang/translation/python/runtime.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/python/runtime.jvm.lux
@@ -17,7 +17,7 @@
(def: #export unit Expression (python.string //.unit))
(def: (flag value)
- (-> Bool Expression)
+ (-> Bit Expression)
(if value
(python.string "")
python.none))
@@ -29,7 +29,7 @@
[(python.string //.variant-value-field) value])))
(def: #export (variant tag last? value)
- (-> Nat Bool Expression Expression)
+ (-> Nat Bit Expression Expression)
(variant' (python.int (.int tag))
(flag last?)
value))
diff --git a/new-luxc/source/luxc/lang/translation/python/structure.jvm.lux b/new-luxc/source/luxc/lang/translation/python/structure.jvm.lux
index 0452ef504..158cf3a2c 100644
--- a/new-luxc/source/luxc/lang/translation/python/structure.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/python/structure.jvm.lux
@@ -25,7 +25,7 @@
(wrap (python.tuple elemsT+)))))
(def: #export (translate-variant translate tag tail? valueS)
- (-> (-> Synthesis (Meta Expression)) Nat Bool Synthesis (Meta Expression))
+ (-> (-> Synthesis (Meta Expression)) Nat Bit Synthesis (Meta Expression))
(do macro.Monad<Meta>
[valueT (translate valueS)]
(wrap (runtimeT.variant tag tail? valueT))))
diff --git a/new-luxc/source/luxc/lang/translation/r/case.jvm.lux b/new-luxc/source/luxc/lang/translation/r/case.jvm.lux
index fb16b8791..42460b620 100644
--- a/new-luxc/source/luxc/lang/translation/r/case.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/r/case.jvm.lux
@@ -31,7 +31,7 @@
bodyO)))))
(def: #export (translate-record-get translate valueS pathP)
- (-> (-> Synthesis (Meta Expression)) Synthesis (List [Nat Bool])
+ (-> (-> Synthesis (Meta Expression)) Synthesis (List [Nat Bit])
(Meta Expression))
(do macro.Monad<Meta>
[valueO (translate valueS)]
@@ -116,7 +116,7 @@
[_ (<tag> value)]
(meta/wrap (r.when (r.not (r.= (|> value <format>) cursor-top))
fail-pm!)))
- ([#.Bool r.bool]
+ ([#.Bit r.bool]
[#.Frac r.float]
[#.Text r.string])
diff --git a/new-luxc/source/luxc/lang/translation/r/expression.jvm.lux b/new-luxc/source/luxc/lang/translation/r/expression.jvm.lux
index cd2227df3..2e30b4999 100644
--- a/new-luxc/source/luxc/lang/translation/r/expression.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/r/expression.jvm.lux
@@ -39,14 +39,14 @@
(^template [<tag> <generator>]
[_ (<tag> value)]
(<generator> value))
- ([#.Bool primitiveT.translate-bool]
+ ([#.Bit primitiveT.translate-bit]
[#.Nat primitiveT.translate-nat]
[#.Int primitiveT.translate-int]
[#.Rev primitiveT.translate-rev]
[#.Frac primitiveT.translate-frac]
[#.Text primitiveT.translate-text])
- (^code ((~ [_ (#.Nat tag)]) (~ [_ (#.Bool last?)]) (~ valueS)))
+ (^code ((~ [_ (#.Nat tag)]) (~ [_ (#.Bit last?)]) (~ valueS)))
(structureT.translate-variant translate tag last? valueS)
(^code [(~ singleton)])
diff --git a/new-luxc/source/luxc/lang/translation/r/primitive.jvm.lux b/new-luxc/source/luxc/lang/translation/r/primitive.jvm.lux
index 3652dfcfd..8bc7da848 100644
--- a/new-luxc/source/luxc/lang/translation/r/primitive.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/r/primitive.jvm.lux
@@ -5,8 +5,8 @@
[//]
(// [".T" runtime]))
-(def: #export translate-bool
- (-> Bool (Meta Expression))
+(def: #export translate-bit
+ (-> Bit (Meta Expression))
(|>> r.bool meta/wrap))
(def: #export translate-int
diff --git a/new-luxc/source/luxc/lang/translation/r/runtime.jvm.lux b/new-luxc/source/luxc/lang/translation/r/runtime.jvm.lux
index 9cab92115..cf0b87d78 100644
--- a/new-luxc/source/luxc/lang/translation/r/runtime.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/r/runtime.jvm.lux
@@ -45,7 +45,7 @@
[//.int-low-field (r.int low)]))))
(def: (flag value)
- (-> Bool Expression)
+ (-> Bit Expression)
(if value
(r.string "")
r.null))
@@ -57,7 +57,7 @@
[//.variant-value-field value])))
(def: #export (variant tag last? value)
- (-> Nat Bool Expression Expression)
+ (-> Nat Bit Expression Expression)
(variant' (r.int (.int tag))
(flag last?)
value))
diff --git a/new-luxc/source/luxc/lang/translation/r/structure.jvm.lux b/new-luxc/source/luxc/lang/translation/r/structure.jvm.lux
index bfe0a40a6..e9a528d2b 100644
--- a/new-luxc/source/luxc/lang/translation/r/structure.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/r/structure.jvm.lux
@@ -25,7 +25,7 @@
(wrap (r.list elemsT+)))))
(def: #export (translate-variant translate tag tail? valueS)
- (-> (-> Synthesis (Meta Expression)) Nat Bool Synthesis (Meta Expression))
+ (-> (-> Synthesis (Meta Expression)) Nat Bit Synthesis (Meta Expression))
(do macro.Monad<Meta>
[valueT (translate valueS)]
(wrap (runtimeT.variant tag tail? valueT))))
diff --git a/new-luxc/source/luxc/lang/translation/ruby/case.jvm.lux b/new-luxc/source/luxc/lang/translation/ruby/case.jvm.lux
index 2cce1abf5..d83a5cd0a 100644
--- a/new-luxc/source/luxc/lang/translation/ruby/case.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/ruby/case.jvm.lux
@@ -30,7 +30,7 @@
(ruby.return! bodyO)))))))
(def: #export (translate-record-get translate valueS path)
- (-> (-> ls.Synthesis (Meta Expression)) ls.Synthesis (List [Nat Bool])
+ (-> (-> ls.Synthesis (Meta Expression)) ls.Synthesis (List [Nat Bit])
(Meta Expression))
(do macro.Monad<Meta>
[valueO (translate valueS)]
@@ -108,7 +108,7 @@
(meta/wrap (ruby.when! (ruby.not (ruby.= (|> value <format>) cursor-top))
(ruby.raise pm-error))))
([#.Int ruby.int]
- [#.Bool ruby.bool]
+ [#.Bit ruby.bool]
[#.Frac ruby.float]
[#.Text ruby.string])
diff --git a/new-luxc/source/luxc/lang/translation/ruby/expression.jvm.lux b/new-luxc/source/luxc/lang/translation/ruby/expression.jvm.lux
index 6d829f81c..e68cf8a8f 100644
--- a/new-luxc/source/luxc/lang/translation/ruby/expression.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/ruby/expression.jvm.lux
@@ -41,12 +41,12 @@
(^template [<tag> <generator>]
[_ (<tag> value)]
(<generator> value))
- ([#.Bool primitiveT.translate-bool]
+ ([#.Bit primitiveT.translate-bit]
[#.Int primitiveT.translate-int]
[#.Frac primitiveT.translate-frac]
[#.Text primitiveT.translate-text])
- (^code ((~ [_ (#.Nat tag)]) (~ [_ (#.Bool last?)]) (~ valueS)))
+ (^code ((~ [_ (#.Nat tag)]) (~ [_ (#.Bit last?)]) (~ valueS)))
(structureT.translate-variant translate tag last? valueS)
(^code [(~+ members)])
diff --git a/new-luxc/source/luxc/lang/translation/ruby/primitive.jvm.lux b/new-luxc/source/luxc/lang/translation/ruby/primitive.jvm.lux
index f84c700d4..cc5e5752e 100644
--- a/new-luxc/source/luxc/lang/translation/ruby/primitive.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/ruby/primitive.jvm.lux
@@ -6,13 +6,13 @@
[macro "meta/" Monad<Meta>])
(luxc (lang (host [ruby #+ Ruby Expression Statement]))))
-(def: #export translate-bool
- (-> Bool (Meta Expression))
- (|>> %b meta/wrap))
+(def: #export translate-bit
+ (-> Bit (Meta Expression))
+ (|>> ruby.bool meta/wrap))
(def: #export translate-int
(-> Int (Meta Expression))
- (|>> %i meta/wrap))
+ (|>> ruby.int meta/wrap))
(def: #export translate-frac
(-> Frac (Meta Expression))
diff --git a/new-luxc/source/luxc/lang/translation/ruby/runtime.jvm.lux b/new-luxc/source/luxc/lang/translation/ruby/runtime.jvm.lux
index 7e94101ff..9d0d0f890 100644
--- a/new-luxc/source/luxc/lang/translation/ruby/runtime.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/ruby/runtime.jvm.lux
@@ -17,7 +17,7 @@
(def: #export unit Expression (%t //.unit))
(def: (flag value)
- (-> Bool Ruby)
+ (-> Bit Ruby)
(if value
(ruby.string "")
ruby.nil))
@@ -29,7 +29,7 @@
[(ruby.string //.variant-value-field) value])))
(def: #export (variant tag last? value)
- (-> Nat Bool Expression Expression)
+ (-> Nat Bit Expression Expression)
(variant' (%i (.int tag)) (flag last?) value))
(def: #export none
diff --git a/new-luxc/source/luxc/lang/translation/ruby/structure.jvm.lux b/new-luxc/source/luxc/lang/translation/ruby/structure.jvm.lux
index 5bf7c9e8b..2a1f81d37 100644
--- a/new-luxc/source/luxc/lang/translation/ruby/structure.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/ruby/structure.jvm.lux
@@ -25,7 +25,7 @@
(wrap (ruby.array elemsT+)))))
(def: #export (translate-variant translate tag tail? valueS)
- (-> (-> Synthesis (Meta Expression)) Nat Bool Synthesis (Meta Expression))
+ (-> (-> Synthesis (Meta Expression)) Nat Bit Synthesis (Meta Expression))
(do macro.Monad<Meta>
[valueT (translate valueS)]
(wrap (runtimeT.variant tag tail? valueT))))
diff --git a/new-luxc/source/luxc/lang/translation/scheme/eval.jvm.lux b/new-luxc/source/luxc/lang/translation/scheme/eval.jvm.lux
index cbdd43d94..ae4a4151a 100644
--- a/new-luxc/source/luxc/lang/translation/scheme/eval.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/scheme/eval.jvm.lux
@@ -73,7 +73,7 @@
(#e.Success output)))))
(def: (variant tag flag value)
- (-> Nat Bool Any Any)
+ (-> Nat Bit Any Any)
[(Long::intValue [] (:coerce Long tag))
(: Any
(if flag