diff options
author | Eduardo Julian | 2020-11-17 20:23:53 -0400 |
---|---|---|
committer | Eduardo Julian | 2020-11-17 20:23:53 -0400 |
commit | d89d837de3475b75587a4293e094d755d2cd4626 (patch) | |
tree | 0975a487d987cfe855c4f6e87f05478346913a16 /stdlib/source/program/aedifex/package.lux | |
parent | 2e5852abb1ac0ae5abdd8709238aca447f62520e (diff) |
Made the syntax of ^template more consistent.
Diffstat (limited to 'stdlib/source/program/aedifex/package.lux')
-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 |