diff options
author | Eduardo Julian | 2021-07-26 01:45:57 -0400 |
---|---|---|
committer | Eduardo Julian | 2021-07-26 01:45:57 -0400 |
commit | e64b6d0114c26a455e19a416b5f02a4d19dd711f (patch) | |
tree | 020e426a40aefebf6b052e799b33c40fe4d8a80c /stdlib/source/program/aedifex/metadata | |
parent | 62b3abfcc014ca1c19d62aacdd497f6a250b372c (diff) |
Re-named Promise to Async.
Diffstat (limited to 'stdlib/source/program/aedifex/metadata')
-rw-r--r-- | stdlib/source/program/aedifex/metadata/artifact.lux | 28 | ||||
-rw-r--r-- | stdlib/source/program/aedifex/metadata/snapshot.lux | 20 |
2 files changed, 24 insertions, 24 deletions
diff --git a/stdlib/source/program/aedifex/metadata/artifact.lux b/stdlib/source/program/aedifex/metadata/artifact.lux index 524272559..55659f391 100644 --- a/stdlib/source/program/aedifex/metadata/artifact.lux +++ b/stdlib/source/program/aedifex/metadata/artifact.lux @@ -11,7 +11,7 @@ ["<.>" xml (#+ Parser)] ["<.>" text]] [concurrency - ["." promise (#+ Promise)]]] + ["." async (#+ Async)]]] [data ["." product] ["." text @@ -85,26 +85,26 @@ (-> <type> XML) (|>> <pre> #xml.Text list (#xml.Node <tag> xml.attributes)))] - [format_group Group ..<group> (|>)] - [format_name Name ..<name> (|>)] - [format_version Version ..<version> (|>)] - [format_last_updated Instant ..<last_updated> ..instant_format] + [group_format Group ..<group> (|>)] + [name_format Name ..<name> (|>)] + [version_format Version ..<version> (|>)] + [last_updated_format Instant ..<last_updated> ..instant_format] ) -(def: format_versions +(def: versions_format (-> (List Version) XML) - (|>> (list\map ..format_version) (#xml.Node ..<versions> xml.attributes))) + (|>> (list\map ..version_format) (#xml.Node ..<versions> xml.attributes))) (def: #export (format value) (-> Metadata XML) (#xml.Node ..<metadata> xml.attributes - (list (..format_group (get@ #group value)) - (..format_name (get@ #name value)) + (list (..group_format (get@ #group value)) + (..name_format (get@ #name value)) (#xml.Node ..<versioning> xml.attributes - (list (..format_versions (get@ #versions value)) - (..format_last_updated (get@ #last_updated value))))))) + (list (..versions_format (get@ #versions value)) + (..last_updated_format (get@ #last_updated value))))))) (def: (text tag) (-> xml.Tag (Parser Text)) @@ -173,8 +173,8 @@ (instant.of_millis +0)) (def: #export (read repository artifact) - (-> (Repository Promise) Artifact (Promise (Try Metadata))) - (do promise.monad + (-> (Repository Async) Artifact (Async (Try Metadata))) + (do async.monad [project (\ repository download (..uri artifact))] (case project (#try.Success project) @@ -193,7 +193,7 @@ #last_updated ..epoch})))))) (def: #export (write repository artifact metadata) - (-> (Repository Promise) Artifact Metadata (Promise (Try Any))) + (-> (Repository Async) Artifact Metadata (Async (Try Any))) (|> metadata ..format (\ xml.codec encode) diff --git a/stdlib/source/program/aedifex/metadata/snapshot.lux b/stdlib/source/program/aedifex/metadata/snapshot.lux index 032214c90..6faab7b3b 100644 --- a/stdlib/source/program/aedifex/metadata/snapshot.lux +++ b/stdlib/source/program/aedifex/metadata/snapshot.lux @@ -12,7 +12,7 @@ ["<.>" xml (#+ Parser)] ["<.>" text]] [concurrency - ["." promise (#+ Promise)]]] + ["." async (#+ Async)]]] [data ["." product] ["." text @@ -63,9 +63,9 @@ (-> <type> XML) (|>> <pre> #xml.Text list (#xml.Node <tag> xml.attributes)))] - [format_group Group ..<group> (|>)] - [format_name Name ..<name> (|>)] - [format_version Version ..<version> (|>)] + [group_format Group ..<group> (|>)] + [name_format Name ..<name> (|>)] + [version_format Version ..<version> (|>)] ) (def: #export (format (^slots [#artifact #versioning])) @@ -73,9 +73,9 @@ (let [(^slots [#///artifact.group #///artifact.name #///artifact.version]) artifact] (#xml.Node ..<metadata> xml.attributes - (list (..format_group group) - (..format_name name) - (..format_version version) + (list (..group_format group) + (..name_format name) + (..version_format version) (///artifact/versioning.format versioning))))) (def: (text tag) @@ -123,8 +123,8 @@ //.remote_artifact_uri) (def: #export (read repository artifact) - (-> (Repository Promise) Artifact (Promise (Try Metadata))) - (do promise.monad + (-> (Repository Async) Artifact (Async (Try Metadata))) + (do async.monad [project (\ repository download (..uri artifact))] (case project (#try.Success project) @@ -140,7 +140,7 @@ #versioning ///artifact/versioning.init}))))) (def: #export (write repository artifact metadata) - (-> (Repository Promise) Artifact Metadata (Promise (Try Any))) + (-> (Repository Async) Artifact Metadata (Async (Try Any))) (|> metadata ..format (\ xml.codec encode) |