aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang/translation/js.lux
diff options
context:
space:
mode:
authorEduardo Julian2018-05-06 00:45:45 -0400
committerEduardo Julian2018-05-06 00:45:45 -0400
commit8787650c4b1641832db9df2c35bc3046e886220e (patch)
tree8c14799379226aa8452d39d91e9a56896db9187f /new-luxc/source/luxc/lang/translation/js.lux
parent3c93d7a3aabaa49c67f9a498bc0d70f0af7f09d0 (diff)
- Updated new-luxc to the latest stdlib changes.
Diffstat (limited to 'new-luxc/source/luxc/lang/translation/js.lux')
-rw-r--r--new-luxc/source/luxc/lang/translation/js.lux22
1 files changed, 11 insertions, 11 deletions
diff --git a/new-luxc/source/luxc/lang/translation/js.lux b/new-luxc/source/luxc/lang/translation/js.lux
index db76a2868..b318c7fbc 100644
--- a/new-luxc/source/luxc/lang/translation/js.lux
+++ b/new-luxc/source/luxc/lang/translation/js.lux
@@ -90,12 +90,12 @@
(def: #export module-js-name Text "module.js")
(def: #export init-module-buffer
- (Meta Unit)
+ (Meta Top)
(function (_ compiler)
(#e.Success [(update@ #.host
(|>> (:! Host)
(set@ #module-buffer (#.Some (StringBuilder::new [])))
- (:! Void))
+ (:! Bottom))
compiler)
[]])))
@@ -106,13 +106,13 @@
[old-name old-sub] (get@ #context old)
new-name (format old-name "$" (%i (nat-to-int old-sub)))]
(case (expr (set@ #.host
- (:! Void (set@ #context [new-name +0] old))
+ (:! Bottom (set@ #context [new-name +0] old))
compiler))
(#e.Success [compiler' output])
(#e.Success [(update@ #.host
(|>> (:! Host)
(set@ #context [old-name (n/inc old-sub)])
- (:! Void))
+ (:! Bottom))
compiler')
[new-name output]])
@@ -134,13 +134,13 @@
(function (_ compiler)
(let [old (:! Host (get@ #.host compiler))]
(case (expr (set@ #.host
- (:! Void (set@ #anchor (#.Some anchor) old))
+ (:! Bottom (set@ #anchor (#.Some anchor) old))
compiler))
(#e.Success [compiler' output])
(#e.Success [(update@ #.host
(|>> (:! Host)
(set@ #anchor (get@ #anchor old))
- (:! Void))
+ (:! Bottom))
compiler')
output])
@@ -173,7 +173,7 @@
(#e.Success [compiler (|> compiler (get@ #.host) (:! Host) (get@ #program-buffer))])))
(def: (execute code)
- (-> Expression (Meta Unit))
+ (-> Expression (Meta Top))
(function (_ compiler)
(case (|> compiler
(get@ #.host)
@@ -304,7 +304,7 @@
(:! Object)))
))
-(def: #export unit Text "\u0000")
+(def: #export unit Text "")
(def: (module-name module)
(-> Text Text)
@@ -317,7 +317,7 @@
(format (module-name module) "$" (lang.normalize-name name)))
(def: #export (save-js code)
- (-> JS (Meta Unit))
+ (-> JS (Meta Top))
(do macro.Monad<Meta>
[module-buffer module-buffer
#let [_ (Appendable::append [(:! CharSequence code)]
@@ -325,11 +325,11 @@
(execute code)))
(def: #export (save-definition name code)
- (-> Ident Expression (Meta Unit))
+ (-> Ident Expression (Meta Top))
(save-js (format "var " (definition-name name) " = " code ";\n")))
(def: #export (save-module! target)
- (-> File (Meta (Process Unit)))
+ (-> File (Meta (Process Top)))
(do macro.Monad<Meta>
[module macro.current-module-name
module-buffer module-buffer