diff options
Diffstat (limited to 'stdlib/source/program/compositor')
-rw-r--r-- | stdlib/source/program/compositor/export.lux | 34 | ||||
-rw-r--r-- | stdlib/source/program/compositor/import.lux | 36 |
2 files changed, 35 insertions, 35 deletions
diff --git a/stdlib/source/program/compositor/export.lux b/stdlib/source/program/compositor/export.lux index 309678908..a9c76f039 100644 --- a/stdlib/source/program/compositor/export.lux +++ b/stdlib/source/program/compositor/export.lux @@ -44,28 +44,28 @@ (do (try.with async.monad) [files (io.listing fs sources)] (|> (dictionary.entries files) - (monad.map try.monad - (function (_ [path source_code]) - (do try.monad - [path (|> path - (text.replaced (\ fs separator) .module_separator) - tar.path) - source_code (tar.content source_code)] - (in (#tar.Normal [path - (instant.of_millis +0) - ($_ tar.and - tar.read_by_owner tar.write_by_owner - tar.read_by_group tar.write_by_group - tar.read_by_other) - ..no_ownership - source_code]))))) - (\ try.monad map row.of_list) + (monad.each try.monad + (function (_ [path source_code]) + (do try.monad + [path (|> path + (text.replaced (\ fs separator) .module_separator) + tar.path) + source_code (tar.content source_code)] + (in (#tar.Normal [path + (instant.of_millis +0) + ($_ tar.and + tar.read_by_owner tar.write_by_owner + tar.read_by_group tar.write_by_group + tar.read_by_other) + ..no_ownership + source_code]))))) + (\ try.monad each row.of_list) (\ async.monad in)))) (def: .public (export fs [sources target]) (-> (file.System Async) Export (Async (Try Any))) (do {! (try.with async.monad)} - [tar (\ ! map (binary.result tar.writer) + [tar (\ ! each (binary.result tar.writer) (..library fs sources))] (|> ..file (format target (\ fs separator)) diff --git a/stdlib/source/program/compositor/import.lux b/stdlib/source/program/compositor/import.lux index 1950c4ebb..d05867201 100644 --- a/stdlib/source/program/compositor/import.lux +++ b/stdlib/source/program/compositor/import.lux @@ -47,25 +47,25 @@ (let [! async.monad] (|> library (\ system read) - (\ ! map (let [! try.monad] - (|>> (\ ! map (<binary>.result tar.parser)) - (\ ! join) - (\ ! map (|>> row.list - (monad.mix ! (function (_ entry import) - (case entry - (#tar.Normal [path instant mode ownership content]) - (let [path (tar.from_path path)] - (case (dictionary.has' path (tar.data content) import) - (#try.Failure error) - (exception.except ..duplicate [library path]) + (\ ! each (let [! try.monad] + (|>> (\ ! each (<binary>.result tar.parser)) + (\ ! conjoint) + (\ ! each (|>> row.list + (monad.mix ! (function (_ entry import) + (case entry + (#tar.Normal [path instant mode ownership content]) + (let [path (tar.from_path path)] + (case (dictionary.has' path (tar.data content) import) + (#try.Failure error) + (exception.except ..duplicate [library path]) - import' - import')) - - _ - (exception.except ..useless_tar_entry []))) - import))) - (\ ! join))))))) + import' + import')) + + _ + (exception.except ..useless_tar_entry []))) + import))) + (\ ! conjoint))))))) (def: .public (import system libraries) (-> (file.System Async) (List Library) (Action Import)) |