diff options
author | Eduardo Julian | 2018-05-20 21:04:03 -0400 |
---|---|---|
committer | Eduardo Julian | 2018-05-20 21:04:03 -0400 |
commit | 14e96f5e5dad439383d63e60a52169cc2e7aaa5c (patch) | |
tree | 606398bbf6742a476a2599d9b25c184c71eae5c7 /new-luxc/source/luxc/lang/translation/lua | |
parent | 19d38211c33faf6d5fe01665982d696643f60051 (diff) |
- Re-named "Top" to "Any", and "Bottom" to "Nothing".
- Removed some modules that should have been deleted before.
Diffstat (limited to '')
4 files changed, 17 insertions, 17 deletions
diff --git a/new-luxc/source/luxc/lang/translation/lua.lux b/new-luxc/source/luxc/lang/translation/lua.lux index 5d25fb864..94a703300 100644 --- a/new-luxc/source/luxc/lang/translation/lua.lux +++ b/new-luxc/source/luxc/lang/translation/lua.lux @@ -78,7 +78,7 @@ (type: #export Host {#context [Text Nat] #anchor (Maybe Anchor) - #interpreter (-> Text (Error Top)) + #interpreter (-> Text (Error Any)) #module-buffer (Maybe StringBuilder) #program-buffer StringBuilder}) @@ -104,12 +104,12 @@ (def: #export lua-module-name Text "module.lua") (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) []]))) @@ -120,13 +120,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]]) @@ -148,13 +148,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]) @@ -187,7 +187,7 @@ (#e.Success [compiler (|> compiler (get@ #.host) (:! Host) (get@ #program-buffer))]))) (def: (execute code) - (-> Expression (Meta Top)) + (-> Expression (Meta Any)) (function (_ compiler) (let [interpreter (|> compiler (get@ #.host) (:! Host) (get@ #interpreter))] (case (interpreter code) @@ -208,7 +208,7 @@ (lang.normalize-name (format module "$" name))) (def: #export (save code) - (-> Lua (Meta Top)) + (-> Lua (Meta Any)) (do macro.Monad<Meta> [module-buffer module-buffer #let [_ (Appendable::append [(:! CharSequence code)] @@ -216,7 +216,7 @@ (execute code))) (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/lua/eval.jvm.lux b/new-luxc/source/luxc/lang/translation/lua/eval.jvm.lux index cc267e7d5..68b41e6d7 100644 --- a/new-luxc/source/luxc/lang/translation/lua/eval.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/lua/eval.jvm.lux @@ -38,7 +38,7 @@ (host.import net/sandius/rembulan/impl/DefaultTable) (def: (variant lux-object host-object) - (-> (-> Object (Error Top)) DefaultTable (Maybe Top)) + (-> (-> Object (Error Any)) DefaultTable (Maybe Any)) (case [(Table::get-key [//.variant-tag-field] host-object) (Table::get-key [//.variant-flag-field] host-object) (Table::get-key [//.variant-value-field] host-object)] @@ -46,14 +46,14 @@ [(lux-object value) (#.Some value)]) (#.Some [(Long::intValue [] (:! Long tag)) - (: Top (case ?flag (#.Some _) "" #.None (host.null))) + (: Any (case ?flag (#.Some _) "" #.None (host.null))) value]) _ #.None)) (def: (array lux-object host-object) - (-> (-> Object (Error Top)) DefaultTable (Maybe (Array Object))) + (-> (-> Object (Error Any)) DefaultTable (Maybe (Array Object))) (let [init-num-keys (:! Nat (Table::rawlen [] host-object))] (loop [num-keys init-num-keys idx +0 @@ -74,7 +74,7 @@ (#.Some output))))) (def: (lux-object host-object) - (-> Object (Error Top)) + (-> Object (Error Any)) (cond (host.null? host-object) (ex.throw Null-Has-No-Lux-Representation "") @@ -106,7 +106,7 @@ )) (def: #export (eval code) - (-> Expression (Meta Top)) + (-> Expression (Meta Any)) (function (_ compiler) (let [interpreter (|> compiler (get@ #.host) (:! //.Host) (get@ #//.interpreter))] (case (interpreter (format "return " code ";")) 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 70b498dfa..ace528429 100644 --- a/new-luxc/source/luxc/lang/translation/lua/runtime.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/lua/runtime.jvm.lux @@ -386,7 +386,7 @@ (def: #export artifact Text (format prefix ".lua")) (def: #export translate - (Meta (Process Top)) + (Meta (Process Any)) (do macro.Monad<Meta> [_ //.init-module-buffer _ (//.save runtime)] diff --git a/new-luxc/source/luxc/lang/translation/lua/statement.jvm.lux b/new-luxc/source/luxc/lang/translation/lua/statement.jvm.lux index ee0725014..3a438ae65 100644 --- a/new-luxc/source/luxc/lang/translation/lua/statement.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/lua/statement.jvm.lux @@ -11,7 +11,7 @@ [".T" eval])) (def: #export (translate-def name expressionT expressionO 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]]] |