aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang/translation/js
diff options
context:
space:
mode:
authorEduardo Julian2018-05-20 21:04:03 -0400
committerEduardo Julian2018-05-20 21:04:03 -0400
commit14e96f5e5dad439383d63e60a52169cc2e7aaa5c (patch)
tree606398bbf6742a476a2599d9b25c184c71eae5c7 /new-luxc/source/luxc/lang/translation/js
parent19d38211c33faf6d5fe01665982d696643f60051 (diff)
- Re-named "Top" to "Any", and "Bottom" to "Nothing".
- Removed some modules that should have been deleted before.
Diffstat (limited to '')
-rw-r--r--new-luxc/source/luxc/lang/translation/js.lux22
-rw-r--r--new-luxc/source/luxc/lang/translation/js/eval.jvm.lux8
-rw-r--r--new-luxc/source/luxc/lang/translation/js/runtime.jvm.lux2
-rw-r--r--new-luxc/source/luxc/lang/translation/js/statement.jvm.lux2
4 files changed, 17 insertions, 17 deletions
diff --git a/new-luxc/source/luxc/lang/translation/js.lux b/new-luxc/source/luxc/lang/translation/js.lux
index 3e9b1b143..edca93d10 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 Top)
+ (Meta Any)
(function (_ compiler)
(#e.Success [(update@ #.host
(|>> (:! Host)
(set@ #module-buffer (#.Some (StringBuilder::new [])))
- (:! Bottom))
+ (:! Nothing))
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
- (:! Bottom (set@ #context [new-name +0] old))
+ (:! Nothing (set@ #context [new-name +0] old))
compiler))
(#e.Success [compiler' output])
(#e.Success [(update@ #.host
(|>> (:! Host)
(set@ #context [old-name (n/inc old-sub)])
- (:! Bottom))
+ (:! Nothing))
compiler')
[new-name output]])
@@ -134,13 +134,13 @@
(function (_ compiler)
(let [old (:! Host (get@ #.host compiler))]
(case (expr (set@ #.host
- (:! Bottom (set@ #anchor (#.Some anchor) old))
+ (:! Nothing (set@ #anchor (#.Some anchor) old))
compiler))
(#e.Success [compiler' output])
(#e.Success [(update@ #.host
(|>> (:! Host)
(set@ #anchor (get@ #anchor old))
- (:! Bottom))
+ (:! Nothing))
compiler')
output])
@@ -173,7 +173,7 @@
(#e.Success [compiler (|> compiler (get@ #.host) (:! Host) (get@ #program-buffer))])))
(def: (execute code)
- (-> Expression (Meta Top))
+ (-> Expression (Meta Any))
(function (_ compiler)
(case (|> compiler
(get@ #.host)
@@ -187,7 +187,7 @@
(#e.Success [compiler []]))))
(def: (::toString js-object)
- (-> Top JSObject)
+ (-> Any JSObject)
(object [] AbstractJSObject []
[]
(AbstractJSObject (isFunction) boolean
@@ -317,7 +317,7 @@
(format (module-name module) "$" (lang.normalize-name name)))
(def: #export (save-js code)
- (-> JS (Meta Top))
+ (-> JS (Meta Any))
(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 Top))
+ (-> Ident Expression (Meta Any))
(save-js (format "var " (definition-name name) " = " code ";\n")))
(def: #export (save-module! target)
- (-> File (Meta (Process Top)))
+ (-> File (Meta (Process Any)))
(do macro.Monad<Meta>
[module macro.current-module-name
module-buffer module-buffer
diff --git a/new-luxc/source/luxc/lang/translation/js/eval.jvm.lux b/new-luxc/source/luxc/lang/translation/js/eval.jvm.lux
index 5b2499eb0..04121b944 100644
--- a/new-luxc/source/luxc/lang/translation/js/eval.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/js/eval.jvm.lux
@@ -73,7 +73,7 @@
#.None))
(def: (variant lux-object js-object)
- (-> (-> Object (Error Top)) ScriptObjectMirror (Maybe Top))
+ (-> (-> Object (Error Any)) ScriptObjectMirror (Maybe Any))
(case [(JSObject::getMember [//.variant-tag-field] js-object)
(JSObject::getMember [//.variant-flag-field] js-object)
(JSObject::getMember [//.variant-value-field] js-object)]
@@ -88,7 +88,7 @@
#.None))
(def: (array lux-object js-object)
- (-> (-> Object (Error Top)) ScriptObjectMirror (Maybe (Array Object)))
+ (-> (-> Object (Error Any)) ScriptObjectMirror (Maybe (Array Object)))
(if (JSObject::isArray [] js-object)
(let [init-num-keys (int-to-nat (ScriptObjectMirror::size [] js-object))]
(loop [num-keys init-num-keys
@@ -112,7 +112,7 @@
#.None))
(def: (lux-object js-object)
- (-> Object (Error Top))
+ (-> Object (Error Any))
(`` (cond (host.null? js-object)
(ex.throw Null-Has-No-Lux-Representation "")
@@ -160,7 +160,7 @@
(ex.throw Unknown-Kind-Of-JS-Object (Object::toString [] (:! Object js-object))))))
(def: #export (eval code)
- (-> Expression (Meta Top))
+ (-> Expression (Meta Any))
(function (_ compiler)
(case (|> compiler
(get@ #.host)
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 1839a1a5e..2c7303c31 100644
--- a/new-luxc/source/luxc/lang/translation/js/runtime.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/js/runtime.jvm.lux
@@ -727,7 +727,7 @@
(def: #export artifact Text (format prefix ".js"))
(def: #export translate
- (Meta (Process Top))
+ (Meta (Process Any))
(do macro.Monad<Meta>
[_ //.init-module-buffer
_ (//.save-js runtime)]
diff --git a/new-luxc/source/luxc/lang/translation/js/statement.jvm.lux b/new-luxc/source/luxc/lang/translation/js/statement.jvm.lux
index e15e4379a..849ae76c2 100644
--- a/new-luxc/source/luxc/lang/translation/js/statement.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/js/statement.jvm.lux
@@ -11,7 +11,7 @@
[".T" eval]))
(def: #export (translate-def name expressionT expressionJS metaV)
- (-> Text Type Expression Code (Meta Top))
+ (-> Text Type Expression Code (Meta Any))
(do macro.Monad<Meta>
[current-module macro.current-module-name
#let [def-ident [current-module name]]]