diff options
author | Eduardo Julian | 2022-06-16 00:48:19 -0400 |
---|---|---|
committer | Eduardo Julian | 2022-06-16 00:48:19 -0400 |
commit | 9e2f1e76f2c8df01ed7687d934c3210fcf676bd6 (patch) | |
tree | 115fab5bd8a5f53dc0d13ce5453095324a83496f /stdlib/source/library/lux/tool/compiler/meta/io | |
parent | f92c806ee8da63f04bbefbf558f6249bacdb47ea (diff) |
De-sigil-ification: suffix : [Part 13]
Diffstat (limited to '')
3 files changed, 29 insertions, 29 deletions
diff --git a/stdlib/source/library/lux/tool/compiler/meta/io.lux b/stdlib/source/library/lux/tool/compiler/meta/io.lux index efbdb599d..374e71ef3 100644 --- a/stdlib/source/library/lux/tool/compiler/meta/io.lux +++ b/stdlib/source/library/lux/tool/compiler/meta/io.lux @@ -12,10 +12,10 @@ (type: .public Code Text) -(def: .public (safe system) +(def .public (safe system) (All (_ m) (-> (System m) Text Text)) (text.replaced "/" (at system separator))) -(def: .public lux_context +(def .public lux_context Context "lux") diff --git a/stdlib/source/library/lux/tool/compiler/meta/io/archive.lux b/stdlib/source/library/lux/tool/compiler/meta/io/archive.lux index a192cf58a..2cef8ada4 100644 --- a/stdlib/source/library/lux/tool/compiler/meta/io/archive.lux +++ b/stdlib/source/library/lux/tool/compiler/meta/io/archive.lux @@ -56,7 +56,7 @@ ["[0]" directive] ["[1]/[0]" program]]]]]]) -(def: (module_parser key parser) +(def (module_parser key parser) (All (_ document) (-> (Key document) (Parser document) (Parser (module.Module document)))) (all <>.and @@ -64,18 +64,18 @@ descriptor.parser (document.parser key parser))) -(def: (parser key parser) +(def (parser key parser) (All (_ document) (-> (Key document) (Parser document) (Parser [(module.Module document) Registry]))) (all <>.and (..module_parser key parser) registry.parser)) -(def: (fresh_analysis_state host configuration) +(def (fresh_analysis_state host configuration) (-> Target Configuration .Lux) (analysis.state (analysis.info version.latest host configuration))) -(def: (analysis_state host configuration archive) +(def (analysis_state host configuration archive) (-> Target Configuration Archive (Try .Lux)) (do [! try.monad] [modules (is (Try (List [descriptor.Module .Module])) @@ -101,14 +101,14 @@ Generators Directives]) -(def: empty_bundles +(def empty_bundles Bundles [(dictionary.empty text.hash) (dictionary.empty text.hash) (dictionary.empty text.hash) (dictionary.empty text.hash)]) -(def: (loaded_document extension host @module expected actual document) +(def (loaded_document extension host @module expected actual document) (All (_ expression directive) (-> Text (generation.Host expression directive) module.ID (Sequence [Artifact (Set unit.ID)]) (Dictionary Text Binary) (Document .Module) (Try [(Document .Module) Bundles Output]))) @@ -246,7 +246,7 @@ (in [(document.document $.key (has .#definitions definitions content)) bundles]))) -(def: (load_definitions fs context @module host_environment entry) +(def (load_definitions fs context @module host_environment entry) (All (_ expression directive) (-> (file.System Async) Context module.ID (generation.Host expression directive) (archive.Entry .Module) @@ -263,11 +263,11 @@ (has archive.#output output)) bundles]))) -(def: pseudo_module +(def pseudo_module Text "(Lux Caching System)") -(def: (cache_parser customs) +(def (cache_parser customs) (-> (List Custom) (Parser [(module.Module Any) Registry])) (case (for @.old (as (List (Custom Any Any Any)) customs) @@ -281,7 +281,7 @@ (cache_parser tail) ))) -(def: (valid_cache customs fs context import contexts [module_name @module]) +(def (valid_cache customs fs context import contexts [module_name @module]) (-> (List Custom) (file.System Async) Context Import (List //.Context) [descriptor.Module module.ID] (Async (Try Cache))) @@ -296,7 +296,7 @@ [input (//context.read fs ..pseudo_module import contexts (the context.#host_module_extension context) module_name)] (in [(cache/purge.valid? (the module.#descriptor module) input) <cache>])))))) -(def: (pre_loaded_caches customs fs context import contexts archive) +(def (pre_loaded_caches customs fs context import contexts archive) (-> (List Custom) (file.System Async) Context Import (List //.Context) Archive (Async (Try (List Cache)))) (do [! (try.with async.monad)] @@ -306,7 +306,7 @@ (monad.each ! (..valid_cache customs fs context import contexts)))] (in it))) -(def: (load_order archive pre_loaded_caches) +(def (load_order archive pre_loaded_caches) (-> Archive (List Cache) (Try (dependency.Order .Module))) (|> pre_loaded_caches @@ -321,7 +321,7 @@ (at try.monad each (dependency.load_order $.key)) (at try.monad conjoint))) -(def: (loaded_caches host_environment fs context purge load_order) +(def (loaded_caches host_environment fs context purge load_order) (All (_ expression directive) (-> (generation.Host expression directive) (file.System Async) Context Purge (dependency.Order .Module) @@ -343,7 +343,7 @@ <it>)))))))] (in it))) -(def: (load_every_reserved_module customs configuration host_environment fs context import contexts archive) +(def (load_every_reserved_module customs configuration host_environment fs context import contexts archive) (All (_ expression directive) (-> (List Custom) Configuration (generation.Host expression directive) (file.System Async) Context Import (List //.Context) Archive (Async (Try [Archive .Lux Bundles])))) @@ -374,7 +374,7 @@ ..empty_bundles loaded_caches)]))))) -(def: .public (thaw customs configuration host_environment fs context import contexts) +(def .public (thaw customs configuration host_environment fs context import contexts) (All (_ expression directive) (-> (List Custom) Configuration (generation.Host expression directive) (file.System Async) Context Import (List //.Context) (Async (Try [Archive .Lux Bundles])))) 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 6845f5cce..e79b60e7b 100644 --- a/stdlib/source/library/lux/tool/compiler/meta/io/context.lux +++ b/stdlib/source/library/lux/tool/compiler/meta/io/context.lux @@ -43,17 +43,17 @@ (type: .public Extension Text) -(def: .public lux_extension +(def .public lux_extension Extension ".lux") -(def: .public (path fs context module) +(def .public (path fs context module) (All (_ m) (-> (file.System m) Context Module file.Path)) (|> module (//.safe fs) (format context (at fs separator)))) -(def: (find_source_file fs importer contexts module extension) +(def (find_source_file fs importer contexts module extension) (-> (file.System Async) Module (List Context) Module Extension (Async (Try file.Path))) (case contexts @@ -68,11 +68,11 @@ (in {try.#Success path}) (find_source_file fs importer contexts' module extension)))))) -(def: (full_host_extension partial_host_extension) +(def (full_host_extension partial_host_extension) (-> Extension Extension) (format partial_host_extension ..lux_extension)) -(def: (find_local_source_file fs importer import contexts partial_host_extension module) +(def (find_local_source_file fs importer import contexts partial_host_extension module) (-> (file.System Async) Module Import (List Context) Extension Module (Async (Try [file.Path Binary]))) ... Preference is explicitly being given to Lux files that have a host extension. @@ -92,7 +92,7 @@ (at fs read) (at ! each (|>> [path]))))))) -(def: (find_library_source_file importer import partial_host_extension module) +(def (find_library_source_file importer import partial_host_extension module) (-> Module Import Extension Module (Try [file.Path Binary])) (let [path (format module (..full_host_extension partial_host_extension))] (case (dictionary.value path import) @@ -108,7 +108,7 @@ {.#None} (exception.except ..cannot_find_module [importer module])))))) -(def: (find_any_source_file fs importer import contexts partial_host_extension module) +(def (find_any_source_file fs importer import contexts partial_host_extension module) (-> (file.System Async) Module Import (List Context) Extension Module (Async (Try [file.Path Binary]))) ... Preference is explicitly being given to Lux files that have a host extension. @@ -122,7 +122,7 @@ {try.#Failure _} (in (..find_library_source_file importer import partial_host_extension module))))) -(def: .public (read fs importer import contexts partial_host_extension module) +(def .public (read fs importer import contexts partial_host_extension module) (-> (file.System Async) Module Import (List Context) Extension Module (Async (Try Input))) (do (try.with async.monad) @@ -140,7 +140,7 @@ (type: .public Enumeration (Dictionary file.Path Binary)) -(def: (context_listing fs context directory enumeration) +(def (context_listing fs context directory enumeration) (-> (file.System Async) Context file.Path Enumeration (Async (Try Enumeration))) (do [! (try.with async.monad)] [enumeration (|> directory @@ -158,10 +158,10 @@ (at ! each (monad.mix ! (context_listing fs context) enumeration)) (at ! conjoint)))) -(def: Action +(def Action (type (All (_ a) (Async (Try a))))) -(def: (canonical fs context) +(def (canonical fs context) (-> (file.System Async) Context (Action Context)) (do (try.with async.monad) [subs (at fs sub_directories context)] @@ -171,7 +171,7 @@ (file.parent fs) (maybe.else context))))) -(def: .public (listing fs contexts) +(def .public (listing fs contexts) (-> (file.System Async) (List Context) (Action Enumeration)) (let [! (is (Monad Action) (try.with async.monad))] |