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/resolution.lux | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'stdlib/source/program/aedifex/dependency/resolution.lux') 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