diff options
Diffstat (limited to 'stdlib/source/library/lux/ffi/export.lua.lux')
-rw-r--r-- | stdlib/source/library/lux/ffi/export.lua.lux | 90 |
1 files changed, 45 insertions, 45 deletions
diff --git a/stdlib/source/library/lux/ffi/export.lua.lux b/stdlib/source/library/lux/ffi/export.lua.lux index 66b98998d..c38eaf711 100644 --- a/stdlib/source/library/lux/ffi/export.lua.lux +++ b/stdlib/source/library/lux/ffi/export.lua.lux @@ -1,7 +1,7 @@ (.require [library [lux (.except) - [extension (.only directive)] + [extension (.only declaration)] ["[0]" meta] ["[0]" static] [abstract @@ -32,7 +32,7 @@ [language [lux ["[0]" generation] - ["[0]" directive] + ["[0]" declaration] [analysis ["[0]" type]]]]]]]]) @@ -53,53 +53,53 @@ (with_expansions [<extension> (static.random (|>> %.nat (%.format "lua export ") code.text) random.nat)] - (directive (<extension> self phase archive [name <code>.text - term <code>.any]) - (do [! phase.monad] - [next directive.analysis - [_ term] (<| directive.lifted_analysis - type.inferring - (next archive term)) + (declaration (<extension> self phase archive [name <code>.text + term <code>.any]) + (do [! phase.monad] + [next declaration.analysis + [_ term] (<| declaration.lifted_analysis + type.inferring + (next archive term)) - next directive.synthesis - term (directive.lifted_synthesis - (next archive term)) + next declaration.synthesis + term (declaration.lifted_synthesis + (next archive term)) - dependencies (directive.lifted_generation - (dependency.dependencies archive term)) + dependencies (declaration.lifted_generation + (dependency.dependencies archive term)) - next directive.generation - [interim_artifacts term] (directive.lifted_generation - (generation.with_interim_artifacts archive - (next archive term))) + next declaration.generation + [interim_artifacts term] (declaration.lifted_generation + (generation.with_interim_artifacts archive + (next archive term))) - _ (directive.lifted_generation - (do ! - [@self (generation.learn_custom name (list#mix set.has dependencies interim_artifacts)) - .let [$exports (/.var "_REQUIREDNAME") - $global (/.var "_G") - exporting? (/.not (/.= /.nil $exports)) - no_exports? (/.= /.nil (/.item $exports $global)) - initialize_exports! (/.set (list (/.item $exports $global)) (/.table (list))) - export_definition! (/.set (|> $global - (/.item $exports) - (/.item (/.string name)) - (list)) - (/.var name)) - export! (/.when exporting? - (all /.then - (/.when no_exports? - initialize_exports!) - export_definition! - ))] - _ (generation.execute! (all /.then - (/.set (list (/.var name)) term) - export!)) - _ (generation.save! @self {.#None} (all /.then - (/.local/1 (/.var name) term) - export!))] - (generation.log! (%.format "Export " (%.text name)))))] - (in directive.no_requirements))) + _ (declaration.lifted_generation + (do ! + [@self (generation.learn_custom name (list#mix set.has dependencies interim_artifacts)) + .let [$exports (/.var "_REQUIREDNAME") + $global (/.var "_G") + exporting? (/.not (/.= /.nil $exports)) + no_exports? (/.= /.nil (/.item $exports $global)) + initialize_exports! (/.set (list (/.item $exports $global)) (/.table (list))) + export_definition! (/.set (|> $global + (/.item $exports) + (/.item (/.string name)) + (list)) + (/.var name)) + export! (/.when exporting? + (all /.then + (/.when no_exports? + initialize_exports!) + export_definition! + ))] + _ (generation.execute! (all /.then + (/.set (list (/.var name)) term) + export!)) + _ (generation.save! @self {.#None} (all /.then + (/.local/1 (/.var name) term) + export!))] + (generation.log! (%.format "Export " (%.text name)))))] + (in declaration.no_requirements))) (def .public export (syntax (_ [exports (<>.many <code>.any)]) |