aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/program/aedifex/command/build.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/program/aedifex/command/build.lux')
-rw-r--r--stdlib/source/program/aedifex/command/build.lux21
1 files changed, 12 insertions, 9 deletions
diff --git a/stdlib/source/program/aedifex/command/build.lux b/stdlib/source/program/aedifex/command/build.lux
index 9eae7660d..190ec3802 100644
--- a/stdlib/source/program/aedifex/command/build.lux
+++ b/stdlib/source/program/aedifex/command/build.lux
@@ -16,7 +16,7 @@
["[0]" text (.use "[1]#[0]" order)
["%" \\format (.only format)]]
[collection
- ["[0]" list (.use "[1]#[0]" functor mix)]
+ ["[0]" list (.use "[1]#[0]" functor mix monoid)]
["[0]" dictionary (.only Dictionary)]
["[0]" set]]]
[math
@@ -34,7 +34,7 @@
["[0]" packager (.only)
["[0]_[1]" ruby]]]]]
[world
- ["[0]" program (.only Program)]
+ ["[0]" environment (.only Environment)]
["[0]" file (.only Path)]
["[0]" shell (.only Exit Process Shell)]
["[0]" console (.only Console)]
@@ -275,19 +275,19 @@
"--add-opens" "java.base/java.lang=ALL-UNNAMED"))
runtime)))
-(def .public (do! console program fs shell resolution)
- (-> (Console Async) (Program Async) (file.System Async) (Shell Async) Resolution (Command [Exit Lux Path]))
+(def .public (do! console environment fs shell resolution)
+ (-> (Console Async) (Environment Async) (file.System Async) (Shell Async) Resolution (Command [Exit Lux Path]))
(function (_ profile)
(let [target (the ///.#target profile)]
(case (the ///.#program profile)
{.#None}
(async#in (exception.except ..no_specified_program []))
- {.#Some program_module}
+ {.#Some [program_module program_definition]}
(do async.monad
- [environment (program.environment async.monad program)
- .let [home (at program home)
- working_directory (at program directory)]]
+ [.let [home (at environment home)
+ working_directory (at environment directory)]
+ environment (environment.environment async.monad environment)]
(do ///action.monad
[[resolution lux] (async#in (..lux resolution (the ///.#lux profile)))
.let [host_dependencies (..host_dependencies fs home resolution)
@@ -320,7 +320,10 @@
(..plural "--compiler" (list#each compiler.format (the ///.#compilers profile)))
(..plural "--source" (set.list (the ///.#sources profile)))
(..singular "--target" cache_directory)
- (..singular "--module" program_module)
+ (case program_module
+ "" (..singular "--module" program_definition)
+ _ (list#composite (..singular "--module" program_module)
+ (..singular "--program" program_definition)))
(..singular "--configuration" (configuration.format (the ///.#configuration profile)))))]
process (at shell execute [(dictionary.composite environment command_environment)
working_directory