From 061fd8a209bbcaffc2bfb850ac6046752a567d50 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Tue, 27 Jul 2021 03:51:10 -0400 Subject: Re-named wrap => in && unwrap => out. --- lux-ruby/source/program.lux | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) (limited to 'lux-ruby') 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 [ ] [(case (ffi.check host_object) (#.Some typed_object) - (`` (|> typed_object (~~ (template.splice )))) + (`` (|> typed_object (~~ (template.spliced )))) _)] @@ -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) -- cgit v1.2.3