From 891b1cfc82322f8017f0a4f6b707d6fe52024545 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Fri, 3 Sep 2021 21:51:30 -0400 Subject: Unified tuple and record syntax. --- .../source/program/aedifex/metadata/artifact.lux | 12 ++++++------ .../source/program/aedifex/metadata/snapshot.lux | 22 +++++++++++----------- 2 files changed, 17 insertions(+), 17 deletions(-) (limited to 'stdlib/source/program/aedifex/metadata') 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 (.exactly 2 .decimal)) second (<>.codec n.decimal (.exactly 2 .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 [ ] [(def: xml.Tag ["" ])] @@ -91,9 +91,9 @@ [group (.somewhere (..text ..)) name (.somewhere (..text ..)) version (.somewhere (..text ..)) - versioning (with_expansions [ {#///artifact/snapshot/version.extension ///artifact/type.jvm_library + versioning (with_expansions [ [#///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]] (|> (.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 )})))] - (in {#artifact {#///artifact.group group + #///artifact/versioning.versions (list )])))] + (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))) -- cgit v1.2.3