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/python | |
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, 18 insertions, 18 deletions
diff --git a/new-luxc/source/luxc/lang/translation/python.lux b/new-luxc/source/luxc/lang/translation/python.lux index 8739c278d..604f06019 100644 --- a/new-luxc/source/luxc/lang/translation/python.lux +++ b/new-luxc/source/luxc/lang/translation/python.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 PyObject)) #module-buffer (Maybe StringBuilder) #program-buffer StringBuilder}) @@ -74,12 +74,12 @@ (def: #export python-module-name Text "module.py") (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) []]))) @@ -90,13 +90,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]]) @@ -118,13 +118,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]) @@ -168,7 +168,7 @@ (#e.Success output) (#e.Success [compiler output])))))] - [load! #loader Statement Top] + [load! #loader Statement Any] [interpret #interpreter Expression PyObject] ) @@ -191,12 +191,12 @@ module-buffer)]] (<eval> code)))] - [save load! python.statement Statement Top] + [save load! python.statement Statement Any] [run interpret python.expression Expression PyObject] ) (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/python/eval.jvm.lux b/new-luxc/source/luxc/lang/translation/python/eval.jvm.lux index 164d088df..6f4e43f9d 100644 --- a/new-luxc/source/luxc/lang/translation/python/eval.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/python/eval.jvm.lux @@ -45,10 +45,10 @@ (getType [] PyType)) (def: (tuple lux-object host-object) - (-> (-> PyObject (Error Top)) PyObject (Error Top)) + (-> (-> PyObject (Error Any)) PyObject (Error Any)) (let [size (:! Nat (PyObject::__len__ [] host-object))] (loop [idx +0 - output (:! (Array Top) (array.new size))] + output (:! (Array Any) (array.new size))] (if (n/< size idx) (case (PyObject::__getitem__ [(:! Int idx)] host-object) (#e.Error error) @@ -72,7 +72,7 @@ (def: value-field (PyString::new [//.variant-value-field])) (def: (variant lux-object host-object) - (-> (-> PyObject (Error Top)) PyObject (Error Top)) + (-> (-> PyObject (Error Any)) PyObject (Error Any)) (case [(PyObject::__getitem__dict [tag-field] host-object) (PyObject::__getitem__dict [flag-field] host-object) (PyObject::__getitem__dict [value-field] host-object)] @@ -85,7 +85,7 @@ [(lux-object value) (#e.Success value)]) (#e.Success [(Long::intValue [] (:! Long tag)) - (: Top + (: Any (case (python-type (:! PyObject flag)) "NoneType" (host.null) @@ -98,7 +98,7 @@ (ex.throw Not-A-Variant (Object::toString [] host-object)))) (def: (lux-object host-object) - (-> PyObject (Error Top)) + (-> PyObject (Error Any)) (case (python-type host-object) "str" (#e.Success (PyObject::asString [] host-object)) @@ -125,7 +125,7 @@ (ex.throw Unknown-Kind-Of-Host-Object (format type " " (Object::toString [] 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/python/runtime.jvm.lux b/new-luxc/source/luxc/lang/translation/python/runtime.jvm.lux index 8167537f5..282d7536e 100644 --- a/new-luxc/source/luxc/lang/translation/python/runtime.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/python/runtime.jvm.lux @@ -426,7 +426,7 @@ (def: #export artifact Text (format prefix ".py")) (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/python/statement.jvm.lux b/new-luxc/source/luxc/lang/translation/python/statement.jvm.lux index b267f5a64..23b51371c 100644 --- a/new-luxc/source/luxc/lang/translation/python/statement.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/python/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]]] |