diff options
author | Eduardo Julian | 2021-09-10 01:21:23 -0400 |
---|---|---|
committer | Eduardo Julian | 2021-09-10 01:21:23 -0400 |
commit | cd71a864ad5be13ed6ec6d046e0a2cb1087bdf94 (patch) | |
tree | af6366578f98f1a8e551f4da9f3ad230fd63a4dd /stdlib/source/program/aedifex/metadata | |
parent | ef77466323f85a3d1b65b46a3deb93652ef22085 (diff) |
Migrated variants to the new syntax.
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 | 22 |
2 files changed, 25 insertions, 25 deletions
diff --git a/stdlib/source/program/aedifex/metadata/artifact.lux b/stdlib/source/program/aedifex/metadata/artifact.lux index 571d9bff1..b56c66104 100644 --- a/stdlib/source/program/aedifex/metadata/artifact.lux +++ b/stdlib/source/program/aedifex/metadata/artifact.lux @@ -84,7 +84,7 @@ (template [<name> <type> <tag> <pre>] [(def: <name> (-> <type> XML) - (|>> <pre> #xml.Text list (#xml.Node <tag> xml.attributes)))] + (|>> <pre> {#xml.Text} list {#xml.Node <tag> xml.attributes}))] [group_format Group ..<group> (|>)] [name_format Name ..<name> (|>)] @@ -94,18 +94,18 @@ (def: versions_format (-> (List Version) XML) - (|>> (list\each ..version_format) (#xml.Node ..<versions> xml.attributes))) + (|>> (list\each ..version_format) {#xml.Node ..<versions> xml.attributes})) (def: .public (format value) (-> Metadata XML) - (#xml.Node ..<metadata> - xml.attributes - (list (..group_format (value@ #group value)) - (..name_format (value@ #name value)) - (#xml.Node ..<versioning> - xml.attributes - (list (..versions_format (value@ #versions value)) - (..last_updated_format (value@ #last_updated value))))))) + {#xml.Node ..<metadata> + xml.attributes + (list (..group_format (value@ #group value)) + (..name_format (value@ #name value)) + {#xml.Node ..<versioning> + xml.attributes + (list (..versions_format (value@ #versions value)) + (..last_updated_format (value@ #last_updated value)))})}) (def: (text tag) (-> xml.Tag (Parser Text)) @@ -178,20 +178,20 @@ (do async.monad [project (\ repository download (..uri artifact))] (case project - (#try.Success project) + {#try.Success project} (in (|> project (do> try.monad [(\ utf8.codec decoded)] [(\ xml.codec decoded)] [list (<xml>.result ..parser)]))) - (#try.Failure error) - (in (#try.Success + {#try.Failure error} + (in {#try.Success (let [(^slots [#///artifact.group #///artifact.name]) artifact] [#group group #name name #versions (list) - #last_updated ..epoch])))))) + #last_updated ..epoch])})))) (def: .public (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 53f5faee0..58792b042 100644 --- a/stdlib/source/program/aedifex/metadata/snapshot.lux +++ b/stdlib/source/program/aedifex/metadata/snapshot.lux @@ -62,7 +62,7 @@ (template [<name> <type> <tag> <pre>] [(def: <name> (-> <type> XML) - (|>> <pre> #xml.Text list (#xml.Node <tag> xml.attributes)))] + (|>> <pre> #xml.Text list {#xml.Node <tag> xml.attributes}))] [group_format Group ..<group> (|>)] [name_format Name ..<name> (|>)] @@ -72,12 +72,12 @@ (def: .public (format (^slots [#artifact #versioning])) (-> Metadata XML) (let [(^slots [#///artifact.group #///artifact.name #///artifact.version]) artifact] - (#xml.Node ..<metadata> - xml.attributes - (list (..group_format group) - (..name_format name) - (..version_format version) - (///artifact/versioning.format versioning))))) + {#xml.Node ..<metadata> + xml.attributes + (list (..group_format group) + (..name_format name) + (..version_format version) + (///artifact/versioning.format versioning))})) (def: (text tag) (-> xml.Tag (Parser Text)) @@ -128,17 +128,17 @@ (do async.monad [project (\ repository download (..uri artifact))] (case project - (#try.Success project) + {#try.Success project} (in (|> project (do> try.monad [(\ utf8.codec decoded)] [(\ xml.codec decoded)] [list (<xml>.result ..parser)]))) - (#try.Failure error) - (in (#try.Success + {#try.Failure error} + (in {#try.Success [#artifact artifact - #versioning ///artifact/versioning.init]))))) + #versioning ///artifact/versioning.init]})))) (def: .public (write repository artifact metadata) (-> (Repository Async) Artifact Metadata (Async (Try Any))) |