From 3d457763e34d4dd1992427b3918b351ac684adb7 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Mon, 1 Feb 2021 04:59:32 -0400 Subject: Improved compilation of loops and pattern-matching for Python. --- .../aedifex/artifact/snapshot/version/value.lux | 42 +++++++++++++++++++ stdlib/source/program/aedifex/artifact/value.lux | 47 ---------------------- 2 files changed, 42 insertions(+), 47 deletions(-) create mode 100644 stdlib/source/program/aedifex/artifact/snapshot/version/value.lux delete mode 100644 stdlib/source/program/aedifex/artifact/value.lux (limited to 'stdlib/source/program/aedifex/artifact') diff --git a/stdlib/source/program/aedifex/artifact/snapshot/version/value.lux b/stdlib/source/program/aedifex/artifact/snapshot/version/value.lux new file mode 100644 index 000000000..7356d897c --- /dev/null +++ b/stdlib/source/program/aedifex/artifact/snapshot/version/value.lux @@ -0,0 +1,42 @@ +(.module: + [lux #* + [abstract + [equivalence (#+ Equivalence)]] + [data + ["." product] + ["." text + ["%" format]]]] + ["." /// (#+ Snapshot) + ["#." time] + ["#." stamp]]) + +(type: #export Value + {#version Text + #snapshot Snapshot}) + +(def: #export equivalence + (Equivalence Value) + ($_ product.equivalence + text.equivalence + ///.equivalence + )) + +(def: separator + "-") + +(def: #export snapshot + "SNAPSHOT") + +(def: #export (format (^slots [#version #snapshot])) + (%.Format Value) + (case snapshot + #///.Local + version + + (#///.Remote stamp) + (let [(^slots [#///stamp.time #///stamp.build]) stamp] + (%.format (text.replace_all ..snapshot + (///time.format time) + version) + ..separator + (%.nat build))))) diff --git a/stdlib/source/program/aedifex/artifact/value.lux b/stdlib/source/program/aedifex/artifact/value.lux deleted file mode 100644 index 3e92dbf16..000000000 --- a/stdlib/source/program/aedifex/artifact/value.lux +++ /dev/null @@ -1,47 +0,0 @@ -(.module: - [lux #* - [abstract - [equivalence (#+ Equivalence)]] - [data - ["." product] - ["." text - ["%" format]] - [collection - ["." list ("#\." functor)]]] - [math - [number - ["." nat]]] - [time - ["." instant]]] - [// (#+ Version) - ["." time_stamp (#+ Time_Stamp)]]) - -(type: #export Build - Nat) - -(type: #export Value - {#version Version - #time_stamp Time_Stamp - #build Build}) - -(def: #export equivalence - (Equivalence Value) - ($_ product.equivalence - text.equivalence - instant.equivalence - nat.equivalence - )) - -(def: separator - "-") - -(def: snapshot - "SNAPSHOT") - -(def: #export (format (^slots [#version #time_stamp #build])) - (%.Format Value) - (%.format (text.replace_all ..snapshot - (time_stamp.format time_stamp) - version) - ..separator - (%.nat build))) -- cgit v1.2.3