aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang/translation/js
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/js
parent6acf4ffc362c0f8ef77d96f8cfe991adb2d9a0eb (diff)
Re-named "Bool" type to "Bit".
Diffstat (limited to 'new-luxc/source/luxc/lang/translation/js')
-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
5 files changed, 9 insertions, 9 deletions
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))))