diff options
Diffstat (limited to 'stdlib/source/library/lux/tool/compiler/meta/io/context.lux')
-rw-r--r-- | stdlib/source/library/lux/tool/compiler/meta/io/context.lux | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/stdlib/source/library/lux/tool/compiler/meta/io/context.lux b/stdlib/source/library/lux/tool/compiler/meta/io/context.lux index 979edaa76..74d5aab33 100644 --- a/stdlib/source/library/lux/tool/compiler/meta/io/context.lux +++ b/stdlib/source/library/lux/tool/compiler/meta/io/context.lux @@ -127,7 +127,7 @@ (Async (Try Input))) (do (try.with async.monad) [[path binary] (..find_any_source_file fs importer import contexts partial_host_extension module)] - (case (\ utf8.codec decode binary) + (case (\ utf8.codec decoded binary) (#try.Success code) (in {#////.module module #////.file path @@ -145,17 +145,17 @@ (do {! (try.with async.monad)} [enumeration (|> directory (\ fs directory_files) - (\ ! map (monad.fold ! (function (_ file enumeration) - (if (text.ends_with? ..lux_extension file) - (do ! - [source_code (\ fs read file)] - (async\in (dictionary.has' (text.replaced context "" file) source_code enumeration))) - (in enumeration))) - enumeration)) + (\ ! map (monad.mix ! (function (_ file enumeration) + (if (text.ends_with? ..lux_extension file) + (do ! + [source_code (\ fs read file)] + (async\in (dictionary.has' (text.replaced context "" file) source_code enumeration))) + (in enumeration))) + enumeration)) (\ ! join))] (|> directory (\ fs sub_directories) - (\ ! map (monad.fold ! (context_listing fs context) enumeration)) + (\ ! map (monad.mix ! (context_listing fs context) enumeration)) (\ ! join)))) (def: Action @@ -175,14 +175,14 @@ (-> (file.System Async) (List Context) (Action Enumeration)) (let [! (: (Monad Action) (try.with async.monad))] - (monad.fold ! - (function (_ context enumeration) - (do ! - [context (..canonical fs context)] - (..context_listing fs - (format context (\ fs separator)) - context - enumeration))) - (: Enumeration - (dictionary.empty text.hash)) - contexts))) + (monad.mix ! + (function (_ context enumeration) + (do ! + [context (..canonical fs context)] + (..context_listing fs + (format context (\ fs separator)) + context + enumeration))) + (: Enumeration + (dictionary.empty text.hash)) + contexts))) |