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/program/compositor/export.lux | 12 ++++++------ stdlib/source/program/compositor/import.lux | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) (limited to 'stdlib/source/program/compositor') diff --git a/stdlib/source/program/compositor/export.lux b/stdlib/source/program/compositor/export.lux index 9fe95684e..f17feaf22 100644 --- a/stdlib/source/program/compositor/export.lux +++ b/stdlib/source/program/compositor/export.lux @@ -6,7 +6,7 @@ [control ["." try (#+ Try)] [concurrency - ["." promise (#+ Promise)]]] + ["." async (#+ Async)]]] [data ["." text ["%" format (#+ format)]] @@ -40,8 +40,8 @@ #tar.group commons})) (def: #export (library fs sources) - (-> (file.System Promise) (List Source) (Promise (Try tar.Tar))) - (do (try.with promise.monad) + (-> (file.System Async) (List Source) (Async (Try tar.Tar))) + (do (try.with async.monad) [files (io.enumerate fs sources)] (|> (dictionary.entries files) (monad.map try.monad @@ -60,11 +60,11 @@ ..no_ownership source_code]))))) (\ try.monad map row.of_list) - (\ promise.monad wrap)))) + (\ async.monad wrap)))) (def: #export (export fs [sources target]) - (-> (file.System Promise) Export (Promise (Try Any))) - (do {! (try.with promise.monad)} + (-> (file.System Async) Export (Async (Try Any))) + (do {! (try.with async.monad)} [tar (\ ! map (binary.run tar.writer) (..library fs sources))] (|> ..file diff --git a/stdlib/source/program/compositor/import.lux b/stdlib/source/program/compositor/import.lux index 4edb82a5e..db46d6c13 100644 --- a/stdlib/source/program/compositor/import.lux +++ b/stdlib/source/program/compositor/import.lux @@ -7,7 +7,7 @@ ["." try (#+ Try)] ["." exception (#+ exception:)] [concurrency - ["." promise (#+ Promise) ("#\." monad)]] + ["." async (#+ Async) ("#\." monad)]] ["<>" parser ["<.>" binary]]] [data @@ -30,7 +30,7 @@ [cli (#+ Library)]]) (def: Action - (type (All [a] (Promise (Try a))))) + (type (All [a] (Async (Try a))))) (exception: #export useless_tar_entry) @@ -43,8 +43,8 @@ (Dictionary file.Path Binary)) (def: (import_library system library import) - (-> (file.System Promise) Library Import (Action Import)) - (let [! promise.monad] + (-> (file.System Async) Library Import (Action Import)) + (let [! async.monad] (|> library (\ system read) (\ ! map (let [! try.monad] @@ -68,9 +68,9 @@ (\ ! join))))))) (def: #export (import system libraries) - (-> (file.System Promise) (List Library) (Action Import)) + (-> (file.System Async) (List Library) (Action Import)) (monad.fold (: (Monad Action) - (try.with promise.monad)) + (try.with async.monad)) (..import_library system) (dictionary.new text.hash) libraries)) -- cgit v1.2.3