aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/program
diff options
context:
space:
mode:
authorEduardo Julian2019-03-18 21:08:32 -0400
committerEduardo Julian2019-03-18 21:08:32 -0400
commit11d6d0076f1384c7713e0e055dc1e8fbad4197ad (patch)
tree86224028d319ef7ba41ec3164a7044872567b47b /stdlib/source/program
parent285de1ae1925c2b030bd96032498ccbaa6fc90c9 (diff)
Changed how compiler output is accumulated to ensure correct order when generating the final executable file.
Diffstat (limited to '')
-rw-r--r--stdlib/source/program/compositor.lux19
1 files changed, 5 insertions, 14 deletions
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)))))