diff options
Diffstat (limited to 'stdlib/source/lux/compiler/default.lux')
-rw-r--r-- | stdlib/source/lux/compiler/default.lux | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/stdlib/source/lux/compiler/default.lux b/stdlib/source/lux/compiler/default.lux index cb93fdba4..ac3fb7aa8 100644 --- a/stdlib/source/lux/compiler/default.lux +++ b/stdlib/source/lux/compiler/default.lux @@ -118,15 +118,15 @@ _ (loop-module-compilation module-name)] (end-module-compilation module-name))) - (def: #export (compile-module platform configuration module-name compiler) + (def: #export (compile-module platform configuration compiler) (All [fs anchor expression statement] - (-> <Platform> Configuration Text <Compiler> (fs <Compiler>))) + (-> <Platform> Configuration <Compiler> (fs <Compiler>))) (do (:: (get@ #file-system platform) &monad) [source (context.read (get@ #file-system platform) (get@ #cli.sources configuration) - module-name) - ## _ (&io.prepare-module target-dir module-name) - ## _ (write-module target-dir file-name module-name module artifacts) + (get@ #cli.module configuration)) + ## _ (&io.prepare-module target-dir (get@ #cli.module configuration)) + ## _ (write-module target-dir file-name (get@ #cli.module configuration) module artifacts) ] (<| (:: @ map product.left) (:: (get@ #file-system platform) lift) @@ -135,9 +135,9 @@ {<Platform> platform} {<Operation> - (perform-module-compilation module-name source)})))) + (perform-module-compilation (get@ #cli.module configuration) source)})))) - (def: (initialize-runtime platform configuration) + (def: #export (initialize platform configuration) (All [fs anchor expression statement] (-> <Platform> Configuration (fs <Compiler>))) (|> platform @@ -174,13 +174,13 @@ ## (io.fail error)) ) - (def: #export (compile platform configuration program) + (def: #export (compile platform configuration) (All [fs anchor expression statement] - (-> <Platform> Configuration Text (fs Any))) + (-> <Platform> Configuration (fs Any))) (do (:: (get@ #file-system platform) &monad) - [compiler (initialize-runtime platform configuration) - _ (compile-module platform configuration ..prelude compiler) - _ (compile-module platform configuration program compiler) + [compiler (initialize platform configuration) + _ (compile-module platform (set@ #cli.module ..prelude configuration) compiler) + _ (compile-module platform configuration compiler) ## _ (cache/io.clean target ...) ] (wrap (log! "Compilation complete!")))) |