diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/program/aedifex/command/auto.lux | 8 | ||||
-rw-r--r-- | stdlib/source/program/aedifex/command/build.lux | 64 | ||||
-rw-r--r-- | stdlib/source/program/aedifex/command/clean.lux | 2 | ||||
-rw-r--r-- | stdlib/source/program/aedifex/command/deploy.lux | 2 | ||||
-rw-r--r-- | stdlib/source/program/aedifex/command/deps.lux | 6 | ||||
-rw-r--r-- | stdlib/source/program/aedifex/command/install.lux | 4 | ||||
-rw-r--r-- | stdlib/source/program/aedifex/command/test.lux | 9 |
7 files changed, 47 insertions, 48 deletions
diff --git a/stdlib/source/program/aedifex/command/auto.lux b/stdlib/source/program/aedifex/command/auto.lux index 805ffb1ba..0a1998730 100644 --- a/stdlib/source/program/aedifex/command/auto.lux +++ b/stdlib/source/program/aedifex/command/auto.lux @@ -33,7 +33,7 @@ (\ ! map (|>> (try.else (list)) (monad.map ! (targets fs)))) (\ ! join) - (\ ! map (|>> list.joined (list& path)))))) + (\ ! map (|>> list.together (list& path)))))) (def: .public delay Nat @@ -41,7 +41,7 @@ (def: (pause delay) (-> Nat (Async (Try Any))) - (async.delayed delay (#try.Success []))) + (async.after delay (#try.Success []))) (def: .public (do! delay watcher command) (All [a] @@ -53,10 +53,10 @@ (with_expansions [<call> ((command console program fs shell resolution) profile)] (do {! async.monad} [targets (|> profile - (get@ #///.sources) + (value@ #///.sources) set.list (monad.map ! (..targets fs)) - (\ ! map list.joined))] + (\ ! map list.together))] (do {! ///action.monad} [_ (monad.map ! (\ watcher start watch.modification) targets) _ <call>] diff --git a/stdlib/source/program/aedifex/command/build.lux b/stdlib/source/program/aedifex/command/build.lux index ff469d896..e4de9ab0a 100644 --- a/stdlib/source/program/aedifex/command/build.lux +++ b/stdlib/source/program/aedifex/command/build.lux @@ -49,8 +49,8 @@ (-> Group Name Finder) (|>> dictionary.entries (list.one (function (_ [dependency package]) - (if (and (text\= group (get@ [#///dependency.artifact #///artifact.group] dependency)) - (text\= name (get@ [#///dependency.artifact #///artifact.name] dependency))) + (if (and (text\= group (value@ [#///dependency.artifact #///artifact.group] dependency)) + (text\= name (value@ [#///dependency.artifact #///artifact.name] dependency))) (#.Some dependency) #.None))))) @@ -111,17 +111,17 @@ (def: (path fs home dependency) (All [!] (-> (file.System !) Path Dependency Path)) (let [/ (\ fs separator) - artifact (get@ #///dependency.artifact dependency)] + artifact (value@ #///dependency.artifact dependency)] (|> artifact - (///local.uri (get@ #///artifact.version artifact)) + (///local.uri (value@ #///artifact.version artifact)) (text.replaced uri.separator /) (format home /) - (text.suffix (format "." (get@ #///dependency.type dependency)))))) + (text.suffix (format "." (value@ #///dependency.type dependency)))))) (def: (libraries fs home) (All [!] (-> (file.System !) Path Resolution (List Path))) (|>> dictionary.keys - (list.only (|>> (get@ #///dependency.type) + (list.only (|>> (value@ #///dependency.type) (text\= ///artifact/type.lux_library))) (list\map (..path fs home)))) @@ -156,14 +156,14 @@ (def: .public (host_dependencies fs home) (All [!] (-> (file.System !) Path Resolution (List Path))) (|>> dictionary.keys - (list.only (|>> (get@ #///dependency.type) + (list.only (|>> (value@ #///dependency.type) (text\= ///artifact/type.lux_library) not)) (list\fold (function (_ dependency uniques) - (let [artifact (get@ #///dependency.artifact dependency) - identity [(get@ #///artifact.group artifact) - (get@ #///artifact.name artifact)] - version (get@ #///artifact.version artifact)] + (let [artifact (value@ #///dependency.artifact dependency) + identity [(value@ #///artifact.group artifact) + (value@ #///artifact.name artifact)] + version (value@ #///artifact.version artifact)] (case (dictionary.value identity uniques) (#.Some [current_version current_path]) (if (\ version_order < version current_version) @@ -183,7 +183,7 @@ (def: (plural name) (-> Text (List Text) (List Text)) - (|>> (list\map (|>> (list name))) list.joined)) + (|>> (list\map (|>> (list name))) list.together)) (def: .public start "[BUILD STARTED]") (def: .public success "[BUILD ENDED]") @@ -245,8 +245,7 @@ (-> (List Path) Text) (|> host_dependencies (#.Item ".") - (text.interposed ..jvm_class_path_separator) - %.text)) + (text.interposed ..jvm_class_path_separator))) (def: .public (with_jvm_class_path host_dependencies runtime) (-> (List Path) ///runtime.Runtime ///runtime.Runtime) @@ -255,15 +254,15 @@ runtime _ - (update@ #///runtime.parameters - (|>> (list& "-classpath" (..jvm_class_path host_dependencies))) - runtime))) + (revised@ #///runtime.parameters + (|>> (list& "-cp" (..jvm_class_path host_dependencies))) + runtime))) (def: .public (do! console program fs shell resolution) (-> (Console Async) (Program Async) (file.System Async) (Shell Async) Resolution (Command [Exit Compiler Path])) (function (_ profile) - (let [target (get@ #///.target profile)] - (case (get@ #///.program profile) + (let [target (value@ #///.target profile)] + (case (value@ #///.program profile) #.None (async\in (exception.except ..no_specified_program [])) @@ -273,19 +272,20 @@ .let [home (\ program home) working_directory (\ program directory)]] (do ///action.monad - [[resolution compiler] (async\in (..compiler resolution (get@ #///.compiler profile))) + [[resolution compiler] (async\in (..compiler resolution (value@ #///.compiler profile))) .let [host_dependencies (..host_dependencies fs home resolution) [[command compiler_params] output] (case compiler (#JVM dependency) - [(|> (..path fs home dependency) - (///runtime.for (get@ #///.java profile)) - (with_jvm_class_path host_dependencies)) + [(|> (value@ #///.java profile) + (with@ #///runtime.parameters (list "program._")) + (with_jvm_class_path (#.Item (..path fs home dependency) host_dependencies))) "program.jar"] (^template [<tag> <runtime> <program>] [(<tag> dependency) - [(///runtime.for (get@ <runtime> profile) - (..path fs home dependency)) + [(|> dependency + (..path fs home) + (///runtime.for (value@ <runtime> profile))) <program>]]) ([#JS #///.js "program.js"] [#Python #///.java "program.py"] @@ -294,13 +294,13 @@ / (\ fs separator) cache_directory (format working_directory / target)] _ (console.write_line ..start console) - .let [full_parameters (list.joined (list compiler_params - (list "build") - (..plural "--library" (..libraries fs home resolution)) - (..plural "--host_dependency" host_dependencies) - (..plural "--source" (set.list (get@ #///.sources profile))) - (..singular "--target" cache_directory) - (..singular "--module" program_module)))] + .let [full_parameters (list.together (list compiler_params + (list "build") + (..plural "--library" (..libraries fs home resolution)) + (..plural "--host_dependency" host_dependencies) + (..plural "--source" (set.list (value@ #///.sources profile))) + (..singular "--target" cache_directory) + (..singular "--module" program_module)))] process (\ shell execute [environment working_directory command diff --git a/stdlib/source/program/aedifex/command/clean.lux b/stdlib/source/program/aedifex/command/clean.lux index 67d539db7..9e55ccc83 100644 --- a/stdlib/source/program/aedifex/command/clean.lux +++ b/stdlib/source/program/aedifex/command/clean.lux @@ -33,7 +33,7 @@ (def: .public (do! console fs profile) (-> (Console Async) (file.System Async) (Command Any)) (do {! async.monad} - [.let [target (get@ #///.target profile)] + [.let [target (value@ #///.target profile)] ? (\ fs directory? target) _ (let [! ///action.monad] (if ? diff --git a/stdlib/source/program/aedifex/command/deploy.lux b/stdlib/source/program/aedifex/command/deploy.lux index cbddc9b27..38f975939 100644 --- a/stdlib/source/program/aedifex/command/deploy.lux +++ b/stdlib/source/program/aedifex/command/deploy.lux @@ -60,7 +60,7 @@ (-> (Console Async) (Repository Async) (file.System Async) Artifact (Command Any)) (do {! ///action.monad} [library (|> profile - (get@ #/.sources) + (value@ #/.sources) set.list (export.library fs) (\ ! map (binary.result tar.writer))) diff --git a/stdlib/source/program/aedifex/command/deps.lux b/stdlib/source/program/aedifex/command/deps.lux index 3cbb82403..3c8381e51 100644 --- a/stdlib/source/program/aedifex/command/deps.lux +++ b/stdlib/source/program/aedifex/command/deps.lux @@ -33,16 +33,16 @@ (def: format (%.Format Dependency) - (|>> (get@ #///dependency.artifact) + (|>> (value@ #///dependency.artifact) ///artifact.format %.text)) (def: .public (do! console local remotes new_repository profile) (-> (Console Async) (Repository Async) (List (Repository Async)) (-> URL (Repository Async)) (Command Resolution)) (do async.monad - [.let [dependencies (|> (get@ #///.dependencies profile) + [.let [dependencies (|> (value@ #///.dependencies profile) set.list - (#.Item (get@ #///.compiler profile)))] + (#.Item (value@ #///.compiler profile)))] [local_successes local_failures cache] (///dependency/resolution.all console (list local) new_repository diff --git a/stdlib/source/program/aedifex/command/install.lux b/stdlib/source/program/aedifex/command/install.lux index 9b06daaec..f0677afc7 100644 --- a/stdlib/source/program/aedifex/command/install.lux +++ b/stdlib/source/program/aedifex/command/install.lux @@ -51,11 +51,11 @@ (def: .public (do! console fs repository profile) (-> (Console Async) (file.System Async) (Repository Async) (Command Any)) - (case (get@ #/.identity profile) + (case (value@ #/.identity profile) (#.Some identity) (do ///action.monad [package (|> profile - (get@ #/.sources) + (value@ #/.sources) set.list (export.library fs)) pom (|> profile diff --git a/stdlib/source/program/aedifex/command/test.lux b/stdlib/source/program/aedifex/command/test.lux index a7279c5ec..ae627bcb7 100644 --- a/stdlib/source/program/aedifex/command/test.lux +++ b/stdlib/source/program/aedifex/command/test.lux @@ -36,7 +36,7 @@ (do {! ///action.monad} [.let [home (\ program home)] [build_exit compiler program] (//build.do! console program fs shell resolution - (set@ #///.program (get@ #///.test profile) profile))] + (with@ #///.program (value@ #///.test profile) profile))] (if (i.= shell.normal build_exit) (do ! [_ (console.write_line ..start console) @@ -44,15 +44,14 @@ [test_command test_parameters] (case compiler (#//build.JVM dependency) (|> program - (///runtime.for (get@ #///.java profile)) + (///runtime.for (value@ #///.java profile)) (//build.with_jvm_class_path host_dependencies)) (^template [<tag> <runtime>] [(<tag> artifact) - (///runtime.for (get@ <runtime> profile) + (///runtime.for (value@ <runtime> profile) program)]) - ([#//build.JVM #///.java] - [#//build.JS #///.js] + ([#//build.JS #///.js] [#//build.Python #///.python] [#//build.Lua #///.lua] [#//build.Ruby #///.ruby]))] |