aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/program/aedifex/package.lux
diff options
context:
space:
mode:
authorEduardo Julian2020-11-01 22:56:30 -0400
committerEduardo Julian2020-11-01 22:56:30 -0400
commit3e67e244ad1f58a7bab0094967a86be72aae2482 (patch)
tree5e8677dd7401134cac932c423a766bcff69c41e2 /stdlib/source/program/aedifex/package.lux
parent69272f598d831e89da83bdc8c9290d5607dfb14d (diff)
Improved the design of actors.
Diffstat (limited to 'stdlib/source/program/aedifex/package.lux')
-rw-r--r--stdlib/source/program/aedifex/package.lux36
1 files changed, 36 insertions, 0 deletions
diff --git a/stdlib/source/program/aedifex/package.lux b/stdlib/source/program/aedifex/package.lux
new file mode 100644
index 000000000..757f116e6
--- /dev/null
+++ b/stdlib/source/program/aedifex/package.lux
@@ -0,0 +1,36 @@
+(.module:
+ [lux #*
+ [control
+ ["." try (#+ Try) ("#@." functor)]
+ [parser
+ ["<.>" xml]]]
+ [data
+ [binary (#+ Binary)]
+ [format
+ [xml (#+ XML)]]
+ [collection
+ [set (#+ Set)]]]]
+ ["." // #_
+ [dependency (#+ Dependency)]
+ ["/" profile]
+ ["#." hash (#+ Hash SHA-1 MD5)]
+ ["#." pom]])
+
+(type: #export Package
+ {#library Binary
+ #pom XML
+ #sha-1 (Hash SHA-1)
+ #md5 (Hash MD5)})
+
+(def: #export (local pom library)
+ (-> XML Binary Package)
+ {#library library
+ #pom pom
+ #sha-1 (//hash.sha-1 library)
+ #md5 (//hash.md5 library)})
+
+(def: #export dependencies
+ (-> Package (Try (Set Dependency)))
+ (|>> (get@ #pom)
+ (<xml>.run //pom.parser)
+ (try@map (get@ #/.dependencies))))