diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/program/aedifex/package.lux | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/stdlib/source/program/aedifex/package.lux b/stdlib/source/program/aedifex/package.lux index 31376c6f5..11d073b51 100644 --- a/stdlib/source/program/aedifex/package.lux +++ b/stdlib/source/program/aedifex/package.lux @@ -18,15 +18,42 @@ ["#." hash (#+ Hash SHA-1 MD5)] ["#." pom]]) +(type: #export Origin + #Local + #Remote) + +(structure: any-equivalence + (Equivalence Any) + + (def: (= _ _) + true)) + +(def: origin-equivalence + (Equivalence Origin) + ($_ equivalence.sum + ..any-equivalence + ..any-equivalence)) + (type: #export Package - {#library Binary + {#origin Origin + #library Binary #pom XML #sha-1 (Hash SHA-1) #md5 (Hash MD5)}) +(template [<name> <tag>] + [(def: #export <name> + (-> Package Bit) + (|>> (get@ #origin) (:: ..origin-equivalence = <tag>)))] + + [local? #Local] + [remote? #Remote] + ) + (def: #export (local pom library) (-> XML Binary Package) - {#library library + {#origin #Local + #library library #pom pom #sha-1 (//hash.sha-1 library) #md5 (//hash.md5 library)}) @@ -40,6 +67,7 @@ (def: #export equivalence (Equivalence Package) ($_ equivalence.product + ..origin-equivalence binary.equivalence xml.equivalence //hash.equivalence |