From 14a5d4377431c7fc7a13b71cfbbaeb7baa116d29 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Fri, 8 Jul 2022 18:04:30 -0400 Subject: Moved "lux/extension" to "lux/meta/extension". --- stdlib/source/documentation/lux/extension.lux | 50 ----- stdlib/source/documentation/lux/meta/extension.lux | 50 +++++ stdlib/source/library/lux/extension.lux | 70 ------- stdlib/source/library/lux/ffi/export.js.lux | 2 +- stdlib/source/library/lux/ffi/export.lua.lux | 2 +- stdlib/source/library/lux/ffi/export.py.lux | 2 +- stdlib/source/library/lux/ffi/export.rb.lux | 2 +- stdlib/source/library/lux/math.lux | 2 +- stdlib/source/library/lux/meta/extension.lux | 70 +++++++ stdlib/source/test/lux.lux | 41 ++-- stdlib/source/test/lux/extension.lux | 206 --------------------- stdlib/source/test/lux/meta.lux | 3 + stdlib/source/test/lux/meta/extension.lux | 206 +++++++++++++++++++++ 13 files changed, 353 insertions(+), 353 deletions(-) delete mode 100644 stdlib/source/documentation/lux/extension.lux create mode 100644 stdlib/source/documentation/lux/meta/extension.lux delete mode 100644 stdlib/source/library/lux/extension.lux create mode 100644 stdlib/source/library/lux/meta/extension.lux delete mode 100644 stdlib/source/test/lux/extension.lux create mode 100644 stdlib/source/test/lux/meta/extension.lux (limited to 'stdlib/source') diff --git a/stdlib/source/documentation/lux/extension.lux b/stdlib/source/documentation/lux/extension.lux deleted file mode 100644 index 737d19387..000000000 --- a/stdlib/source/documentation/lux/extension.lux +++ /dev/null @@ -1,50 +0,0 @@ -(.require - [library - [lux (.except) - ["$" documentation] - ["[0]" debug] - [data - [text - ["%" \\format (.only format)]] - [collection - ["[0]" sequence]]] - [meta - ["[0]" code - ["<[1]>" \\parser]] - [macro - ["[0]" template]] - [compiler - ["[0]" phase] - [language - [lux - [phase - ["[0]" declaration]]]]]]]] - [\\library - ["[0]" /]]) - -(.def .public documentation - (.List $.Module) - ($.module /._ - "" - [($.definition /.analysis - "Mechanism for defining extensions to Lux's analysis/type-checking infrastructure." - [(analysis ("my analysis" self phase archive [pass_through .any]) - (phase archive pass_through))]) - - ($.definition /.synthesis - "Mechanism for defining extensions to Lux's synthesis/optimization infrastructure." - [(synthesis ("my synthesis" self phase archive [pass_through .any]) - (phase archive pass_through))]) - - ($.definition /.generation - "" - [(generation ("my generation" self phase archive [pass_through .any]) - (phase archive pass_through))]) - - ($.definition /.declaration - "" - [(declaration ("my declaration" self phase archive [parameters (<>.some .any)]) - (do phase.monad - [.let [_ (debug.log! (format "Successfully installed declaration " (%.text self) "!"))]] - (in declaration.no_requirements)))])] - [])) diff --git a/stdlib/source/documentation/lux/meta/extension.lux b/stdlib/source/documentation/lux/meta/extension.lux new file mode 100644 index 000000000..737d19387 --- /dev/null +++ b/stdlib/source/documentation/lux/meta/extension.lux @@ -0,0 +1,50 @@ +(.require + [library + [lux (.except) + ["$" documentation] + ["[0]" debug] + [data + [text + ["%" \\format (.only format)]] + [collection + ["[0]" sequence]]] + [meta + ["[0]" code + ["<[1]>" \\parser]] + [macro + ["[0]" template]] + [compiler + ["[0]" phase] + [language + [lux + [phase + ["[0]" declaration]]]]]]]] + [\\library + ["[0]" /]]) + +(.def .public documentation + (.List $.Module) + ($.module /._ + "" + [($.definition /.analysis + "Mechanism for defining extensions to Lux's analysis/type-checking infrastructure." + [(analysis ("my analysis" self phase archive [pass_through .any]) + (phase archive pass_through))]) + + ($.definition /.synthesis + "Mechanism for defining extensions to Lux's synthesis/optimization infrastructure." + [(synthesis ("my synthesis" self phase archive [pass_through .any]) + (phase archive pass_through))]) + + ($.definition /.generation + "" + [(generation ("my generation" self phase archive [pass_through .any]) + (phase archive pass_through))]) + + ($.definition /.declaration + "" + [(declaration ("my declaration" self phase archive [parameters (<>.some .any)]) + (do phase.monad + [.let [_ (debug.log! (format "Successfully installed declaration " (%.text self) "!"))]] + (in declaration.no_requirements)))])] + [])) diff --git a/stdlib/source/library/lux/extension.lux b/stdlib/source/library/lux/extension.lux deleted file mode 100644 index 3ab53a44a..000000000 --- a/stdlib/source/library/lux/extension.lux +++ /dev/null @@ -1,70 +0,0 @@ -(.require - [library - [lux (.except) - [abstract - ["[0]" monad]] - [control - ["<>" parser (.use "[1]#[0]" monad)]] - [data - ["[0]" product] - [collection - ["[0]" list (.use "[1]#[0]" functor)]]] - [meta - ["[0]" code (.only) - ["" \\parser (.only Parser)]] - [macro (.only with_symbols) - [syntax (.only syntax)]] - [compiler - ["[0]" phase] - [language - [lux - [analysis - ["" \\parser]] - [synthesis - ["" \\parser]]]]]]]]) - -(type Declaration - (Record - [#name Code - #label Text - #phase Text - #archive Text - #inputs (List Code)])) - -(def (declarationP default) - (-> Code (Parser Declaration)) - (.form (all <>.and - .any - .local - .local - .local - (.tuple (<>.some .any))))) - -(with_template [ ] - [(def .public - (syntax (_ [[name extension phase archive inputs] (..declarationP (` )) - body .any]) - (let [g!name (code.local extension) - g!phase (code.local phase) - g!archive (code.local archive)] - (with_symbols [g!handler g!inputs g!error g!_] - (in (list (` ( (, name) - (.function ((, g!handler) (, g!name) (, g!phase) (, g!archive) (, g!inputs)) - (.case ((,! ) - ((,! monad.do) (,! <>.monad) - [(,* inputs) - (, g!_) ] - (.at (,! <>.monad) (,' in) (, body))) - (, g!inputs)) - {.#Right (, g!_)} - (, g!_) - - {.#Left (, g!error)} - ((,! phase.failure) (, g!error))) - )))))))))] - - [.any .end .and .result "lux def analysis" analysis] - [.any .end .and .result "lux def synthesis" synthesis] - [.any .end .and .result "lux def generation" generation] - [.any .end .and .result "lux def declaration" declaration] - ) diff --git a/stdlib/source/library/lux/ffi/export.js.lux b/stdlib/source/library/lux/ffi/export.js.lux index bb725ed0c..66009f8ba 100644 --- a/stdlib/source/library/lux/ffi/export.js.lux +++ b/stdlib/source/library/lux/ffi/export.js.lux @@ -1,7 +1,6 @@ (.require [library [lux (.except) - [extension (.only declaration)] [abstract ["[0]" monad (.only do)]] [control @@ -15,6 +14,7 @@ [math ["[0]" random]] ["[0]" meta (.only) + [extension (.only declaration)] ["[0]" static] ["[0]" code (.only) ["<[1]>" \\parser]] diff --git a/stdlib/source/library/lux/ffi/export.lua.lux b/stdlib/source/library/lux/ffi/export.lua.lux index c59c410ae..30af57aa4 100644 --- a/stdlib/source/library/lux/ffi/export.lua.lux +++ b/stdlib/source/library/lux/ffi/export.lua.lux @@ -1,7 +1,6 @@ (.require [library [lux (.except) - [extension (.only declaration)] [abstract ["[0]" monad (.only do)]] [control @@ -15,6 +14,7 @@ [math ["[0]" random]] ["[0]" meta (.only) + [extension (.only declaration)] ["[0]" static] ["[0]" code (.only) ["<[1]>" \\parser]] diff --git a/stdlib/source/library/lux/ffi/export.py.lux b/stdlib/source/library/lux/ffi/export.py.lux index 70c5fc591..370ed7a9d 100644 --- a/stdlib/source/library/lux/ffi/export.py.lux +++ b/stdlib/source/library/lux/ffi/export.py.lux @@ -1,7 +1,6 @@ (.require [library [lux (.except) - [extension (.only declaration)] [abstract ["[0]" monad (.only do)]] [control @@ -15,6 +14,7 @@ [math ["[0]" random]] ["[0]" meta (.only) + [extension (.only declaration)] ["[0]" static] ["[0]" code (.only) ["<[1]>" \\parser]] diff --git a/stdlib/source/library/lux/ffi/export.rb.lux b/stdlib/source/library/lux/ffi/export.rb.lux index df3ab6f85..1558aad67 100644 --- a/stdlib/source/library/lux/ffi/export.rb.lux +++ b/stdlib/source/library/lux/ffi/export.rb.lux @@ -1,7 +1,6 @@ (.require [library [lux (.except global) - [extension (.only declaration)] [abstract ["[0]" monad (.only do)]] [control @@ -16,6 +15,7 @@ [math ["[0]" random]] ["[0]" meta (.only) + [extension (.only declaration)] ["[0]" static] ["[0]" type] ["[0]" code (.only) diff --git a/stdlib/source/library/lux/math.lux b/stdlib/source/library/lux/math.lux index bbad785af..486c7221a 100644 --- a/stdlib/source/library/lux/math.lux +++ b/stdlib/source/library/lux/math.lux @@ -1,7 +1,6 @@ (.require [library [lux (.except) - [extension (.only analysis)] [abstract ["[0]" monad (.only do)]] [control @@ -14,6 +13,7 @@ [collection ["[0]" list (.use "[1]#[0]" mix)]]] [meta + [extension (.only analysis)] ["@" target] ["[0]" static] ["[0]" code diff --git a/stdlib/source/library/lux/meta/extension.lux b/stdlib/source/library/lux/meta/extension.lux new file mode 100644 index 000000000..3ab53a44a --- /dev/null +++ b/stdlib/source/library/lux/meta/extension.lux @@ -0,0 +1,70 @@ +(.require + [library + [lux (.except) + [abstract + ["[0]" monad]] + [control + ["<>" parser (.use "[1]#[0]" monad)]] + [data + ["[0]" product] + [collection + ["[0]" list (.use "[1]#[0]" functor)]]] + [meta + ["[0]" code (.only) + ["" \\parser (.only Parser)]] + [macro (.only with_symbols) + [syntax (.only syntax)]] + [compiler + ["[0]" phase] + [language + [lux + [analysis + ["" \\parser]] + [synthesis + ["" \\parser]]]]]]]]) + +(type Declaration + (Record + [#name Code + #label Text + #phase Text + #archive Text + #inputs (List Code)])) + +(def (declarationP default) + (-> Code (Parser Declaration)) + (.form (all <>.and + .any + .local + .local + .local + (.tuple (<>.some .any))))) + +(with_template [ ] + [(def .public + (syntax (_ [[name extension phase archive inputs] (..declarationP (` )) + body .any]) + (let [g!name (code.local extension) + g!phase (code.local phase) + g!archive (code.local archive)] + (with_symbols [g!handler g!inputs g!error g!_] + (in (list (` ( (, name) + (.function ((, g!handler) (, g!name) (, g!phase) (, g!archive) (, g!inputs)) + (.case ((,! ) + ((,! monad.do) (,! <>.monad) + [(,* inputs) + (, g!_) ] + (.at (,! <>.monad) (,' in) (, body))) + (, g!inputs)) + {.#Right (, g!_)} + (, g!_) + + {.#Left (, g!error)} + ((,! phase.failure) (, g!error))) + )))))))))] + + [.any .end .and .result "lux def analysis" analysis] + [.any .end .and .result "lux def synthesis" synthesis] + [.any .end .and .result "lux def generation" generation] + [.any .end .and .result "lux def declaration" declaration] + ) diff --git a/stdlib/source/test/lux.lux b/stdlib/source/test/lux.lux index 0f03b346d..04d1ca0f9 100644 --- a/stdlib/source/test/lux.lux +++ b/stdlib/source/test/lux.lux @@ -56,7 +56,6 @@ ["[1][0]" world] ["[1][0]" ffi] - ["[1][0]" extension] ]))) (def for_bit @@ -1193,27 +1192,25 @@ (def test Test (<| (_.covering /._) - (`` (`` (_.in_parallel - (list ..test|lux - - /abstract.test - /control.test - /data.test - /debug.test - - /documentation.test - /math.test - - /meta.test - /program.test - /test.test - - /world.test - - /ffi.test - (,, (for @.old (,, (these)) - (,, (these /extension.test)))) - )))))) + (_.in_parallel + (list ..test|lux + + /abstract.test + /control.test + /data.test + /debug.test + + /documentation.test + /math.test + + /meta.test + /program.test + /test.test + + /world.test + + /ffi.test + )))) (program: args (let [times (for @.old 100 diff --git a/stdlib/source/test/lux/extension.lux b/stdlib/source/test/lux/extension.lux deleted file mode 100644 index 8be85f9c0..000000000 --- a/stdlib/source/test/lux/extension.lux +++ /dev/null @@ -1,206 +0,0 @@ -(.`` (.`` (.require - [library - [lux (.except) - ["_" test (.only Test)] - ["[0]" debug] - [abstract - ["[0]" monad (.only do)]] - [control - ["<>" parser] - ["[0]" try (.use "[1]#[0]" functor)]] - [data - ["[0]" product] - ["[0]" binary (.only) - ["[1]F" \\format]] - ["[0]" text (.use "[1]#[0]" equivalence) - ["%" \\format (.only format)]] - [collection - ["[0]" sequence] - ["[0]" list (.use "[1]#[0]" functor)]]] - [math - ["[0]" random] - [number - ["n" nat]]] - [meta - ["[0]" code - ["<[1]>" \\parser]] - [macro - ["[0]" template]] - ["@" target (.only) - ["[0]" js] - ["[0]" python] - ["[0]" lua] - ["[0]" ruby] - ["[0]" php] - ["[0]" scheme] - ["[0]" jvm - (.,, (.for "JVM" (.,, (.these ["[1]" bytecode] - ["[0]" class] - ["[0]" version] - [encoding - ["[0]" name]])) - (.,, (.these))))]] - [compiler - ["[0]" phase] - [meta - [archive - ["[0]" unit]]] - [language - [lux - ["[0]" generation] - ["[0]" declaration] - ["[0]" analysis (.only) - ["[0]" type] - ["<[1]>" \\parser]] - ["[0]" synthesis (.only) - ["<[1]>" \\parser]] - [phase - [generation - (.,, (.for "JVM" (.,, (.these ["[0]" jvm - ["[1]/[0]" runtime]])) - (.,, (.these))))]]]]]]]] - [\\library - ["[0]" / (.only analysis synthesis generation declaration)]]))) - -(def dummy_generation "dummy generation") - -(with_template [] - [(def - Text - (`` (%.symbol (symbol (,, (template.symbol [.._ ]))))))] - - [my_analysis] - [my_synthesis] - [my_generation] - [my_declaration] - ) - -... Generation -(for @.old - (these) - - (these - (for @.python - ... TODO: Remove this hack once Jython is no longer being used as the Python interpreter. - (analysis ("dummy dum dum" self phase archive []) - (undefined)) - - (these)) - - ... Analysis - (analysis (..my_analysis self phase archive [pass_through .any]) - (phase archive pass_through)) - - ... Synthesis - (analysis (..my_synthesis self phase archive [parameters (<>.some .any)]) - (let [! phase.monad] - (|> parameters - (monad.each ! (phase archive)) - (at ! each (|>> {analysis.#Extension self}))))) - - (synthesis (..my_synthesis self phase archive [pass_through .any]) - (phase archive pass_through)) - - ... Generation - (analysis (..my_generation self phase archive [parameters (<>.some .any)]) - (let [! phase.monad] - (|> parameters - (monad.each ! (phase archive)) - (at ! each (|>> {analysis.#Extension self}))))) - - (synthesis (..my_generation self phase archive [parameters (<>.some .any)]) - (let [! phase.monad] - (|> parameters - (monad.each ! (phase archive)) - (at ! each (|>> {synthesis.#Extension self}))))) - - (generation (..my_generation self phase archive [pass_through .any]) - (phase archive pass_through)) - - (analysis (..dummy_generation self phase archive []) - (at phase.monad in {analysis.#Extension self (list)})) - - (synthesis (..dummy_generation self phase archive []) - (at phase.monad in {synthesis.#Extension self (list)})) - - (generation (..dummy_generation self phase archive []) - (at phase.monad in - (for @.jvm (jvm.string self) - @.js (js.string self) - @.python (python.unicode self) - @.lua (lua.string self) - @.ruby (ruby.string self) - @.php (php.string self) - @.scheme (scheme.string self)))) - - ... Declaration - (declaration (..my_declaration self phase archive [expression .any]) - (do [! phase.monad] - [analysis_phase declaration.analysis - expressionA (<| declaration.lifted_analysis - (type.expecting .Any) - (analysis_phase archive expression)) - - synthesis_phase declaration.synthesis - expressionS (declaration.lifted_synthesis - (synthesis_phase archive expressionA)) - - generation_phase declaration.generation - expressionG (declaration.lifted_generation - (generation_phase 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 .public test - Test - (<| (_.covering /._) - (do random.monad - [expected random.nat] - (`` (all _.and - (,, (with_template [ ] - [(_.coverage [] - (for @.old false - (n.= expected - (`` ((,, (static )) expected)))))] - - [/.analysis ..my_analysis] - [/.synthesis ..my_synthesis])) - (_.coverage [/.generation] - (for @.old false - (and (n.= expected - (`` ((,, (static ..my_generation)) expected))) - (text#= ..dummy_generation - (`` ((,, (static ..dummy_generation)))))))) - (_.coverage [/.declaration] - true) - ))))) diff --git a/stdlib/source/test/lux/meta.lux b/stdlib/source/test/lux/meta.lux index 4a7159fe5..7bcecdd8a 100644 --- a/stdlib/source/test/lux/meta.lux +++ b/stdlib/source/test/lux/meta.lux @@ -42,6 +42,7 @@ ["[1][0]" type] ["[1][0]" macro] ["[1][0]" static] + ["[1][0]" extension] ["[1][0]" target (.only) (.,, (.for "{old}" (.,, (.these ["[1]/[0]" jvm])) "JVM" (.,, (.these ["[1]/[0]" jvm])) @@ -1066,6 +1067,8 @@ @.lua (,, (these /target/lua.test)) @.python (,, (these /target/python.test)) @.ruby (,, (these /target/ruby.test)))) + (,, (for @.old (,, (these)) + (,, (these /extension.test)))) /compiler/arity.test /compiler/version.test diff --git a/stdlib/source/test/lux/meta/extension.lux b/stdlib/source/test/lux/meta/extension.lux new file mode 100644 index 000000000..8be85f9c0 --- /dev/null +++ b/stdlib/source/test/lux/meta/extension.lux @@ -0,0 +1,206 @@ +(.`` (.`` (.require + [library + [lux (.except) + ["_" test (.only Test)] + ["[0]" debug] + [abstract + ["[0]" monad (.only do)]] + [control + ["<>" parser] + ["[0]" try (.use "[1]#[0]" functor)]] + [data + ["[0]" product] + ["[0]" binary (.only) + ["[1]F" \\format]] + ["[0]" text (.use "[1]#[0]" equivalence) + ["%" \\format (.only format)]] + [collection + ["[0]" sequence] + ["[0]" list (.use "[1]#[0]" functor)]]] + [math + ["[0]" random] + [number + ["n" nat]]] + [meta + ["[0]" code + ["<[1]>" \\parser]] + [macro + ["[0]" template]] + ["@" target (.only) + ["[0]" js] + ["[0]" python] + ["[0]" lua] + ["[0]" ruby] + ["[0]" php] + ["[0]" scheme] + ["[0]" jvm + (.,, (.for "JVM" (.,, (.these ["[1]" bytecode] + ["[0]" class] + ["[0]" version] + [encoding + ["[0]" name]])) + (.,, (.these))))]] + [compiler + ["[0]" phase] + [meta + [archive + ["[0]" unit]]] + [language + [lux + ["[0]" generation] + ["[0]" declaration] + ["[0]" analysis (.only) + ["[0]" type] + ["<[1]>" \\parser]] + ["[0]" synthesis (.only) + ["<[1]>" \\parser]] + [phase + [generation + (.,, (.for "JVM" (.,, (.these ["[0]" jvm + ["[1]/[0]" runtime]])) + (.,, (.these))))]]]]]]]] + [\\library + ["[0]" / (.only analysis synthesis generation declaration)]]))) + +(def dummy_generation "dummy generation") + +(with_template [] + [(def + Text + (`` (%.symbol (symbol (,, (template.symbol [.._ ]))))))] + + [my_analysis] + [my_synthesis] + [my_generation] + [my_declaration] + ) + +... Generation +(for @.old + (these) + + (these + (for @.python + ... TODO: Remove this hack once Jython is no longer being used as the Python interpreter. + (analysis ("dummy dum dum" self phase archive []) + (undefined)) + + (these)) + + ... Analysis + (analysis (..my_analysis self phase archive [pass_through .any]) + (phase archive pass_through)) + + ... Synthesis + (analysis (..my_synthesis self phase archive [parameters (<>.some .any)]) + (let [! phase.monad] + (|> parameters + (monad.each ! (phase archive)) + (at ! each (|>> {analysis.#Extension self}))))) + + (synthesis (..my_synthesis self phase archive [pass_through .any]) + (phase archive pass_through)) + + ... Generation + (analysis (..my_generation self phase archive [parameters (<>.some .any)]) + (let [! phase.monad] + (|> parameters + (monad.each ! (phase archive)) + (at ! each (|>> {analysis.#Extension self}))))) + + (synthesis (..my_generation self phase archive [parameters (<>.some .any)]) + (let [! phase.monad] + (|> parameters + (monad.each ! (phase archive)) + (at ! each (|>> {synthesis.#Extension self}))))) + + (generation (..my_generation self phase archive [pass_through .any]) + (phase archive pass_through)) + + (analysis (..dummy_generation self phase archive []) + (at phase.monad in {analysis.#Extension self (list)})) + + (synthesis (..dummy_generation self phase archive []) + (at phase.monad in {synthesis.#Extension self (list)})) + + (generation (..dummy_generation self phase archive []) + (at phase.monad in + (for @.jvm (jvm.string self) + @.js (js.string self) + @.python (python.unicode self) + @.lua (lua.string self) + @.ruby (ruby.string self) + @.php (php.string self) + @.scheme (scheme.string self)))) + + ... Declaration + (declaration (..my_declaration self phase archive [expression .any]) + (do [! phase.monad] + [analysis_phase declaration.analysis + expressionA (<| declaration.lifted_analysis + (type.expecting .Any) + (analysis_phase archive expression)) + + synthesis_phase declaration.synthesis + expressionS (declaration.lifted_synthesis + (synthesis_phase archive expressionA)) + + generation_phase declaration.generation + expressionG (declaration.lifted_generation + (generation_phase 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 .public test + Test + (<| (_.covering /._) + (do random.monad + [expected random.nat] + (`` (all _.and + (,, (with_template [ ] + [(_.coverage [] + (for @.old false + (n.= expected + (`` ((,, (static )) expected)))))] + + [/.analysis ..my_analysis] + [/.synthesis ..my_synthesis])) + (_.coverage [/.generation] + (for @.old false + (and (n.= expected + (`` ((,, (static ..my_generation)) expected))) + (text#= ..dummy_generation + (`` ((,, (static ..dummy_generation)))))))) + (_.coverage [/.declaration] + true) + ))))) -- cgit v1.2.3