diff options
Diffstat (limited to 'stdlib/source/library/lux/meta/compiler/meta/cache/purge.lux')
-rw-r--r-- | stdlib/source/library/lux/meta/compiler/meta/cache/purge.lux | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/stdlib/source/library/lux/meta/compiler/meta/cache/purge.lux b/stdlib/source/library/lux/meta/compiler/meta/cache/purge.lux index fa3fc4630..769f99958 100644 --- a/stdlib/source/library/lux/meta/compiler/meta/cache/purge.lux +++ b/stdlib/source/library/lux/meta/compiler/meta/cache/purge.lux @@ -28,7 +28,6 @@ ["[0]" dependency ["[1]" module]] ["/[1]" // - [context (.only Context)] ["/[1]" // (.only Input)] ["[0]" archive (.only) [registry (.only Registry)] @@ -42,10 +41,11 @@ (Dictionary descriptor.Module module.ID)) ... TODO: Make the monad parameterizable. -(def .public (purge! fs context @module) - (-> (file.System Async) Context module.ID (Async (Try Any))) +(def .public (purge! fs @module) + (-> (file.System Async) module.ID + (Async (Try Any))) (do [! (try.with async.monad)] - [.let [cache (//module.path fs context @module)] + [.let [cache (//module.path fs @module)] _ (|> cache (of fs directory_files) (of ! each (monad.each ! (of fs delete))) @@ -53,7 +53,8 @@ (of fs delete cache))) (def .public (valid? expected actual) - (-> Descriptor Input Bit) + (-> Descriptor Input + Bit) (and (text#= (the descriptor.#name expected) (the ////.#module actual)) (text#= (the descriptor.#file expected) @@ -62,7 +63,8 @@ (the ////.#hash actual)))) (def initial - (-> (List Cache) Purge) + (-> (List Cache) + Purge) (|>> (list.all (function (_ [valid? module_name @module _]) (if valid? {.#None} @@ -70,7 +72,8 @@ (dictionary.of_list text.hash))) (def .public (purge caches load_order) - (-> (List Cache) (dependency.Order Any) Purge) + (-> (List Cache) (dependency.Order Any) + Purge) (list#mix (function (_ [module_name [@module entry]] purge) (let [purged? (is (Predicate descriptor.Module) (dictionary.key? purge))] |