aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/program/aedifex/artifact
diff options
context:
space:
mode:
authorEduardo Julian2021-07-08 23:59:00 -0400
committerEduardo Julian2021-07-08 23:59:00 -0400
commitf3e869d0246e956399ec31a074c6c6299ff73602 (patch)
treeba67c7713bbe4ec48232f58a4b324bd364111f95 /stdlib/source/program/aedifex/artifact
parent2b909032e7a0bd10cd7db52067d2fb701bfa95e5 (diff)
Made sure the "phase" parameter of extensions is always usable (even across language boundaries)
Diffstat (limited to '')
-rw-r--r--stdlib/source/program/aedifex/artifact.lux23
1 files changed, 22 insertions, 1 deletions
diff --git a/stdlib/source/program/aedifex/artifact.lux b/stdlib/source/program/aedifex/artifact.lux
index 9e87988ea..e5d37f7bb 100644
--- a/stdlib/source/program/aedifex/artifact.lux
+++ b/stdlib/source/program/aedifex/artifact.lux
@@ -2,10 +2,11 @@
[lux (#- Name)
[abstract
[equivalence (#+ Equivalence)]
+ [order (#+ Order)]
[hash (#+ Hash)]]
[data
["." product]
- ["." text
+ ["." text ("#\." order)
["%" format (#+ Format)]]
[collection
["." list ("#\." monoid)]]]
@@ -40,6 +41,26 @@
(Equivalence Artifact)
(\ ..hash &equivalence))
+(implementation: #export order
+ (Order Artifact)
+
+ (def: &equivalence
+ ..equivalence)
+
+ (def: (< reference subject)
+ (<| (or (text\< (get@ #group reference)
+ (get@ #group subject)))
+
+ (and (text\= (get@ #group reference)
+ (get@ #group subject)))
+ (or (text\< (get@ #name reference)
+ (get@ #name subject)))
+
+ (and (text\= (get@ #name reference)
+ (get@ #name subject)))
+ (text\< (get@ #version reference)
+ (get@ #version subject)))))
+
(template [<separator> <definition>]
[(def: <definition>
Text