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] --- .../source/program/aedifex/metadata/artifact.lux | 36 +++++++++++----------- 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'stdlib/source/program/aedifex/metadata/artifact.lux') diff --git a/stdlib/source/program/aedifex/metadata/artifact.lux b/stdlib/source/program/aedifex/metadata/artifact.lux index 0057ce119..01271437e 100644 --- a/stdlib/source/program/aedifex/metadata/artifact.lux +++ b/stdlib/source/program/aedifex/metadata/artifact.lux @@ -45,32 +45,32 @@ #versions (List Version) #last_updated Instant])) -(def: (pad value) +(def (pad value) (-> Nat Text) (if (n.< 10 value) (%.format "0" (%.nat value)) (%.nat value))) -(def: (date_format value) +(def (date_format value) (%.Format Date) (%.format (|> value date.year year.value .nat %.nat) (|> value date.month month.number ..pad) (|> value date.day_of_month ..pad))) -(def: (time_format value) +(def (time_format value) (%.Format Time) (let [(open "[0]") (time.clock value)] (%.format (..pad #hour) (..pad #minute) (..pad #second)))) -(def: (instant_format value) +(def (instant_format value) (%.Format Instant) (%.format (..date_format (instant.date value)) (..time_format (instant.time value)))) (with_template [ ] - [(def: xml.Tag ["" ])] + [(def xml.Tag ["" ])] [ "groupId"] [ "artifactId"] @@ -82,7 +82,7 @@ ) (with_template [
]
-  [(def: 
+  [(def 
      (->  XML)
      (|>> 
 {xml.#Text} list {xml.#Node  xml.attributes}))]
 
@@ -92,11 +92,11 @@
   [last_updated_format Instant .. ..instant_format]
   )
 
-(def: versions_format
+(def versions_format
   (-> (List Version) XML)
   (|>> (list#each ..version_format) {xml.#Node .. xml.attributes}))
 
-(def: .public (format value)
+(def .public (format value)
   (-> Metadata XML)
   {xml.#Node ..
              xml.attributes
@@ -107,12 +107,12 @@
                               (list (..versions_format (the #versions value))
                                     (..last_updated_format (the #last_updated value)))})})
 
-(def: (text tag)
+(def (text tag)
   (-> xml.Tag (Parser Text))
   (<| (.node tag)
       .text))
 
-(def: date_parser
+(def date_parser
   (.Parser Date)
   (do <>.monad
     [year (<>.codec n.decimal (.exactly 4 .decimal))
@@ -122,7 +122,7 @@
      day_of_month (<>.codec n.decimal (.exactly 2 .decimal))]
     (<>.lifted (date.date year month day_of_month))))
 
-(def: time_parser
+(def time_parser
   (.Parser Time)
   (do <>.monad
     [hour (<>.codec n.decimal (.exactly 2 .decimal))
@@ -134,7 +134,7 @@
                  time.#second second
                  time.#milli_second 0]))))
 
-(def: last_updated_parser
+(def last_updated_parser
   (Parser Instant)
   (.then (do <>.monad
                  [date ..date_parser
@@ -142,7 +142,7 @@
                  (in (instant.of_date_time date time)))
                (..text ..)))
 
-(def: .public parser
+(def .public parser
   (Parser Metadata)
   (<| (.node ..)
       (all <>.and
@@ -158,7 +158,7 @@
                     (.somewhere ..last_updated_parser)
                     )))))
 
-(def: .public equivalence
+(def .public equivalence
   (Equivalence Metadata)
   (all product.equivalence
        text.equivalence
@@ -167,15 +167,15 @@
        instant.equivalence
        ))
 
-(def: .public uri
+(def .public uri
   (-> Artifact URI)
   //.remote_project_uri)
 
-(def: epoch
+(def epoch
   Instant
   (instant.of_millis +0))
 
-(def: .public (read repository artifact)
+(def .public (read repository artifact)
   (-> (Repository Async) Artifact (Async (Try Metadata)))
   (do async.monad
     [project (at repository download (..uri artifact))]
@@ -195,7 +195,7 @@
               ..#versions (list)
               ..#last_updated ..epoch])}))))
 
-(def: .public (write repository artifact metadata)
+(def .public (write repository artifact metadata)
   (-> (Repository Async) Artifact Metadata (Async (Try Any)))
   (|> metadata
       ..format
-- 
cgit v1.2.3