diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/program/aedifex/artifact.lux | 23 |
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 |