diff options
author | Eduardo Julian | 2021-09-03 21:51:30 -0400 |
---|---|---|
committer | Eduardo Julian | 2021-09-03 21:51:30 -0400 |
commit | 891b1cfc82322f8017f0a4f6b707d6fe52024545 (patch) | |
tree | 957429c0a2ad850b3570492deabe054fb2ace63e /stdlib/source/program/aedifex/metadata | |
parent | e76add6e6f904677f5c09bb2a66dce283f1b848a (diff) |
Unified tuple and record syntax.
Diffstat (limited to 'stdlib/source/program/aedifex/metadata')
-rw-r--r-- | stdlib/source/program/aedifex/metadata/artifact.lux | 12 | ||||
-rw-r--r-- | stdlib/source/program/aedifex/metadata/snapshot.lux | 22 |
2 files changed, 17 insertions, 17 deletions
diff --git a/stdlib/source/program/aedifex/metadata/artifact.lux b/stdlib/source/program/aedifex/metadata/artifact.lux index 3a6ffb74f..0d6b924b9 100644 --- a/stdlib/source/program/aedifex/metadata/artifact.lux +++ b/stdlib/source/program/aedifex/metadata/artifact.lux @@ -40,10 +40,10 @@ (type: .public Metadata (Record - {#group Group + [#group Group #name Name #versions (List Version) - #last_updated Instant})) + #last_updated Instant])) (def: (pad value) (-> Nat Text) @@ -129,10 +129,10 @@ minute (<>.codec n.decimal (<text>.exactly 2 <text>.decimal)) second (<>.codec n.decimal (<text>.exactly 2 <text>.decimal))] (<>.lifted (time.time - {#time.hour hour + [#time.hour hour #time.minute minute #time.second second - #time.milli_second 0})))) + #time.milli_second 0])))) (def: last_updated_parser (Parser Instant) @@ -188,10 +188,10 @@ (#try.Failure error) (in (#try.Success (let [(^slots [#///artifact.group #///artifact.name]) artifact] - {#group group + [#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 d5e9483bf..61183a932 100644 --- a/stdlib/source/program/aedifex/metadata/snapshot.lux +++ b/stdlib/source/program/aedifex/metadata/snapshot.lux @@ -47,8 +47,8 @@ (type: .public Metadata (Record - {#artifact Artifact - #versioning Versioning})) + [#artifact Artifact + #versioning Versioning])) (template [<definition> <tag>] [(def: <definition> xml.Tag ["" <tag>])] @@ -91,9 +91,9 @@ [group (<xml>.somewhere (..text ..<group>)) name (<xml>.somewhere (..text ..<name>)) version (<xml>.somewhere (..text ..<version>)) - versioning (with_expansions [<default_version> {#///artifact/snapshot/version.extension ///artifact/type.jvm_library + versioning (with_expansions [<default_version> [#///artifact/snapshot/version.extension ///artifact/type.jvm_library #///artifact/snapshot/version.value version - #///artifact/snapshot/version.updated ///artifact/time.epoch}] + #///artifact/snapshot/version.updated ///artifact/time.epoch]] (|> (<xml>.somewhere ///artifact/versioning.parser) (\ ! each (revised@ #///artifact/versioning.versions @@ -104,13 +104,13 @@ versions versions))))) - (<>.else {#///artifact/versioning.snapshot #///artifact/snapshot.Local + (<>.else [#///artifact/versioning.snapshot #///artifact/snapshot.Local #///artifact/versioning.last_updated ///artifact/time.epoch - #///artifact/versioning.versions (list <default_version>)})))] - (in {#artifact {#///artifact.group group + #///artifact/versioning.versions (list <default_version>)])))] + (in [#artifact [#///artifact.group group #///artifact.name name - #///artifact.version version} - #versioning versioning})))) + #///artifact.version version] + #versioning versioning])))) (def: .public equivalence (Equivalence Metadata) @@ -137,8 +137,8 @@ (#try.Failure error) (in (#try.Success - {#artifact artifact - #versioning ///artifact/versioning.init}))))) + [#artifact artifact + #versioning ///artifact/versioning.init]))))) (def: .public (write repository artifact metadata) (-> (Repository Async) Artifact Metadata (Async (Try Any))) |