diff options
Diffstat (limited to 'stdlib/source/lux')
7 files changed, 25 insertions, 23 deletions
diff --git a/stdlib/source/lux/control/parser/analysis.lux b/stdlib/source/lux/control/parser/analysis.lux index 824e2a83c..eb1757862 100644 --- a/stdlib/source/lux/control/parser/analysis.lux +++ b/stdlib/source/lux/control/parser/analysis.lux @@ -20,7 +20,8 @@ ["." list ("#@." functor)]]] [tool [compiler - [reference (#+)] + [reference (#+) + [variable (#+)]] [arity (#+ Arity)] [language [lux diff --git a/stdlib/source/lux/data/collection/tree/zipper.lux b/stdlib/source/lux/data/collection/tree/zipper.lux index cf6020ffe..029c27390 100644 --- a/stdlib/source/lux/data/collection/tree/zipper.lux +++ b/stdlib/source/lux/data/collection/tree/zipper.lux @@ -94,19 +94,17 @@ zipper (#.Some parent) - (update@ #node (`` (for {(~~ (static @.old)) - (: (-> (Tree ($ 0)) (Tree ($ 0))) + (`` (for {(~~ (static @.old)) + (update@ #node (: (-> (Tree ($ 0)) (Tree ($ 0))) (set@ #//.children (list@compose (list.reverse (get@ #lefts zipper)) (#.Cons (get@ #node zipper) - (get@ #rights zipper)))))} - (:share [a] - {(Zipper a) - zipper} - {(-> (Tree a) (Tree a)) - (set@ #//.children (list@compose (list.reverse (get@ #lefts zipper)) - (#.Cons (get@ #node zipper) - (get@ #rights zipper))))}))) - parent))) + (get@ #rights zipper))))) + parent)} + (set@ [#node #//.children] + (list@compose (list.reverse (get@ #lefts zipper)) + (#.Cons (get@ #node zipper) + (get@ #rights zipper))) + parent))))) (def: #export (start zipper) (All [a] (-> (Zipper a) (Zipper a))) diff --git a/stdlib/source/lux/extension.lux b/stdlib/source/lux/extension.lux index 4b0b7e4d2..a4254807b 100644 --- a/stdlib/source/lux/extension.lux +++ b/stdlib/source/lux/extension.lux @@ -43,6 +43,7 @@ {#name Code #label Text #phase Text + #archive Text #inputs (List Input)}) (def: (declaration default) @@ -51,11 +52,12 @@ <c>.any <c>.local-identifier <c>.local-identifier + <c>.local-identifier (<>.some (..input default))))) (template [<any> <end> <and> <run> <extension> <name>] [(syntax: #export (<name> - {[name extension phase inputs] (..declaration (` <any>))} + {[name extension phase archive inputs] (..declaration (` <any>))} body) (let [g!parser (case (list@map product.right inputs) #.Nil @@ -64,10 +66,11 @@ parsers (` (.$_ <and> (~+ parsers)))) g!name (code.local-identifier extension) - g!phase (code.local-identifier phase)] + g!phase (code.local-identifier phase) + g!archive (code.local-identifier archive)] (with-gensyms [g!handler g!inputs g!error] (wrap (list (` (<extension> (~ name) - (.function ((~ g!handler) (~ g!name) (~ g!phase) (~ g!inputs)) + (.function ((~ g!handler) (~ g!name) (~ g!phase) (~ g!archive) (~ g!inputs)) (.case ((~! <run>) (~ g!parser) (~ g!inputs)) (#.Right [(~+ (list@map (|>> product.left code.local-identifier) diff --git a/stdlib/source/lux/tool/compiler/default/init.lux b/stdlib/source/lux/tool/compiler/default/init.lux index ee51cd684..091d8e4a4 100644 --- a/stdlib/source/lux/tool/compiler/default/init.lux +++ b/stdlib/source/lux/tool/compiler/default/init.lux @@ -66,8 +66,8 @@ eval (///analysis/evaluation.evaluator expander synthesis-state generation-state generate) analysis-state [(analysisE.bundle eval host-analysis) (///analysis.state (///analysis.info ///version.version target))]] - [(dictionary.merge (luxD.bundle expander host-analysis program extender) - host-directive-bundle) + [(dictionary.merge host-directive-bundle + (luxD.bundle expander host-analysis program extender)) {#///directive.analysis {#///directive.state analysis-state #///directive.phase (analysisP.phase expander)} #///directive.synthesis {#///directive.state synthesis-state diff --git a/stdlib/source/lux/tool/compiler/language/lux/phase/extension/analysis/jvm.lux b/stdlib/source/lux/tool/compiler/language/lux/phase/extension/analysis/jvm.lux index 91d6a6447..77b9e0b8a 100644 --- a/stdlib/source/lux/tool/compiler/language/lux/phase/extension/analysis/jvm.lux +++ b/stdlib/source/lux/tool/compiler/language/lux/phase/extension/analysis/jvm.lux @@ -213,12 +213,12 @@ (///bundle.install "and" (//lux.binary <type> <type> <type>)) (///bundle.install "or" (//lux.binary <type> <type> <type>)) (///bundle.install "xor" (//lux.binary <type> <type> <type>)) - (///bundle.install "shl" (//lux.binary <type> Integer <type>)) - (///bundle.install "shr" (//lux.binary <type> Integer <type>)) - (///bundle.install "ushr" (//lux.binary <type> Integer <type>)) + (///bundle.install "shl" (//lux.binary <type> ..int <type>)) + (///bundle.install "shr" (//lux.binary <type> ..int <type>)) + (///bundle.install "ushr" (//lux.binary <type> ..int <type>)) )))] - [bundle::int reflection.int ..long] + [bundle::int reflection.int ..int] [bundle::long reflection.long ..long] ) diff --git a/stdlib/source/lux/tool/compiler/language/lux/phase/extension/directive/lux.lux b/stdlib/source/lux/tool/compiler/language/lux/phase/extension/directive/lux.lux index b9ae14372..91de84cd1 100644 --- a/stdlib/source/lux/tool/compiler/language/lux/phase/extension/directive/lux.lux +++ b/stdlib/source/lux/tool/compiler/language/lux/phase/extension/directive/lux.lux @@ -159,7 +159,7 @@ _ (/////generation.save! false [(%.nat module-id) (%.nat id)] directive)] (wrap [codeG value]))))) - (def: (<full> archive extension codeT codeC) + (def: #export (<full> archive extension codeT codeC) (All [anchor expression directive] (-> Archive Text Type Code (Operation anchor expression directive [expression Any]))) diff --git a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/jvm/case.lux b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/jvm/case.lux index 0f110b906..889ac0265 100644 --- a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/jvm/case.lux +++ b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/jvm/case.lux @@ -251,7 +251,7 @@ (..right-projection lefts))] (_.compose so-far next))) recordG - path)))) + (list.reverse path))))) (def: #export (case phase archive [valueS path]) (Generator [Synthesis Path]) |