diff options
author | Eduardo Julian | 2022-08-11 04:15:07 -0400 |
---|---|---|
committer | Eduardo Julian | 2022-08-11 04:15:07 -0400 |
commit | 065e8a4d8122d4616b570496915d2c0e2c78cd6b (patch) | |
tree | f2bbdc3e40b796b34026ab04c9a478d8a3f082d5 /stdlib/source/program/aedifex/command | |
parent | 68d78235694c633c956bb9e8a007cad7d65370bc (diff) |
Re-named the "case" macro to "when".
Diffstat (limited to '')
5 files changed, 14 insertions, 14 deletions
diff --git a/stdlib/source/program/aedifex/command/auto.lux b/stdlib/source/program/aedifex/command/auto.lux index 4e4871f52..a5f02d37f 100644 --- a/stdlib/source/program/aedifex/command/auto.lux +++ b/stdlib/source/program/aedifex/command/auto.lux @@ -64,7 +64,7 @@ (do ! [_ (..pause delay) events (at watcher poll [])] - (case events + (when events {.#Item _} (do ! [_ <call>] diff --git a/stdlib/source/program/aedifex/command/build.lux b/stdlib/source/program/aedifex/command/build.lux index 503fd5f1c..20492bf69 100644 --- a/stdlib/source/program/aedifex/command/build.lux +++ b/stdlib/source/program/aedifex/command/build.lux @@ -100,9 +100,9 @@ (def (lux resolution lux_dependency) (-> Resolution Dependency (Try [Resolution Lux])) (let [[[lux_group lux_name lux_version] lux_type] lux_dependency] - (case (..dependency_finder lux_group lux_name resolution) + (when (..dependency_finder lux_group lux_name resolution) {.#Some dependency} - (case lux_name + (when lux_name (^.with_template [<tag> <name>] [<name> {try.#Success [(..remove_dependency dependency resolution) @@ -148,7 +148,7 @@ (def (< left right) (loop (again [left (text.all_split_by ..version_separator left) right (text.all_split_by ..version_separator right)]) - (case [left right] + (when [left right] [{.#Item leftH leftT} {.#Item rightH rightT}] (if (text#= leftH rightH) (again leftT rightT) @@ -175,7 +175,7 @@ identity [(the ///artifact.#group artifact) (the ///artifact.#name artifact)] version (the ///artifact.#version artifact)] - (case (dictionary.value identity uniques) + (when (dictionary.value identity uniques) {.#Some [current_version current_path]} (if (at version_order < version current_version) (dictionary.has identity [version dependency] uniques) @@ -213,7 +213,7 @@ (async.async [])) _ (|> (at process <capability> []) (async.upon! (function (again ?line) - (case ?line + (when ?line {try.#Failure error} (if (exception.match? shell.no_more_output error) (write! {try.#Success []}) @@ -222,7 +222,7 @@ {try.#Success line} (async.upon! (function (_ outcome) - (case outcome + (when outcome {try.#Failure error} (write! {try.#Failure error}) @@ -264,7 +264,7 @@ (def .public (with_jvm_class_path host_dependencies runtime) (-> (List Path) ///runtime.Runtime ///runtime.Runtime) - (case host_dependencies + (when host_dependencies {.#End} runtime @@ -279,7 +279,7 @@ (-> (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) + (when (the ///.#program profile) {.#None} (async#in (exception.except ..no_specified_program [])) @@ -292,7 +292,7 @@ [[resolution lux] (async#in (..lux resolution (the ///.#lux profile))) .let [host_dependencies (..host_dependencies fs home resolution) [[command_environment command lux_params] output] - (case lux + (when lux {#JVM dependency} [(|> (the ///.#java profile) (has ///runtime.#parameters (list "program._")) @@ -320,7 +320,7 @@ (..plural "--compiler" (list#each compiler.format (the ///.#compilers profile))) (..plural "--source" (set.list (the ///.#sources profile))) (..singular "--target" cache_directory) - (case program_module + (when program_module "" (..singular "--module" program_definition) _ (list#composite (..singular "--module" program_module) (..singular "--program" program_definition))) diff --git a/stdlib/source/program/aedifex/command/deploy/release.lux b/stdlib/source/program/aedifex/command/deploy/release.lux index d7394d7a3..88303069a 100644 --- a/stdlib/source/program/aedifex/command/deploy/release.lux +++ b/stdlib/source/program/aedifex/command/deploy/release.lux @@ -81,7 +81,7 @@ archive.empty {.#None}) try.trusted - (pipe.case + (pipe.when {.#Left it} it diff --git a/stdlib/source/program/aedifex/command/install.lux b/stdlib/source/program/aedifex/command/install.lux index 67739203a..b28e2b275 100644 --- a/stdlib/source/program/aedifex/command/install.lux +++ b/stdlib/source/program/aedifex/command/install.lux @@ -52,7 +52,7 @@ (def .public (do! console fs local profile) (-> (Console Async) (file.System Async) (Repository Async) (Command Any)) - (case (the /.#identity profile) + (when (the /.#identity profile) {.#Some identity} (do ///action.monad [package (|> profile diff --git a/stdlib/source/program/aedifex/command/test.lux b/stdlib/source/program/aedifex/command/test.lux index 16a2694d4..f22372abf 100644 --- a/stdlib/source/program/aedifex/command/test.lux +++ b/stdlib/source/program/aedifex/command/test.lux @@ -49,7 +49,7 @@ [_ (is (Async (Try Any)) (console.write_line ..start console)) .let [host_dependencies (//build.host_dependencies fs home resolution) - [command_environment test_command test_parameters] (case compiler + [command_environment test_command test_parameters] (when compiler {//build.#JVM dependency} (|> program (///runtime.for (the ///.#java profile)) |