From 99361f07e4dd5724611e13a91ba8f14f039cdf0c Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Thu, 17 Feb 2022 04:41:44 -0400 Subject: Finishing the meta-compiler [Part 3] --- stdlib/source/program/compositor.lux | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'stdlib/source/program/compositor.lux') diff --git a/stdlib/source/program/compositor.lux b/stdlib/source/program/compositor.lux index b398f85e3..7df24358b 100644 --- a/stdlib/source/program/compositor.lux +++ b/stdlib/source/program/compositor.lux @@ -42,6 +42,7 @@ [extension {"+" Extender}]]]] [meta [packager {"+" Packager}] + [context {"+" Context}] ["[0]" cli {"+" Service}] ["[0]" import] ["[0]" export] @@ -52,9 +53,7 @@ [io ["ioW" archive]]]] ... ["[0]" interpreter] - ]]] - ["[0]" / "_" - ["[1][0]" static {"+" Static}]]) + ]]]) (def: (or_crash! failure_description action) (All (_ a) @@ -92,8 +91,8 @@ (format "Duration: ")))]] (in output))) -(def: (package! fs host_dependencies [packager package] static archive context) - (-> (file.System Async) (Dictionary file.Path Binary) [Packager file.Path] Static Archive unit.ID (Async (Try Any))) +(def: (package! fs host_dependencies [packager package] archive context) + (-> (file.System Async) (Dictionary file.Path Binary) [Packager file.Path] Archive unit.ID (Async (Try Any))) (case (packager host_dependencies archive context) {try.#Success content} (case content @@ -129,12 +128,12 @@ (dictionary.has head content output))))))) (with_expansions [ (as_is anchor expression artifact)] - (def: .public (compiler static + (def: .public (compiler file_context expander host_analysis platform generation_bundle host_directive_bundle program anchorT,expressionT,directiveT extender service packager,package) (All (_ ) - (-> Static + (-> Context Expander analysis.Bundle (IO (Platform )) @@ -162,15 +161,15 @@ (Async (Try [(directive.State+ ) Archive phase.Wrapper])) - (:expected (platform.initialize static compilation_module expander host_analysis platform generation_bundle host_directive_bundle program anchorT,expressionT,directiveT extender + (:expected (platform.initialize file_context compilation_module expander host_analysis platform generation_bundle host_directive_bundle program anchorT,expressionT,directiveT extender import compilation_sources))) [archive state] (:sharing [] (Platform ) platform (Async (Try [Archive (directive.State+ )])) - (:expected (platform.compile phase_wrapper import static expander platform compilation [archive state]))) - _ (ioW.freeze (value@ platform.#&file_system platform) static archive) + (:expected (platform.compile phase_wrapper import file_context expander platform compilation [archive state]))) + _ (ioW.freeze (value@ platform.#&file_system platform) file_context archive) program_context (async#in ($/program.context archive)) host_dependencies (..load_host_dependencies (value@ platform.#&file_system platform) compilation_host_dependencies) _ (..package! (for [@.old (file.async file.default) @@ -180,7 +179,6 @@ @.js (maybe.trusted file.default)]) host_dependencies packager,package - static archive program_context)] (in (debug.log! "Compilation complete!")))) -- cgit v1.2.3