aboutsummaryrefslogtreecommitdiff
path: root/lux-python
diff options
context:
space:
mode:
Diffstat (limited to 'lux-python')
-rw-r--r--lux-python/source/program.lux26
1 files changed, 13 insertions, 13 deletions
diff --git a/lux-python/source/program.lux b/lux-python/source/program.lux
index f7c167368..8dad70853 100644
--- a/lux-python/source/program.lux
+++ b/lux-python/source/program.lux
@@ -12,7 +12,7 @@
["." io (#+ IO io)]
["." function]
[concurrency
- ["." promise (#+ Promise)]]]
+ ["." async (#+ Async)]]]
[data
["." maybe]
["." text ("#\." hash)
@@ -153,10 +153,10 @@
(#try.Failure try)
(^multi [(#try.Success tag) (#try.Success flag) (#try.Success value)]
- [(read tag)
- (#try.Success tag)]
- [(read value)
- (#try.Success value)])
+ {(read tag)
+ (#try.Success tag)}
+ {(read value)
+ (#try.Success value)})
(#try.Success [tag
(: Any
(case (ffi.check org/python/core/PyNone flag)
@@ -289,7 +289,7 @@
(def: (ingest context content)
(|> content
(\ utf8.codec decode)
- try.assume
+ try.assumed
(:as (_.Statement Any))))
(def: (re_learn context custom content)
@@ -329,7 +329,7 @@
(def: define! define!)
(def: (ingest context content)
- (|> content (\ utf8.codec decode) try.assume (:as (_.Statement Any))))
+ (|> content (\ utf8.codec decode) try.assumed (:as (_.Statement Any))))
(def: (re_learn context content)
(execute! content))
@@ -358,7 +358,7 @@
{inputs [org/python/core/PyObject]}
{keywords [java/lang/String]})
org/python/core/PyObject
- (try.assume
+ (try.assumed
(case (array.to_list inputs)
(^ (list))
(\ try.monad wrap (host_phase (list) phase))
@@ -429,10 +429,10 @@
(:as Operation)
(function (_ state))
(:as Try)
- try.assume
+ try.assumed
(:as Try)
(do try.monad
- [handler (try.from_maybe (..ensure_function handler))
+ [handler (try.of_maybe (..ensure_function handler))
output (org/python/core/PyFunction::__call__ (|> (ffi.array org/python/core/PyObject 5)
(ffi.array_write 0 (org/python/core/PyString::new name))
(ffi.array_write 1 (:as org/python/core/PyObject (phase_wrapper phase)))
@@ -479,8 +479,8 @@
_.none)))))
(def: (declare_success! _)
- (-> Any (Promise Any))
- (promise.future (\ world/program.default exit +0)))
+ (-> Any (Async Any))
+ (async.future (\ world/program.default exit +0)))
(def: (scope body)
(-> (_.Statement Any) (_.Statement Any))
@@ -497,7 +497,7 @@
(program: [{service /cli.service}]
(let [extension ".py"]
- (exec (do promise.monad
+ (exec (do async.monad
[_ (/.compiler {#/static.host @.python
#/static.host_module_extension extension
#/static.target (/cli.target service)