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/php | |
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, 19 insertions, 19 deletions
diff --git a/new-luxc/source/luxc/lang/translation/php.lux b/new-luxc/source/luxc/lang/translation/php.lux index 8cbcaad3a..50bfd5289 100644 --- a/new-luxc/source/luxc/lang/translation/php.lux +++ b/new-luxc/source/luxc/lang/translation/php.lux @@ -54,7 +54,7 @@ (type: #export Host {#context [Text Nat] #anchor (Maybe Anchor) - #loader (-> Statement (Error Top)) + #loader (-> Statement (Error Any)) #interpreter (-> Expression (Error Object)) #module-buffer (Maybe StringBuilder) #program-buffer StringBuilder}) @@ -77,12 +77,12 @@ (def: #export module-name Text (format "module" extension)) (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) []]))) @@ -93,13 +93,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]]) @@ -121,13 +121,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]) @@ -171,7 +171,7 @@ (#e.Success output) (#e.Success [compiler output])))))] - [load! #loader Statement Top] + [load! #loader Statement Any] [interpret #interpreter Expression Object] ) @@ -186,7 +186,7 @@ (lang.normalize-name (format module "$" name))) (def: #export (save code) - (-> Statement (Meta Top)) + (-> Statement (Meta Any)) (do macro.Monad<Meta> [module-buffer module-buffer #let [_ (Appendable::append [(:! CharSequence (_.code code))] @@ -194,7 +194,7 @@ (load! 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/php/eval.jvm.lux b/new-luxc/source/luxc/lang/translation/php/eval.jvm.lux index c6ff1a880..48c09c6c0 100644 --- a/new-luxc/source/luxc/lang/translation/php/eval.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/php/eval.jvm.lux @@ -60,10 +60,10 @@ (get [Memory] Memory)) (def: (tuple lux-object host-object) - (-> (-> Object (Error Top)) ArrayMemory (Error Top)) + (-> (-> Object (Error Any)) ArrayMemory (Error Any)) (let [size (ArrayMemory::size [] host-object)] (loop [idx 0 - output (: (Array Top) (array.new (:! Nat size)))] + output (: (Array Any) (array.new (:! Nat size)))] (if (i/< size idx) (let [value (|> host-object (ArrayMemory::get [(LongMemory::new [idx])]) @@ -78,13 +78,13 @@ (ex.return output))))) (def: (variant lux-object host-object) - (-> (-> Object (Error Top)) ArrayMemory (Error Top)) + (-> (-> Object (Error Any)) ArrayMemory (Error Any)) (do e.Monad<Error> [variant-tag (lux-object (ArrayMemory::get [(StringMemory::new [//.variant-tag-field])] host-object)) variant-value (lux-object (ArrayMemory::get [(StringMemory::new [//.variant-value-field])] host-object))] - (wrap (: Top + (wrap (: Any [(Long::intValue [] (:! Long variant-tag)) - (: Top + (: Any (if (|> host-object (ArrayMemory::get [(StringMemory::new [//.variant-flag-field])]) (:! ReferenceMemory) @@ -95,7 +95,7 @@ variant-value])))) (def: (lux-object host-object) - (-> Object (Error Top)) + (-> Object (Error Any)) (cond (host.instance? php/runtime/memory/FalseMemory host-object) (ex.return false) @@ -123,7 +123,7 @@ (ex.throw Unknown-Kind-Of-Host-Object host-object))) (def: #export (eval code) - (-> Expression (Meta Top)) + (-> Expression (Meta Any)) (function (_ compiler) (let [interpreter (|> compiler (get@ #.host) (:! //.Host) (get@ #//.interpreter))] (case (interpreter code) 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 c7262a291..5f9745845 100644 --- a/new-luxc/source/luxc/lang/translation/php/runtime.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/php/runtime.jvm.lux @@ -397,7 +397,7 @@ (def: #export artifact Text (format prefix //.extension)) (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/php/statement.jvm.lux b/new-luxc/source/luxc/lang/translation/php/statement.jvm.lux index afbf7e476..a20e164ca 100644 --- a/new-luxc/source/luxc/lang/translation/php/statement.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/php/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]]] |