aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/program/aedifex/dependency/resolution.lux
diff options
context:
space:
mode:
authorEduardo Julian2021-07-27 03:51:10 -0400
committerEduardo Julian2021-07-27 03:51:10 -0400
commit061fd8a209bbcaffc2bfb850ac6046752a567d50 (patch)
tree8cd83ad7d0bc06ded7976eb5420467e485733ae8 /stdlib/source/program/aedifex/dependency/resolution.lux
parente64b6d0114c26a455e19a416b5f02a4d19dd711f (diff)
Re-named wrap => in && unwrap => out.
Diffstat (limited to 'stdlib/source/program/aedifex/dependency/resolution.lux')
-rw-r--r--stdlib/source/program/aedifex/dependency/resolution.lux64
1 files changed, 32 insertions, 32 deletions
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 (<xml>.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))]