diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/library/lux/tool/compiler/default/platform.lux | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/stdlib/source/library/lux/tool/compiler/default/platform.lux b/stdlib/source/library/lux/tool/compiler/default/platform.lux index 6c38763b0..d78c5d4f7 100644 --- a/stdlib/source/library/lux/tool/compiler/default/platform.lux +++ b/stdlib/source/library/lux/tool/compiler/default/platform.lux @@ -28,7 +28,8 @@ [format ["_" binary {"+" Writer}]]] [world - ["[0]" file {"+" Path}]]]] + ["[0]" file {"+" Path}] + ["[0]" console]]]] ["[0]" // "_" ["[1][0]" init] ["/[1]" // @@ -111,7 +112,7 @@ (monad.each ..monad write_artifact!) (: (Action (List Any))))) document (# async.monad in - (document.check $.key document))] + (document.marked? $.key document))] (ioW.cache system static module_id (_.result ..writer [descriptor document]))))) @@ -140,7 +141,7 @@ (def: runtime_document (Document .Module) - (document.write $.key (module.empty 0))) + (document.document $.key (module.empty 0))) (def: (process_runtime archive platform) (All (_ <type_vars>) @@ -541,7 +542,7 @@ [modules (monad.each ! (function (_ module) (do ! [[descriptor document output] (archive.find module archive) - lux_module (document.read $.key document)] + lux_module (document.content $.key document)] (in [module lux_module]))) (archive.archived archive)) .let [additions (|> modules @@ -673,8 +674,16 @@ {.#Right [descriptor document output]} (do ! - [.let [_ (debug.log! (..module_compilation_log module state)) - descriptor (with@ descriptor.#references all_dependencies descriptor)] + [_ (let [report (..module_compilation_log module state)] + (with_expansions [<else> (in (debug.log! report))] + (for [@.js (case console.default + {.#None} + <else> + + {.#Some console} + (console.write_line report console))] + <else>))) + .let [descriptor (with@ descriptor.#references all_dependencies descriptor)] _ (..cache_module static platform module_id [descriptor document output])] (case (archive.has module [descriptor document output] archive) {try.#Success archive} |