From 11d6d0076f1384c7713e0e055dc1e8fbad4197ad Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Mon, 18 Mar 2019 21:08:32 -0400 Subject: Changed how compiler output is accumulated to ensure correct order when generating the final executable file. --- stdlib/source/program/compositor.lux | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) (limited to 'stdlib/source/program/compositor.lux') diff --git a/stdlib/source/program/compositor.lux b/stdlib/source/program/compositor.lux index 8262fe841..727941fde 100644 --- a/stdlib/source/program/compositor.lux +++ b/stdlib/source/program/compositor.lux @@ -21,7 +21,7 @@ [host ["_" js]] [world - ["." file] + ["." file (#+ File)] ["." console]] [tool [compiler @@ -70,19 +70,10 @@ (statement.lift-generation generation.output)}))] (case ?outcome (#error.Success [state output]) - (exec (log! "all buffers | output:") - (log! (|> output - dictionary.entries - (list@map (function (_ [module buffer]) - (|> buffer - row.to-list - (list@map (|>> product.left %name (format text.new-line text.tab))) - (text.join-with "") - (format module)))) - (text.join-with text.new-line))) - (do (error.with io.monad) - [file (!.use (:: system create-file) "program.js")] - (!.use (:: file over-write) (script.package output)))) + (do (error.with io.monad) + [file (: (IO (Error (File IO))) + (file.get-file io.monad system "program.js"))] + (!.use (:: file over-write) (script.package output))) (#error.Failure error) (:: io.monad wrap (#error.Failure error))))) -- cgit v1.2.3