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/dependency/deployment.lux | 10 +++++----- stdlib/source/program/aedifex/dependency/resolution.lux | 16 ++++++++-------- 2 files changed, 13 insertions(+), 13 deletions(-) (limited to 'stdlib/source/program/aedifex/dependency') diff --git a/stdlib/source/program/aedifex/dependency/deployment.lux b/stdlib/source/program/aedifex/dependency/deployment.lux index 40d7e2532..c74eac1ee 100644 --- a/stdlib/source/program/aedifex/dependency/deployment.lux +++ b/stdlib/source/program/aedifex/dependency/deployment.lux @@ -53,12 +53,12 @@ (at repository upload (format artifact extension)))))] (do [! (try.with async.monad)] [_ (at repository upload artifact data)] - (case status + (when status {///dependency/status.#Unverified} (in []) {///dependency/status.#Partial partial} - (case partial + (when partial {.#Left sha-1} (deploy_hash ///hash.sha-1_codec ///artifact/extension.sha-1 sha-1) @@ -75,12 +75,12 @@ (with_expansions [ (format type ///artifact/extension.sha-1) (format type ///artifact/extension.md5)] (list.partial type - (case status + (when status {///dependency/status.#Unverified} (list) {///dependency/status.#Partial partial} - (list (case partial + (list (when partial {.#Left _} {.#Right _} )) @@ -96,7 +96,7 @@ snapshot (|> snapshot (revised [///metadata/snapshot.#versioning ///artifact/versioning.#snapshot] (function (_ snapshot) - (case snapshot + (when snapshot {///artifact/snapshot.#Local} {///artifact/snapshot.#Local} diff --git a/stdlib/source/program/aedifex/dependency/resolution.lux b/stdlib/source/program/aedifex/dependency/resolution.lux index ae075b5b0..81eb16502 100644 --- a/stdlib/source/program/aedifex/dependency/resolution.lux +++ b/stdlib/source/program/aedifex/dependency/resolution.lux @@ -84,7 +84,7 @@ (Async (Try (Maybe (Hash h)))))) (do async.monad [?actual (at repository download (///repository/remote.uri version_template artifact extension))] - (case ?actual + (when ?actual {try.#Success actual} (in (do [! try.monad] [output (at ! each (|>> ffi.as_string java/lang/String::trim ffi.of_string) @@ -111,7 +111,7 @@ ?md5 (..verified_hash data repository version_template artifact (format extension ///artifact/extension.md5) ///hash.md5 ///hash.md5_codec ..md5_does_not_match)] - (in [data (case [?sha-1 ?md5] + (in [data (when [?sha-1 ?md5] [{.#Some sha-1} {.#Some md5}] {//status.#Verified sha-1 md5} @@ -178,7 +178,7 @@ (def .public (any console repositories dependency) (-> (Console Async) (List (Repository Async)) Dependency (Async (Try Package))) - (case repositories + (when repositories {.#End} (|> dependency (exception.except ..cannot_resolve) @@ -188,7 +188,7 @@ (do [! async.monad] [_ (..announce_fetching console repository (the //.#artifact dependency)) outcome (..one repository dependency)] - (case outcome + (when outcome {try.#Success package} (do ! [_ (..announce_success console repository (the //.#artifact dependency))] @@ -209,13 +209,13 @@ failures (is (List Dependency) (list)) dependencies dependencies resolution resolution]) - (case dependencies + (when dependencies {.#End} (at async.monad in [successes failures resolution]) {.#Item head tail} - (case (the [//.#artifact ///artifact.#version] head) + (when (the [//.#artifact ///artifact.#version] head) ... Skip if there is no version "" (again repositories successes @@ -224,13 +224,13 @@ resolution) _ (do [! async.monad] [?package (is (Async (Try Package)) - (case (dictionary.value head resolution) + (when (dictionary.value head resolution) {.#Some package} (in {try.#Success package}) {.#None} (..any console repositories head)))] - (case ?package + (when ?package {try.#Success package} (do ! [.let [redundant? (is (Predicate Dependency) -- cgit v1.2.3