diff options
author | Eduardo Julian | 2021-07-08 23:59:00 -0400 |
---|---|---|
committer | Eduardo Julian | 2021-07-08 23:59:00 -0400 |
commit | f3e869d0246e956399ec31a074c6c6299ff73602 (patch) | |
tree | ba67c7713bbe4ec48232f58a4b324bd364111f95 /stdlib/source/program/aedifex/artifact | |
parent | 2b909032e7a0bd10cd7db52067d2fb701bfa95e5 (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.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 |