diff options
author | Eduardo Julian | 2022-10-01 16:33:20 -0400 |
---|---|---|
committer | Eduardo Julian | 2022-10-01 16:33:20 -0400 |
commit | 53704218a3705132dbe807a8ef54f938809f84d5 (patch) | |
tree | 44d03d90f4f6f8055fba226e23755edbb3c55318 /lux-ruby | |
parent | 1f4557bf0d904231b3b8d2b2bf73c35e9caead48 (diff) |
New format for extensions [part 0]
Diffstat (limited to 'lux-ruby')
-rw-r--r-- | lux-ruby/source/program.lux | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/lux-ruby/source/program.lux b/lux-ruby/source/program.lux index b729daa3a..14f5fa2c7 100644 --- a/lux-ruby/source/program.lux +++ b/lux-ruby/source/program.lux @@ -11,7 +11,6 @@ ["[0]" try (.only Try)] ["[0]" exception (.only Exception)] ["[0]" io (.only IO io)] - ["[0]" function] [concurrency ["[0]" async (.only Async)]]] [data @@ -779,6 +778,11 @@ [_ (run! content)] (run! (_.global (reference.artifact context)))))))))) +(def phase_wrapper + phase.Wrapper + (for @.jvm (..host_phase (list)) + @.ruby (|>>))) + (for @.jvm (these (exception.def .public (invaid_phase_application [partial_application arity]) (Exception [(List Any) (List Any)]) (exception.report @@ -924,8 +928,8 @@ (exception.except ..invaid_phase_application [partial_application inputs])))))] (org/jruby/RubyProc::newProc (!ruby_runtime) block ..proc_type))) - (def (extender phase_wrapper) - (-> phase.Wrapper Extender) + (def extender + Extender ... TODO: Stop relying on coercions ASAP. (<| (as Extender) (function (@self handler)) @@ -956,13 +960,6 @@ (-> phase.Wrapper Extender) (as_expected handler))) -(def (phase_wrapper archive) - (-> Archive (runtime.Operation phase.Wrapper)) - (<| phase#in - (as phase.Wrapper) - (for @.jvm (..host_phase (list)) - @.ruby (|>>)))) - (def platform (IO (Platform Register _.Expression _.Statement)) (do io.monad @@ -1005,7 +1002,7 @@ analysis.bundle ..platform generation.bundle - (function.constant extension/bundle.empty) + extension/bundle.empty ..lux_program (reference.constant ruby/reference.system) [Register _.Expression _.Statement] |