aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/program/aedifex/repository.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/program/aedifex/repository.lux')
-rw-r--r--stdlib/source/program/aedifex/repository.lux8
1 files changed, 8 insertions, 0 deletions
diff --git a/stdlib/source/program/aedifex/repository.lux b/stdlib/source/program/aedifex/repository.lux
index d966c7f82..05560c6c9 100644
--- a/stdlib/source/program/aedifex/repository.lux
+++ b/stdlib/source/program/aedifex/repository.lux
@@ -15,6 +15,8 @@
[uri (#+ URI)]]]])
(interface: #export (Repository !)
+ (: Text
+ description)
(: (-> URI (! (Try Binary)))
download)
(: (-> URI Binary (! (Try Any)))
@@ -23,6 +25,8 @@
(def: #export (async repository)
(-> (Repository IO) (Repository Promise))
(implementation
+ (def: description
+ (\ repository description))
(def: (download uri)
(promise.future (\ repository download uri)))
@@ -31,6 +35,8 @@
))
(interface: #export (Mock s)
+ (: Text
+ the_description)
(: (-> URI s (Try [s Binary]))
on_download)
(: (-> URI Binary s (Try s))
@@ -40,6 +46,8 @@
(All [s] (-> (Mock s) s (Repository Promise)))
(let [state (stm.var init)]
(implementation
+ (def: description
+ (\ mock the_description))
(def: (download uri)
(stm.commit
(do {! stm.monad}