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/deployment.lux | 28 +++++----- .../program/aedifex/dependency/resolution.lux | 64 +++++++++++----------- 2 files changed, 46 insertions(+), 46 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 3a7cba41f..a6302d5f0 100644 --- a/stdlib/source/program/aedifex/dependency/deployment.lux +++ b/stdlib/source/program/aedifex/dependency/deployment.lux @@ -54,7 +54,7 @@ [_ (\ repository upload artifact data)] (case status #///dependency/status.Unverified - (wrap []) + (in []) (#///dependency/status.Partial partial) (case partial @@ -103,17 +103,17 @@ (#///artifact/snapshot.Remote [now (inc build)])))) (set@ [#///metadata/snapshot.versioning #///artifact/versioning.last_updated] now)) versioning_snapshot (get@ [#///metadata/snapshot.versioning #///artifact/versioning.snapshot] snapshot)]] - (wrap (|> snapshot - (set@ [#///metadata/snapshot.versioning #///artifact/versioning.versions] - (list {#///artifact/snapshot/version.extension type - #///artifact/snapshot/version.value (///artifact/snapshot/version/value.format - {#///artifact/snapshot/version/value.version version_template - #///artifact/snapshot/version/value.snapshot versioning_snapshot}) - #///artifact/snapshot/version.updated now})) - ## (set@ [#///metadata/snapshot.versioning #///artifact/versioning.snapshot] - ## (list\compose (..artifacts type (product.right (get@ #///package.library package))) - ## (..artifacts ///artifact/type.pom (product.right (get@ #///package.pom package))))) - )))) + (in (|> snapshot + (set@ [#///metadata/snapshot.versioning #///artifact/versioning.versions] + (list {#///artifact/snapshot/version.extension type + #///artifact/snapshot/version.value (///artifact/snapshot/version/value.format + {#///artifact/snapshot/version/value.version version_template + #///artifact/snapshot/version/value.snapshot versioning_snapshot}) + #///artifact/snapshot/version.updated now})) + ## (set@ [#///metadata/snapshot.versioning #///artifact/versioning.snapshot] + ## (list\compose (..artifacts type (product.right (get@ #///package.library package))) + ## (..artifacts ///artifact/type.pom (product.right (get@ #///package.pom package))))) + )))) (def: #export (one repository [artifact type] package) (-> (Repository Async) Dependency Package (Async (Try Artifact))) @@ -131,14 +131,14 @@ status])) snapshot (///metadata/snapshot.read repository artifact) - snapshot (\ ! wrap (..update_snapshot [artifact type] now snapshot)) + snapshot (\ ! in (..update_snapshot [artifact type] now snapshot)) _ (///metadata/snapshot.write repository artifact snapshot) project (///metadata/artifact.read repository artifact) _ (|> project (set@ #///metadata/artifact.versions (list version_template)) (set@ #///metadata/artifact.last_updated now) (///metadata/artifact.write repository artifact))] - (wrap artifact)))) + (in artifact)))) (def: #export (all repository resolution) (-> (Repository Async) Resolution (Async (Try (Set Artifact)))) 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