From b7873d4b68ffc041f9ff134c52a32b54c20febf9 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sun, 9 Jan 2022 05:35:12 -0400 Subject: Fixed a bug when testing extensions on the JVM compiler. --- .../lux/phase/extension/generation/js/common.lux | 4 +- .../lux/phase/extension/generation/lua/common.lux | 3 + .../compiler/language/lux/phase/generation/js.lux | 3 + .../language/lux/phase/generation/js/case.lux | 24 ++- .../language/lux/phase/generation/js/function.lux | 54 ++--- .../language/lux/phase/generation/js/runtime.lux | 233 ++++++++++----------- .../language/lux/phase/generation/js/structure.lux | 3 +- .../compiler/language/lux/phase/generation/lua.lux | 3 + .../language/lux/phase/generation/lua/case.lux | 20 +- .../language/lux/phase/generation/lua/function.lux | 4 +- .../lux/phase/generation/lua/structure.lux | 13 +- .../language/lux/phase/synthesis/variable.lux | 6 +- .../lux/tool/compiler/meta/packager/jvm.lux | 1 + 13 files changed, 208 insertions(+), 163 deletions(-) (limited to 'stdlib/source/library') diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/js/common.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/js/common.lux index 6d86b681f..0a9bf90bb 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/js/common.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/js/common.lux @@ -33,7 +33,6 @@ ["[1][0]" loop] ["[1][0]" function]]] [// - [analysis {"+" }] ["[0]" synthesis {"+" %synthesis}] [/// ["[1]" phase ("[1]#[0]" monad)]]]]]) @@ -127,6 +126,9 @@ (^ (synthesis.branch/case case)) (//case.case! statement expression archive case) + (^ (synthesis.branch/exec it)) + (//case.exec! statement expression archive it) + (^ (synthesis.branch/let let)) (//case.let! statement expression archive let) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/lua/common.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/lua/common.lux index bcaa03ee6..15bc133a7 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/lua/common.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/lua/common.lux @@ -87,6 +87,9 @@ (^ (synthesis.branch/case case)) (//case.case! statement expression archive case) + (^ (synthesis.branch/exec it)) + (//case.exec! statement expression archive it) + (^ (synthesis.branch/let let)) (//case.let! statement expression archive let) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js.lux index 57cfbd1e4..af1b3b605 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js.lux @@ -55,6 +55,9 @@ (^ (synthesis.branch/case case)) (/case.case ///extension/common.statement expression archive case) + (^ (synthesis.branch/exec it)) + (/case.exec expression archive it) + (^ (synthesis.branch/let let)) (/case.let expression archive let) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/case.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/case.lux index c21dc12ec..b2d828de3 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/case.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/case.lux @@ -1,6 +1,6 @@ (.using [library - [lux {"-" case let if} + [lux {"-" case exec let if} [abstract ["[0]" monad {"+" do}]] [control @@ -36,6 +36,23 @@ (-> Register Var) (|>> (///reference.local //reference.system) :expected)) +(def: .public (exec expression archive [this that]) + (Generator [Synthesis Synthesis]) + (do ///////phase.monad + [this (expression archive this) + that (expression archive that)] + (in (|> (_.array (list this that)) + (_.at (_.int +1)))))) + +(def: .public (exec! statement expression archive [this that]) + (Generator! [Synthesis Synthesis]) + (do ///////phase.monad + [this (expression archive this) + that (statement expression archive that)] + (in ($_ _.then + (_.statement this) + that)))) + (def: .public (let expression archive [valueS register bodyS]) (Generator [Synthesis Register Synthesis]) (do ///////phase.monad @@ -262,7 +279,10 @@ ..peek_cursor) then!]))) {.#Item item})] - (in (_.cond clauses ..fail_pm!))) + (in (list#mix (function (_ [when then] else) + (_.if when then else)) + ..fail_pm! + clauses))) (^template [ ] [{ item} diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/function.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/function.lux index ca4b71fa0..65e38cba2 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/function.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/function.lux @@ -1,6 +1,6 @@ (.using [library - [lux {"-" Variant Tuple function} + [lux {"-" function} [abstract ["[0]" monad {"+" do}]] [data @@ -18,7 +18,7 @@ ["/[1]" // "_" ["[1][0]" reference] ["//[1]" /// "_" - [analysis {"+" Variant Tuple Abstraction Application Analysis}] + [analysis {"+" Abstraction Application Analysis}] [synthesis {"+" Synthesis}] ["[1][0]" generation {"+" Context}] ["//[1]" /// "_" @@ -95,32 +95,32 @@ .let [[definition instantiation] (with_closure @self environment ($_ _.then (_.define @num_args (_.the "length" @@arguments)) - (_.cond (list [(|> @num_args (_.= arityO)) - ($_ _.then - initialize! - (_.with_label (_.label @scope) - (_.do_while (_.boolean true) - body!)))] - [(|> @num_args (_.> arityO)) - (let [arity_inputs (|> (_.array (list)) - (_.the "slice") - (_.do "call" (list @@arguments (_.i32 +0) arityO))) - extra_inputs (|> (_.array (list)) - (_.the "slice") - (_.do "call" (list @@arguments arityO)))] - (_.return (|> @self - (apply_poly arity_inputs) - (apply_poly extra_inputs))))]) - ... (|> @num_args (_.< arityO)) - (let [all_inputs (|> (_.array (list)) + (<| (_.if (|> @num_args (_.= arityO)) + ($_ _.then + initialize! + (_.with_label (_.label @scope) + (_.do_while (_.boolean true) + body!)))) + (_.if (|> @num_args (_.> arityO)) + (let [arity_inputs (|> (_.array (list)) (_.the "slice") - (_.do "call" (list @@arguments)))] - ($_ _.then - (_.define @curried all_inputs) - (_.return (_.closure (list) - (let [@missing all_inputs] - (_.return (apply_poly (_.do "concat" (list @missing) @curried) - @self)))))))) + (_.do "call" (list @@arguments (_.i32 +0) arityO))) + extra_inputs (|> (_.array (list)) + (_.the "slice") + (_.do "call" (list @@arguments arityO)))] + (_.return (|> @self + (apply_poly arity_inputs) + (apply_poly extra_inputs))))) + ... (|> @num_args (_.< arityO)) + (let [all_inputs (|> (_.array (list)) + (_.the "slice") + (_.do "call" (list @@arguments)))] + ($_ _.then + (_.define @curried all_inputs) + (_.return (_.closure (list) + (let [@missing all_inputs] + (_.return (apply_poly (_.do "concat" (list @missing) @curried) + @self)))))))) ))] _ (/////generation.execute! definition) _ (/////generation.save! (product.right function_name) {.#None} definition)] diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/runtime.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/runtime.lux index 1bf29150f..7be5cfb48 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/runtime.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/runtime.lux @@ -164,12 +164,12 @@ ($_ _.then (_.define last_index_right (..last_index tuple)) (_.define right_index (_.+ (_.i32 +1) lefts)) - (_.cond (list [(_.= last_index_right right_index) - (_.return (_.at right_index tuple))] - [(_.> last_index_right right_index) - ... Needs recursion. - ]) - (_.return (_.do "slice" (list right_index) tuple))) + (<| (_.if (_.= last_index_right right_index) + (_.return (_.at right_index tuple))) + (_.if (_.> last_index_right right_index) + ... Needs recursion. + ) + (_.return (_.do "slice" (list right_index) tuple))) ))))) (def: .public variant_tag_field "_lux_tag") @@ -202,23 +202,21 @@ (_.- (_.i32 +1)))) (_.set sum actual##value))] (<| (_.while (_.boolean true)) - (_.cond (list [(_.= expected##lefts actual##lefts) - (_.if (_.= expected##right? actual##right?) - (_.return actual##value) - mismatch!)] - - [(_.< expected##lefts actual##lefts) - (_.if (_.= ..unit actual##right?) - recur! - mismatch!)] - - [(_.= ..unit expected##right?) - (_.return (..variant (|> actual##lefts - (_.- expected##lefts) - (_.- (_.i32 +1))) - actual##right? - actual##value))]) - mismatch!)))) + (_.if (_.= expected##lefts actual##lefts) + (_.if (_.= expected##right? actual##right?) + (_.return actual##value) + mismatch!)) + (_.if (_.< expected##lefts actual##lefts) + (_.if (_.= ..unit actual##right?) + recur! + mismatch!)) + (_.if (_.= ..unit expected##right?) + (_.return (..variant (|> actual##lefts + (_.- expected##lefts) + (_.- (_.i32 +1))) + actual##right? + actual##value))) + mismatch!))) (def: left (-> Expression Computation) @@ -545,89 +543,84 @@ (|> (i64//< param subject) (_.or (i64//= param subject)))) +(def: negative? + (i64//< i64//zero)) + (runtime: (i64/// parameter subject) - (let [negative? (function (_ value) - (i64//< i64//zero value)) - valid_division_check [(i64//= i64//zero parameter) - (_.throw (_.string "Cannot divide by zero!"))] - short_circuit_check [(i64//= i64//zero subject) - (_.return i64//zero)]] - (_.cond (list valid_division_check - short_circuit_check - - [(i64//= i64//min subject) - (_.cond (list [(_.or (i64//= i64//one parameter) - (i64//= i64//-one parameter)) - (_.return i64//min)] - [(i64//= i64//min parameter) - (_.return i64//one)]) - (with_vars [approximation] - (let [subject/2 (..i64//arithmetic_right_shifted subject (_.i32 +1))] - ($_ _.then - (_.define approximation (i64//left_shifted (i64/// parameter - subject/2) - (_.i32 +1))) - (_.if (i64//= i64//zero approximation) - (_.return (_.? (negative? parameter) - i64//one - i64//-one)) - (let [remainder (i64//- (i64//* approximation - parameter) - subject)] - (_.return (i64//+ (i64/// parameter - remainder) - approximation))))))))] - [(i64//= i64//min parameter) - (_.return i64//zero)] - - [(negative? subject) - (_.return (_.? (negative? parameter) - (i64/// (i64//opposite parameter) - (i64//opposite subject)) - (i64//opposite (i64/// parameter - (i64//opposite subject)))))] - - [(negative? parameter) - (_.return (i64//opposite (i64/// (i64//opposite parameter) subject)))]) - (with_vars [result remainder] - ($_ _.then - (_.define result i64//zero) - (_.define remainder subject) - (_.while (i64//<= remainder parameter) - (with_vars [approximate approximate_result approximate_remainder log2 delta] - (let [approximate_result' (i64//of_number approximate) - approx_remainder (i64//* parameter approximate_result)] - ($_ _.then - (_.define approximate (|> (i64//number remainder) - (_./ (i64//number parameter)) - (_.apply/1 (_.var "Math.floor")) - (_.apply/2 (_.var "Math.max") (_.i32 +1)))) - (_.define log2 (|> approximate - (_.apply/1 (_.var "Math.log")) - (_./ (_.var "Math.LN2")) - (_.apply/1 (_.var "Math.ceil")))) - (_.define delta (_.? (_.> (_.i32 +48) log2) - (_.apply/2 (_.var "Math.pow") - (_.i32 +2) - (_.- (_.i32 +48) - log2)) - (_.i32 +1))) - (_.define approximate_result approximate_result') - (_.define approximate_remainder approx_remainder) - (_.while (_.or (negative? approximate_remainder) - (i64//< approximate_remainder - remainder)) - ($_ _.then - (_.set approximate (_.- delta approximate)) - (_.set approximate_result approximate_result') - (_.set approximate_remainder approx_remainder))) - (_.set result (i64//+ (_.? (i64//= i64//zero approximate_result) - i64//one - approximate_result) - result)) - (_.set remainder (i64//- approximate_remainder remainder)))))) - (_.return result))) - ))) + (<| (_.if (i64//= i64//zero parameter) + (_.throw (_.string "Cannot divide by zero!"))) + (_.if (i64//= i64//zero subject) + (_.return i64//zero)) + (_.if (i64//= i64//min subject) + (<| (_.if (_.or (i64//= i64//one parameter) + (i64//= i64//-one parameter)) + (_.return i64//min)) + (_.if (i64//= i64//min parameter) + (_.return i64//one)) + (with_vars [approximation] + (let [subject/2 (..i64//arithmetic_right_shifted subject (_.i32 +1))] + ($_ _.then + (_.define approximation (i64//left_shifted (i64/// parameter + subject/2) + (_.i32 +1))) + (_.if (i64//= i64//zero approximation) + (_.return (_.? (..negative? parameter) + i64//one + i64//-one)) + (let [remainder (i64//- (i64//* approximation + parameter) + subject)] + (_.return (i64//+ (i64/// parameter + remainder) + approximation))))))))) + (_.if (i64//= i64//min parameter) + (_.return i64//zero)) + (_.if (..negative? subject) + (_.return (_.? (..negative? parameter) + (i64/// (i64//opposite parameter) + (i64//opposite subject)) + (i64//opposite (i64/// parameter + (i64//opposite subject)))))) + (_.if (..negative? parameter) + (_.return (i64//opposite (i64/// (i64//opposite parameter) subject)))) + (with_vars [result remainder] + ($_ _.then + (_.define result i64//zero) + (_.define remainder subject) + (_.while (i64//<= remainder parameter) + (with_vars [approximate approximate_result approximate_remainder log2 delta] + (let [approximate_result' (i64//of_number approximate) + approx_remainder (i64//* parameter approximate_result)] + ($_ _.then + (_.define approximate (|> (i64//number remainder) + (_./ (i64//number parameter)) + (_.apply/1 (_.var "Math.floor")) + (_.apply/2 (_.var "Math.max") (_.i32 +1)))) + (_.define log2 (|> approximate + (_.apply/1 (_.var "Math.log")) + (_./ (_.var "Math.LN2")) + (_.apply/1 (_.var "Math.ceil")))) + (_.define delta (_.? (_.> (_.i32 +48) log2) + (_.apply/2 (_.var "Math.pow") + (_.i32 +2) + (_.- (_.i32 +48) + log2)) + (_.i32 +1))) + (_.define approximate_result approximate_result') + (_.define approximate_remainder approx_remainder) + (_.while (_.or (..negative? approximate_remainder) + (i64//< approximate_remainder + remainder)) + ($_ _.then + (_.set approximate (_.- delta approximate)) + (_.set approximate_result approximate_result') + (_.set approximate_remainder approx_remainder))) + (_.set result (i64//+ (_.? (i64//= i64//zero approximate_result) + i64//one + approximate_result) + result)) + (_.set remainder (i64//- approximate_remainder remainder)))))) + (_.return result))))) (runtime: (i64//% parameter subject) (let [flat (|> subject @@ -694,19 +687,19 @@ (let [console (_.var "console") print (_.var "print") end! (_.return ..unit)] - (_.cond (list [(|> console _.type_of (_.= (_.string "undefined")) _.not - (_.and (_.the "log" console))) - ($_ _.then - (_.statement (|> console (_.do "log" (list message)))) - end!)] - [(|> print _.type_of (_.= (_.string "undefined")) _.not) - ($_ _.then - (_.statement (_.apply/1 print (_.? (_.= (_.string "string") - (_.type_of message)) - message - (_.apply/1 (_.var "JSON.stringify") message)))) - end!)]) - end!))) + (<| (_.if (|> console _.type_of (_.= (_.string "undefined")) _.not + (_.and (_.the "log" console))) + ($_ _.then + (_.statement (|> console (_.do "log" (list message)))) + end!)) + (_.if (|> print _.type_of (_.= (_.string "undefined")) _.not) + ($_ _.then + (_.statement (_.apply/1 print (_.? (_.= (_.string "string") + (_.type_of message)) + message + (_.apply/1 (_.var "JSON.stringify") message)))) + end!)) + end!))) (runtime: (io//error message) (_.throw message)) @@ -733,7 +726,7 @@ (runtime: (js//delete object field) ($_ _.then - (_.delete (_.at field object)) + (_.statement (_.delete (_.at field object))) (_.return object))) (def: runtime//js @@ -751,7 +744,7 @@ (runtime: (array//delete idx array) ($_ _.then - (_.delete (_.at (_.the ..i64_low_field idx) array)) + (_.statement (_.delete (_.at (_.the ..i64_low_field idx) array))) (_.return array))) (def: runtime//array diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/structure.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/structure.lux index 9aefc6a48..b1e96b617 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/structure.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/structure.lux @@ -9,8 +9,9 @@ ["[1][0]" runtime {"+" Operation Phase Generator}] ["[1][0]" primitive] ["///[1]" //// "_" - [analysis {"+" Variant Tuple}] ["[1][0]" synthesis {"+" Synthesis}] + [analysis + [composite {"+" Variant Tuple}]] ["//[1]" /// ["[1][0]" phase ("[1]#[0]" monad)]]]]) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua.lux index 7ba6496cd..3319eb024 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua.lux @@ -55,6 +55,9 @@ (^ (synthesis.branch/case case)) (/case.case ///extension/common.statement expression archive case) + (^ (synthesis.branch/exec it)) + (/case.exec expression archive it) + (^ (synthesis.branch/let let)) (/case.let expression archive let) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/case.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/case.lux index 16c8d5c19..dfb7908e7 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/case.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/case.lux @@ -1,6 +1,6 @@ (.using [library - [lux {"-" case let if} + [lux {"-" case exec let if} [abstract ["[0]" monad {"+" do}]] [data @@ -38,6 +38,24 @@ (-> Register Var) (|>> (///reference.foreign //reference.system) :expected)) +(def: .public (exec expression archive [this that]) + (Generator [Synthesis Synthesis]) + (do ///////phase.monad + [this (expression archive this) + that (expression archive that)] + (in (|> (_.array (list this that)) + (_.item (_.int +2)))))) + +(def: .public (exec! statement expression archive [this that]) + (Generator! [Synthesis Synthesis]) + (do [! ///////phase.monad] + [this (expression archive this) + that (statement expression archive that) + $dummy (# ! each _.var (/////generation.symbol "_exec"))] + (in ($_ _.then + (_.set (list $dummy) this) + that)))) + (def: .public (let expression archive [valueS register bodyS]) (Generator [Synthesis Register Synthesis]) (do ///////phase.monad diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/function.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/function.lux index 5ce1e0b7a..b5899731b 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/function.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/function.lux @@ -1,6 +1,6 @@ (.using [library - [lux {"-" Tuple Variant Label function} + [lux {"-" Label function} [abstract ["[0]" monad {"+" do}]] [control @@ -20,7 +20,7 @@ ["/[1]" // "_" ["[1][0]" reference] ["//[1]" /// "_" - [analysis {"+" Variant Tuple Abstraction Application Analysis}] + [analysis {"+" Abstraction Application Analysis}] [synthesis {"+" Synthesis}] ["[1][0]" generation {"+" Context}] ["//[1]" /// "_" diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/structure.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/structure.lux index 3c491e788..97784804e 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/structure.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/structure.lux @@ -9,26 +9,27 @@ ["[1][0]" runtime {"+" Operation Phase Generator}] ["[1][0]" primitive] ["///[1]" //// "_" - [analysis {"+" Variant Tuple}] ["[1][0]" synthesis {"+" Synthesis}] + [analysis + [composite {"+" Variant Tuple}]] ["//[1]" /// "_" ["[1][0]" phase ("[1]#[0]" monad)]]]]) -(def: .public (tuple generate archive elemsS+) +(def: .public (tuple phase archive elemsS+) (Generator (Tuple Synthesis)) (case elemsS+ {.#End} (///////phase#in (//primitive.text /////synthesis.unit)) {.#Item singletonS {.#End}} - (generate archive singletonS) + (phase archive singletonS) _ (|> elemsS+ - (monad.each ///////phase.monad (generate archive)) + (monad.each ///////phase.monad (phase archive)) (///////phase#each _.array)))) -(def: .public (variant generate archive [lefts right? valueS]) +(def: .public (variant phase archive [lefts right? valueS]) (Generator (Variant Synthesis)) (///////phase#each (//runtime.variant lefts right?) - (generate archive valueS))) + (phase archive valueS))) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/variable.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/variable.lux index 79321ad28..0389a03af 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/variable.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/variable.lux @@ -383,9 +383,9 @@ (dictionary.value register) (maybe.else ..necessary!))]] (in [(dictionary.lacks register redundancy) - {/.#Control (if redundant? - {/.#Branch {/.#Exec input (..remove_local register output)}} - {/.#Branch {/.#Let input register output}})}])) + {/.#Control {/.#Branch (if redundant? + {/.#Exec input (..remove_local register output)} + {/.#Let input register output})}}])) {/.#If test then else} (do try.monad diff --git a/stdlib/source/library/lux/tool/compiler/meta/packager/jvm.lux b/stdlib/source/library/lux/tool/compiler/meta/packager/jvm.lux index b4b1df413..0f933172d 100644 --- a/stdlib/source/library/lux/tool/compiler/meta/packager/jvm.lux +++ b/stdlib/source/library/lux/tool/compiler/meta/packager/jvm.lux @@ -144,6 +144,7 @@ (let [class_path (|> custom (maybe#each (|>> name.internal name.read)) (maybe.else (runtime.class_name [module artifact])) + (text.replaced "." "/") (text.suffix (value@ static.#artifact_extension static)))] (do try.monad [_ (java/util/jar/JarOutputStream::putNextEntry (java/util/jar/JarEntry::new class_path) sink)] -- cgit v1.2.3