aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/program/aedifex
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
parente64b6d0114c26a455e19a416b5f02a4d19dd711f (diff)
Re-named wrap => in && unwrap => out.
Diffstat (limited to 'stdlib/source/program/aedifex')
-rw-r--r--stdlib/source/program/aedifex/artifact/snapshot.lux2
-rw-r--r--stdlib/source/program/aedifex/artifact/snapshot/build.lux2
-rw-r--r--stdlib/source/program/aedifex/artifact/snapshot/stamp.lux2
-rw-r--r--stdlib/source/program/aedifex/artifact/snapshot/time.lux2
-rw-r--r--stdlib/source/program/aedifex/artifact/snapshot/version.lux4
-rw-r--r--stdlib/source/program/aedifex/artifact/time.lux6
-rw-r--r--stdlib/source/program/aedifex/artifact/time/date.lux4
-rw-r--r--stdlib/source/program/aedifex/artifact/versioning.lux2
-rw-r--r--stdlib/source/program/aedifex/command/build.lux14
-rw-r--r--stdlib/source/program/aedifex/command/clean.lux2
-rw-r--r--stdlib/source/program/aedifex/command/deploy.lux2
-rw-r--r--stdlib/source/program/aedifex/command/deps.lux2
-rw-r--r--stdlib/source/program/aedifex/command/install.lux2
-rw-r--r--stdlib/source/program/aedifex/command/pom.lux2
-rw-r--r--stdlib/source/program/aedifex/command/test.lux4
-rw-r--r--stdlib/source/program/aedifex/dependency/deployment.lux28
-rw-r--r--stdlib/source/program/aedifex/dependency/resolution.lux64
-rw-r--r--stdlib/source/program/aedifex/hash.lux6
-rw-r--r--stdlib/source/program/aedifex/metadata/artifact.lux32
-rw-r--r--stdlib/source/program/aedifex/metadata/snapshot.lux24
-rw-r--r--stdlib/source/program/aedifex/pom.lux32
-rw-r--r--stdlib/source/program/aedifex/project.lux12
-rw-r--r--stdlib/source/program/aedifex/repository.lux8
-rw-r--r--stdlib/source/program/aedifex/repository/local.lux4
-rw-r--r--stdlib/source/program/aedifex/repository/remote.lux6
25 files changed, 134 insertions, 134 deletions
diff --git a/stdlib/source/program/aedifex/artifact/snapshot.lux b/stdlib/source/program/aedifex/artifact/snapshot.lux
index b377c1b38..6a5849f43 100644
--- a/stdlib/source/program/aedifex/artifact/snapshot.lux
+++ b/stdlib/source/program/aedifex/artifact/snapshot.lux
@@ -51,7 +51,7 @@
(def: local_copy_parser
(Parser Any)
(<| (<xml>.node ..<local_copy>)
- (<text>.embed (<text>.this ..local_copy_value))
+ (<text>.then (<text>.this ..local_copy_value))
<xml>.text))
(def: #export (format snapshot)
diff --git a/stdlib/source/program/aedifex/artifact/snapshot/build.lux b/stdlib/source/program/aedifex/artifact/snapshot/build.lux
index 0e8692054..37bb3ca2d 100644
--- a/stdlib/source/program/aedifex/artifact/snapshot/build.lux
+++ b/stdlib/source/program/aedifex/artifact/snapshot/build.lux
@@ -38,5 +38,5 @@
(def: #export parser
(Parser Build)
(<| (<xml>.node ..tag)
- (<text>.embed (<>.codec nat.decimal (<text>.many <text>.decimal)))
+ (<text>.then (<>.codec nat.decimal (<text>.many <text>.decimal)))
<xml>.text))
diff --git a/stdlib/source/program/aedifex/artifact/snapshot/stamp.lux b/stdlib/source/program/aedifex/artifact/snapshot/stamp.lux
index 147369711..0e9cba494 100644
--- a/stdlib/source/program/aedifex/artifact/snapshot/stamp.lux
+++ b/stdlib/source/program/aedifex/artifact/snapshot/stamp.lux
@@ -46,7 +46,7 @@
(def: time_parser
(Parser Time)
(<| (<xml>.node <timestamp>)
- (<text>.embed //time.parser)
+ (<text>.then //time.parser)
<xml>.text))
(def: #export parser
diff --git a/stdlib/source/program/aedifex/artifact/snapshot/time.lux b/stdlib/source/program/aedifex/artifact/snapshot/time.lux
index 46c9b149e..08f8b8035 100644
--- a/stdlib/source/program/aedifex/artifact/snapshot/time.lux
+++ b/stdlib/source/program/aedifex/artifact/snapshot/time.lux
@@ -43,4 +43,4 @@
[date ///time/date.parser
_ (<text>.this ..separator)
time ///time/time.parser]
- (wrap [date time])))
+ (in [date time])))
diff --git a/stdlib/source/program/aedifex/artifact/snapshot/version.lux b/stdlib/source/program/aedifex/artifact/snapshot/version.lux
index 89af452e2..c1341cf98 100644
--- a/stdlib/source/program/aedifex/artifact/snapshot/version.lux
+++ b/stdlib/source/program/aedifex/artifact/snapshot/version.lux
@@ -62,6 +62,6 @@
($_ <>.and
(<xml>.somewhere (..text ..<extension>))
(<xml>.somewhere (..text ..<value>))
- (<xml>.somewhere (<text>.embed ///time.parser
- (..text ..<updated>)))
+ (<xml>.somewhere (<text>.then ///time.parser
+ (..text ..<updated>)))
)))
diff --git a/stdlib/source/program/aedifex/artifact/time.lux b/stdlib/source/program/aedifex/artifact/time.lux
index 524b68bb1..c8452a477 100644
--- a/stdlib/source/program/aedifex/artifact/time.lux
+++ b/stdlib/source/program/aedifex/artifact/time.lux
@@ -36,8 +36,8 @@
(-> Instant (Try Time))
(do try.monad
[date (/date.date (instant.date instant))]
- (wrap [date
- (instant.time instant)])))
+ (in [date
+ (instant.time instant)])))
(def: #export equivalence
(Equivalence Time)
@@ -54,4 +54,4 @@
(do <>.monad
[date /date.parser
time /time.parser]
- (wrap [date time])))
+ (in [date time])))
diff --git a/stdlib/source/program/aedifex/artifact/time/date.lux b/stdlib/source/program/aedifex/artifact/time/date.lux
index f6b8ae5a9..b392a5569 100644
--- a/stdlib/source/program/aedifex/artifact/time/date.lux
+++ b/stdlib/source/program/aedifex/artifact/time/date.lux
@@ -51,7 +51,7 @@
(if (and (i.>= ..min_year year)
(i.<= ..max_year year))
(#try.Success (:abstraction raw))
- (exception.throw ..year_is_out_of_range [(date.year raw)]))))
+ (exception.except ..year_is_out_of_range [(date.year raw)]))))
(def: #export value
(-> Date date.Date)
@@ -79,4 +79,4 @@
month (<>.lift (month.by_number month))
day_of_month (<>.codec n.decimal (<text>.exactly 2 <text>.decimal))
date (<>.lift (date.date year month day_of_month))]
- (wrap (:abstraction date)))))
+ (in (:abstraction date)))))
diff --git a/stdlib/source/program/aedifex/artifact/versioning.lux b/stdlib/source/program/aedifex/artifact/versioning.lux
index 9c9805571..37adedea1 100644
--- a/stdlib/source/program/aedifex/artifact/versioning.lux
+++ b/stdlib/source/program/aedifex/artifact/versioning.lux
@@ -77,7 +77,7 @@
(def: last_updated_parser
(Parser //time.Time)
- (<| (<text>.embed //time.parser)
+ (<| (<text>.then //time.parser)
(..text ..<last_updated>)))
(def: #export parser
diff --git a/stdlib/source/program/aedifex/command/build.lux b/stdlib/source/program/aedifex/command/build.lux
index b5df31411..6a0b6bcd0 100644
--- a/stdlib/source/program/aedifex/command/build.lux
+++ b/stdlib/source/program/aedifex/command/build.lux
@@ -104,10 +104,10 @@
[#Ruby ..ruby_compiler_name])
_
- (exception.throw ..no_available_compiler []))
+ (exception.except ..no_available_compiler []))
_
- (exception.throw ..no_available_compiler []))))
+ (exception.except ..no_available_compiler []))))
(def: (path fs home dependency)
(All [!] (-> (file.System !) Path Dependency Path))
@@ -266,7 +266,7 @@
(let [target (get@ #///.target profile)]
(case (get@ #///.program profile)
#.None
- (async\wrap (exception.throw ..no_specified_program []))
+ (async\in (exception.except ..no_specified_program []))
(#.Some program_module)
(do async.monad
@@ -274,7 +274,7 @@
#let [home (\ program home)
working_directory (\ program directory)]]
(do ///action.monad
- [[resolution compiler] (async\wrap (..compiler resolution (get@ #///.compiler profile)))
+ [[resolution compiler] (async\in (..compiler resolution (get@ #///.compiler profile)))
#let [host_dependencies (..host_dependencies fs home resolution)
[[command compiler_params] output] (case compiler
(#JVM dependency)
@@ -313,6 +313,6 @@
..success
..failure)
console)]
- (wrap [exit
- compiler
- (format cache_directory / output)])))))))
+ (in [exit
+ compiler
+ (format cache_directory / output)])))))))
diff --git a/stdlib/source/program/aedifex/command/clean.lux b/stdlib/source/program/aedifex/command/clean.lux
index 2ff701d2b..c7443beb6 100644
--- a/stdlib/source/program/aedifex/command/clean.lux
+++ b/stdlib/source/program/aedifex/command/clean.lux
@@ -45,5 +45,5 @@
(\ ! map (monad.map ! recur))
(\ ! join))]
(\ fs delete root)))
- (\ ! wrap [])))]
+ (\ ! in [])))]
(console.write_line (..success target) console)))
diff --git a/stdlib/source/program/aedifex/command/deploy.lux b/stdlib/source/program/aedifex/command/deploy.lux
index 79f6e4f2f..9e74a53a5 100644
--- a/stdlib/source/program/aedifex/command/deploy.lux
+++ b/stdlib/source/program/aedifex/command/deploy.lux
@@ -64,7 +64,7 @@
set.to_list
(export.library fs)
(\ ! map (binary.run tar.writer)))
- pom (\ async.monad wrap (///pom.write profile))
+ pom (\ async.monad in (///pom.write profile))
_ (///dependency/deployment.one
repository
[artifact ///artifact/type.lux_library]
diff --git a/stdlib/source/program/aedifex/command/deps.lux b/stdlib/source/program/aedifex/command/deps.lux
index 7e0d655e9..434bedbdd 100644
--- a/stdlib/source/program/aedifex/command/deps.lux
+++ b/stdlib/source/program/aedifex/command/deps.lux
@@ -74,4 +74,4 @@
(list.sort (\ ///dependency.order <))
(exception.enumerate ..format))])
console)]
- (wrap resolution))))
+ (in resolution))))
diff --git a/stdlib/source/program/aedifex/command/install.lux b/stdlib/source/program/aedifex/command/install.lux
index 142829a8c..ddc73ca36 100644
--- a/stdlib/source/program/aedifex/command/install.lux
+++ b/stdlib/source/program/aedifex/command/install.lux
@@ -60,7 +60,7 @@
(export.library fs))
pom (|> profile
///pom.write
- (\ async.monad wrap))
+ (\ async.monad in))
_ (///dependency/deployment.one repository
[identity ///artifact/type.lux_library]
(let [pom_data (|> pom
diff --git a/stdlib/source/program/aedifex/command/pom.lux b/stdlib/source/program/aedifex/command/pom.lux
index 73e10f0fc..3b6412070 100644
--- a/stdlib/source/program/aedifex/command/pom.lux
+++ b/stdlib/source/program/aedifex/command/pom.lux
@@ -31,6 +31,6 @@
[content (|> (///pom.write profile)
(try\map (|>> (\ xml.codec encode)
(\ utf8.codec encode)))
- async\wrap)
+ async\in)
_ (\ fs write content ///pom.file)]
(console.write_line ..success console)))
diff --git a/stdlib/source/program/aedifex/command/test.lux b/stdlib/source/program/aedifex/command/test.lux
index e159a48f2..7af6a4351 100644
--- a/stdlib/source/program/aedifex/command/test.lux
+++ b/stdlib/source/program/aedifex/command/test.lux
@@ -67,5 +67,5 @@
..success
..failure)
console)]
- (wrap [exit []]))
- (wrap [build_exit []])))))
+ (in [exit []]))
+ (in [build_exit []])))))
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 (<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))]
diff --git a/stdlib/source/program/aedifex/hash.lux b/stdlib/source/program/aedifex/hash.lux
index 760c05ce1..4e83b8f07 100644
--- a/stdlib/source/program/aedifex/hash.lux
+++ b/stdlib/source/program/aedifex/hash.lux
@@ -99,7 +99,7 @@
(-> Binary (Try (Hash <kind>)))
(if (n.= <size> (binary.size data))
(#try.Success (:abstraction data))
- (exception.throw <exception> [data])))]
+ (exception.except <exception> [data])))]
[as_sha-1 SHA-1 ..sha-1::size ..not_a_sha-1]
[as_md5 MD5 ..md5::size ..not_a_md5]
@@ -142,8 +142,8 @@
([1 binary.write/8]
[2 binary.write/16]
[4 binary.write/32])
- _ (exception.throw ..not_a_hash [(..encoding_size size) encoded])))))
- (exception.throw ..not_a_hash [(..encoding_size size) encoded]))))
+ _ (exception.except ..not_a_hash [(..encoding_size size) encoded])))))
+ (exception.except ..not_a_hash [(..encoding_size size) encoded]))))
(template [<codec> <hash> <nat> <constructor>]
[(implementation: #export <codec>
diff --git a/stdlib/source/program/aedifex/metadata/artifact.lux b/stdlib/source/program/aedifex/metadata/artifact.lux
index 55659f391..777c7df1b 100644
--- a/stdlib/source/program/aedifex/metadata/artifact.lux
+++ b/stdlib/source/program/aedifex/metadata/artifact.lux
@@ -135,11 +135,11 @@
(def: last_updated_parser
(Parser Instant)
- (<text>.embed (do <>.monad
- [date ..date_parser
- time ..time_parser]
- (wrap (instant.of_date_time date time)))
- (..text ..<last_updated>)))
+ (<text>.then (do <>.monad
+ [date ..date_parser
+ time ..time_parser]
+ (in (instant.of_date_time date time)))
+ (..text ..<last_updated>)))
(def: #export parser
(Parser Metadata)
@@ -178,19 +178,19 @@
[project (\ repository download (..uri artifact))]
(case project
(#try.Success project)
- (wrap (|> project
- (do> try.monad
- [(\ utf8.codec decode)]
- [(\ xml.codec decode)]
- [list (<xml>.run ..parser)])))
+ (in (|> project
+ (do> try.monad
+ [(\ utf8.codec decode)]
+ [(\ xml.codec decode)]
+ [list (<xml>.run ..parser)])))
(#try.Failure error)
- (wrap (#try.Success
- (let [(^slots [#///artifact.group #///artifact.name]) artifact]
- {#group group
- #name name
- #versions (list)
- #last_updated ..epoch}))))))
+ (in (#try.Success
+ (let [(^slots [#///artifact.group #///artifact.name]) artifact]
+ {#group group
+ #name name
+ #versions (list)
+ #last_updated ..epoch}))))))
(def: #export (write repository artifact metadata)
(-> (Repository Async) Artifact Metadata (Async (Try Any)))
diff --git a/stdlib/source/program/aedifex/metadata/snapshot.lux b/stdlib/source/program/aedifex/metadata/snapshot.lux
index 6faab7b3b..c96957740 100644
--- a/stdlib/source/program/aedifex/metadata/snapshot.lux
+++ b/stdlib/source/program/aedifex/metadata/snapshot.lux
@@ -106,10 +106,10 @@
(<>.default {#///artifact/versioning.snapshot #///artifact/snapshot.Local
#///artifact/versioning.last_updated ///artifact/time.epoch
#///artifact/versioning.versions (list <default_version>)})))]
- (wrap {#artifact {#///artifact.group group
- #///artifact.name name
- #///artifact.version version}
- #versioning versioning}))))
+ (in {#artifact {#///artifact.group group
+ #///artifact.name name
+ #///artifact.version version}
+ #versioning versioning}))))
(def: #export equivalence
(Equivalence Metadata)
@@ -128,16 +128,16 @@
[project (\ repository download (..uri artifact))]
(case project
(#try.Success project)
- (wrap (|> project
- (do> try.monad
- [(\ utf8.codec decode)]
- [(\ xml.codec decode)]
- [list (<xml>.run ..parser)])))
+ (in (|> project
+ (do> try.monad
+ [(\ utf8.codec decode)]
+ [(\ xml.codec decode)]
+ [list (<xml>.run ..parser)])))
(#try.Failure error)
- (wrap (#try.Success
- {#artifact artifact
- #versioning ///artifact/versioning.init})))))
+ (in (#try.Success
+ {#artifact artifact
+ #versioning ///artifact/versioning.init})))))
(def: #export (write repository artifact metadata)
(-> (Repository Async) Artifact Metadata (Async (Try Any)))
diff --git a/stdlib/source/program/aedifex/pom.lux b/stdlib/source/program/aedifex/pom.lux
index b458c7a21..145d65f6e 100644
--- a/stdlib/source/program/aedifex/pom.lux
+++ b/stdlib/source/program/aedifex/pom.lux
@@ -152,7 +152,7 @@
)))
_
- (exception.throw /.no_identity [])))
+ (exception.except /.no_identity [])))
(def: property_parser
(Parser [Tag Text])
@@ -173,16 +173,16 @@
(do maybe.monad
[group (dictionary.get ["" ..group_tag] properties)
artifact (dictionary.get ["" ..artifact_tag] properties)]
- (wrap {#//dependency.artifact {#//artifact.group group
- #//artifact.name artifact
- #//artifact.version (|> properties
- (dictionary.get ["" ..version_tag])
- (maybe.default "")
- (text.replace_all "${project.version}" own_version)
- (text.replace_all "${project.parent.version}" parent_version))}
- #//dependency.type (|> properties
- (dictionary.get ["" "type"])
- (maybe.default //artifact/type.jvm_library))})))))
+ (in {#//dependency.artifact {#//artifact.group group
+ #//artifact.name artifact
+ #//artifact.version (|> properties
+ (dictionary.get ["" ..version_tag])
+ (maybe.default "")
+ (text.replace_all "${project.version}" own_version)
+ (text.replace_all "${project.parent.version}" parent_version))}
+ #//dependency.type (|> properties
+ (dictionary.get ["" "type"])
+ (maybe.default //artifact/type.jvm_library))})))))
(def: (dependencies_parser own_version parent_version)
(-> Text Text (Parser (List Dependency)))
@@ -224,8 +224,8 @@
<xml>.somewhere
(<>.default (list)))
_ (<>.some <xml>.ignore)]
- (wrap (|> (\ /.monoid identity)
- (update@ #/.dependencies (function (_ empty)
- (list\fold set.add empty dependencies)))
- (update@ #/.repositories (function (_ empty)
- (list\fold set.add empty repositories)))))))))
+ (in (|> (\ /.monoid identity)
+ (update@ #/.dependencies (function (_ empty)
+ (list\fold set.add empty dependencies)))
+ (update@ #/.repositories (function (_ empty)
+ (list\fold set.add empty repositories)))))))))
diff --git a/stdlib/source/program/aedifex/project.lux b/stdlib/source/program/aedifex/project.lux
index d845ed689..9d3574bd1 100644
--- a/stdlib/source/program/aedifex/project.lux
+++ b/stdlib/source/program/aedifex/project.lux
@@ -57,19 +57,19 @@
(case (list.find (set.member? lineage)
(get@ #//.parents profile))
(#.Some ouroboros)
- (exception.throw ..circular_dependency [ouroboros name])
+ (exception.except ..circular_dependency [ouroboros name])
#.None
(do {! try.monad}
[parents (monad.map ! (profile' (set.add name lineage) project)
(get@ #//.parents profile))]
- (wrap (list\fold (function (_ parent child)
- (\ //.monoid compose child parent))
- (set@ #//.parents (list) profile)
- parents))))
+ (in (list\fold (function (_ parent child)
+ (\ //.monoid compose child parent))
+ (set@ #//.parents (list) profile)
+ parents))))
#.None
- (exception.throw ..unknown_profile [name])))
+ (exception.except ..unknown_profile [name])))
(def: #export (profile name project)
(-> Name Project (Try Profile))
diff --git a/stdlib/source/program/aedifex/repository.lux b/stdlib/source/program/aedifex/repository.lux
index 8f92be270..1ab1e0602 100644
--- a/stdlib/source/program/aedifex/repository.lux
+++ b/stdlib/source/program/aedifex/repository.lux
@@ -58,10 +58,10 @@
(#try.Success [|state| output])
(do !
[_ (stm.write |state| state)]
- (wrap (#try.Success output)))
+ (in (#try.Success output)))
(#try.Failure error)
- (wrap (#try.Failure error))))))
+ (in (#try.Failure error))))))
(def: (upload uri content)
(stm.commit
@@ -71,8 +71,8 @@
(#try.Success |state|)
(do !
[_ (stm.write |state| state)]
- (wrap (#try.Success [])))
+ (in (#try.Success [])))
(#try.Failure error)
- (wrap (#try.Failure error))))))
+ (in (#try.Failure error))))))
)))
diff --git a/stdlib/source/program/aedifex/repository/local.lux b/stdlib/source/program/aedifex/repository/local.lux
index 4620a1363..db9395c09 100644
--- a/stdlib/source/program/aedifex/repository/local.lux
+++ b/stdlib/source/program/aedifex/repository/local.lux
@@ -51,12 +51,12 @@
[#let [absolute_path (..absolute_path program (\ fs separator) uri)]
? (\ fs file? absolute_path)
_ (if ?
- (wrap [])
+ (in [])
(case (file.parent fs absolute_path)
(#.Some parent)
(file.make_directories async.monad fs parent)
_
(let [! (try.with async.monad)]
- (\ ! wrap []))))]
+ (\ ! in []))))]
(\ fs write content absolute_path))))
diff --git a/stdlib/source/program/aedifex/repository/remote.lux b/stdlib/source/program/aedifex/repository/remote.lux
index 118085389..76363c94f 100644
--- a/stdlib/source/program/aedifex/repository/remote.lux
+++ b/stdlib/source/program/aedifex/repository/remote.lux
@@ -73,7 +73,7 @@
_
(do !
[_ ((get@ #@http.body message) (#.Some 0))]
- (\ io.monad wrap (exception.throw ..download_failure [(format address uri) status]))))))
+ (\ io.monad in (exception.except ..download_failure [(format address uri) status]))))))
(def: (upload uri content)
(do (try.with io.monad)
@@ -91,8 +91,8 @@
_ ((get@ #@http.body message) (#.Some 0))]
(case status
(^ (static http/status.created))
- (wrap [])
+ (in [])
_
- (\ io.monad wrap (exception.throw ..upload_failure [(format address uri) status])))))
+ (\ io.monad in (exception.except ..upload_failure [(format address uri) status])))))
)