aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang/translation/python.lux
diff options
context:
space:
mode:
Diffstat (limited to 'new-luxc/source/luxc/lang/translation/python.lux')
-rw-r--r--new-luxc/source/luxc/lang/translation/python.lux20
1 files changed, 10 insertions, 10 deletions
diff --git a/new-luxc/source/luxc/lang/translation/python.lux b/new-luxc/source/luxc/lang/translation/python.lux
index 77df53332..8739c278d 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 Unit))
+ #loader (-> Statement (Error Top))
#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 Unit)
+ (Meta Top)
(function (_ compiler)
(#e.Success [(update@ #.host
(|>> (:! Host)
(set@ #module-buffer (#.Some (StringBuilder::new [])))
- (:! Void))
+ (:! Bottom))
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
- (:! 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]])
@@ -118,13 +118,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])
@@ -168,7 +168,7 @@
(#e.Success output)
(#e.Success [compiler output])))))]
- [load! #loader Statement Unit]
+ [load! #loader Statement Top]
[interpret #interpreter Expression PyObject]
)
@@ -191,12 +191,12 @@
module-buffer)]]
(<eval> code)))]
- [save load! python.statement Statement Unit]
+ [save load! python.statement Statement Top]
[run interpret python.expression Expression PyObject]
)
(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