From 9e2f1e76f2c8df01ed7687d934c3210fcf676bd6 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Thu, 16 Jun 2022 00:48:19 -0400 Subject: De-sigil-ification: suffix : [Part 13] --- stdlib/source/program/aedifex/artifact/extension.lux | 8 ++++---- stdlib/source/program/aedifex/artifact/snapshot.lux | 18 +++++++++--------- .../program/aedifex/artifact/snapshot/build.lux | 8 ++++---- .../program/aedifex/artifact/snapshot/stamp.lux | 12 ++++++------ .../program/aedifex/artifact/snapshot/time.lux | 8 ++++---- .../program/aedifex/artifact/snapshot/version.lux | 12 ++++++------ .../aedifex/artifact/snapshot/version/value.lux | 8 ++++---- stdlib/source/program/aedifex/artifact/time.lux | 12 ++++++------ stdlib/source/program/aedifex/artifact/time/date.lux | 20 ++++++++++---------- stdlib/source/program/aedifex/artifact/time/time.lux | 4 ++-- stdlib/source/program/aedifex/artifact/type.lux | 2 +- .../source/program/aedifex/artifact/versioning.lux | 16 ++++++++-------- 12 files changed, 64 insertions(+), 64 deletions(-) (limited to 'stdlib/source/program/aedifex/artifact') diff --git a/stdlib/source/program/aedifex/artifact/extension.lux b/stdlib/source/program/aedifex/artifact/extension.lux index c89fd2a35..f78a4b963 100644 --- a/stdlib/source/program/aedifex/artifact/extension.lux +++ b/stdlib/source/program/aedifex/artifact/extension.lux @@ -12,19 +12,19 @@ (type: .public Extension Text) -(def: separator +(def separator ".") -(def: .public extension +(def .public extension (-> //.Type Extension) (|>> (format ..separator))) -(def: .public type +(def .public type (-> Extension //.Type) (text.replaced ..separator "")) (with_template [] - [(def: .public + [(def .public Extension (..extension (template.symbol [//._] [])))] diff --git a/stdlib/source/program/aedifex/artifact/snapshot.lux b/stdlib/source/program/aedifex/artifact/snapshot.lux index b9fde212c..4966eb80f 100644 --- a/stdlib/source/program/aedifex/artifact/snapshot.lux +++ b/stdlib/source/program/aedifex/artifact/snapshot.lux @@ -21,13 +21,13 @@ {#Local} {#Remote Stamp})) -(def: any_equivalence +(def any_equivalence (Equivalence Any) (implementation - (def: (= _ _) + (def (= _ _) true))) -(def: .public equivalence +(def .public equivalence (Equivalence Snapshot) (all sum.equivalence ..any_equivalence @@ -35,28 +35,28 @@ )) (with_template [ ] - [(def: xml.Tag ["" ])] + [(def xml.Tag ["" ])] [ "localCopy"] [ "snapshot"] ) -(def: local_copy_value +(def local_copy_value "true") -(def: local_copy_format +(def local_copy_format XML {xml.#Node xml.attributes (list {xml.#Text ..local_copy_value})}) -(def: local_copy_parser +(def local_copy_parser (Parser Any) (<| (.node ..) (.then (.this ..local_copy_value)) .text)) -(def: .public (format snapshot) +(def .public (format snapshot) (-> Snapshot XML) (<| {xml.#Node .. xml.attributes} (case snapshot @@ -66,7 +66,7 @@ {#Remote stamp} (/stamp.format stamp)))) -(def: .public parser +(def .public parser (Parser Snapshot) (<| (.node ) (<>.or ..local_copy_parser diff --git a/stdlib/source/program/aedifex/artifact/snapshot/build.lux b/stdlib/source/program/aedifex/artifact/snapshot/build.lux index 483da5e39..f0a0c7d18 100644 --- a/stdlib/source/program/aedifex/artifact/snapshot/build.lux +++ b/stdlib/source/program/aedifex/artifact/snapshot/build.lux @@ -20,22 +20,22 @@ (type: .public Build Nat) -(def: .public equivalence +(def .public equivalence (Equivalence Build) nat.equivalence) -(def: tag +(def tag xml.Tag ["" "buildNumber"]) -(def: .public format +(def .public format (-> Build XML) (|>> %.nat {xml.#Text} list {xml.#Node ..tag xml.attributes})) -(def: .public parser +(def .public parser (Parser Build) (<| (.node ..tag) (.then (<>.codec nat.decimal (.many .decimal))) diff --git a/stdlib/source/program/aedifex/artifact/snapshot/stamp.lux b/stdlib/source/program/aedifex/artifact/snapshot/stamp.lux index 3365d685c..2f82cf020 100644 --- a/stdlib/source/program/aedifex/artifact/snapshot/stamp.lux +++ b/stdlib/source/program/aedifex/artifact/snapshot/stamp.lux @@ -22,36 +22,36 @@ [#time Time #build Build])) -(def: .public equivalence +(def .public equivalence (Equivalence Stamp) (all product.equivalence //time.equivalence //build.equivalence )) -(def: +(def xml.Tag ["" "timestamp"]) -(def: time_format +(def time_format (-> Time XML) (|>> //time.format {xml.#Text} list {xml.#Node .. xml.attributes})) -(def: .public (format (open "_[0]")) +(def .public (format (open "_[0]")) (-> Stamp (List XML)) (list (..time_format _#time) (//build.format _#build))) -(def: time_parser +(def time_parser (Parser Time) (<| (.node ) (.then //time.parser) .text)) -(def: .public parser +(def .public parser (Parser Stamp) (<>.and (.somewhere ..time_parser) (.somewhere //build.parser))) diff --git a/stdlib/source/program/aedifex/artifact/snapshot/time.lux b/stdlib/source/program/aedifex/artifact/snapshot/time.lux index 3b6fbe0ee..38a60ede0 100644 --- a/stdlib/source/program/aedifex/artifact/snapshot/time.lux +++ b/stdlib/source/program/aedifex/artifact/snapshot/time.lux @@ -24,20 +24,20 @@ (type: .public Time ///time.Time) -(def: .public equivalence +(def .public equivalence (Equivalence Time) ///time.equivalence) -(def: separator +(def separator ".") -(def: .public (format [date time]) +(def .public (format [date time]) (%.Format Time) (%.format (///time/date.format date) ..separator (///time/time.format time))) -(def: .public parser +(def .public parser (.Parser Time) (do <>.monad [date ///time/date.parser diff --git a/stdlib/source/program/aedifex/artifact/snapshot/version.lux b/stdlib/source/program/aedifex/artifact/snapshot/version.lux index bf26ae259..e38534c8f 100644 --- a/stdlib/source/program/aedifex/artifact/snapshot/version.lux +++ b/stdlib/source/program/aedifex/artifact/snapshot/version.lux @@ -23,7 +23,7 @@ #value Text #updated Time])) -(def: .public equivalence +(def .public equivalence (Equivalence Version) (all product.equivalence text.equivalence @@ -32,7 +32,7 @@ )) (with_template [ ] - [(def: xml.Tag ["" ])] + [(def xml.Tag ["" ])] [ "extension"] [ "value"] @@ -41,23 +41,23 @@ [ "snapshotVersion"] ) -(def: (text_format tag value) +(def (text_format tag value) (-> xml.Tag Text XML) (|> value {xml.#Text} list {xml.#Node tag xml.attributes})) -(def: .public (format (open "_[0]")) +(def .public (format (open "_[0]")) (-> Version XML) (<| {xml.#Node .. xml.attributes} (list (..text_format .. _#extension) (..text_format .. _#value) (..text_format .. (///time.format _#updated))))) -(def: (text tag) +(def (text tag) (-> xml.Tag (Parser Text)) (<| (.node tag) .text)) -(def: .public parser +(def .public parser (Parser Version) (<| (.node ..) (all <>.and diff --git a/stdlib/source/program/aedifex/artifact/snapshot/version/value.lux b/stdlib/source/program/aedifex/artifact/snapshot/version/value.lux index 875326058..c0b528186 100644 --- a/stdlib/source/program/aedifex/artifact/snapshot/version/value.lux +++ b/stdlib/source/program/aedifex/artifact/snapshot/version/value.lux @@ -16,20 +16,20 @@ [#version Text #snapshot Snapshot])) -(def: .public equivalence +(def .public equivalence (Equivalence Value) (all product.equivalence text.equivalence ///.equivalence )) -(def: separator +(def separator "-") -(def: .public snapshot +(def .public snapshot "SNAPSHOT") -(def: .public (format (open "/[0]")) +(def .public (format (open "/[0]")) (%.Format Value) (case /#snapshot {///.#Local} diff --git a/stdlib/source/program/aedifex/artifact/time.lux b/stdlib/source/program/aedifex/artifact/time.lux index d7be974fd..9e52e52ca 100644 --- a/stdlib/source/program/aedifex/artifact/time.lux +++ b/stdlib/source/program/aedifex/artifact/time.lux @@ -22,34 +22,34 @@ (type: .public Time [/date.Date /time.Time]) -(def: .public epoch +(def .public epoch Time [/date.epoch time.midnight]) -(def: .public (instant time) +(def .public (instant time) (-> Time Instant) (let [[date time] time] (instant.of_date_time (/date.value date) time))) -(def: .public (of_instant instant) +(def .public (of_instant instant) (-> Instant (Try Time)) (do try.monad [date (/date.date (instant.date instant))] (in [date (instant.time instant)]))) -(def: .public equivalence +(def .public equivalence (Equivalence Time) (product.equivalence /date.equivalence time.equivalence)) -(def: .public (format [date time]) +(def .public (format [date time]) (Format Time) (%.format (/date.format date) (/time.format time))) -(def: .public parser +(def .public parser (Parser Time) (do <>.monad [date /date.parser diff --git a/stdlib/source/program/aedifex/artifact/time/date.lux b/stdlib/source/program/aedifex/artifact/time/date.lux index 027ec6004..ba908f0af 100644 --- a/stdlib/source/program/aedifex/artifact/time/date.lux +++ b/stdlib/source/program/aedifex/artifact/time/date.lux @@ -23,14 +23,14 @@ [type [primitive (.except)]]]]) -(def: .public (pad value) +(def .public (pad value) (-> Nat Text) (if (n.< 10 value) (%.format "0" (%.nat value)) (%.nat value))) -(def: min_year +1,000) -(def: max_year +9,999) +(def min_year +1,000) +(def max_year +9,999) (exception: .public (year_is_out_of_range [year year.Year]) (exception.report @@ -41,11 +41,11 @@ (primitive .public Date date.Date - (def: .public epoch + (def .public epoch Date (abstraction date.epoch)) - (def: .public (date raw) + (def .public (date raw) (-> date.Date (Try Date)) (let [year (|> raw date.year year.value)] (if (or (i.< ..min_year year) @@ -53,24 +53,24 @@ (exception.except ..year_is_out_of_range [(date.year raw)]) {try.#Success (abstraction raw)}))) - (def: .public value + (def .public value (-> Date date.Date) (|>> representation)) - (def: .public equivalence + (def .public equivalence (Equivalence Date) (implementation - (def: (= reference subject) + (def (= reference subject) (date#= (representation reference) (representation subject))))) - (def: .public (format value) + (def .public (format value) (%.Format Date) (%.format (|> value representation date.year year.value .nat %.nat) (|> value representation date.month month.number ..pad) (|> value representation date.day_of_month ..pad))) - (def: .public parser + (def .public parser (Parser Date) (do <>.monad [year (<>.codec n.decimal (.exactly 4 .decimal)) diff --git a/stdlib/source/program/aedifex/artifact/time/time.lux b/stdlib/source/program/aedifex/artifact/time/time.lux index 01d2169d5..d02667bbc 100644 --- a/stdlib/source/program/aedifex/artifact/time/time.lux +++ b/stdlib/source/program/aedifex/artifact/time/time.lux @@ -19,14 +19,14 @@ (type: .public Time time.Time) -(def: .public (format value) +(def .public (format value) (%.Format Time) (let [(open "_[0]") (time.clock value)] (%.format (//.pad _#hour) (//.pad _#minute) (//.pad _#second)))) -(def: .public parser +(def .public parser (.Parser Time) (do <>.monad [hour (<>.codec n.decimal (.exactly 2 .decimal)) diff --git a/stdlib/source/program/aedifex/artifact/type.lux b/stdlib/source/program/aedifex/artifact/type.lux index 53242c437..971b8757a 100644 --- a/stdlib/source/program/aedifex/artifact/type.lux +++ b/stdlib/source/program/aedifex/artifact/type.lux @@ -7,7 +7,7 @@ Text) (with_template [ ] - [(def: .public + [(def .public Type )] diff --git a/stdlib/source/program/aedifex/artifact/versioning.lux b/stdlib/source/program/aedifex/artifact/versioning.lux index 5812e4368..811db7ab9 100644 --- a/stdlib/source/program/aedifex/artifact/versioning.lux +++ b/stdlib/source/program/aedifex/artifact/versioning.lux @@ -35,12 +35,12 @@ #last_updated //time.Time #versions (List Version)])) -(def: .public init +(def .public init [#snapshot {//snapshot.#Local} #last_updated //time.epoch #versions (list)]) -(def: .public equivalence +(def .public equivalence (Equivalence Versioning) (all product.equivalence //snapshot.equivalence @@ -49,7 +49,7 @@ )) (with_template [ ] - [(def: xml.Tag ["" ])] + [(def xml.Tag ["" ])] [ "lastUpdated"] [ "snapshotVersions"] @@ -57,11 +57,11 @@ [ "versioning"] ) -(def: last_updated_format +(def last_updated_format (-> //time.Time XML) (|>> //time.format {xml.#Text} list {xml.#Node .. xml.attributes})) -(def: .public (format (open "_[0]")) +(def .public (format (open "_[0]")) (-> Versioning XML) (<| {xml.#Node .. xml.attributes} (list (//snapshot.format _#snapshot) @@ -70,17 +70,17 @@ (list#each //snapshot/version.format) {xml.#Node .. xml.attributes})))) -(def: (text tag) +(def (text tag) (-> xml.Tag (Parser Text)) (<| (.node tag) .text)) -(def: last_updated_parser +(def last_updated_parser (Parser //time.Time) (<| (.then //time.parser) (..text ..))) -(def: .public parser +(def .public parser (Parser Versioning) (<| (.node ..) (all <>.and -- cgit v1.2.3