diff options
author | Eduardo Julian | 2021-07-27 03:51:10 -0400 |
---|---|---|
committer | Eduardo Julian | 2021-07-27 03:51:10 -0400 |
commit | 061fd8a209bbcaffc2bfb850ac6046752a567d50 (patch) | |
tree | 8cd83ad7d0bc06ded7976eb5420467e485733ae8 /lux-ruby/source | |
parent | e64b6d0114c26a455e19a416b5f02a4d19dd711f (diff) |
Re-named wrap => in && unwrap => out.
Diffstat (limited to 'lux-ruby/source')
-rw-r--r-- | lux-ruby/source/program.lux | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/lux-ruby/source/program.lux b/lux-ruby/source/program.lux index 2e77c85f4..5c2b3488d 100644 --- a/lux-ruby/source/program.lux +++ b/lux-ruby/source/program.lux @@ -14,7 +14,7 @@ ["." io (#+ IO io)] ["." function] [concurrency - ["." promise (#+ Promise)]] + ["." async (#+ Async)]] ["<>" parser ["<.>" code]]] [data @@ -265,15 +265,16 @@ (org/jruby/RubyHash::get runtime.variant_flag_field host_object) (org/jruby/RubyHash::get runtime.variant_value_field host_object)] (^multi [(#.Some tag) ?flag (#.Some value)] - [(read value) - (#.Some value)]) + {(read value) + (#.Some value)}) (#try.Success [(java/lang/Long::intValue (:as java/lang/Long tag)) - (: Any (case ?flag - (#.Some _) - "" + (: Any + (case ?flag + (#.Some _) + "" - #.None - (ffi.null))) + #.None + (ffi.null))) value]) _ @@ -288,7 +289,7 @@ (~~ (template [<class> <post_processing>] [(case (ffi.check <class> host_object) (#.Some typed_object) - (`` (|> typed_object (~~ (template.splice <post_processing>)))) + (`` (|> typed_object (~~ (template.spliced <post_processing>)))) _)] @@ -491,7 +492,7 @@ {block org/jruby/runtime/Block}) org/jruby/runtime/builtin/IRubyObject (|> value - debug.inspect + debug.inspection (org/jruby/RubyString::newInternalFromJavaExternal ..initial_ruby_runtime))))) (exception: (invalid_operation {method Text}) @@ -635,7 +636,7 @@ (def: (ingest context content) (|> content (\ utf8.codec decode) - try.assume + try.assumed (:as _.Statement))) (def: (re_learn context custom content) @@ -698,7 +699,7 @@ {inputs [org/jruby/runtime/builtin/IRubyObject]} {_ org/jruby/runtime/Block}) org/jruby/runtime/builtin/IRubyObject - (<| try.assume + (<| try.assumed (let [inputs (array.to_list inputs)]) (case inputs (^ (list)) @@ -771,10 +772,10 @@ (:as Operation) (function (@self state)) (:as Try) - try.assume + try.assumed (:as Try) (do try.monad - [handler (try.from_maybe (..ensure_macro handler)) + [handler (try.of_maybe (..ensure_macro handler)) output (org/jruby/RubyProc::call (!ruby_thread_context) (|> (ffi.array org/jruby/runtime/builtin/IRubyObject 5) (ffi.array_write 0 (org/jruby/RubyString::newInternalFromJavaExternal (!ruby_runtime) name)) @@ -816,12 +817,12 @@ program))) (def: (declare_success! _) - (-> Any (Promise Any)) - (promise.future (\ world/program.default exit +0))) + (-> Any (Async Any)) + (async.future (\ world/program.default exit +0))) (program: [{service /cli.service}] (let [extension ".rb"] - (exec (do promise.monad + (exec (do async.monad [_ (/.compiler {#/static.host @.ruby #/static.host_module_extension extension #/static.target (/cli.target service) |