diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/program/aedifex/artifact/time.lux | 12 | ||||
-rw-r--r-- | stdlib/source/program/aedifex/metadata/snapshot.lux | 3 | ||||
-rw-r--r-- | stdlib/source/program/aedifex/repository/local.lux | 10 |
3 files changed, 17 insertions, 8 deletions
diff --git a/stdlib/source/program/aedifex/artifact/time.lux b/stdlib/source/program/aedifex/artifact/time.lux index 59367c37d..b227c3954 100644 --- a/stdlib/source/program/aedifex/artifact/time.lux +++ b/stdlib/source/program/aedifex/artifact/time.lux @@ -5,12 +5,15 @@ [equivalence (#+ Equivalence)] [monad (#+ do)]] [control + ["." try (#+ Try)] ["<>" parser ["<.>" text (#+ Parser)]]] [data ["." product] [text - ["%" format (#+ Format)]]]] + ["%" format (#+ Format)]]] + [time + ["." instant (#+ Instant)]]] ["." / #_ ["#." date] ["#." time]]) @@ -22,6 +25,13 @@ Time [/date.epoch time.midnight]) +(def: #export (from_instant instant) + (-> Instant (Try Time)) + (do try.monad + [date (/date.date (instant.date instant))] + (wrap [date + (instant.time instant)]))) + (def: #export equivalence (Equivalence Time) (product.equivalence /date.equivalence diff --git a/stdlib/source/program/aedifex/metadata/snapshot.lux b/stdlib/source/program/aedifex/metadata/snapshot.lux index f6878a023..c8feaa3d9 100644 --- a/stdlib/source/program/aedifex/metadata/snapshot.lux +++ b/stdlib/source/program/aedifex/metadata/snapshot.lux @@ -37,6 +37,7 @@ ["/#" // #_ [repository (#+ Repository)] ["#." artifact (#+ Group Name Version Artifact) + ["#/." time] ["#/." type (#+ Type)] ["#/." versioning (#+ Versioning)] ["#/." snapshot @@ -99,7 +100,7 @@ (|>> (case> (^ (list)) (list {#///artifact/snapshot/version.extension ///artifact/type.jvm_library #///artifact/snapshot/version.value version - #///artifact/snapshot/version.updated instant.epoch}) + #///artifact/snapshot/version.updated ///artifact/time.epoch}) versions versions)))) diff --git a/stdlib/source/program/aedifex/repository/local.lux b/stdlib/source/program/aedifex/repository/local.lux index 6b4575627..d026559c9 100644 --- a/stdlib/source/program/aedifex/repository/local.lux +++ b/stdlib/source/program/aedifex/repository/local.lux @@ -36,13 +36,11 @@ Bit URI (Promise (Try (File Promise)))) - (do {! promise.monad} - [#let [uri (text.replace_once ///metadata.remote_file ///metadata.local_file uri)] - home (\ program home []) - #let [/ (\ system separator) - absolute_path (format home / (..root /) / (..path / uri))]] + (let [uri (text.replace_once ///metadata.remote_file ///metadata.local_file uri) + / (\ system separator) + absolute_path (format (..root /) / (..path / uri))] (if create? - (do {! (try.with !)} + (do {! (try.with promise.monad)} [_ (: (Promise (Try Path)) (file.make_directories promise.monad system (file.parent system absolute_path)))] (: (Promise (Try (File Promise))) |