From 6b8678f818a5f7399a50f4e2108d96783d22fd67 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Thu, 19 Mar 2020 21:18:58 -0400 Subject: Got the new compiler to build again. --- stdlib/source/program/compositor.lux | 61 +++++++++++++++++++----------------- 1 file changed, 32 insertions(+), 29 deletions(-) (limited to 'stdlib/source/program/compositor.lux') diff --git a/stdlib/source/program/compositor.lux b/stdlib/source/program/compositor.lux index 43e58cf50..886582c34 100644 --- a/stdlib/source/program/compositor.lux +++ b/stdlib/source/program/compositor.lux @@ -1,5 +1,5 @@ (.module: - [lux #* + [lux (#- Module) [type (#+ :share)] ["@" target (#+ Host)] [abstract @@ -12,7 +12,7 @@ [security ["!" capability]] [concurrency - ["." promise (#+ Promise)]]] + ["." promise (#+ Promise) ("#@." monad)]]] [data [binary (#+ Binary)] ["." product] @@ -20,7 +20,7 @@ ["%" format (#+ format)]] [collection ["." dictionary] - ["." row] + ["." row (#+ Row)] ["." list ("#@." functor fold)]]] [time ["." instant (#+ Instant)]] @@ -42,7 +42,8 @@ [phase [extension (#+ Extender)]]]] [meta - ["." archive (#+ Archive)]]] + ["." archive (#+ Archive) + [descriptor (#+ Module)]]]] ## ["." interpreter] ]] [/ @@ -64,31 +65,32 @@ (wrap output)))) (with-expansions [ (as-is anchor expression artifact)] - (def: (save-artifacts! system state [packager package]) - (All [] - (-> (file.System Promise) - (directive.State+ ) - [(-> (generation.Output artifact) Binary) Path] - (Promise (Try Any)))) - (let [?outcome (phase.run' state - (:share [] - {(directive.State+ ) - state} - {(directive.Operation - (generation.Output artifact)) - (directive.lift-generation generation.output)}))] - (case ?outcome - (#try.Success [state output]) - (do (try.with promise.monad) - [file (: (Promise (Try (File Promise))) - (file.get-file promise.monad system package))] - (!.use (:: file over-write) (packager output))) + ## TODO: Clean-up ASAP. + ## (def: (save-artifacts! system state [packager package]) + ## (All [] + ## (-> (file.System Promise) + ## (directive.State+ ) + ## [(-> (Row [Module (generation.Buffer artifact)]) Binary) Path] + ## (Promise (Try Any)))) + ## (let [?outcome (phase.run' state + ## (:share [] + ## {(directive.State+ ) + ## state} + ## {(directive.Operation + ## (generation.Output artifact)) + ## (directive.lift-generation generation.output)}))] + ## (case ?outcome + ## (#try.Success [state output]) + ## (do (try.with promise.monad) + ## [file (: (Promise (Try (File Promise))) + ## (file.get-file promise.monad system package))] + ## (!.use (:: file over-write) (packager output))) - (#try.Failure error) - (:: promise.monad wrap (#try.Failure error))))) + ## (#try.Failure error) + ## (promise@wrap (#try.Failure error))))) (def: #export (compiler target partial-host-extension - expander host-analysis platform host generation-bundle host-directive-bundle program extender + expander host-analysis platform host module generation-bundle host-directive-bundle program extender service packager,package) (All [] @@ -98,12 +100,13 @@ analysis.Bundle (IO (Platform )) Host + Module (generation.Bundle ) (directive.Bundle ) (-> expression artifact) Extender Service - [(-> (generation.Output artifact) Binary) Path] + [(-> (Row [Module (generation.Buffer artifact)]) Binary) Path] (Promise Any))) (do promise.monad [platform (promise.future platform) @@ -118,13 +121,13 @@ {(Platform ) platform} {(Promise (Try (directive.State+ ))) - (platform.initialize target host expander host-analysis platform generation-bundle host-directive-bundle program extender)}) + (platform.initialize target host module expander host-analysis platform generation-bundle host-directive-bundle program extender)}) [archive state] (:share [] {(Platform ) platform} {(Promise (Try [Archive (directive.State+ )])) (platform.compile target partial-host-extension expander platform host configuration archive.empty state)}) - _ (save-artifacts! (get@ #platform.&file-system platform) state packager,package) + ## _ (save-artifacts! (get@ #platform.&file-system platform) state packager,package) ## _ (cache/io.clean target ...) ] (wrap (log! "Compilation complete!")))) -- cgit v1.2.3