From 061fd8a209bbcaffc2bfb850ac6046752a567d50 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Tue, 27 Jul 2021 03:51:10 -0400 Subject: Re-named wrap => in && unwrap => out. --- .../program/aedifex/dependency/resolution.lux | 64 +++++++++++----------- 1 file changed, 32 insertions(+), 32 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 1a97dad34..8c7b6ab6a 100644 --- a/stdlib/source/program/aedifex/dependency/resolution.lux +++ b/stdlib/source/program/aedifex/dependency/resolution.lux @@ -82,22 +82,22 @@ [?actual (\ repository download (///repository/remote.uri version_template artifact extension))] (case ?actual (#try.Success actual) - (wrap (do {! try.monad} - [output (\ ! map (|>> (:as java/lang/String) - java/lang/String::trim - (:as Text)) - (\ utf8.codec decode actual)) - actual (|> output - (text.split_all_with " ") - list.head - (maybe.default output) - (\ codec decode)) - _ (exception.assert exception [artifact extension output] - (\ ///hash.equivalence = (hash library) actual))] - (wrap (#.Some actual)))) + (in (do {! try.monad} + [output (\ ! map (|>> (:as java/lang/String) + java/lang/String::trim + (:as Text)) + (\ utf8.codec decode actual)) + actual (|> output + (text.split_all_with " ") + list.head + (maybe.default output) + (\ codec decode)) + _ (exception.assert exception [artifact extension output] + (\ ///hash.equivalence = (hash library) actual))] + (in (#.Some actual)))) (#try.Failure error) - (wrap (#try.Success #.None))))) + (in (#try.Success #.None))))) (def: (hashed repository version_template artifact extension) (-> (Repository Async) Version Artifact Extension (Async (Try [Binary Status]))) @@ -109,18 +109,18 @@ ?md5 (..verified_hash data repository version_template artifact (format extension ///artifact/extension.md5) ///hash.md5 ///hash.md5_codec ..md5_does_not_match)] - (wrap [data (case [?sha-1 ?md5] - [(#.Some sha-1) (#.Some md5)] - (#//status.Verified sha-1 md5) + (in [data (case [?sha-1 ?md5] + [(#.Some sha-1) (#.Some md5)] + (#//status.Verified sha-1 md5) - [(#.Some sha-1) _] - (#//status.Partial (#.Left sha-1)) + [(#.Some sha-1) _] + (#//status.Partial (#.Left sha-1)) - [_ (#.Some md5)] - (#//status.Partial (#.Right md5)) + [_ (#.Some md5)] + (#//status.Partial (#.Right md5)) - [#.None #.None] - #//status.Unverified)]))) + [#.None #.None] + #//status.Unverified)]))) (def: #export (one repository dependency) (-> (Repository Async) Dependency (Async (Try Package))) @@ -134,14 +134,14 @@ artifact (set@ #///artifact.version artifact_version artifact)] [pom_data pom_status] (..hashed repository version_template artifact ///artifact/extension.pom) library_&_status (..hashed repository version_template artifact extension)] - (\ async.monad wrap + (\ async.monad in (do try.monad [pom (\ utf8.codec decode pom_data) pom (\ xml.codec decode pom) profile (.run ///pom.parser (list pom))] - (wrap {#///package.origin (#///repository/origin.Remote "") - #///package.library library_&_status - #///package.pom [pom pom_data pom_status]})))))) + (in {#///package.origin (#///repository/origin.Remote "") + #///package.library library_&_status + #///package.pom [pom pom_data pom_status]})))))) (type: #export Resolution (Dictionary Dependency Package)) @@ -179,8 +179,8 @@ (case repositories #.Nil (|> dependency - (exception.throw ..cannot_resolve) - (\ async.monad wrap)) + (exception.except ..cannot_resolve) + (\ async.monad in)) (#.Cons repository alternatives) (do {! async.monad} @@ -190,7 +190,7 @@ (#try.Success package) (do ! [_ (..announce_success console repository (get@ #//.artifact dependency))] - (wrap outcome)) + (in outcome)) (#try.Failure error) (do ! @@ -209,7 +209,7 @@ resolution resolution] (case dependencies #.Nil - (\ async.monad wrap + (\ async.monad in [successes failures resolution]) (#.Cons head tail) @@ -223,7 +223,7 @@ _ (do {! async.monad} [?package (case (dictionary.get head resolution) (#.Some package) - (wrap (#try.Success package)) + (in (#try.Success package)) #.None (..any console repositories head))] -- cgit v1.2.3