aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/test')
-rw-r--r--stdlib/source/test/lux/meta/extension.lux108
1 files changed, 51 insertions, 57 deletions
diff --git a/stdlib/source/test/lux/meta/extension.lux b/stdlib/source/test/lux/meta/extension.lux
index a7f585379..bef9aabb3 100644
--- a/stdlib/source/test/lux/meta/extension.lux
+++ b/stdlib/source/test/lux/meta/extension.lux
@@ -64,14 +64,6 @@
[\\library
["[0]" / (.only analysis synthesis generation declaration)]])))
-(with_template [<name>]
- [(def <name>
- Text
- (`` (%.symbol (symbol (,, (template.symbol [.._ <name>]))))))]
-
- [my_declaration]
- )
-
... Generation
(for @.old
(these)
@@ -150,55 +142,57 @@
(at phase.monad in {analysis.#Extension (symbol ..dummy_generation|synthesis) (list)})))
... Declaration
- (declaration (..my_declaration self phase archive [expression <code>.any])
- (do [! phase.monad]
- [analysis_phase declaration.analysis
- expressionA (<| declaration.lifted_analysis
- (type.expecting .Any)
- (analysis_phase archive expression))
-
- lux (<| declaration.lifted_analysis
- extension.lifted
- meta.compiler_state)
-
- synthesis_phase declaration.synthesis
- expressionS (declaration.lifted_synthesis
- (synthesis_phase lux archive expressionA))
-
- generation_phase declaration.generation
- expressionG (declaration.lifted_generation
- (generation_phase lux archive expressionS))
-
- _ (declaration.lifted_generation
- (generation.with_new_context archive unit.none
- (do !
- [[module_id artifact_id] (generation.context archive)
- .let [commentary (format "Successfully installed declaration " (%.text self) "!")]
- _ (generation.save! artifact_id {.#None}
- (for @.jvm (let [$class (jvm/runtime.class_name [module_id artifact_id])]
- (<| [$class]
- (try.else (binary.empty 0))
- (try#each (binaryF.result class.format))
- (class.class version.v6_0 class.public
- (name.internal $class)
- {.#None}
- (name.internal "java.lang.Object")
- (list)
- (list)
- (list)
- sequence.empty)))
- @.js (js.comment commentary
- (js.statement (js.string commentary)))
- @.python (python.comment commentary
- (python.statement (python.string commentary)))
- @.lua (lua.comment commentary
- (lua.statement expressionG))
- @.ruby (ruby.comment commentary
- (ruby.statement (ruby.string commentary)))))]
- (generation.log! commentary))))]
- (in declaration.no_requirements)))
-
- (`` ((,, (static ..my_declaration)) (n.* 2 3)))
+ (def my_declaration
+ Declaration
+ (declaration (_ self phase archive [expression <code>.any])
+ (do [! phase.monad]
+ [analysis_phase declaration.analysis
+ expressionA (<| declaration.lifted_analysis
+ (type.expecting .Any)
+ (analysis_phase archive expression))
+
+ lux (<| declaration.lifted_analysis
+ extension.lifted
+ meta.compiler_state)
+
+ synthesis_phase declaration.synthesis
+ expressionS (declaration.lifted_synthesis
+ (synthesis_phase lux archive expressionA))
+
+ generation_phase declaration.generation
+ expressionG (declaration.lifted_generation
+ (generation_phase lux archive expressionS))
+
+ _ (declaration.lifted_generation
+ (generation.with_new_context archive unit.none
+ (do !
+ [[module_id artifact_id] (generation.context archive)
+ .let [commentary (format "Successfully installed declaration " (%.text self) "!")]
+ _ (generation.save! artifact_id {.#None}
+ (for @.jvm (let [$class (jvm/runtime.class_name [module_id artifact_id])]
+ (<| [$class]
+ (try.else (binary.empty 0))
+ (try#each (binaryF.result class.format))
+ (class.class version.v6_0 class.public
+ (name.internal $class)
+ {.#None}
+ (name.internal "java.lang.Object")
+ (list)
+ (list)
+ (list)
+ sequence.empty)))
+ @.js (js.comment commentary
+ (js.statement (js.string commentary)))
+ @.python (python.comment commentary
+ (python.statement (python.string commentary)))
+ @.lua (lua.comment commentary
+ (lua.statement expressionG))
+ @.ruby (ruby.comment commentary
+ (ruby.statement (ruby.string commentary)))))]
+ (generation.log! commentary))))]
+ (in declaration.no_requirements))))
+
+ (..my_declaration (n.* 2 3))
))
(def .public test