From e64b6d0114c26a455e19a416b5f02a4d19dd711f Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Mon, 26 Jul 2021 01:45:57 -0400 Subject: Re-named Promise to Async. --- stdlib/source/test/aedifex/command/clean.lux | 32 ++++++++++++++-------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'stdlib/source/test/aedifex/command/clean.lux') diff --git a/stdlib/source/test/aedifex/command/clean.lux b/stdlib/source/test/aedifex/command/clean.lux index f0a5f4b58..568c6fb76 100644 --- a/stdlib/source/test/aedifex/command/clean.lux +++ b/stdlib/source/test/aedifex/command/clean.lux @@ -7,7 +7,7 @@ [control ["." try (#+ Try)] [concurrency - ["." promise (#+ Promise)]]] + ["." async (#+ Async)]]] [data [binary (#+ Binary)] ["." product] @@ -46,32 +46,32 @@ [count (\ ! map (n.% 10) random.nat) names (random.set text.hash count ..node_name) contents (random.list count ($binary.random 100))] - (wrap (list.zip/2 (list\map (|>> (format prefix)) (set.to_list names)) - contents)))) + (wrap (list.zipped/2 (list\map (|>> (format prefix)) (set.to_list names)) + contents)))) (def: (create_file! fs [path content]) - (-> (file.System Promise) [Path Binary] (Promise (Try Any))) + (-> (file.System Async) [Path Binary] (Async (Try Any))) (\ fs write content path)) (def: (create_directory! fs path files) - (-> (file.System Promise) Path (List [Path Binary]) (Promise (Try Any))) - (do {! (try.with promise.monad)} - [_ (: (Promise (Try Any)) - (file.make_directories promise.monad fs path)) + (-> (file.System Async) Path (List [Path Binary]) (Async (Try Any))) + (do {! (try.with async.monad)} + [_ (: (Async (Try Any)) + (file.make_directories async.monad fs path)) _ (monad.map ! (..create_file! fs) files)] (wrap []))) (def: (directory_exists? fs) - (-> (file.System Promise) Path (Promise (Try Bit))) - (|>> (\ fs directory?) (try.lift promise.monad))) + (-> (file.System Async) Path (Async (Try Bit))) + (|>> (\ fs directory?) (try.lift async.monad))) (def: (file_exists? fs) - (-> (file.System Promise) Path (Promise (Try Bit))) - (|>> (\ fs file?) (try.lift promise.monad))) + (-> (file.System Async) Path (Async (Try Bit))) + (|>> (\ fs file?) (try.lift async.monad))) (def: (assets_exist? fs directory_path files) - (-> (file.System Promise) Path (List [Path Binary]) (Promise (Try Bit))) - (do {! (try.with promise.monad)} + (-> (file.System Async) Path (List [Path Binary]) (Async (Try Bit))) + (do {! (try.with async.monad)} [directory_exists? (..directory_exists? fs directory_path) files_exist? (: (Action (List Bit)) (|> files @@ -95,9 +95,9 @@ sub_files (..files (format sub_path /)) dummy @profile.random] - (wrap (do promise.monad + (wrap (do async.monad [#let [console (@version.echo "")] - verdict (do {! (try.with promise.monad)} + verdict (do {! (try.with async.monad)} [_ (..create_directory! fs target_path direct_files) _ (..create_directory! fs sub_path sub_files) context_exists!/pre (..directory_exists? fs context) -- cgit v1.2.3