diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/library/lux/tool/compiler/meta/io/archive.lux | 68 |
1 files changed, 34 insertions, 34 deletions
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 2c7b14da6..3a89e09eb 100644 --- a/stdlib/source/library/lux/tool/compiler/meta/io/archive.lux +++ b/stdlib/source/library/lux/tool/compiler/meta/io/archive.lux @@ -53,7 +53,7 @@ ["[0]" analysis] ["[0]" synthesis] ["[0]" generation] - ["[0]" directive] + ["[0]" declaration] ["[1]/[0]" program]]]]]]) (def (module_parser key parser) @@ -93,13 +93,13 @@ (type Analysers (Dictionary Text analysis.Handler)) (type Synthesizers (Dictionary Text synthesis.Handler)) (type Generators (Dictionary Text generation.Handler)) -(type Directives (Dictionary Text directive.Handler)) +(type Declarations (Dictionary Text declaration.Handler)) (type Bundles [Analysers Synthesizers Generators - Directives]) + Declarations]) (def empty_bundles Bundles @@ -109,8 +109,8 @@ (dictionary.empty text.hash)]) (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) + (All (_ expression declaration) + (-> Text (generation.Host expression declaration) module.ID (Sequence [Artifact (Set unit.ID)]) (Dictionary Text Binary) (Document .Module) (Try [(Document .Module) Bundles Output]))) (do [! try.monad] [[definitions bundles] (is (Try [Definitions Bundles Output]) @@ -119,23 +119,23 @@ (dictionary.empty text.hash)) bundles ..empty_bundles output (is Output sequence.empty)]) - (let [[analysers synthesizers generators directives] bundles] + (let [[analysers synthesizers generators declarations] bundles] (case input {.#Item [[[@artifact artifact_category mandatory_artifact?] artifact_dependencies] input']} (case (do ! [data (try.of_maybe (dictionary.value (format (%.nat @artifact) extension) actual)) .let [context [@module @artifact] - directive (at host ingest context data)]] + declaration (at host ingest context data)]] (case artifact_category {category.#Anonymous} (do ! [.let [output (sequence.suffix [@artifact {.#None} data] output)] - _ (at host re_learn context {.#None} directive)] + _ (at host re_learn context {.#None} declaration)] (in [definitions [analysers synthesizers generators - directives] + declarations] output])) {category.#Definition [name function_artifact]} @@ -145,70 +145,70 @@ [analysers synthesizers generators - directives] + declarations] output]) (do ! - [value (at host re_load context {.#None} directive)] + [value (at host re_load context {.#None} declaration)] (in [(dictionary.has name value definitions) [analysers synthesizers generators - directives] + declarations] output])))) {category.#Analyser extension} (do ! [.let [output (sequence.suffix [@artifact {.#None} data] output)] - value (at host re_load context {.#None} directive)] + value (at host re_load context {.#None} declaration)] (in [definitions [(dictionary.has extension (as analysis.Handler value) analysers) synthesizers generators - directives] + declarations] output])) {category.#Synthesizer extension} (do ! [.let [output (sequence.suffix [@artifact {.#None} data] output)] - value (at host re_load context {.#None} directive)] + value (at host re_load context {.#None} declaration)] (in [definitions [analysers (dictionary.has extension (as synthesis.Handler value) synthesizers) generators - directives] + declarations] output])) {category.#Generator extension} (do ! [.let [output (sequence.suffix [@artifact {.#None} data] output)] - value (at host re_load context {.#None} directive)] + value (at host re_load context {.#None} declaration)] (in [definitions [analysers synthesizers (dictionary.has extension (as generation.Handler value) generators) - directives] + declarations] output])) - {category.#Directive extension} + {category.#Declaration extension} (do ! [.let [output (sequence.suffix [@artifact {.#None} data] output)] - value (at host re_load context {.#None} directive)] + value (at host re_load context {.#None} declaration)] (in [definitions [analysers synthesizers generators - (dictionary.has extension (as directive.Handler value) directives)] + (dictionary.has extension (as declaration.Handler value) declarations)] output])) {category.#Custom name} (do ! [.let [output (sequence.suffix [@artifact {.#Some name} data] output)] - _ (at host re_learn context {.#Some name} directive)] + _ (at host re_learn context {.#Some name} declaration)] (in [definitions [analysers synthesizers generators - directives] + declarations] output])))) {try.#Success [definitions' bundles' output']} (again input' definitions' bundles' output') @@ -247,8 +247,8 @@ bundles]))) (def (load_definitions fs context @module host_environment entry) - (All (_ expression directive) - (-> (file.System Async) Context module.ID (generation.Host expression directive) + (All (_ expression declaration) + (-> (file.System Async) Context module.ID (generation.Host expression declaration) (archive.Entry .Module) (Async (Try [(archive.Entry .Module) Bundles])))) (do (try.with async.monad) @@ -322,8 +322,8 @@ (at try.monad conjoint))) (def (loaded_caches host_environment fs context purge load_order) - (All (_ expression directive) - (-> (generation.Host expression directive) (file.System Async) Context + (All (_ expression declaration) + (-> (generation.Host expression declaration) (file.System Async) Context Purge (dependency.Order .Module) (Async (Try (List [[descriptor.Module (archive.Entry .Module)] Bundles]))))) (do [! (try.with async.monad)] @@ -344,8 +344,8 @@ (in it))) (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 + (All (_ expression declaration) + (-> (List Custom) Configuration (generation.Host expression declaration) (file.System Async) Context Import (List //.Context) Archive (Async (Try [Archive .Lux Bundles])))) (do [! (try.with async.monad)] [pre_loaded_caches (..pre_loaded_caches customs fs context import contexts archive) @@ -365,18 +365,18 @@ analysis_state (..analysis_state (the context.#host context) configuration archive)] (in [archive analysis_state - (list#mix (function (_ [_ [+analysers +synthesizers +generators +directives]] - [analysers synthesizers generators directives]) + (list#mix (function (_ [_ [+analysers +synthesizers +generators +declarations]] + [analysers synthesizers generators declarations]) [(dictionary.composite +analysers analysers) (dictionary.composite +synthesizers synthesizers) (dictionary.composite +generators generators) - (dictionary.composite +directives directives)]) + (dictionary.composite +declarations declarations)]) ..empty_bundles loaded_caches)]))))) (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) + (All (_ expression declaration) + (-> (List Custom) Configuration (generation.Host expression declaration) (file.System Async) Context Import (List //.Context) (Async (Try [Archive .Lux Bundles])))) (do async.monad [binary (at fs read (cache/archive.descriptor fs context))] |