From 065e8a4d8122d4616b570496915d2c0e2c78cd6b Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Thu, 11 Aug 2022 04:15:07 -0400 Subject: Re-named the "case" macro to "when". --- stdlib/source/program/aedifex/command/build.lux | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'stdlib/source/program/aedifex/command/build.lux') 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 [ ] [ {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 []) (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))) -- cgit v1.2.3