aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/ffi/export.rb.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/library/lux/ffi/export.rb.lux')
-rw-r--r--stdlib/source/library/lux/ffi/export.rb.lux72
1 files changed, 36 insertions, 36 deletions
diff --git a/stdlib/source/library/lux/ffi/export.rb.lux b/stdlib/source/library/lux/ffi/export.rb.lux
index 6777bfa86..b29982a1c 100644
--- a/stdlib/source/library/lux/ffi/export.rb.lux
+++ b/stdlib/source/library/lux/ffi/export.rb.lux
@@ -1,7 +1,7 @@
(.require
[library
[lux (.except global)
- [extension (.only directive)]
+ [extension (.only declaration)]
["[0]" meta]
["[0]" static]
["[0]" type]
@@ -34,7 +34,7 @@
[language
[lux
["[0]" generation]
- ["[0]" directive]
+ ["[0]" declaration]
["[0]" analysis
["[1]" type]]]]]]]])
@@ -87,45 +87,45 @@
(with_expansions [<extension> (static.random (|>> %.nat (%.format "ruby export ") code.text)
random.nat)]
- (directive (<extension> self phase archive [global? <code>.bit
- name <code>.text
- term <code>.any])
- (do [! phase.monad]
- [next directive.analysis
- [type term] (<| directive.lifted_analysis
- analysis.inferring
- (next archive term))
+ (declaration (<extension> self phase archive [global? <code>.bit
+ name <code>.text
+ term <code>.any])
+ (do [! phase.monad]
+ [next declaration.analysis
+ [type term] (<| declaration.lifted_analysis
+ analysis.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 [[:input:/* :output:] (type.flat_function type)
- code (if global?
- (/.set (list (/.manual name)) term)
- (case :input:/*
- {.#End}
- (/.function (/.manual name) (list)
- (/.return term))
+ _ (declaration.lifted_generation
+ (do !
+ [@self (generation.learn_custom name (list#mix set.has dependencies interim_artifacts))
+ .let [[:input:/* :output:] (type.flat_function type)
+ code (if global?
+ (/.set (list (/.manual name)) term)
+ (case :input:/*
+ {.#End}
+ (/.function (/.manual name) (list)
+ (/.return term))
- _
- (/.statement (/.apply (list (/.string name) term) {.#None}
- (/.manual "define_method")))))]
- _ (generation.execute! code)
- _ (generation.save! @self {.#None} code)]
- (generation.log! (%.format "Export " (%.text name)))))]
- (in directive.no_requirements)))
+ _
+ (/.statement (/.apply (list (/.string name) term) {.#None}
+ (/.manual "define_method")))))]
+ _ (generation.execute! code)
+ _ (generation.save! @self {.#None} code)]
+ (generation.log! (%.format "Export " (%.text name)))))]
+ (in declaration.no_requirements)))
(def .public export
(syntax (_ [exports (<>.many <code>.any)])