diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/program/aedifex/repository.lux | 10 | ||||
-rw-r--r-- | stdlib/source/program/aedifex/repository/local.lux | 14 |
2 files changed, 12 insertions, 12 deletions
diff --git a/stdlib/source/program/aedifex/repository.lux b/stdlib/source/program/aedifex/repository.lux index 7ae07e9b5..8f92be270 100644 --- a/stdlib/source/program/aedifex/repository.lux +++ b/stdlib/source/program/aedifex/repository.lux @@ -7,7 +7,7 @@ [io (#+ IO)] ["." try (#+ Try)] [concurrency - ["." promise (#+ Promise)] + ["." async (#+ Async)] ["." stm]]] [data [binary (#+ Binary)]] @@ -24,15 +24,15 @@ upload)) (def: #export (async repository) - (-> (Repository IO) (Repository Promise)) + (-> (Repository IO) (Repository Async)) (implementation (def: description (\ repository description)) (def: (download uri) - (promise.future (\ repository download uri))) + (async.future (\ repository download uri))) (def: (upload uri content) - (promise.future (\ repository upload uri content))) + (async.future (\ repository upload uri content))) )) (interface: #export (Mock s) @@ -44,7 +44,7 @@ on_upload)) (def: #export (mock mock init) - (All [s] (-> (Mock s) s (Repository Promise))) + (All [s] (-> (Mock s) s (Repository Async))) (let [state (stm.var init)] (implementation (def: description diff --git a/stdlib/source/program/aedifex/repository/local.lux b/stdlib/source/program/aedifex/repository/local.lux index e7dbb7d4d..4620a1363 100644 --- a/stdlib/source/program/aedifex/repository/local.lux +++ b/stdlib/source/program/aedifex/repository/local.lux @@ -6,7 +6,7 @@ [control ["." try] [concurrency - ["." promise (#+ Promise)]]] + ["." async (#+ Async)]]] [data ["." text ["%" format (#+ format)]]] @@ -21,7 +21,7 @@ ["#." metadata]]]) (def: (root program /) - (-> (Program Promise) Text file.Path) + (-> (Program Async) Text file.Path) (|> ///local.repository (text.replace_all uri.separator /) (format (\ program home) /))) @@ -31,13 +31,13 @@ (text.replace_all uri.separator /)) (def: (absolute_path program /) - (-> (Program Promise) Text (-> URI file.Path)) + (-> (Program Async) Text (-> URI file.Path)) (|>> ///metadata.local_uri (..path /) (format (..root program /) /))) (implementation: #export (repository program fs) - (-> (Program Promise) (file.System Promise) (//.Repository Promise)) + (-> (Program Async) (file.System Async) (//.Repository Async)) (def: description (..root program (\ fs separator))) @@ -47,16 +47,16 @@ (\ fs read))) (def: (upload uri content) - (do {! promise.monad} + (do {! async.monad} [#let [absolute_path (..absolute_path program (\ fs separator) uri)] ? (\ fs file? absolute_path) _ (if ? (wrap []) (case (file.parent fs absolute_path) (#.Some parent) - (file.make_directories promise.monad fs parent) + (file.make_directories async.monad fs parent) _ - (let [! (try.with promise.monad)] + (let [! (try.with async.monad)] (\ ! wrap []))))] (\ fs write content absolute_path)))) |