aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/program/aedifex/pom.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/program/aedifex/pom.lux')
-rw-r--r--stdlib/source/program/aedifex/pom.lux31
1 files changed, 20 insertions, 11 deletions
diff --git a/stdlib/source/program/aedifex/pom.lux b/stdlib/source/program/aedifex/pom.lux
index 794ed7e12..9370620f5 100644
--- a/stdlib/source/program/aedifex/pom.lux
+++ b/stdlib/source/program/aedifex/pom.lux
@@ -1,15 +1,18 @@
(.module:
[lux #*
[control
- [pipe (#+ case>)]]
+ [pipe (#+ case>)]
+ ["." try (#+ Try)]
+ ["." exception]]
[data
["." maybe ("#@." functor)]
[format
["_" xml (#+ XML)]]
[collection
- ["." list ("#@." monoid functor)]]]]
+ ["." list ("#@." monoid functor)]
+ ["." set]]]]
["." // #_
- ["/" project]
+ ["/" profile]
["#." artifact (#+ Artifact)]
["#." dependency (#+ Repository Dependency)]])
@@ -110,11 +113,17 @@
))
(def: #export (project value)
- (-> /.Project XML)
- (#_.Node ["" "project"] _.attrs
- ($_ list@compose
- (list ..version)
- (..artifact (get@ #/.identity value))
- (|> value (get@ #/.repositories) (list@map ..repository) (..group "repositories") list)
- (|> value (get@ #/.dependencies) (list@map ..dependency) (..group "dependencies") list)
- )))
+ (-> /.Profile (Try XML))
+ (case (get@ #/.identity value)
+ (#.Some identity)
+ (#try.Success
+ (#_.Node ["" "project"] _.attrs
+ ($_ list@compose
+ (list ..version)
+ (..artifact identity)
+ (|> value (get@ #/.repositories) set.to-list (list@map ..repository) (..group "repositories") list)
+ (|> value (get@ #/.dependencies) set.to-list (list@map ..dependency) (..group "dependencies") list)
+ )))
+
+ _
+ (exception.throw /.no-identity [])))