From 9449d89f611ba3192373fdeb6848d02707ff1292 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Thu, 14 Mar 2019 21:34:51 -0400 Subject: Now allowing the alias of a module to refer to the alias of an ancestor. --- stdlib/source/lux.lux | 61 +++-- stdlib/source/lux/data/collection/set/ordered.lux | 26 +-- stdlib/source/lux/data/format/css.lux | 12 +- stdlib/source/lux/data/format/css/font.lux | 4 +- stdlib/source/lux/data/format/css/query.lux | 14 +- stdlib/source/lux/data/format/css/style.lux | 6 +- stdlib/source/lux/data/number.lux | 10 +- stdlib/source/lux/data/number/frac.lux | 10 +- stdlib/source/lux/data/number/rev.lux | 8 +- stdlib/source/lux/host/jvm/attribute.lux | 14 +- stdlib/source/lux/host/jvm/class.lux | 36 +-- stdlib/source/lux/host/jvm/constant.lux | 12 +- stdlib/source/lux/host/jvm/descriptor.lux | 4 +- stdlib/source/lux/host/jvm/field.lux | 16 +- stdlib/source/lux/host/jvm/index.lux | 4 +- stdlib/source/lux/host/jvm/magic.lux | 4 +- stdlib/source/lux/host/jvm/method.lux | 10 +- stdlib/source/lux/host/jvm/modifier.lux | 4 +- stdlib/source/lux/host/jvm/version.lux | 4 +- stdlib/source/lux/macro/poly/json.lux | 84 +++---- stdlib/source/lux/macro/syntax/common/reader.lux | 2 +- stdlib/source/lux/time/date.lux | 4 +- stdlib/source/lux/tool/compiler/default/init.lux | 130 +++++------ .../source/lux/tool/compiler/default/platform.lux | 27 ++- stdlib/source/lux/tool/compiler/meta/cache.lux | 37 +-- .../source/lux/tool/compiler/meta/io/context.lux | 24 +- stdlib/source/lux/tool/compiler/phase/analysis.lux | 26 +-- .../lux/tool/compiler/phase/analysis/case.lux | 16 +- .../lux/tool/compiler/phase/analysis/function.lux | 12 +- .../lux/tool/compiler/phase/analysis/inference.lux | 8 +- .../lux/tool/compiler/phase/analysis/module.lux | 2 +- .../lux/tool/compiler/phase/analysis/primitive.lux | 6 +- .../lux/tool/compiler/phase/analysis/reference.lux | 18 +- .../lux/tool/compiler/phase/analysis/scope.lux | 6 +- .../lux/tool/compiler/phase/analysis/structure.lux | 12 +- .../lux/tool/compiler/phase/analysis/type.lux | 2 +- .../compiler/phase/extension/analysis/common.lux | 130 +++++------ .../compiler/phase/extension/analysis/host.jvm.lux | 250 ++++++++++----------- .../tool/compiler/phase/extension/statement.lux | 88 ++++---- .../lux/tool/compiler/phase/generation/js/case.lux | 76 +++---- .../phase/generation/js/extension/common.lux | 16 +- .../phase/generation/js/extension/host.lux | 48 ++-- .../tool/compiler/phase/generation/js/function.lux | 23 +- .../lux/tool/compiler/phase/generation/js/loop.lux | 9 +- .../compiler/phase/generation/js/primitive.lux | 4 +- .../compiler/phase/generation/js/structure.lux | 14 +- .../tool/compiler/phase/generation/reference.lux | 14 +- .../compiler/phase/generation/scheme/case.jvm.lux | 63 +++--- .../generation/scheme/extension/common.jvm.lux | 24 +- .../phase/generation/scheme/function.jvm.lux | 31 ++- .../compiler/phase/generation/scheme/loop.jvm.lux | 9 +- .../phase/generation/scheme/runtime.jvm.lux | 26 +-- .../source/lux/tool/compiler/phase/statement.lux | 12 +- .../source/lux/tool/compiler/phase/synthesis.lux | 55 +++-- .../lux/tool/compiler/phase/synthesis/case.lux | 42 ++-- .../lux/tool/compiler/phase/synthesis/function.lux | 34 +-- .../lux/tool/compiler/phase/synthesis/loop.lux | 44 ++-- stdlib/source/lux/tool/compiler/synthesis.lux | 10 +- stdlib/source/lux/world/db/jdbc.jvm.lux | 6 +- stdlib/source/lux/world/net/http/request.lux | 6 +- stdlib/source/lux/world/net/http/route.lux | 4 +- stdlib/source/program/licentia.lux | 6 +- stdlib/source/program/licentia/license.lux | 6 +- stdlib/source/program/licentia/license/notice.lux | 6 +- stdlib/source/test/lux.lux | 14 +- stdlib/source/test/lux/control.lux | 32 +-- stdlib/source/test/lux/host/jvm.jvm.lux | 16 +- 67 files changed, 903 insertions(+), 890 deletions(-) diff --git a/stdlib/source/lux.lux b/stdlib/source/lux.lux index 5514d1939..83c5fadfb 100644 --- a/stdlib/source/lux.lux +++ b/stdlib/source/lux.lux @@ -4061,6 +4061,7 @@ #All (#Only (List Text)) (#Exclude (List Text)) + #Ignore #Nothing) (type: Openings @@ -4106,6 +4107,10 @@ (^or (^ (list& [_ (#Tag ["" "*"])] tokens')) (^ (list& [_ (#Tag ["" "all"])] tokens'))) (return [#All tokens']) + + (^or (^ (list& [_ (#Tag ["" "_"])] tokens')) + (^ (list& [_ (#Tag ["" "nothing"])] tokens'))) + (return [#Ignore tokens']) _ (return [#Nothing tokens]))) @@ -4157,9 +4162,14 @@ #.None template)) -(def: de-alias - (-> Text Text Text) - (replace-all ".")) +(def: contextual-reference "#") +(def: self-reference ".") + +(def: (de-alias context self aliased) + (-> Text Text Text Text) + (|> aliased + (replace-all ..self-reference self) + (replace-all ..contextual-reference context))) (def: #export module-separator "/") @@ -4234,8 +4244,8 @@ #import-alias import-alias #import-refer import-refer})) -(def: (parse-imports nested? relative-root imports) - (-> Bit Text (List Code) (Meta (List Importation))) +(def: (parse-imports nested? relative-root context-alias imports) + (-> Bit Text Text (List Code) (Meta (List Importation))) (do meta-monad [imports' (monad/map meta-monad (: (-> Code (Meta (List Importation))) @@ -4258,7 +4268,7 @@ #let [[referral extra] referral+extra] openings+extra (parse-openings extra) #let [[openings extra] openings+extra] - sub-imports (parse-imports #1 import-name extra)] + sub-imports (parse-imports #1 import-name context-alias extra)] (wrap (case [referral openings] [#Nothing #Nil] sub-imports _ (list& {#import-name import-name @@ -4273,32 +4283,35 @@ referral+extra (parse-referrals extra) #let [[referral extra] referral+extra] openings+extra (parse-openings extra) - #let [[openings extra] openings+extra] - sub-imports (parse-imports #1 import-name extra)] - (wrap (list& {#import-name import-name - #import-alias (#Some (de-alias m-name alias)) - #import-refer {#refer-defs referral - #refer-open openings}} - sub-imports))) + #let [[openings extra] openings+extra + de-aliased (de-alias context-alias m-name alias)] + sub-imports (parse-imports #1 import-name de-aliased extra)] + (wrap (case [referral openings] + [#Ignore #Nil] sub-imports + _ (list& {#import-name import-name + #import-alias (#Some de-aliased) + #import-refer {#refer-defs referral + #refer-open openings}} + sub-imports)))) ## Parallel (^ [_ (#Record (list [[_ (#Tuple (list [_ (#Nat alteration)] [_ (#Tag ["" domain])]))] parallel-tree]))]) (do meta-monad - [parallel-imports (parse-imports nested? relative-root (list parallel-tree))] + [parallel-imports (parse-imports nested? relative-root context-alias (list parallel-tree))] (wrap (list/map (alter-domain alteration domain) parallel-imports))) (^ [_ (#Record (list [[_ (#Nat alteration)] parallel-tree]))]) (do meta-monad - [parallel-imports (parse-imports nested? relative-root (list parallel-tree))] + [parallel-imports (parse-imports nested? relative-root context-alias (list parallel-tree))] (wrap (list/map (alter-domain alteration "") parallel-imports))) (^ [_ (#Record (list [[_ (#Tag ["" domain])] parallel-tree]))]) (do meta-monad - [parallel-imports (parse-imports nested? relative-root (list parallel-tree)) + [parallel-imports (parse-imports nested? relative-root context-alias (list parallel-tree)) #let [alteration (list/size (text/split-all-with ..module-separator domain))]] (wrap (list/map (alter-domain alteration domain) parallel-imports))) @@ -4564,7 +4577,7 @@ (function (recur source [tags members] target) (let [pattern (record$ (list/map (function (_ [t-module t-name]) [(tag$ [t-module t-name]) - (identifier$ ["" (de-alias t-name alias)])]) + (identifier$ ["" (de-alias "" t-name alias)])]) tags))] (do meta-monad [enhanced-target (monad/fold meta-monad @@ -4573,7 +4586,7 @@ [m-structure (resolve-type-tags m-type)] (case m-structure (#Some m-tags&members) - (recur ["" (de-alias m-name alias)] + (recur ["" (de-alias "" m-name alias)] m-tags&members enhanced-target) @@ -4687,7 +4700,7 @@ (return (list/join decls'))) _ - (return (list (` ("lux def" (~ (identifier$ ["" (de-alias name alias)])) + (return (list (` ("lux def" (~ (identifier$ ["" (de-alias "" name alias)])) (~ source+) [(~ cursor-code) (#.Record #Nil)]))))))) @@ -4820,6 +4833,9 @@ _ (test-referrals module-name *defs -defs)] (wrap (filter (|>> (is-member? -defs) not) *defs))) + #Ignore + (wrap (list)) + #Nothing (wrap (list))) #let [defs (list/map (: (-> Text Code) @@ -4864,10 +4880,13 @@ (#Exclude defs) (list (form$ (list& (' #-) (list/map local-identifier$ defs)))) + #Ignore + (list) + #Nothing (list))) openings (list/map (function (_ [alias structs]) - (form$ (list& (text$ (..replace-all "#" module-alias alias)) + (form$ (list& (text$ (..replace-all ..contextual-reference module-alias alias)) (list/map local-identifier$ structs)))) r-opens)] (` (..refer (~ (text$ module-name)) @@ -4901,7 +4920,7 @@ _ [(list) tokens]))] current-module current-module-name - imports (parse-imports #0 current-module _imports) + imports (parse-imports #0 current-module "" _imports) #let [=imports (list/map (: (-> Importation Code) (function (_ [m-name m-alias =refer]) (` [(~ (text$ m-name)) (~ (text$ (default "" m-alias)))]))) diff --git a/stdlib/source/lux/data/collection/set/ordered.lux b/stdlib/source/lux/data/collection/set/ordered.lux index ef9403d06..a3aef2c24 100644 --- a/stdlib/source/lux/data/collection/set/ordered.lux +++ b/stdlib/source/lux/data/collection/set/ordered.lux @@ -7,30 +7,30 @@ [collection ["." list ("#/." fold)] [dictionary - ["//" ordered]]]] + ["/" ordered]]]] [type abstract]]) (abstract: #export (Set a) {} - (//.Dictionary a a) + (/.Dictionary a a) (def: #export new (All [a] (-> (Order a) (Set a))) - (|>> //.new :abstraction)) + (|>> /.new :abstraction)) (def: #export (member? set elem) (All [a] (-> (Set a) a Bit)) - (|> set :representation (//.contains? elem))) + (|> set :representation (/.contains? elem))) (do-template [ ] [(def: #export (All [a] (-> (Set a) (Maybe a))) (|>> :representation ))] - [min //.min] - [max //.max] + [min /.min] + [max /.max] ) (do-template [ ] @@ -38,21 +38,21 @@ (-> (Set Any) Nat) (|>> :representation ))] - [size //.size] - [depth //.depth] + [size /.size] + [depth /.depth] ) (def: #export (add elem set) (All [a] (-> a (Set a) (Set a))) - (|> set :representation (//.put elem elem) :abstraction)) + (|> set :representation (/.put elem elem) :abstraction)) (def: #export (remove elem set) (All [a] (-> a (Set a) (Set a))) - (|> set :representation (//.remove elem) :abstraction)) + (|> set :representation (/.remove elem) :abstraction)) (def: #export to-list (All [a] (-> (Set a) (List a))) - (|>> :representation //.keys)) + (|>> :representation /.keys)) (def: #export (from-list Order list) (All [a] (-> (Order a) (List a) (Set a))) @@ -66,13 +66,13 @@ (All [a] (-> (Set a) (Set a) (Set a))) (|> (..to-list right) (list.filter (..member? left)) - (..from-list (get@ #//.order (:representation right))))) + (..from-list (get@ #/.order (:representation right))))) (def: #export (difference param subject) (All [a] (-> (Set a) (Set a) (Set a))) (|> (..to-list subject) (list.filter (|>> (..member? param) not)) - (..from-list (get@ #//.order (:representation subject))))) + (..from-list (get@ #/.order (:representation subject))))) (structure: #export equivalence (All [a] (Equivalence (Set a))) (def: (= reference sample) diff --git a/stdlib/source/lux/data/format/css.lux b/stdlib/source/lux/data/format/css.lux index e44e4f61e..accc59e0e 100644 --- a/stdlib/source/lux/data/format/css.lux +++ b/stdlib/source/lux/data/format/css.lux @@ -13,12 +13,12 @@ abstract] [world [net (#+ URL)]]] - [/ - ["/." selector (#+ Selector Combinator)] - ["/." value (#+ Value Animation Percentage)] - ["/." font (#+ Font)] - ["/." style (#+ Style)] - ["/." query (#+ Query)]]) + ["." / #_ + ["#." selector (#+ Selector Combinator)] + ["#." value (#+ Value Animation Percentage)] + ["#." font (#+ Font)] + ["#." style (#+ Style)] + ["#." query (#+ Query)]]) (abstract: #export Common {} Any) (abstract: #export Special {} Any) diff --git a/stdlib/source/lux/data/format/css/font.lux b/stdlib/source/lux/data/format/css/font.lux index d7615043a..2ed7c0f4d 100644 --- a/stdlib/source/lux/data/format/css/font.lux +++ b/stdlib/source/lux/data/format/css/font.lux @@ -6,8 +6,8 @@ ["s" syntax (#+ syntax:)]] [world [net (#+ URL)]]] - [// - ["//." value (#+ Value Font-Stretch Font-Style Font-Weight)]]) + ["." // #_ + ["#." value (#+ Value Font-Stretch Font-Style Font-Weight)]]) (type: #export Unicode-Range {#start Nat diff --git a/stdlib/source/lux/data/format/css/query.lux b/stdlib/source/lux/data/format/css/query.lux index a29073240..1fb1b74bb 100644 --- a/stdlib/source/lux/data/format/css/query.lux +++ b/stdlib/source/lux/data/format/css/query.lux @@ -9,13 +9,13 @@ ["s" syntax (#+ syntax:)]] [type abstract]] - [// - ["//." value (#+ Value Length Count Resolution Ratio - Orientation Scan Boolean Update - Block-Overflow Inline-Overflow - Display-Mode Color-Gamut Inverted-Colors - Pointer Hover - Light Scripting Motion Color-Scheme)]]) + ["." // #_ + ["#." value (#+ Value Length Count Resolution Ratio + Orientation Scan Boolean Update + Block-Overflow Inline-Overflow + Display-Mode Color-Gamut Inverted-Colors + Pointer Hover + Light Scripting Motion Color-Scheme)]]) (syntax: (text-identifier {identifier s.text}) (wrap (list (code.local-identifier identifier)))) diff --git a/stdlib/source/lux/data/format/css/style.lux b/stdlib/source/lux/data/format/css/style.lux index 37979e8b8..0e618156b 100644 --- a/stdlib/source/lux/data/format/css/style.lux +++ b/stdlib/source/lux/data/format/css/style.lux @@ -5,9 +5,9 @@ format]] [type abstract]] - [// - ["//." value (#+ Value)] - ["//." property (#+ Property)]]) + ["." // #_ + ["#." value (#+ Value)] + ["#." property (#+ Property)]]) (abstract: #export Style {#.doc "The style associated with a CSS selector."} diff --git a/stdlib/source/lux/data/number.lux b/stdlib/source/lux/data/number.lux index e673fc54f..eb3946fab 100644 --- a/stdlib/source/lux/data/number.lux +++ b/stdlib/source/lux/data/number.lux @@ -5,11 +5,11 @@ [data ["." error (#+ Error)] ["." text]]] - [/ - ["/." nat] - ["/." int] - ["/." rev] - ["/." frac]]) + ["." / #_ + ["#." nat] + ["#." int] + ["#." rev] + ["#." frac]]) (macro: (encoding-doc tokens state) (case tokens diff --git a/stdlib/source/lux/data/number/frac.lux b/stdlib/source/lux/data/number/frac.lux index 9c3380116..284576264 100644 --- a/stdlib/source/lux/data/number/frac.lux +++ b/stdlib/source/lux/data/number/frac.lux @@ -13,11 +13,11 @@ ["." error (#+ Error)] ["." maybe]] ["." math]] - [// - ["//." i64] - ["//." nat] - ["//." int] - ["//." rev]]) + ["." // #_ + ["#." i64] + ["#." nat] + ["#." int] + ["#." rev]]) (structure: #export equivalence (Equivalence Frac) (def: = f/=)) diff --git a/stdlib/source/lux/data/number/rev.lux b/stdlib/source/lux/data/number/rev.lux index dbfb5a93a..eb2286e65 100644 --- a/stdlib/source/lux/data/number/rev.lux +++ b/stdlib/source/lux/data/number/rev.lux @@ -15,10 +15,10 @@ [collection ["." array (#+ Array)]]] ["." function]] - [// - ["//." i64] - ["//." nat] - ["//." int]]) + ["." // #_ + ["#." i64] + ["#." nat] + ["#." int]]) (structure: #export equivalence (Equivalence Rev) (def: = r/=)) diff --git a/stdlib/source/lux/host/jvm/attribute.lux b/stdlib/source/lux/host/jvm/attribute.lux index 9008dd658..1bef206da 100644 --- a/stdlib/source/lux/host/jvm/attribute.lux +++ b/stdlib/source/lux/host/jvm/attribute.lux @@ -11,11 +11,11 @@ ["." row (#+ Row)]]] [world [binary (#+ Binary)]]] - [// - ["//." encoding (#+ U2 U4)] - ["//." index (#+ Index)] - ["//." constant (#+ UTF8 Class Value) - ["//." pool (#+ Pool)]]]) + ["." // #_ + ["#." encoding (#+ U2 U4)] + ["#." index (#+ Index)] + ["#." constant (#+ UTF8 Class Value) + ["#/." pool (#+ Pool)]]]) (type: #export (Info about) {#name (Index UTF8) @@ -84,7 +84,7 @@ (-> (Index (Value Any)) (State Pool Attribute)) (do state.monad - [@name (//pool.utf8 "ConstantValue")] + [@name (//constant/pool.utf8 "ConstantValue")] (wrap (#Constant {#name @name #length (//encoding.to-u4 //encoding.u2-bytes) #info index})))) @@ -92,7 +92,7 @@ ## (def: #export (code specification) ## (-> Code' (State Pool Attribute)) ## (do state.monad -## [@name (//pool.utf8 "Code")] +## [@name (//constant/pool.utf8 "Code")] ## (wrap (#Code {#name @name ## #length (undefined) ## #info specification})))) diff --git a/stdlib/source/lux/host/jvm/class.lux b/stdlib/source/lux/host/jvm/class.lux index 0c7bfd0da..2474ffa69 100644 --- a/stdlib/source/lux/host/jvm/class.lux +++ b/stdlib/source/lux/host/jvm/class.lux @@ -15,18 +15,18 @@ ["." row (#+ Row)]]] [type [abstract (#+)]]] - [// - ["//." encoding (#+)] - ["//." modifier (#+ modifiers:)] - ["//." version (#+ Version Minor Major)] - ["//." name (#+ Internal)] - ["//." magic (#+ Magic)] - ["//." index (#+ Index)] - ["//." attribute (#+ Attribute)] - ["//." field (#+ Field)] - ["//." method (#+ Method)] - ["//." constant (#+ Constant) - ["//." pool (#+ Pool)]]]) + ["." // #_ + ["#." encoding (#+)] + ["#." modifier (#+ modifiers:)] + ["#." version (#+ Version Minor Major)] + ["#." name (#+ Internal)] + ["#." magic (#+ Magic)] + ["#." index (#+ Index)] + ["#." attribute (#+ Attribute)] + ["#." field (#+ Field)] + ["#." method (#+ Method)] + ["#." constant (#+ Constant) + ["#/." pool (#+ Pool)]]]) (modifiers: ["0001" public] @@ -58,7 +58,7 @@ //encoding.u4-equivalence //encoding.u2-equivalence //encoding.u2-equivalence - //pool.equivalence + //constant/pool.equivalence ..modifier-equivalence //index.equivalence //index.equivalence @@ -73,12 +73,12 @@ (-> Internal Internal (List Internal) (State Pool [(Index //constant.Class) (Index //constant.Class) (Row (Index //constant.Class))])) (do state.monad - [@this (//pool.class (//name.read this)) - @super (//pool.class (//name.read super)) + [@this (//constant/pool.class (//name.read this)) + @super (//constant/pool.class (//name.read super)) @interfaces (: (State Pool (Row (Index //constant.Class))) (monad.fold @ (function (_ interface @interfaces) (do @ - [@interface (//pool.class (//name.read interface))] + [@interface (//constant/pool.class (//name.read interface))] (wrap (row.add @interface @interfaces)))) row.empty interfaces))] @@ -94,7 +94,7 @@ (Row Attribute) Class) (let [[pool [@this @super @interfaces] =fields] - (state.run //pool.empty + (state.run //constant/pool.empty (do state.monad [classes (install-classes this super interfaces) =fields (monad.seq state.monad fields)] @@ -117,7 +117,7 @@ //magic.format //version.format //version.format - //pool.format + //constant/pool.format ..modifier-format //index.format //index.format diff --git a/stdlib/source/lux/host/jvm/constant.lux b/stdlib/source/lux/host/jvm/constant.lux index e3ec4c334..cf8d2e1fc 100644 --- a/stdlib/source/lux/host/jvm/constant.lux +++ b/stdlib/source/lux/host/jvm/constant.lux @@ -15,12 +15,12 @@ ["." row (#+ Row)]]] [type abstract]] - [// - [encoding (#+ U4)] - ["//." index (#+ Index)] - [descriptor (#+ Descriptor)]] - [/ - ["/." tag ("#/." equivalence)]]) + ["." / #_ + ["#." tag ("#/." equivalence)] + ["." // #_ + [encoding (#+ U4)] + [descriptor (#+ Descriptor)] + ["#." index (#+ Index)]]]) (type: #export UTF8 Text) diff --git a/stdlib/source/lux/host/jvm/descriptor.lux b/stdlib/source/lux/host/jvm/descriptor.lux index 8da571f86..82a1c8ff8 100644 --- a/stdlib/source/lux/host/jvm/descriptor.lux +++ b/stdlib/source/lux/host/jvm/descriptor.lux @@ -7,8 +7,8 @@ ["." list ("#/." functor)]]] [type abstract]] - [// - ["//." name (#+ Internal)]]) + ["." // #_ + ["#." name (#+ Internal)]]) (abstract: #export Base' {} Any) (abstract: #export Object' {} Any) diff --git a/stdlib/source/lux/host/jvm/field.lux b/stdlib/source/lux/host/jvm/field.lux index 69e0400ea..f40800790 100644 --- a/stdlib/source/lux/host/jvm/field.lux +++ b/stdlib/source/lux/host/jvm/field.lux @@ -15,14 +15,14 @@ ["." row (#+ Row)]]] [type [abstract (#+)]]] - [// + ["." // #_ [encoding (#+)] [modifier (#+ modifiers:)] - ["//." constant (#+ UTF8) - ["//." pool (#+ Pool)]] - ["//." index (#+ Index)] - ["//." attribute (#+ Attribute)] - ["//." descriptor (#+ Descriptor Value)]]) + ["#." constant (#+ UTF8) + ["#/." pool (#+ Pool)]] + ["#." index (#+ Index)] + ["#." attribute (#+ Attribute)] + ["#." descriptor (#+ Descriptor Value)]]) (modifiers: ["0001" public] @@ -62,8 +62,8 @@ (-> Modifier UTF8 (Descriptor (Value Any)) (Row Attribute) (State Pool Field)) (do state.monad - [@name (//pool.utf8 name) - @descriptor (//pool.descriptor descriptor)] + [@name (//constant/pool.utf8 name) + @descriptor (//constant/pool.descriptor descriptor)] (wrap {#modifier modifier #name @name #descriptor @descriptor diff --git a/stdlib/source/lux/host/jvm/index.lux b/stdlib/source/lux/host/jvm/index.lux index 69232edb4..c7174f9d4 100644 --- a/stdlib/source/lux/host/jvm/index.lux +++ b/stdlib/source/lux/host/jvm/index.lux @@ -7,8 +7,8 @@ ["." binary (#+ Format)]]] [type abstract]] - [// - ["//." encoding (#+ U2)]]) + ["." // #_ + ["#." encoding (#+ U2)]]) (abstract: #export (Index kind) {} diff --git a/stdlib/source/lux/host/jvm/magic.lux b/stdlib/source/lux/host/jvm/magic.lux index e32259529..5b74dc572 100644 --- a/stdlib/source/lux/host/jvm/magic.lux +++ b/stdlib/source/lux/host/jvm/magic.lux @@ -4,8 +4,8 @@ [number (#+ hex)] [format [binary (#+ Format)]]]] - [// - ["//." encoding (#+ U4)]]) + ["." // #_ + ["#." encoding (#+ U4)]]) (type: #export Magic U4) diff --git a/stdlib/source/lux/host/jvm/method.lux b/stdlib/source/lux/host/jvm/method.lux index c2342cd03..e0ef63d3e 100644 --- a/stdlib/source/lux/host/jvm/method.lux +++ b/stdlib/source/lux/host/jvm/method.lux @@ -15,13 +15,13 @@ ["." row (#+ Row)]]] [type [abstract (#+)]]] - [// + ["." // #_ [encoding (#+)] [modifier (#+ modifiers:)] - ["//." constant (#+ UTF8)] - ["//." index (#+ Index)] - ["//." attribute (#+ Attribute)] - ["//." descriptor (#+ Descriptor)]]) + ["#." constant (#+ UTF8)] + ["#." index (#+ Index)] + ["#." attribute (#+ Attribute)] + ["#." descriptor (#+ Descriptor)]]) (modifiers: ["0001" public] diff --git a/stdlib/source/lux/host/jvm/modifier.lux b/stdlib/source/lux/host/jvm/modifier.lux index cb8a29498..e41e5c5e1 100644 --- a/stdlib/source/lux/host/jvm/modifier.lux +++ b/stdlib/source/lux/host/jvm/modifier.lux @@ -16,8 +16,8 @@ [macro (#+ with-gensyms) ["." code] ["s" syntax (#+ Syntax syntax:)]]] - [// - ["//." encoding]]) + ["." // #_ + ["#." encoding]]) (type: Modifier {#code Text diff --git a/stdlib/source/lux/host/jvm/version.lux b/stdlib/source/lux/host/jvm/version.lux index aca98e990..8641dd393 100644 --- a/stdlib/source/lux/host/jvm/version.lux +++ b/stdlib/source/lux/host/jvm/version.lux @@ -3,8 +3,8 @@ [data [format ["." binary (#+ Format)]]]] - [// - ["//." encoding (#+ U2)]]) + ["." // #_ + ["#." encoding (#+ U2)]]) (type: #export Version U2) (type: #export Minor Version) diff --git a/stdlib/source/lux/macro/poly/json.lux b/stdlib/source/lux/macro/poly/json.lux index f273fc8d8..ce590b880 100644 --- a/stdlib/source/lux/macro/poly/json.lux +++ b/stdlib/source/lux/macro/poly/json.lux @@ -19,7 +19,7 @@ ["l" lexer] format] [format - ["//" json (#+ JSON)]] + ["/" json (#+ JSON)]] [collection ["." list ("#/." fold monad)] ["." row (#+ Row row) ("#/." monad)] @@ -53,14 +53,14 @@ (def: (encode input) (let [high (|> input (i64.and high-mask) (i64.logical-right-shift 32)) low (i64.and low-mask input)] - (#//.Array (row (|> high .int int-to-frac #//.Number) - (|> low .int int-to-frac #//.Number))))) + (#/.Array (row (|> high .int int-to-frac #/.Number) + (|> low .int int-to-frac #/.Number))))) (def: (decode input) - (<| (//.run input) - //.array + (<| (/.run input) + /.array (do p.monad - [high //.number - low //.number]) + [high /.number + low /.number]) (wrap (n/+ (|> high frac-to-int .nat (i64.left-shift 32)) (|> low frac-to-int .nat)))))) @@ -74,7 +74,7 @@ (All [a] (-> (-> a JSON) (-> (Maybe a) JSON))) (function (_ elem) (case elem - #.None #//.Null + #.None #/.Null (#.Some value) (writer value)))) (structure: qty-codec @@ -94,17 +94,17 @@ (wrap (` (: (~ (@JSON//encode inputT)) ))))] - [(poly.exactly Any) (function ((~ g!_) (~ (code.identifier ["" "0"]))) #//.Null)] - [(poly.sub Bit) (|>> #//.Boolean)] + [(poly.exactly Any) (function ((~ g!_) (~ (code.identifier ["" "0"]))) #/.Null)] + [(poly.sub Bit) (|>> #/.Boolean)] [(poly.sub Nat) (:: (~! ..nat-codec) (~' encode))] [(poly.sub Int) (:: (~! ..int-codec) (~' encode))] - [(poly.sub Frac) (|>> #//.Number)] - [(poly.sub Text) (|>> #//.String)]) + [(poly.sub Frac) (|>> #/.Number)] + [(poly.sub Text) (|>> #/.String)])