From 53704218a3705132dbe807a8ef54f938809f84d5 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sat, 1 Oct 2022 16:33:20 -0400 Subject: New format for extensions [part 0] --- lux-lua/source/program.lux | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'lux-lua') diff --git a/lux-lua/source/program.lux b/lux-lua/source/program.lux index 8a88b7d79..fb07a4fff 100644 --- a/lux-lua/source/program.lux +++ b/lux-lua/source/program.lux @@ -798,8 +798,8 @@ )) (as java/lang/Object it)))) - (def (extender [state_context executor] phase_wrapper) - (-> Baggage (-> phase.Wrapper Extender)) + (def (extender [state_context executor]) + (-> Baggage Extender) ... TODO: Stop relying on coercions ASAP. (<| (as Extender) (function (@self handler)) @@ -836,14 +836,11 @@ (-> phase.Wrapper Extender) (as_expected handler)))) -(def (phase_wrapper archive) - (-> Archive (runtime.Operation phase.Wrapper)) - (do phase.monad - [] - (in (as phase.Wrapper - (for @.old (..lua_function ..to_host) - @.jvm (..lua_function ..to_host) - @.lua (|>>)))))) +(def phase_wrapper + phase.Wrapper + (for @.old (..lua_function ..to_host) + @.jvm (..lua_function ..to_host) + @.lua (|>>))) (with_expansions [ (def platform (IO [Baggage (Platform [Register _.Label] _.Expression _.Statement)]) @@ -901,7 +898,7 @@ analysis.bundle (io.io platform) generation.bundle - (function.constant extension/bundle.empty) + extension/bundle.empty ..lux_program (reference.constant lua/reference.system) [(type_literal [Register _.Label]) -- cgit v1.2.3