aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/program/aedifex/artifact
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/program/aedifex/artifact.lux23
1 files changed, 16 insertions, 7 deletions
diff --git a/stdlib/source/program/aedifex/artifact.lux b/stdlib/source/program/aedifex/artifact.lux
index dc0892eb1..c29cc7b2d 100644
--- a/stdlib/source/program/aedifex/artifact.lux
+++ b/stdlib/source/program/aedifex/artifact.lux
@@ -9,8 +9,9 @@
[collection
["." list ("#@." monoid)]]]
[world
+ ["." file (#+ Path)]
[net
- ["." uri]]]])
+ ["." uri (#+ URI)]]]])
(type: #export Group
Text)
@@ -64,20 +65,28 @@
..identity-separator
(..identity value)))
-(def: #export (path artifact)
- (-> Artifact Text)
+(def: (address separator artifact)
+ (-> Text Artifact Text)
(let [directory (%.format (|> artifact
(get@ #group)
(text.split-all-with ..group-separator)
- (text.join-with uri.separator))
- uri.separator
+ (text.join-with separator))
+ separator
(get@ #name artifact)
- uri.separator
+ separator
(get@ #version artifact))]
(%.format directory
- uri.separator
+ separator
(..identity artifact))))
+(def: #export uri
+ (-> Artifact URI)
+ (..address uri.separator))
+
+(def: #export (path system)
+ (All [!] (-> (file.System !) Artifact Path))
+ (..address (:: system separator)))
+
(def: #export (local artifact)
(-> Artifact (List Text))
(list@compose (|> artifact