aboutsummaryrefslogtreecommitdiff
path: root/stdlib
diff options
context:
space:
mode:
authorEduardo Julian2019-03-14 21:34:51 -0400
committerEduardo Julian2019-03-14 21:34:51 -0400
commit9449d89f611ba3192373fdeb6848d02707ff1292 (patch)
treec84efab622a9ee54ba2f0dc46ead3082289339f7 /stdlib
parenteb37e9b2a851cab1aef7de293ec345d7925d639a (diff)
Now allowing the alias of a module to refer to the alias of an ancestor.
Diffstat (limited to '')
-rw-r--r--stdlib/source/lux.lux61
-rw-r--r--stdlib/source/lux/data/collection/set/ordered.lux26
-rw-r--r--stdlib/source/lux/data/format/css.lux12
-rw-r--r--stdlib/source/lux/data/format/css/font.lux4
-rw-r--r--stdlib/source/lux/data/format/css/query.lux14
-rw-r--r--stdlib/source/lux/data/format/css/style.lux6
-rw-r--r--stdlib/source/lux/data/number.lux10
-rw-r--r--stdlib/source/lux/data/number/frac.lux10
-rw-r--r--stdlib/source/lux/data/number/rev.lux8
-rw-r--r--stdlib/source/lux/host/jvm/attribute.lux14
-rw-r--r--stdlib/source/lux/host/jvm/class.lux36
-rw-r--r--stdlib/source/lux/host/jvm/constant.lux12
-rw-r--r--stdlib/source/lux/host/jvm/descriptor.lux4
-rw-r--r--stdlib/source/lux/host/jvm/field.lux16
-rw-r--r--stdlib/source/lux/host/jvm/index.lux4
-rw-r--r--stdlib/source/lux/host/jvm/magic.lux4
-rw-r--r--stdlib/source/lux/host/jvm/method.lux10
-rw-r--r--stdlib/source/lux/host/jvm/modifier.lux4
-rw-r--r--stdlib/source/lux/host/jvm/version.lux4
-rw-r--r--stdlib/source/lux/macro/poly/json.lux84
-rw-r--r--stdlib/source/lux/macro/syntax/common/reader.lux2
-rw-r--r--stdlib/source/lux/time/date.lux4
-rw-r--r--stdlib/source/lux/tool/compiler/default/init.lux130
-rw-r--r--stdlib/source/lux/tool/compiler/default/platform.lux27
-rw-r--r--stdlib/source/lux/tool/compiler/meta/cache.lux37
-rw-r--r--stdlib/source/lux/tool/compiler/meta/io/context.lux24
-rw-r--r--stdlib/source/lux/tool/compiler/phase/analysis.lux26
-rw-r--r--stdlib/source/lux/tool/compiler/phase/analysis/case.lux16
-rw-r--r--stdlib/source/lux/tool/compiler/phase/analysis/function.lux12
-rw-r--r--stdlib/source/lux/tool/compiler/phase/analysis/inference.lux8
-rw-r--r--stdlib/source/lux/tool/compiler/phase/analysis/module.lux2
-rw-r--r--stdlib/source/lux/tool/compiler/phase/analysis/primitive.lux6
-rw-r--r--stdlib/source/lux/tool/compiler/phase/analysis/reference.lux18
-rw-r--r--stdlib/source/lux/tool/compiler/phase/analysis/scope.lux6
-rw-r--r--stdlib/source/lux/tool/compiler/phase/analysis/structure.lux12
-rw-r--r--stdlib/source/lux/tool/compiler/phase/analysis/type.lux2
-rw-r--r--stdlib/source/lux/tool/compiler/phase/extension/analysis/common.lux130
-rw-r--r--stdlib/source/lux/tool/compiler/phase/extension/analysis/host.jvm.lux250
-rw-r--r--stdlib/source/lux/tool/compiler/phase/extension/statement.lux88
-rw-r--r--stdlib/source/lux/tool/compiler/phase/generation/js/case.lux76
-rw-r--r--stdlib/source/lux/tool/compiler/phase/generation/js/extension/common.lux16
-rw-r--r--stdlib/source/lux/tool/compiler/phase/generation/js/extension/host.lux48
-rw-r--r--stdlib/source/lux/tool/compiler/phase/generation/js/function.lux23
-rw-r--r--stdlib/source/lux/tool/compiler/phase/generation/js/loop.lux9
-rw-r--r--stdlib/source/lux/tool/compiler/phase/generation/js/primitive.lux4
-rw-r--r--stdlib/source/lux/tool/compiler/phase/generation/js/structure.lux14
-rw-r--r--stdlib/source/lux/tool/compiler/phase/generation/reference.lux14
-rw-r--r--stdlib/source/lux/tool/compiler/phase/generation/scheme/case.jvm.lux63
-rw-r--r--stdlib/source/lux/tool/compiler/phase/generation/scheme/extension/common.jvm.lux24
-rw-r--r--stdlib/source/lux/tool/compiler/phase/generation/scheme/function.jvm.lux31
-rw-r--r--stdlib/source/lux/tool/compiler/phase/generation/scheme/loop.jvm.lux9
-rw-r--r--stdlib/source/lux/tool/compiler/phase/generation/scheme/runtime.jvm.lux26
-rw-r--r--stdlib/source/lux/tool/compiler/phase/statement.lux12
-rw-r--r--stdlib/source/lux/tool/compiler/phase/synthesis.lux55
-rw-r--r--stdlib/source/lux/tool/compiler/phase/synthesis/case.lux42
-rw-r--r--stdlib/source/lux/tool/compiler/phase/synthesis/function.lux34
-rw-r--r--stdlib/source/lux/tool/compiler/phase/synthesis/loop.lux44
-rw-r--r--stdlib/source/lux/tool/compiler/synthesis.lux10
-rw-r--r--stdlib/source/lux/world/db/jdbc.jvm.lux6
-rw-r--r--stdlib/source/lux/world/net/http/request.lux6
-rw-r--r--stdlib/source/lux/world/net/http/route.lux4
-rw-r--r--stdlib/source/program/licentia.lux6
-rw-r--r--stdlib/source/program/licentia/license.lux6
-rw-r--r--stdlib/source/program/licentia/license/notice.lux6
-rw-r--r--stdlib/source/test/lux.lux14
-rw-r--r--stdlib/source/test/lux/control.lux32
-rw-r--r--stdlib/source/test/lux/host/jvm.jvm.lux16
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 [<name> <alias>]
[(def: #export <name>
(All [a] (-> (Set a) (Maybe a)))
(|>> :representation <alias>))]
- [min //.min]
- [max //.max]
+ [min /.min]
+ [max /.max]
)
(do-template [<name> <alias>]
@@ -38,21 +38,21 @@
(-> (Set Any) Nat)
(|>> :representation <alias>))]
- [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<a> 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))
<encoder>))))]
- [(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)])
<time> (do-template [<type> <codec>]
[(do @
[_ (poly.exactly <type>)]
(wrap (` (: (~ (@JSON//encode inputT))
- (|>> (:: <codec> (~' encode)) #//.String)))))]
+ (|>> (:: <codec> (~' encode)) #/.String)))))]
## [du.Duration du.codec]
## [i.Instant i.codec]
@@ -115,7 +115,7 @@
[*env* poly.env
#let [@JSON//encode (: (-> Type Code)
(function (_ type)
- (` (-> (~ (poly.to-code *env* type)) //.JSON))))]
+ (` (-> (~ (poly.to-code *env* type)) /.JSON))))]
inputT poly.peek]
($_ p.either
<basic>
@@ -138,7 +138,7 @@
((~! list/map) (function ((~ g!_) [(~ g!key) (~ g!val)])
[(~ g!key) ((~ =val=) (~ g!val))]))
(d.from-list text.hash)
- #//.Object)))))
+ #/.Object)))))
(do @
[[_ =sub=] (poly.apply ($_ p.and
(poly.exactly .Maybe)
@@ -150,7 +150,7 @@
(poly.exactly .List)
codec//encode))]
(wrap (` (: (~ (@JSON//encode inputT))
- (|>> ((~! list/map) (~ =sub=)) row.from-list #//.Array)))))
+ (|>> ((~! list/map) (~ =sub=)) row.from-list #/.Array)))))
(do @
[#let [g!_ (code.local-identifier "_______")
g!input (code.local-identifier "_______input")]
@@ -160,8 +160,8 @@
(case (~ g!input)
(~+ (list/join (list/map (function (_ [tag g!encode])
(list (` ((~ (code.nat tag)) (~ g!input)))
- (` (//.json [(~ (code.frac (..tag tag)))
- ((~ g!encode) (~ g!input))]))))
+ (` (/.json [(~ (code.frac (..tag tag)))
+ ((~ g!encode) (~ g!input))]))))
(list.enumerate members))))))))))
(do @
[g!encoders (poly.tuple (p.many codec//encode))
@@ -171,9 +171,9 @@
(list/map (|>> nat/encode code.local-identifier)))]]
(wrap (` (: (~ (@JSON//encode inputT))
(function ((~ g!_) [(~+ g!members)])
- (//.json [(~+ (list/map (function (_ [g!member g!encode])
- (` ((~ g!encode) (~ g!member))))
- (list.zip2 g!members g!encoders)))]))))))
+ (/.json [(~+ (list/map (function (_ [g!member g!encode])
+ (` ((~ g!encode) (~ g!member))))
+ (list.zip2 g!members g!encoders)))]))))))
## Type recursion
(do @
[[selfC non-recC] (poly.recursive codec//encode)
@@ -190,10 +190,10 @@
(do @
[[funcC varsC bodyC] (poly.polymorphic codec//encode)]
(wrap (` (: (All [(~+ varsC)]
- (-> (~+ (list/map (function (_ varC) (` (-> (~ varC) //.JSON)))
+ (-> (~+ (list/map (function (_ varC) (` (-> (~ varC) /.JSON)))
varsC))
(-> ((~ (poly.to-code *env* inputT)) (~+ varsC))
- //.JSON)))
+ /.JSON)))
(function ((~ funcC) (~+ varsC))
(~ bodyC))))))
poly.parameter
@@ -210,17 +210,17 @@
(wrap (` (: (~ (@JSON//decode inputT))
<decoder>))))]
- [(poly.exactly Any) //.null]
- [(poly.sub Bit) //.boolean]
- [(poly.sub Nat) (p.codec (~! ..nat-codec) //.any)]
- [(poly.sub Int) (p.codec (~! ..int-codec) //.any)]
- [(poly.sub Frac) //.number]
- [(poly.sub Text) //.string])
+ [(poly.exactly Any) /.null]
+ [(poly.sub Bit) /.boolean]
+ [(poly.sub Nat) (p.codec (~! ..nat-codec) /.any)]
+ [(poly.sub Int) (p.codec (~! ..int-codec) /.any)]
+ [(poly.sub Frac) /.number]
+ [(poly.sub Text) /.string])
<time> (do-template [<type> <codec>]
[(do @
[_ (poly.exactly <type>)]
(wrap (` (: (~ (@JSON//decode inputT))
- (p.codec <codec> //.string)))))]
+ (p.codec <codec> /.string)))))]
## [du.Duration du.codec]
## [i.Instant i.codec]
@@ -231,7 +231,7 @@
[*env* poly.env
#let [@JSON//decode (: (-> Type Code)
(function (_ type)
- (` (//.Reader (~ (poly.to-code *env* type))))))]
+ (` (/.Reader (~ (poly.to-code *env* type))))))]
inputT poly.peek]
($_ p.either
<basic>
@@ -240,37 +240,37 @@
[unitT (poly.apply (p.after (poly.exactly unit.Qty)
poly.any))]
(wrap (` (: (~ (@JSON//decode inputT))
- (p.codec (~! qty-codec) //.any)))))
+ (p.codec (~! qty-codec) /.any)))))
(do @
[[_ _ valC] (poly.apply ($_ p.and
(poly.exactly d.Dictionary)
(poly.exactly .Text)
codec//decode))]
(wrap (` (: (~ (@JSON//decode inputT))
- (//.object (~ valC))))))
+ (/.object (~ valC))))))
(do @
[[_ subC] (poly.apply (p.and (poly.exactly .Maybe)
codec//decode))]
(wrap (` (: (~ (@JSON//decode inputT))
- (//.nullable (~ subC))))))
+ (/.nullable (~ subC))))))
(do @
[[_ subC] (poly.apply (p.and (poly.exactly .List)
codec//decode))]
(wrap (` (: (~ (@JSON//decode inputT))
- (//.array (p.some (~ subC)))))))
+ (/.array (p.some (~ subC)))))))
(do @
[members (poly.variant (p.many codec//decode))]
(wrap (` (: (~ (@JSON//decode inputT))
($_ p.or
(~+ (list/map (function (_ [tag memberC])
(` (|> (~ memberC)
- (p.after (//.number! (~ (code.frac (..tag tag)))))
- //.array)))
+ (p.after (/.number! (~ (code.frac (..tag tag)))))
+ /.array)))
(list.enumerate members))))))))
(do @
[g!decoders (poly.tuple (p.many codec//decode))]
(wrap (` (: (~ (@JSON//decode inputT))
- (//.array ($_ p.and (~+ g!decoders)))))))
+ (/.array ($_ p.and (~+ g!decoders)))))))
## Type recursion
(do @
[[selfC bodyC] (poly.recursive codec//decode)
@@ -287,8 +287,8 @@
(do @
[[funcC varsC bodyC] (poly.polymorphic codec//decode)]
(wrap (` (: (All [(~+ varsC)]
- (-> (~+ (list/map (|>> (~) //.Reader (`)) varsC))
- (//.Reader ((~ (poly.to-code *env* inputT)) (~+ varsC)))))
+ (-> (~+ (list/map (|>> (~) /.Reader (`)) varsC))
+ (/.Reader ((~ (poly.to-code *env* inputT)) (~+ varsC)))))
(function ((~ funcC) (~+ varsC))
(~ bodyC))))))
poly.parameter
@@ -316,7 +316,7 @@
(derived: (..codec Record)))}
(with-gensyms [g!inputs]
- (wrap (list (` (: (Codec //.JSON (~ inputT))
+ (wrap (list (` (: (Codec /.JSON (~ inputT))
(structure (def: (~' encode) ((~! ..codec) (~ inputT)))
- (def: ((~' decode) (~ g!inputs)) (//.run (~ g!inputs) ((~! ..codec) (~ inputT))))
+ (def: ((~' decode) (~ g!inputs)) (/.run (~ g!inputs) ((~! ..codec) (~ inputT))))
)))))))
diff --git a/stdlib/source/lux/macro/syntax/common/reader.lux b/stdlib/source/lux/macro/syntax/common/reader.lux
index ee846218e..44bb9dae9 100644
--- a/stdlib/source/lux/macro/syntax/common/reader.lux
+++ b/stdlib/source/lux/macro/syntax/common/reader.lux
@@ -10,7 +10,7 @@
[collection
["." list]]]]
["." //
- ["/." ///
+ ["#//" ///
["s" syntax (#+ syntax: Syntax)]]])
## Exports
diff --git a/stdlib/source/lux/time/date.lux b/stdlib/source/lux/time/date.lux
index 42ad0c998..99a8f6f39 100644
--- a/stdlib/source/lux/time/date.lux
+++ b/stdlib/source/lux/time/date.lux
@@ -17,8 +17,8 @@
["l" lexer]]
[collection
["." row (#+ Row row)]]]]
- [//
- ["//." month (#+ Month)]])
+ ["." // #_
+ ["#." month (#+ Month)]])
(type: #export Year Int)
diff --git a/stdlib/source/lux/tool/compiler/default/init.lux b/stdlib/source/lux/tool/compiler/default/init.lux
index 8ff684755..a00d4b5cd 100644
--- a/stdlib/source/lux/tool/compiler/default/init.lux
+++ b/stdlib/source/lux/tool/compiler/default/init.lux
@@ -14,14 +14,14 @@
[world
["." file]]]
["." //
- ["." syntax (#+ Aliases)]
- ["." evaluation]
- ["/." // (#+ Instancer)
- ["." analysis]
- ["." synthesis]
- ["." statement]
- ["." host]
- ["." phase
+ ["#." syntax (#+ Aliases)]
+ ["#." evaluation]
+ ["#/" // (#+ Instancer)
+ ["#." analysis]
+ ["#." synthesis]
+ ["#." statement]
+ ["#." host]
+ ["#." phase
[macro (#+ Expander)]
[".P" analysis
["." module]]
@@ -41,33 +41,33 @@
(def: #export info
Info
- {#.target (`` (for {(~~ (static host.common-lisp)) host.common-lisp
- (~~ (static host.js)) host.js
- (~~ (static host.jvm)) host.jvm
- (~~ (static host.lua)) host.lua
- (~~ (static host.php)) host.php
- (~~ (static host.python)) host.python
- (~~ (static host.r)) host.r
- (~~ (static host.ruby)) host.ruby
- (~~ (static host.scheme)) host.scheme}))
+ {#.target (`` (for {(~~ (static ///host.common-lisp)) ///host.common-lisp
+ (~~ (static ///host.js)) ///host.js
+ (~~ (static ///host.jvm)) ///host.jvm
+ (~~ (static ///host.lua)) ///host.lua
+ (~~ (static ///host.php)) ///host.php
+ (~~ (static ///host.python)) ///host.python
+ (~~ (static ///host.r)) ///host.r
+ (~~ (static ///host.ruby)) ///host.ruby
+ (~~ (static ///host.scheme)) ///host.scheme}))
#.version //.version
#.mode #.Build})
(def: (refresh expander)
(All [anchor expression statement]
- (-> Expander (statement.Operation anchor expression statement Any)))
- (do phase.monad
- [[bundle state] phase.get-state
- #let [eval (evaluation.evaluator expander
- (get@ [#statement.synthesis #statement.state] state)
- (get@ [#statement.generation #statement.state] state)
- (get@ [#statement.generation #statement.phase] state))]]
- (phase.set-state [bundle
- (update@ [#statement.analysis #statement.state]
- (: (-> analysis.State+ analysis.State+)
- (|>> product.right
- [(analysisE.bundle eval)]))
- state)])))
+ (-> Expander (///statement.Operation anchor expression statement Any)))
+ (do ///phase.monad
+ [[bundle state] ///phase.get-state
+ #let [eval (//evaluation.evaluator expander
+ (get@ [#///statement.synthesis #///statement.state] state)
+ (get@ [#///statement.generation #///statement.state] state)
+ (get@ [#///statement.generation #///statement.phase] state))]]
+ (///phase.set-state [bundle
+ (update@ [#///statement.analysis #///statement.state]
+ (: (-> ///analysis.State+ ///analysis.State+)
+ (|>> product.right
+ [(analysisE.bundle eval)]))
+ state)])))
(def: #export (state expander host generate generation-bundle)
(All [anchor expression statement]
@@ -75,31 +75,31 @@
(generation.Host expression statement)
(generation.Phase anchor expression statement)
(generation.Bundle anchor expression statement)
- (statement.State+ anchor expression statement)))
- (let [synthesis-state [synthesisE.bundle synthesis.init]
+ (///statement.State+ anchor expression statement)))
+ (let [synthesis-state [synthesisE.bundle ///synthesis.init]
generation-state [generation-bundle (generation.state host)]
- eval (evaluation.evaluator expander synthesis-state generation-state generate)
- analysis-state [(analysisE.bundle eval) (analysis.state ..info host)]]
+ eval (//evaluation.evaluator expander synthesis-state generation-state generate)
+ analysis-state [(analysisE.bundle eval) (///analysis.state ..info host)]]
[statementE.bundle
- {#statement.analysis {#statement.state analysis-state
- #statement.phase (analysisP.phase expander)}
- #statement.synthesis {#statement.state synthesis-state
- #statement.phase synthesisP.phase}
- #statement.generation {#statement.state generation-state
- #statement.phase generate}}]))
+ {#///statement.analysis {#///statement.state analysis-state
+ #///statement.phase (analysisP.phase expander)}
+ #///statement.synthesis {#///statement.state synthesis-state
+ #///statement.phase synthesisP.phase}
+ #///statement.generation {#///statement.state generation-state
+ #///statement.phase generate}}]))
(type: Reader
(-> Source (Error [Source Code])))
(def: (reader current-module aliases)
- (-> Module Aliases (analysis.Operation Reader))
+ (-> Module Aliases (///analysis.Operation Reader))
(function (_ [bundle state])
(let [[cursor offset source-code] (get@ #.source state)]
(#error.Success [[bundle state]
- (syntax.parse current-module aliases ("lux text size" source-code))]))))
+ (//syntax.parse current-module aliases ("lux text size" source-code))]))))
(def: (read reader)
- (-> Reader (analysis.Operation Code))
+ (-> Reader (///analysis.Operation Code))
(function (_ [bundle compiler])
(case (reader (get@ #.source compiler))
(#error.Failure error)
@@ -113,37 +113,37 @@
output])))))
(with-expansions [<Operation> (as-is (All [anchor expression statement]
- (statement.Operation anchor expression statement Any)))]
+ (///statement.Operation anchor expression statement Any)))]
(def: (begin dependencies hash input)
(-> (List Module) Nat ///.Input <Operation>)
- (statement.lift-analysis
- (do phase.monad
+ (///statement.lift-analysis
+ (do ///phase.monad
[#let [module (get@ #///.module input)]
_ (module.create hash module)
- _ (analysis.set-current-module module)
+ _ (///analysis.set-current-module module)
_ (monad.map @ module.import dependencies)]
- (analysis.set-source-code (analysis.source (get@ #///.module input) (get@ #///.code input))))))
+ (///analysis.set-source-code (///analysis.source (get@ #///.module input) (get@ #///.code input))))))
(def: end
(-> Module <Operation>)
(|>> module.set-compiled
- statement.lift-analysis))
+ ///statement.lift-analysis))
(def: (iteration expander reader)
(-> Expander Reader <Operation>)
(let [execute (statementP.phase expander)]
- (do phase.monad
- [code (statement.lift-analysis
+ (do ///phase.monad
+ [code (///statement.lift-analysis
(..read reader))
_ (execute code)]
(..refresh expander))))
(def: (loop expander module)
(-> Expander Module <Operation>)
- (do phase.monad
- [reader (statement.lift-analysis
- (..reader module syntax.no-aliases))]
+ (do ///phase.monad
+ [reader (///statement.lift-analysis
+ (..reader module //syntax.no-aliases))]
(function (_ state)
(.loop [state state]
(case (..iteration expander reader state)
@@ -151,13 +151,13 @@
(recur state')
(#error.Failure error)
- (if (ex.match? syntax.end-of-file error)
+ (if (ex.match? //syntax.end-of-file error)
(#error.Success [state []])
(ex.with-stack ///.cannot-compile module (#error.Failure error))))))))
(def: (compile expander dependencies hash input)
(-> Expander (List Module) Nat ///.Input <Operation>)
- (do phase.monad
+ (do ///phase.monad
[#let [module (get@ #///.module input)]
_ (..begin dependencies hash input)
_ (..loop expander module)]
@@ -173,21 +173,21 @@
(def: #export (compiler expander prelude module)
(-> Expander Module Module
(All [anchor expression statement]
- (Instancer (statement.State+ anchor expression statement) .Module)))
+ (Instancer (///statement.State+ anchor expression statement) .Module)))
(function (_ key parameters input)
(let [hash (text/hash (get@ #///.code input))
dependencies (default-dependencies prelude input)]
{#///.dependencies dependencies
#///.process (function (_ state archive)
(do error.monad
- [[state' analysis-module] (phase.run' state
- (: (All [anchor expression statement]
- (statement.Operation anchor expression statement .Module))
- (do phase.monad
- [_ (compile expander dependencies hash input)]
- (statement.lift-analysis
- (extension.lift
- macro.current-module)))))
+ [[state' analysis-module] (///phase.run' state
+ (: (All [anchor expression statement]
+ (///statement.Operation anchor expression statement .Module))
+ (do ///phase.monad
+ [_ (compile expander dependencies hash input)]
+ (///statement.lift-analysis
+ (extension.lift
+ macro.current-module)))))
#let [descriptor {#descriptor.hash hash
#descriptor.name (get@ #///.module input)
#descriptor.file (get@ #///.file input)
diff --git a/stdlib/source/lux/tool/compiler/default/platform.lux b/stdlib/source/lux/tool/compiler/default/platform.lux
index 89a02e502..e1ffb64bd 100644
--- a/stdlib/source/lux/tool/compiler/default/platform.lux
+++ b/stdlib/source/lux/tool/compiler/default/platform.lux
@@ -11,13 +11,12 @@
["." list]]]
[world
["." file (#+ File)]]]
- [//
- ["." init]
- ["." syntax]
- ["/." //
- ["." analysis]
- ["." statement]
- ["." phase
+ ["." // #_
+ ["#." init]
+ ["#." syntax]
+ ["#/" //
+ ["#." statement]
+ ["#." phase
[macro (#+ Expander)]
## TODO: Get rid of this import ASAP
[extension (#+)]
@@ -50,7 +49,7 @@
## (encoding.to-utf8 (%code (cache/description.write file-name module))))))
(with-expansions [<Platform> (as-is (Platform ! anchor expression statement))
- <State+> (as-is (statement.State+ anchor expression statement))
+ <State+> (as-is (///statement.State+ anchor expression statement))
<Bundle> (as-is (generation.Bundle anchor expression statement))]
(def: #export (initialize expander platform generation-bundle)
@@ -58,11 +57,11 @@
(-> Expander <Platform> <Bundle> (! (Error <State+>))))
(|> platform
(get@ #runtime)
- statement.lift-generation
- (phase.run' (init.state expander
- (get@ #host platform)
- (get@ #phase platform)
- generation-bundle))
+ ///statement.lift-generation
+ (///phase.run' (//init.state expander
+ (get@ #host platform)
+ (get@ #phase platform)
+ generation-bundle))
(:: error.functor map product.left)
(:: (get@ #&monad platform) wrap))
@@ -101,7 +100,7 @@
{<State+>
state}
{(///.Compiler <State+> .Module Any)
- ((init.compiler expander syntax.prelude source-module) init.key (list))})]
+ ((//init.compiler expander //syntax.prelude source-module) //init.key (list))})]
(loop [module source-module
[archive state] [archive state]]
(let [import! (:share [! anchor expression statement]
diff --git a/stdlib/source/lux/tool/compiler/meta/cache.lux b/stdlib/source/lux/tool/compiler/meta/cache.lux
index 7ba16878a..a0d5302f3 100644
--- a/stdlib/source/lux/tool/compiler/meta/cache.lux
+++ b/stdlib/source/lux/tool/compiler/meta/cache.lux
@@ -19,13 +19,14 @@
["." set (#+ Set)]]]
[world
[file (#+ File System)]]]
- [//
- [io (#+ Context Module)
- ["io/." context]
- ["io/." archive]]
- ["." archive (#+ Signature Key Descriptor Document Archive)]
- ["/." //]]
- ["." /dependency (#+ Dependency Graph)])
+ ["." //
+ ["#." io (#+ Context Module)
+ ["#/." context]
+ ["#/." archive]]
+ ["#." archive (#+ Signature Key Descriptor Document Archive)]
+ ["#/" //]]
+ ["." / #_
+ ["#." dependency (#+ Dependency Graph)]])
(exception: #export (cannot-delete-file {file File})
(ex.report ["File" file]))
@@ -37,8 +38,8 @@
(exception: #export (mismatched-signature {module ///.Module} {expected Signature} {actual Signature})
(ex.report ["Module" module]
- ["Expected" (archive.describe expected)]
- ["Actual" (archive.describe actual)]))
+ ["Expected" (//archive.describe expected)]
+ ["Actual" (//archive.describe actual)]))
(do-template [<name>]
[(exception: #export (<name> {message Text})
@@ -51,7 +52,7 @@
(def: #export (cached System<m> root)
(All [m] (-> (System m) File (m (List File))))
(|> root
- (io/archive.archive System<m>)
+ (//io/archive.archive System<m>)
(do> (:: System<m> &monad)
[(:: System<m> files)]
[(monad.map @ (function (recur file)
@@ -63,7 +64,7 @@
[(:: System<m> files)]
[(monad.map @ recur)]
[list.concat
- (list& (maybe.assume (io/archive.module System<m> root file)))
+ (list& (maybe.assume (//io/archive.module System<m> root file)))
wrap]))
(wrap (list))))))]
[list.concat wrap])))
@@ -79,7 +80,7 @@
(def: (un-install System<m> root module)
(All [m] (-> (System m) File Module (m Any)))
- (let [document (io/archive.document System<m> root module)]
+ (let [document (//io/archive.document System<m> root module)]
(|> document
(do> (:: System<m> &monad)
[(:: System<m> files)]
@@ -120,19 +121,19 @@
(All [m d] (-> (System m) (List File) File (Key d) (Format d) Module
(m (Maybe [Dependency (Document d)]))))
(do (:: System<m> &monad)
- [document' (:: System<m> read (io/archive.document System<m> root module))
- [module' source-code] (io/context.read System<m> contexts module)
+ [document' (:: System<m> read (//io/archive.document System<m> root module))
+ [module' source-code] (//io/context.read System<m> contexts module)
#let [current-hash (:: text.hash hash source-code)]]
(case (do error.monad
[[signature descriptor content] (binary.read (..document binary) document')
#let [[document-hash _file references _state] descriptor]
- _ (ex.assert mismatched-signature [module (get@ #archive.signature key) signature]
- (:: archive.equivalence =
- (get@ #archive.signature key)
+ _ (ex.assert mismatched-signature [module (get@ #//archive.signature key) signature]
+ (:: //archive.equivalence =
+ (get@ #//archive.signature key)
signature))
_ (ex.assert stale-document [module current-hash document-hash]
(n/= current-hash document-hash))
- document (archive.write key signature descriptor content)]
+ document (//archive.write key signature descriptor content)]
(wrap [[module references] document]))
(#error.Success [dependency document])
(wrap (#.Some [dependency document]))
diff --git a/stdlib/source/lux/tool/compiler/meta/io/context.lux b/stdlib/source/lux/tool/compiler/meta/io/context.lux
index 6b9ce9ba4..b009fbdc6 100644
--- a/stdlib/source/lux/tool/compiler/meta/io/context.lux
+++ b/stdlib/source/lux/tool/compiler/meta/io/context.lux
@@ -15,11 +15,11 @@
[binary (#+ Binary)]]
[type (#+ :share)]]
["." // (#+ Context Code)
- [//
+ ["#/" // #_
[archive
[descriptor (#+ Module)]]
- ["//." // (#+ Input)
- ["." host]]]])
+ ["#/" // (#+ Input)
+ ["#." host]]]])
(do-template [<name>]
[(exception: #export (<name> {module Module})
@@ -37,15 +37,15 @@
(def: partial-host-extension
Extension
- (`` (for {(~~ (static host.common-lisp)) ".cl"
- (~~ (static host.js)) ".js"
- (~~ (static host.jvm)) ".jvm"
- (~~ (static host.lua)) ".lua"
- (~~ (static host.php)) ".php"
- (~~ (static host.python)) ".py"
- (~~ (static host.r)) ".r"
- (~~ (static host.ruby)) ".rb"
- (~~ (static host.scheme)) ".scm"})))
+ (`` (for {(~~ (static ////host.common-lisp)) ".cl"
+ (~~ (static ////host.js)) ".js"
+ (~~ (static ////host.jvm)) ".jvm"
+ (~~ (static ////host.lua)) ".lua"
+ (~~ (static ////host.php)) ".php"
+ (~~ (static ////host.python)) ".py"
+ (~~ (static ////host.r)) ".r"
+ (~~ (static ////host.ruby)) ".rb"
+ (~~ (static ////host.scheme)) ".scm"})))
(def: full-host-extension
Extension
diff --git a/stdlib/source/lux/tool/compiler/phase/analysis.lux b/stdlib/source/lux/tool/compiler/phase/analysis.lux
index 917ea1632..f12ab301e 100644
--- a/stdlib/source/lux/tool/compiler/phase/analysis.lux
+++ b/stdlib/source/lux/tool/compiler/phase/analysis.lux
@@ -8,18 +8,18 @@
[text
format]]
["." macro]]
- [/
- ["/." type]
- ["/." primitive]
- ["/." structure]
- ["/." reference]
- ["/." case]
- ["/." function]
- ["." //
- ["//." macro (#+ Expander)]
- ["//." extension]
- [//
- ["." reference]
+ ["." / #_
+ ["#." type]
+ ["#." primitive]
+ ["#." structure]
+ ["#." reference]
+ ["#." case]
+ ["#." function]
+ ["#/" //
+ ["#." macro (#+ Expander)]
+ ["#." extension]
+ ["#/" // #_
+ ["#." reference]
["/" analysis (#+ Analysis Operation Phase)]]]])
(exception: #export (unrecognized-syntax {code Code})
@@ -102,7 +102,7 @@
[[functionT functionA] (/type.with-inference
(compile functionC))]
(case functionA
- (#/.Reference (#reference.Constant def-name))
+ (#/.Reference (#///reference.Constant def-name))
(do @
[?macro (//extension.lift (macro.find-macro def-name))]
(case ?macro
diff --git a/stdlib/source/lux/tool/compiler/phase/analysis/case.lux b/stdlib/source/lux/tool/compiler/phase/analysis/case.lux
index 688d04c95..2970364a0 100644
--- a/stdlib/source/lux/tool/compiler/phase/analysis/case.lux
+++ b/stdlib/source/lux/tool/compiler/phase/analysis/case.lux
@@ -15,16 +15,16 @@
["." check]]
["." macro
["." code]]]
- [//
- ["//." scope]
- ["//." type]
- ["//." structure]
- ["/." //
- ["///." extension]
+ ["." // #_
+ ["#." scope]
+ ["#." type]
+ ["#." structure]
+ ["#/" //
+ ["#." extension]
[//
["/" analysis (#+ Pattern Analysis Operation Phase)]]]]
- [/
- ["/." coverage (#+ Coverage)]])
+ ["." / #_
+ ["#." coverage (#+ Coverage)]])
(exception: #export (cannot-match-with-pattern {type Type} {pattern Code})
(ex.report ["Type" (%type type)]
diff --git a/stdlib/source/lux/tool/compiler/phase/analysis/function.lux b/stdlib/source/lux/tool/compiler/phase/analysis/function.lux
index bb75a313b..0438ee4c8 100644
--- a/stdlib/source/lux/tool/compiler/phase/analysis/function.lux
+++ b/stdlib/source/lux/tool/compiler/phase/analysis/function.lux
@@ -12,12 +12,12 @@
["." type
["." check]]
["." macro]]
- [//
- ["//." scope]
- ["//." type]
- ["//." inference]
- ["/." //
- ["///." extension]
+ ["." // #_
+ ["#." scope]
+ ["#." type]
+ ["#." inference]
+ ["#/" //
+ ["#." extension]
[//
["/" analysis (#+ Analysis Operation Phase)]]]])
diff --git a/stdlib/source/lux/tool/compiler/phase/analysis/inference.lux b/stdlib/source/lux/tool/compiler/phase/analysis/inference.lux
index a99b06ac2..3b40b09d2 100644
--- a/stdlib/source/lux/tool/compiler/phase/analysis/inference.lux
+++ b/stdlib/source/lux/tool/compiler/phase/analysis/inference.lux
@@ -12,10 +12,10 @@
["." type
["." check]]
["." macro]]
- [//
- ["//." type]
- ["/." // ("#/." monad)
- ["///." extension]
+ ["." // #_
+ ["#." type]
+ ["#/" // ("#/." monad)
+ ["#." extension]
[//
["/" analysis (#+ Tag Analysis Operation Phase)]]]])
diff --git a/stdlib/source/lux/tool/compiler/phase/analysis/module.lux b/stdlib/source/lux/tool/compiler/phase/analysis/module.lux
index ec9a3d5a0..b2af57b50 100644
--- a/stdlib/source/lux/tool/compiler/phase/analysis/module.lux
+++ b/stdlib/source/lux/tool/compiler/phase/analysis/module.lux
@@ -14,7 +14,7 @@
["." plist]]]]
["." macro]]
["." ///
- ["///." extension]
+ ["#." extension]
[//
["/" analysis (#+ Operation)]]])
diff --git a/stdlib/source/lux/tool/compiler/phase/analysis/primitive.lux b/stdlib/source/lux/tool/compiler/phase/analysis/primitive.lux
index 6e0a591d2..60e3392e6 100644
--- a/stdlib/source/lux/tool/compiler/phase/analysis/primitive.lux
+++ b/stdlib/source/lux/tool/compiler/phase/analysis/primitive.lux
@@ -2,9 +2,9 @@
[lux (#- nat int rev)
[control
monad]]
- [//
- ["//." type]
- ["/." //
+ ["." // #_
+ ["#." type]
+ ["#/" //
[//
["/" analysis (#+ Analysis Operation)]]]])
diff --git a/stdlib/source/lux/tool/compiler/phase/analysis/reference.lux b/stdlib/source/lux/tool/compiler/phase/analysis/reference.lux
index 507441427..dad708219 100644
--- a/stdlib/source/lux/tool/compiler/phase/analysis/reference.lux
+++ b/stdlib/source/lux/tool/compiler/phase/analysis/reference.lux
@@ -7,13 +7,13 @@
[data
["." text ("#/." equivalence)
format]]]
- [//
- ["//." scope]
- ["//." type]
- ["/." //
- ["///." extension]
- [//
- ["." reference]
+ ["." // #_
+ ["#." scope]
+ ["#." type]
+ ["#/" //
+ ["#." extension]
+ ["#/" // #_
+ ["#." reference]
["/" analysis (#+ Analysis Operation)]]]])
(exception: #export (foreign-module-has-not-been-imported {current Text} {foreign Text})
@@ -25,7 +25,7 @@
(def: (definition def-name)
(-> Name (Operation Analysis))
- (with-expansions [<return> (wrap (|> def-name reference.constant #/.Reference))]
+ (with-expansions [<return> (wrap (|> def-name ////reference.constant #/.Reference))]
(do ///.monad
[[actualT def-anns _] (///extension.lift (macro.find-def def-name))]
(case (macro.get-identifier-ann (name-of #.alias) def-anns)
@@ -55,7 +55,7 @@
(#.Some [actualT ref])
(do @
[_ (//type.infer actualT)]
- (wrap (#.Some (|> ref reference.variable #/.Reference))))
+ (wrap (#.Some (|> ref ////reference.variable #/.Reference))))
#.None
(wrap #.None))))
diff --git a/stdlib/source/lux/tool/compiler/phase/analysis/scope.lux b/stdlib/source/lux/tool/compiler/phase/analysis/scope.lux
index a1b46a761..9ad60ebf9 100644
--- a/stdlib/source/lux/tool/compiler/phase/analysis/scope.lux
+++ b/stdlib/source/lux/tool/compiler/phase/analysis/scope.lux
@@ -14,9 +14,9 @@
[dictionary
["." plist]]]]]
["." ///
- ["///." extension]
- [//
- ["////." reference (#+ Register Variable)]
+ ["#." extension]
+ ["#/" // #_
+ ["#." reference (#+ Register Variable)]
["/" analysis (#+ Operation Phase)]]])
(type: Local (Bindings Text [Type Register]))
diff --git a/stdlib/source/lux/tool/compiler/phase/analysis/structure.lux b/stdlib/source/lux/tool/compiler/phase/analysis/structure.lux
index e5a936226..0a6017cdc 100644
--- a/stdlib/source/lux/tool/compiler/phase/analysis/structure.lux
+++ b/stdlib/source/lux/tool/compiler/phase/analysis/structure.lux
@@ -20,12 +20,12 @@
["." check]]
["." macro
["." code]]]
- [//
- ["//." type]
- ["//." primitive]
- ["//." inference]
- ["/." //
- ["///." extension]
+ ["." // #_
+ ["#." type]
+ ["#." primitive]
+ ["#." inference]
+ ["#/" //
+ ["#." extension]
[//
["/" analysis (#+ Tag Analysis Operation Phase)]]]])
diff --git a/stdlib/source/lux/tool/compiler/phase/analysis/type.lux b/stdlib/source/lux/tool/compiler/phase/analysis/type.lux
index ae87615e4..5a7db6516 100644
--- a/stdlib/source/lux/tool/compiler/phase/analysis/type.lux
+++ b/stdlib/source/lux/tool/compiler/phase/analysis/type.lux
@@ -9,7 +9,7 @@
["." check (#+ Check)]]
["." macro]]
["." ///
- ["///." extension]
+ ["#." extension]
[//
["/" analysis (#+ Operation)]]])
diff --git a/stdlib/source/lux/tool/compiler/phase/extension/analysis/common.lux b/stdlib/source/lux/tool/compiler/phase/extension/analysis/common.lux
index ed71847c2..dbe0b10ca 100644
--- a/stdlib/source/lux/tool/compiler/phase/extension/analysis/common.lux
+++ b/stdlib/source/lux/tool/compiler/phase/extension/analysis/common.lux
@@ -13,16 +13,16 @@
["." macro]
[io (#+ IO)]]
["." ///
- ["." bundle]
- ["//." //
+ ["#." bundle]
+ ["#/" //
[analysis
[".A" type]
[".A" case]
[".A" function]]
- [//
+ ["#/" //
[default
[evaluation (#+ Eval)]]
- ["." analysis (#+ Analysis Handler Bundle)]]]])
+ ["#." analysis (#+ Analysis Handler Bundle)]]]])
## [Utils]
(def: (simple inputsT+ outputT)
@@ -38,7 +38,7 @@
(typeA.with-type argT
(analyse argC)))
(list.zip2 inputsT+ args))]
- (wrap (#analysis.Extension extension-name argsA)))
+ (wrap (#/////analysis.Extension extension-name argsA)))
(////.throw ///.incorrect-arity [extension-name num-expected num-actual]))))))
(def: #export (nullary valueT)
@@ -79,7 +79,7 @@
_ (typeA.infer (type (Either Text varT)))
opA (typeA.with-type (type (IO varT))
(analyse opC))]
- (wrap (#analysis.Extension extension-name (list opA))))
+ (wrap (#/////analysis.Extension extension-name (list opA))))
_
(////.throw ///.incorrect-arity [extension-name 1 (list.size args)]))))
@@ -89,7 +89,7 @@
(function (_ extension-name analyse argsC+)
(case argsC+
(^ (list [_ (#.Text module-name)] exprC))
- (analysis.with-current-module module-name
+ (/////analysis.with-current-module module-name
(analyse exprC))
_
@@ -132,85 +132,85 @@
(def: (bundle::lux eval)
(-> Eval Bundle)
- (|> bundle.empty
- (bundle.install "is" lux::is)
- (bundle.install "try" lux::try)
- (bundle.install "check" (lux::check eval))
- (bundle.install "coerce" (lux::coerce eval))
- (bundle.install "check type" lux::check::type)
- (bundle.install "in-module" lux::in-module)))
+ (|> ///bundle.empty
+ (///bundle.install "is" lux::is)
+ (///bundle.install "try" lux::try)
+ (///bundle.install "check" (lux::check eval))
+ (///bundle.install "coerce" (lux::coerce eval))
+ (///bundle.install "check type" lux::check::type)
+ (///bundle.install "in-module" lux::in-module)))
(def: bundle::io
Bundle
- (<| (bundle.prefix "io")
- (|> bundle.empty
- (bundle.install "log" (unary Text Any))
- (bundle.install "error" (unary Text Nothing))
- (bundle.install "exit" (unary Int Nothing))
- (bundle.install "current-time" (nullary Int)))))
+ (<| (///bundle.prefix "io")
+ (|> ///bundle.empty
+ (///bundle.install "log" (unary Text Any))
+ (///bundle.install "error" (unary Text Nothing))
+ (///bundle.install "exit" (unary Int Nothing))
+ (///bundle.install "current-time" (nullary Int)))))
(def: I64* (type (I64 Any)))
(def: bundle::i64
Bundle
- (<| (bundle.prefix "i64")
- (|> bundle.empty
- (bundle.install "and" (binary I64* I64* I64))
- (bundle.install "or" (binary I64* I64* I64))
- (bundle.install "xor" (binary I64* I64* I64))
- (bundle.install "left-shift" (binary Nat I64* I64))
- (bundle.install "logical-right-shift" (binary Nat I64* I64))
- (bundle.install "arithmetic-right-shift" (binary Nat I64* I64))
- (bundle.install "+" (binary I64* I64* I64))
- (bundle.install "-" (binary I64* I64* I64))
- (bundle.install "=" (binary I64* I64* Bit)))))
+ (<| (///bundle.prefix "i64")
+ (|> ///bundle.empty
+ (///bundle.install "and" (binary I64* I64* I64))
+ (///bundle.install "or" (binary I64* I64* I64))
+ (///bundle.install "xor" (binary I64* I64* I64))
+ (///bundle.install "left-shift" (binary Nat I64* I64))
+ (///bundle.install "logical-right-shift" (binary Nat I64* I64))
+ (///bundle.install "arithmetic-right-shift" (binary Nat I64* I64))
+ (///bundle.install "+" (binary I64* I64* I64))
+ (///bundle.install "-" (binary I64* I64* I64))
+ (///bundle.install "=" (binary I64* I64* Bit)))))
(def: bundle::int
Bundle
- (<| (bundle.prefix "int")
- (|> bundle.empty
- (bundle.install "*" (binary Int Int Int))
- (bundle.install "/" (binary Int Int Int))
- (bundle.install "%" (binary Int Int Int))
- (bundle.install "<" (binary Int Int Bit))
- (bundle.install "frac" (unary Int Frac))
- (bundle.install "char" (unary Int Text)))))
+ (<| (///bundle.prefix "int")
+ (|> ///bundle.empty
+ (///bundle.install "*" (binary Int Int Int))
+ (///bundle.install "/" (binary Int Int Int))
+ (///bundle.install "%" (binary Int Int Int))
+ (///bundle.install "<" (binary Int Int Bit))
+ (///bundle.install "frac" (unary Int Frac))
+ (///bundle.install "char" (unary Int Text)))))
(def: bundle::frac
Bundle
- (<| (bundle.prefix "frac")
- (|> bundle.empty
- (bundle.install "+" (binary Frac Frac Frac))
- (bundle.install "-" (binary Frac Frac Frac))
- (bundle.install "*" (binary Frac Frac Frac))
- (bundle.install "/" (binary Frac Frac Frac))
- (bundle.install "%" (binary Frac Frac Frac))
- (bundle.install "=" (binary Frac Frac Bit))
- (bundle.install "<" (binary Frac Frac Bit))
- (bundle.install "smallest" (nullary Frac))
- (bundle.install "min" (nullary Frac))
- (bundle.install "max" (nullary Frac))
- (bundle.install "int" (unary Frac Int))
- (bundle.install "encode" (unary Frac Text))
- (bundle.install "decode" (unary Text (type (Maybe Frac)))))))
+ (<| (///bundle.prefix "frac")
+ (|> ///bundle.empty
+ (///bundle.install "+" (binary Frac Frac Frac))
+ (///bundle.install "-" (binary Frac Frac Frac))
+ (///bundle.install "*" (binary Frac Frac Frac))
+ (///bundle.install "/" (binary Frac Frac Frac))
+ (///bundle.install "%" (binary Frac Frac Frac))
+ (///bundle.install "=" (binary Frac Frac Bit))
+ (///bundle.install "<" (binary Frac Frac Bit))
+ (///bundle.install "smallest" (nullary Frac))
+ (///bundle.install "min" (nullary Frac))
+ (///bundle.install "max" (nullary Frac))
+ (///bundle.install "int" (unary Frac Int))
+ (///bundle.install "encode" (unary Frac Text))
+ (///bundle.install "decode" (unary Text (type (Maybe Frac)))))))
(def: bundle::text
Bundle
- (<| (bundle.prefix "text")
- (|> bundle.empty
- (bundle.install "=" (binary Text Text Bit))
- (bundle.install "<" (binary Text Text Bit))
- (bundle.install "concat" (binary Text Text Text))
- (bundle.install "index" (trinary Text Text Nat (type (Maybe Nat))))
- (bundle.install "size" (unary Text Nat))
- (bundle.install "char" (binary Text Nat Nat))
- (bundle.install "clip" (trinary Text Nat Nat Text))
+ (<| (///bundle.prefix "text")
+ (|> ///bundle.empty
+ (///bundle.install "=" (binary Text Text Bit))
+ (///bundle.install "<" (binary Text Text Bit))
+ (///bundle.install "concat" (binary Text Text Text))
+ (///bundle.install "index" (trinary Text Text Nat (type (Maybe Nat))))
+ (///bundle.install "size" (unary Text Nat))
+ (///bundle.install "char" (binary Text Nat Nat))
+ (///bundle.install "clip" (trinary Text Nat Nat Text))
)))
(def: #export (bundle eval)
(-> Eval Bundle)
- (<| (bundle.prefix "lux")
- (|> bundle.empty
+ (<| (///bundle.prefix "lux")
+ (|> ///bundle.empty
(dictionary.merge (bundle::lux eval))
(dictionary.merge bundle::i64)
(dictionary.merge bundle::int)
diff --git a/stdlib/source/lux/tool/compiler/phase/extension/analysis/host.jvm.lux b/stdlib/source/lux/tool/compiler/phase/extension/analysis/host.jvm.lux
index 7edc13cbd..6b1e6ed5b 100644
--- a/stdlib/source/lux/tool/compiler/phase/extension/analysis/host.jvm.lux
+++ b/stdlib/source/lux/tool/compiler/phase/extension/analysis/host.jvm.lux
@@ -20,16 +20,16 @@
["." macro
["s" syntax]]
["." host (#+ import:)]]
- [//
- ["." common]
- ["/." //
- ["." bundle]
- ["//." // ("#/." monad)
+ ["." // #_
+ ["#." common]
+ ["#/" //
+ ["#." bundle]
+ ["#/" // ("#/." monad)
[analysis
[".A" type]
[".A" inference]]
- [//
- ["." analysis (#+ Analysis Operation Handler Bundle)]]]]])
+ ["#/" // #_
+ ["#." analysis (#+ Analysis Operation Handler Bundle)]]]]])
(type: Method-Signature
{#method Type
@@ -130,51 +130,51 @@
(def: bundle::conversion
Bundle
- (<| (bundle.prefix "convert")
- (|> bundle.empty
- (bundle.install "double-to-float" (common.unary Double Float))
- (bundle.install "double-to-int" (common.unary Double Integer))
- (bundle.install "double-to-long" (common.unary Double Long))
- (bundle.install "float-to-double" (common.unary Float Double))
- (bundle.install "float-to-int" (common.unary Float Integer))
- (bundle.install "float-to-long" (common.unary Float Long))
- (bundle.install "int-to-byte" (common.unary Integer Byte))
- (bundle.install "int-to-char" (common.unary Integer Character))
- (bundle.install "int-to-double" (common.unary Integer Double))
- (bundle.install "int-to-float" (common.unary Integer Float))
- (bundle.install "int-to-long" (common.unary Integer Long))
- (bundle.install "int-to-short" (common.unary Integer Short))
- (bundle.install "long-to-double" (common.unary Long Double))
- (bundle.install "long-to-float" (common.unary Long Float))
- (bundle.install "long-to-int" (common.unary Long Integer))
- (bundle.install "long-to-short" (common.unary Long Short))
- (bundle.install "long-to-byte" (common.unary Long Byte))
- (bundle.install "char-to-byte" (common.unary Character Byte))
- (bundle.install "char-to-short" (common.unary Character Short))
- (bundle.install "char-to-int" (common.unary Character Integer))
- (bundle.install "char-to-long" (common.unary Character Long))
- (bundle.install "byte-to-long" (common.unary Byte Long))
- (bundle.install "short-to-long" (common.unary Short Long))
+ (<| (///bundle.prefix "convert")
+ (|> ///bundle.empty
+ (///bundle.install "double-to-float" (//common.unary Double Float))
+ (///bundle.install "double-to-int" (//common.unary Double Integer))
+ (///bundle.install "double-to-long" (//common.unary Double Long))
+ (///bundle.install "float-to-double" (//common.unary Float Double))
+ (///bundle.install "float-to-int" (//common.unary Float Integer))
+ (///bundle.install "float-to-long" (//common.unary Float Long))
+ (///bundle.install "int-to-byte" (//common.unary Integer Byte))
+ (///bundle.install "int-to-char" (//common.unary Integer Character))
+ (///bundle.install "int-to-double" (//common.unary Integer Double))
+ (///bundle.install "int-to-float" (//common.unary Integer Float))
+ (///bundle.install "int-to-long" (//common.unary Integer Long))
+ (///bundle.install "int-to-short" (//common.unary Integer Short))
+ (///bundle.install "long-to-double" (//common.unary Long Double))
+ (///bundle.install "long-to-float" (//common.unary Long Float))
+ (///bundle.install "long-to-int" (//common.unary Long Integer))
+ (///bundle.install "long-to-short" (//common.unary Long Short))
+ (///bundle.install "long-to-byte" (//common.unary Long Byte))
+ (///bundle.install "char-to-byte" (//common.unary Character Byte))
+ (///bundle.install "char-to-short" (//common.unary Character Short))
+ (///bundle.install "char-to-int" (//common.unary Character Integer))
+ (///bundle.install "char-to-long" (//common.unary Character Long))
+ (///bundle.install "byte-to-long" (//common.unary Byte Long))
+ (///bundle.install "short-to-long" (//common.unary Short Long))
)))
(do-template [<name> <prefix> <type>]
[(def: <name>
Bundle
- (<| (bundle.prefix <prefix>)
- (|> bundle.empty
- (bundle.install "+" (common.binary <type> <type> <type>))
- (bundle.install "-" (common.binary <type> <type> <type>))
- (bundle.install "*" (common.binary <type> <type> <type>))
- (bundle.install "/" (common.binary <type> <type> <type>))
- (bundle.install "%" (common.binary <type> <type> <type>))
- (bundle.install "=" (common.binary <type> <type> Bit))
- (bundle.install "<" (common.binary <type> <type> Bit))
- (bundle.install "and" (common.binary <type> <type> <type>))
- (bundle.install "or" (common.binary <type> <type> <type>))
- (bundle.install "xor" (common.binary <type> <type> <type>))
- (bundle.install "shl" (common.binary <type> Integer <type>))
- (bundle.install "shr" (common.binary <type> Integer <type>))
- (bundle.install "ushr" (common.binary <type> Integer <type>))
+ (<| (///bundle.prefix <prefix>)
+ (|> ///bundle.empty
+ (///bundle.install "+" (//common.binary <type> <type> <type>))
+ (///bundle.install "-" (//common.binary <type> <type> <type>))
+ (///bundle.install "*" (//common.binary <type> <type> <type>))
+ (///bundle.install "/" (//common.binary <type> <type> <type>))
+ (///bundle.install "%" (//common.binary <type> <type> <type>))
+ (///bundle.install "=" (//common.binary <type> <type> Bit))
+ (///bundle.install "<" (//common.binary <type> <type> Bit))
+ (///bundle.install "and" (//common.binary <type> <type> <type>))
+ (///bundle.install "or" (//common.binary <type> <type> <type>))
+ (///bundle.install "xor" (//common.binary <type> <type> <type>))
+ (///bundle.install "shl" (//common.binary <type> Integer <type>))
+ (///bundle.install "shr" (//common.binary <type> Integer <type>))
+ (///bundle.install "ushr" (//common.binary <type> Integer <type>))
)))]
[bundle::int "int" Integer]
@@ -184,15 +184,15 @@
(do-template [<name> <prefix> <type>]
[(def: <name>
Bundle
- (<| (bundle.prefix <prefix>)
- (|> bundle.empty
- (bundle.install "+" (common.binary <type> <type> <type>))
- (bundle.install "-" (common.binary <type> <type> <type>))
- (bundle.install "*" (common.binary <type> <type> <type>))
- (bundle.install "/" (common.binary <type> <type> <type>))
- (bundle.install "%" (common.binary <type> <type> <type>))
- (bundle.install "=" (common.binary <type> <type> Bit))
- (bundle.install "<" (common.binary <type> <type> Bit))
+ (<| (///bundle.prefix <prefix>)
+ (|> ///bundle.empty
+ (///bundle.install "+" (//common.binary <type> <type> <type>))
+ (///bundle.install "-" (//common.binary <type> <type> <type>))
+ (///bundle.install "*" (//common.binary <type> <type> <type>))
+ (///bundle.install "/" (//common.binary <type> <type> <type>))
+ (///bundle.install "%" (//common.binary <type> <type> <type>))
+ (///bundle.install "=" (//common.binary <type> <type> Bit))
+ (///bundle.install "<" (//common.binary <type> <type> Bit))
)))]
[bundle::float "float" Float]
@@ -201,10 +201,10 @@
(def: bundle::char
Bundle
- (<| (bundle.prefix "char")
- (|> bundle.empty
- (bundle.install "=" (common.binary Character Character Bit))
- (bundle.install "<" (common.binary Character Character Bit))
+ (<| (///bundle.prefix "char")
+ (|> ///bundle.empty
+ (///bundle.install "=" (//common.binary Character Character Bit))
+ (///bundle.install "<" (//common.binary Character Character Bit))
)))
(def: #export boxes
@@ -229,7 +229,7 @@
[var-id varT] (typeA.with-env check.var)
arrayA (typeA.with-type (type (Array varT))
(analyse arrayC))]
- (wrap (#analysis.Extension extension-name (list arrayA))))
+ (wrap (#/////analysis.Extension extension-name (list arrayA))))
_
(////.throw ///.incorrect-arity [extension-name 1 (list.size args)]))))
@@ -266,9 +266,9 @@
_ (if (n/> 0 level)
(wrap [])
(////.throw non-array expectedT))]
- (wrap (#analysis.Extension extension-name (list (analysis.nat (dec level))
- (analysis.text elem-class)
- lengthA))))
+ (wrap (#/////analysis.Extension extension-name (list (/////analysis.nat (dec level))
+ (/////analysis.text elem-class)
+ lengthA))))
_
(////.throw ///.incorrect-arity [extension-name 1 (list.size args)]))))
@@ -342,7 +342,7 @@
[elemT elem-class] (box-array-element-type (maybe.default varT ?elemT))
idxA (typeA.with-type Nat
(analyse idxC))]
- (wrap (#analysis.Extension extension-name (list (analysis.text elem-class) idxA arrayA))))
+ (wrap (#/////analysis.Extension extension-name (list (/////analysis.text elem-class) idxA arrayA))))
_
(////.throw ///.incorrect-arity [extension-name 2 (list.size args)]))))
@@ -364,19 +364,19 @@
(analyse idxC))
valueA (typeA.with-type valueT
(analyse valueC))]
- (wrap (#analysis.Extension extension-name (list (analysis.text elem-class) idxA valueA arrayA))))
+ (wrap (#/////analysis.Extension extension-name (list (/////analysis.text elem-class) idxA valueA arrayA))))
_
(////.throw ///.incorrect-arity [extension-name 3 (list.size args)]))))
(def: bundle::array
Bundle
- (<| (bundle.prefix "array")
- (|> bundle.empty
- (bundle.install "length" array::length)
- (bundle.install "new" array::new)
- (bundle.install "read" array::read)
- (bundle.install "write" array::write)
+ (<| (///bundle.prefix "array")
+ (|> ///bundle.empty
+ (///bundle.install "length" array::length)
+ (///bundle.install "new" array::new)
+ (///bundle.install "read" array::read)
+ (///bundle.install "write" array::write)
)))
(def: object::null
@@ -387,7 +387,7 @@
(do ////.monad
[expectedT (///.lift macro.expected-type)
_ (check-object expectedT)]
- (wrap (#analysis.Extension extension-name (list))))
+ (wrap (#/////analysis.Extension extension-name (list))))
_
(////.throw ///.incorrect-arity [extension-name 0 (list.size args)]))))
@@ -402,7 +402,7 @@
[objectT objectA] (typeA.with-inference
(analyse objectC))
_ (check-object objectT)]
- (wrap (#analysis.Extension extension-name (list objectA))))
+ (wrap (#/////analysis.Extension extension-name (list objectA))))
_
(////.throw ///.incorrect-arity [extension-name 1 (list.size args)]))))
@@ -417,7 +417,7 @@
(analyse monitorC))
_ (check-object monitorT)
exprA (analyse exprC)]
- (wrap (#analysis.Extension extension-name (list monitorA exprA))))
+ (wrap (#/////analysis.Extension extension-name (list monitorA exprA))))
_
(////.throw ///.incorrect-arity [extension-name 2 (list.size args)]))))
@@ -514,7 +514,7 @@
(if ?
(wrap [])
(////.throw non-throwable exception-class)))]
- (wrap (#analysis.Extension extension-name (list exceptionA))))
+ (wrap (#/////analysis.Extension extension-name (list exceptionA))))
_
(////.throw ///.incorrect-arity [extension-name 1 (list.size args)]))))
@@ -529,7 +529,7 @@
(do ////.monad
[_ (typeA.infer (#.Primitive "java.lang.Class" (list (#.Primitive class (list)))))
_ (load-class class)]
- (wrap (#analysis.Extension extension-name (list (analysis.text class)))))
+ (wrap (#/////analysis.Extension extension-name (list (/////analysis.text class)))))
_
(////.throw ///.invalid-syntax extension-name))
@@ -551,7 +551,7 @@
object-class (check-object objectT)
? (sub-class? class object-class)]
(if ?
- (wrap (#analysis.Extension extension-name (list (analysis.text class))))
+ (wrap (#/////analysis.Extension extension-name (list (/////analysis.text class))))
(////.throw cannot-possibly-be-an-instance (format object-class " !<= " class))))
_
@@ -747,9 +747,9 @@
" For value: " (%code valueC) text.new-line)))
))))))]
(if can-cast?
- (wrap (#analysis.Extension extension-name (list (analysis.text from-name)
- (analysis.text to-name)
- valueA)))
+ (wrap (#/////analysis.Extension extension-name (list (/////analysis.text from-name)
+ (/////analysis.text to-name)
+ valueA)))
(////.throw cannot-cast (format "From class/primitive: " from-name text.new-line
" To class/primitive: " to-name text.new-line
" For value: " (%code valueC) text.new-line))))
@@ -759,15 +759,15 @@
(def: bundle::object
Bundle
- (<| (bundle.prefix "object")
- (|> bundle.empty
- (bundle.install "null" object::null)
- (bundle.install "null?" object::null?)
- (bundle.install "synchronized" object::synchronized)
- (bundle.install "throw" object::throw)
- (bundle.install "class" object::class)
- (bundle.install "instance?" object::instance?)
- (bundle.install "cast" object::cast)
+ (<| (///bundle.prefix "object")
+ (|> ///bundle.empty
+ (///bundle.install "null" object::null)
+ (///bundle.install "null?" object::null?)
+ (///bundle.install "synchronized" object::synchronized)
+ (///bundle.install "throw" object::throw)
+ (///bundle.install "class" object::class)
+ (///bundle.install "instance?" object::instance?)
+ (///bundle.install "cast" object::cast)
)))
(def: (find-field class-name field-name)
@@ -841,7 +841,7 @@
[[_ (#.Text class)] [_ (#.Text field)]]
(do ////.monad
[[fieldT final?] (static-field class field)]
- (wrap (#analysis.Extension extension-name (list (analysis.text class) (analysis.text field)))))
+ (wrap (#/////analysis.Extension extension-name (list (/////analysis.text class) (/////analysis.text field)))))
_
(////.throw ///.invalid-syntax extension-name))
@@ -863,7 +863,7 @@
(not final?))
valueA (typeA.with-type fieldT
(analyse valueC))]
- (wrap (#analysis.Extension extension-name (list (analysis.text class) (analysis.text field) valueA))))
+ (wrap (#/////analysis.Extension extension-name (list (/////analysis.text class) (/////analysis.text field) valueA))))
_
(////.throw ///.invalid-syntax extension-name))
@@ -882,7 +882,7 @@
[[objectT objectA] (typeA.with-inference
(analyse objectC))
[fieldT final?] (virtual-field class field objectT)]
- (wrap (#analysis.Extension extension-name (list (analysis.text class) (analysis.text field) objectA))))
+ (wrap (#/////analysis.Extension extension-name (list (/////analysis.text class) (/////analysis.text field) objectA))))
_
(////.throw ///.invalid-syntax extension-name))
@@ -906,7 +906,7 @@
(not final?))
valueA (typeA.with-type fieldT
(analyse valueC))]
- (wrap (#analysis.Extension extension-name (list (analysis.text class) (analysis.text field) valueA objectA))))
+ (wrap (#/////analysis.Extension extension-name (list (/////analysis.text class) (/////analysis.text field) valueA objectA))))
_
(////.throw ///.invalid-syntax extension-name))
@@ -1165,9 +1165,9 @@
(def: (decorate-inputs typesT inputsA)
(-> (List Text) (List Analysis) (List Analysis))
(|> inputsA
- (list.zip2 (list/map analysis.text typesT))
+ (list.zip2 (list/map /////analysis.text typesT))
(list/map (function (_ [type value])
- (analysis.tuple (list type value))))))
+ (/////analysis.tuple (list type value))))))
(def: invoke::static
Handler
@@ -1180,8 +1180,8 @@
[methodT exceptionsT] (method-candidate class method #Static argsT)
[outputT argsA] (inferenceA.general analyse methodT (list/map product.right argsTC))
outputJC (check-jvm outputT)]
- (wrap (#analysis.Extension extension-name (list& (analysis.text class) (analysis.text method)
- (analysis.text outputJC) (decorate-inputs argsT argsA)))))
+ (wrap (#/////analysis.Extension extension-name (list& (/////analysis.text class) (/////analysis.text method)
+ (/////analysis.text outputJC) (decorate-inputs argsT argsA)))))
_
(////.throw ///.invalid-syntax extension-name))))
@@ -1203,8 +1203,8 @@
_
(undefined))]
outputJC (check-jvm outputT)]
- (wrap (#analysis.Extension extension-name (list& (analysis.text class) (analysis.text method)
- (analysis.text outputJC) objectA (decorate-inputs argsT argsA)))))
+ (wrap (#/////analysis.Extension extension-name (list& (/////analysis.text class) (/////analysis.text method)
+ (/////analysis.text outputJC) objectA (decorate-inputs argsT argsA)))))
_
(////.throw ///.invalid-syntax extension-name))))
@@ -1220,8 +1220,8 @@
[methodT exceptionsT] (method-candidate class method #Special argsT)
[outputT argsA] (inferenceA.general analyse methodT (list& objectC (list/map product.right argsTC)))
outputJC (check-jvm outputT)]
- (wrap (#analysis.Extension extension-name (list& (analysis.text class) (analysis.text method)
- (analysis.text outputJC) (decorate-inputs argsT argsA)))))
+ (wrap (#/////analysis.Extension extension-name (list& (/////analysis.text class) (/////analysis.text method)
+ (/////analysis.text outputJC) (decorate-inputs argsT argsA)))))
_
(////.throw ///.invalid-syntax extension-name))))
@@ -1240,9 +1240,9 @@
[methodT exceptionsT] (method-candidate class-name method #Interface argsT)
[outputT argsA] (inferenceA.general analyse methodT (list& objectC (list/map product.right argsTC)))
outputJC (check-jvm outputT)]
- (wrap (#analysis.Extension extension-name
- (list& (analysis.text class-name) (analysis.text method) (analysis.text outputJC)
- (decorate-inputs argsT argsA)))))
+ (wrap (#/////analysis.Extension extension-name
+ (list& (/////analysis.text class-name) (/////analysis.text method) (/////analysis.text outputJC)
+ (decorate-inputs argsT argsA)))))
_
(////.throw ///.invalid-syntax extension-name))))
@@ -1257,37 +1257,37 @@
[#let [argsT (list/map product.left argsTC)]
[methodT exceptionsT] (constructor-candidate class argsT)
[outputT argsA] (inferenceA.general analyse methodT (list/map product.right argsTC))]
- (wrap (#analysis.Extension extension-name (list& (analysis.text class) (decorate-inputs argsT argsA)))))
+ (wrap (#/////analysis.Extension extension-name (list& (/////analysis.text class) (decorate-inputs argsT argsA)))))
_
(////.throw ///.invalid-syntax extension-name))))
(def: bundle::member
Bundle
- (<| (bundle.prefix "member")
- (|> bundle.empty
- (dictionary.merge (<| (bundle.prefix "static")
- (|> bundle.empty
- (bundle.install "get" static::get)
- (bundle.install "put" static::put))))
- (dictionary.merge (<| (bundle.prefix "virtual")
- (|> bundle.empty
- (bundle.install "get" virtual::get)
- (bundle.install "put" virtual::put))))
- (dictionary.merge (<| (bundle.prefix "invoke")
- (|> bundle.empty
- (bundle.install "static" invoke::static)
- (bundle.install "virtual" invoke::virtual)
- (bundle.install "special" invoke::special)
- (bundle.install "interface" invoke::interface)
- (bundle.install "constructor" invoke::constructor)
+ (<| (///bundle.prefix "member")
+ (|> ///bundle.empty
+ (dictionary.merge (<| (///bundle.prefix "static")
+ (|> ///bundle.empty
+ (///bundle.install "get" static::get)
+ (///bundle.install "put" static::put))))
+ (dictionary.merge (<| (///bundle.prefix "virtual")
+ (|> ///bundle.empty
+ (///bundle.install "get" virtual::get)
+ (///bundle.install "put" virtual::put))))
+ (dictionary.merge (<| (///bundle.prefix "invoke")
+ (|> ///bundle.empty
+ (///bundle.install "static" invoke::static)
+ (///bundle.install "virtual" invoke::virtual)
+ (///bundle.install "special" invoke::special)
+ (///bundle.install "interface" invoke::interface)
+ (///bundle.install "constructor" invoke::constructor)
)))
)))
(def: #export bundle
Bundle
- (<| (bundle.prefix "jvm")
- (|> bundle.empty
+ (<| (///bundle.prefix "jvm")
+ (|> ///bundle.empty
(dictionary.merge bundle::conversion)
(dictionary.merge bundle::int)
(dictionary.merge bundle::long)
diff --git a/stdlib/source/lux/tool/compiler/phase/extension/statement.lux b/stdlib/source/lux/tool/compiler/phase/extension/statement.lux
index 83e7320d8..5c957aab1 100644
--- a/stdlib/source/lux/tool/compiler/phase/extension/statement.lux
+++ b/stdlib/source/lux/tool/compiler/phase/extension/statement.lux
@@ -13,30 +13,30 @@
[type (#+ :share :by-example)
["." check]]]
["." //
- ["." bundle]
- ["/." //
+ ["#." bundle]
+ ["#/" //
[analysis
["." module]
["." type]]
- ["." generation]
- [//
- ["." analysis]
- ["." synthesis (#+ Synthesis)]
- ["." statement (#+ Operation Handler Bundle)]]]])
+ ["#." generation]
+ ["#/" // #_
+ ["#." analysis]
+ ["#." synthesis (#+ Synthesis)]
+ ["#." statement (#+ Operation Handler Bundle)]]]])
## TODO: Inline "evaluate!'" into "evaluate!" ASAP
(def: (evaluate!' generate code//type codeS)
(All [anchor expression statement]
- (-> (generation.Phase anchor expression statement)
+ (-> (///generation.Phase anchor expression statement)
Type
Synthesis
(Operation anchor expression statement [Type expression Any])))
- (statement.lift-generation
- (generation.with-buffer
+ (////statement.lift-generation
+ (///generation.with-buffer
(do ///.monad
[codeT (generate codeS)
- count generation.next
- codeV (generation.evaluate! (format "evaluate" (%n count)) codeT)]
+ count ///generation.next
+ codeV (///generation.evaluate! (format "evaluate" (%n count)) codeT)]
(wrap [code//type codeT codeV])))))
(def: (evaluate! type codeC)
@@ -44,33 +44,33 @@
(-> Type Code (Operation anchor expression statement [Type expression Any])))
(do ///.monad
[state (//.lift ///.get-state)
- #let [analyse (get@ [#statement.analysis #statement.phase] state)
- synthesize (get@ [#statement.synthesis #statement.phase] state)
- generate (get@ [#statement.generation #statement.phase] state)]
- [_ code//type codeA] (statement.lift-analysis
- (analysis.with-scope
+ #let [analyse (get@ [#////statement.analysis #////statement.phase] state)
+ synthesize (get@ [#////statement.synthesis #////statement.phase] state)
+ generate (get@ [#////statement.generation #////statement.phase] state)]
+ [_ code//type codeA] (////statement.lift-analysis
+ (////analysis.with-scope
(type.with-fresh-env
(type.with-type type
(do @
[codeA (analyse codeC)]
(wrap [type codeA]))))))
- codeS (statement.lift-synthesis
+ codeS (////statement.lift-synthesis
(synthesize codeA))]
(evaluate!' generate code//type codeS)))
## TODO: Inline "definition'" into "definition" ASAP
(def: (definition' generate name code//type codeS)
(All [anchor expression statement]
- (-> (generation.Phase anchor expression statement)
+ (-> (///generation.Phase anchor expression statement)
Name
Type
Synthesis
(Operation anchor expression statement [Type expression Text Any])))
- (statement.lift-generation
- (generation.with-buffer
+ (////statement.lift-generation
+ (///generation.with-buffer
(do ///.monad
[codeT (generate codeS)
- codeN+V (generation.define! name codeT)]
+ codeN+V (///generation.define! name codeT)]
(wrap [code//type codeT codeN+V])))))
(def: (definition name ?type codeC)
@@ -79,11 +79,11 @@
(Operation anchor expression statement [Type expression Text Any])))
(do ///.monad
[state (//.lift ///.get-state)
- #let [analyse (get@ [#statement.analysis #statement.phase] state)
- synthesize (get@ [#statement.synthesis #statement.phase] state)
- generate (get@ [#statement.generation #statement.phase] state)]
- [_ code//type codeA] (statement.lift-analysis
- (analysis.with-scope
+ #let [analyse (get@ [#////statement.analysis #////statement.phase] state)
+ synthesize (get@ [#////statement.synthesis #////statement.phase] state)
+ generate (get@ [#////statement.generation #////statement.phase] state)]
+ [_ code//type codeA] (////statement.lift-analysis
+ (////analysis.with-scope
(type.with-fresh-env
(case ?type
(#.Some type)
@@ -98,7 +98,7 @@
code//type (type.with-env
(check.clean code//type))]
(wrap [code//type codeA]))))))
- codeS (statement.lift-synthesis
+ codeS (////statement.lift-synthesis
(synthesize codeA))]
(definition' generate name code//type codeS)))
@@ -106,7 +106,7 @@
(All [anchor expression statement]
(-> Text Type Code Any
(Operation anchor expression statement Any)))
- (statement.lift-analysis
+ (////statement.lift-analysis
(do ///.monad
[_ (module.define short-name [type annotations value])]
(if (macro.type? annotations)
@@ -124,7 +124,7 @@
(case inputsC+
(^ (list [_ (#.Identifier ["" short-name])] valueC annotationsC))
(do ///.monad
- [current-module (statement.lift-analysis
+ [current-module (////statement.lift-analysis
(//.lift macro.current-module-name))
#let [full-name [current-module short-name]]
[_ annotationsT annotationsV] (evaluate! Code annotationsC)
@@ -136,14 +136,14 @@
valueC)
_ (..define short-name value//type annotationsV valueV)
#let [_ (log! (format "Definition " (%name full-name)))]]
- (statement.lift-generation
- (generation.learn full-name valueN)))
+ (////statement.lift-generation
+ (///generation.learn full-name valueN)))
_
(///.throw //.invalid-syntax [extension-name]))))
(def: (alias! alias def-name)
- (-> Text Name (analysis.Operation Any))
+ (-> Text Name (////analysis.Operation Any))
(do ///.monad
[definition (//.lift (macro.find-def def-name))]
(module.define alias definition)))
@@ -155,7 +155,7 @@
(^ (list annotationsC))
(do ///.monad
[[_ annotationsT annotationsV] (evaluate! Code annotationsC)
- _ (statement.lift-analysis
+ _ (////statement.lift-analysis
(module.set-annotations (:coerce Code annotationsV)))]
(wrap []))
@@ -168,8 +168,8 @@
(case inputsC+
(^ (list [_ (#.Identifier ["" alias])] [_ (#.Identifier def-name)]))
(//.lift
- (///.sub [(get@ [#statement.analysis #statement.state])
- (set@ [#statement.analysis #statement.state])]
+ (///.sub [(get@ [#////statement.analysis #////statement.state])
+ (set@ [#////statement.analysis #////statement.state])]
(alias! alias def-name)))
_
@@ -199,16 +199,16 @@
_
(///.throw //.invalid-syntax [extension-name]))))]
- [def::analysis analysis.Handler statement.lift-analysis]
- [def::synthesis synthesis.Handler statement.lift-synthesis]
- [def::generation (generation.Handler anchor expression statement) statement.lift-generation]
- [def::statement (statement.Handler anchor expression statement) (<|)]
+ [def::analysis ////analysis.Handler ////statement.lift-analysis]
+ [def::synthesis ////synthesis.Handler ////statement.lift-synthesis]
+ [def::generation (///generation.Handler anchor expression statement) ////statement.lift-generation]
+ [def::statement (////statement.Handler anchor expression statement) (<|)]
)
(def: bundle::def
Bundle
- (<| (bundle.prefix "def")
- (|> bundle.empty
+ (<| (//bundle.prefix "def")
+ (|> //bundle.empty
(dictionary.put "module" def::module)
(dictionary.put "alias" def::alias)
(dictionary.put "analysis" def::analysis)
@@ -219,7 +219,7 @@
(def: #export bundle
Bundle
- (<| (bundle.prefix "lux")
- (|> bundle.empty
+ (<| (//bundle.prefix "lux")
+ (|> //bundle.empty
(dictionary.put "def" lux::def)
(dictionary.merge ..bundle::def))))
diff --git a/stdlib/source/lux/tool/compiler/phase/generation/js/case.lux b/stdlib/source/lux/tool/compiler/phase/generation/js/case.lux
index 11869fa7b..8dba99feb 100644
--- a/stdlib/source/lux/tool/compiler/phase/generation/js/case.lux
+++ b/stdlib/source/lux/tool/compiler/phase/generation/js/case.lux
@@ -11,19 +11,19 @@
["." list ("#/." functor fold)]]]
[host
["_" js (#+ Expression Computation Var Statement)]]]
- [//
- ["//." runtime (#+ Operation Phase)]
- ["//." reference]
- ["//." primitive]
- [//
- ["." reference]
- ["//." // ("#/." monad)
- [//
+ ["." // #_
+ ["#." runtime (#+ Operation Phase)]
+ ["#." reference]
+ ["#." primitive]
+ ["#/" // #_
+ ["#." reference]
+ ["#/" // ("#/." monad)
+ ["#/" // #_
[reference (#+ Register)]
- ["." synthesis (#+ Synthesis Path)]]]]])
+ ["#." synthesis (#+ Synthesis Path)]]]]])
(def: #export register
- (reference.local _.var))
+ (///reference.local _.var))
(def: #export (let generate [valueS register bodyS])
(-> Phase [Synthesis Register Synthesis]
@@ -101,8 +101,8 @@
(def: (count-pops path)
(-> Path [Nat Path])
(.case path
- (^ ($_ synthesis.path/seq
- #synthesis.Pop
+ (^ ($_ /////synthesis.path/seq
+ #/////synthesis.Pop
path'))
(.let [[pops post-pops] (count-pops path')]
[(inc pops) post-pops])
@@ -121,25 +121,25 @@
(def: (pattern-matching' generate pathP)
(-> Phase Path (Operation Statement))
(.case pathP
- (^ (synthesis.path/then bodyS))
+ (^ (/////synthesis.path/then bodyS))
(do ////.monad
[body! (generate bodyS)]
(wrap (_.return body!)))
- #synthesis.Pop
+ #/////synthesis.Pop
(/////wrap pop-cursor!)
- (#synthesis.Bind register)
+ (#/////synthesis.Bind register)
(/////wrap (_.define (..register register) ..peek-cursor))
(^template [<tag> <format> <=>]
(^ (<tag> value))
(/////wrap (_.when (|> value <format> (<=> ..peek-cursor) _.not)
fail-pm!)))
- ([synthesis.path/bit //primitive.bit _.=]
- [synthesis.path/i64 (<| //primitive.i64 .int) //runtime.i64//=]
- [synthesis.path/f64 //primitive.f64 _.=]
- [synthesis.path/text //primitive.text _.=])
+ ([/////synthesis.path/bit //primitive.bit _.=]
+ [/////synthesis.path/i64 (<| //primitive.i64 .int) //runtime.i64//=]
+ [/////synthesis.path/f64 //primitive.f64 _.=]
+ [/////synthesis.path/text //primitive.text _.=])
(^template [<pm> <flag> <prep>]
(^ (<pm> idx))
@@ -148,18 +148,18 @@
(_.if (_.= _.null @temp)
fail-pm!
(push-cursor! @temp)))))
- ([synthesis.side/left _.null (<|)]
- [synthesis.side/right (_.string "") inc])
+ ([/////synthesis.side/left _.null (<|)]
+ [/////synthesis.side/right (_.string "") inc])
(^template [<pm> <getter> <prep>]
(^ (<pm> idx))
(/////wrap (|> idx <prep> .int _.i32 (<getter> ..peek-cursor) push-cursor!)))
- ([synthesis.member/left //runtime.product//left (<|)]
- [synthesis.member/right //runtime.product//right inc])
+ ([/////synthesis.member/left //runtime.product//left (<|)]
+ [/////synthesis.member/right //runtime.product//right inc])
- (^ ($_ synthesis.path/seq
- (#synthesis.Bind register)
- #synthesis.Pop
+ (^ ($_ /////synthesis.path/seq
+ (#/////synthesis.Bind register)
+ #/////synthesis.Pop
thenP))
(do ////.monad
[then! (pattern-matching' generate thenP)]
@@ -167,9 +167,9 @@
(_.define (..register register) ..peek-and-pop-cursor)
then!)))
- (^ ($_ synthesis.path/seq
- #synthesis.Pop
- #synthesis.Pop
+ (^ ($_ /////synthesis.path/seq
+ #/////synthesis.Pop
+ #/////synthesis.Pop
nextP))
(.let [[extra-pops nextP'] (count-pops nextP)]
(do ////.monad
@@ -184,15 +184,15 @@
[left! (pattern-matching' generate leftP)
right! (pattern-matching' generate rightP)]
(wrap <computation>)))
- ([synthesis.path/seq (_.then left! right!)]
- [synthesis.path/alt ($_ _.then
- (_.do-while _.false
- ($_ _.then
- ..save-cursor!
- left!))
- ($_ _.then
- ..restore-cursor!
- right!))])
+ ([/////synthesis.path/seq (_.then left! right!)]
+ [/////synthesis.path/alt ($_ _.then
+ (_.do-while _.false
+ ($_ _.then
+ ..save-cursor!
+ left!))
+ ($_ _.then
+ ..restore-cursor!
+ right!))])
_
(////.throw unrecognized-path [])))
diff --git a/stdlib/source/lux/tool/compiler/phase/generation/js/extension/common.lux b/stdlib/source/lux/tool/compiler/phase/generation/js/extension/common.lux
index 98ef827a8..cbac2ca3f 100644
--- a/stdlib/source/lux/tool/compiler/phase/generation/js/extension/common.lux
+++ b/stdlib/source/lux/tool/compiler/phase/generation/js/extension/common.lux
@@ -15,14 +15,14 @@
["s" syntax (#+ syntax:)]]
[host (#+ import:)
["_" js (#+ Expression Computation)]]]
- [///
- ["///." runtime (#+ Operation Phase Handler Bundle)]
- ["///." primitive]
- ["//." ///
- ["." extension
+ ["." /// #_
+ ["#." runtime (#+ Operation Phase Handler Bundle)]
+ ["#." primitive]
+ ["#//" ///
+ ["#." extension
["." bundle]]
- [//
- ["." synthesis (#+ Synthesis)]]]])
+ ["#/" // #_
+ [synthesis (#+ Synthesis)]]]])
(syntax: (Vector {size s.nat} elemT)
(wrap (list (` [(~+ (list.repeat size elemT))]))))
@@ -51,7 +51,7 @@
((~' wrap) ((~ g!extension) [(~+ g!input+)])))
(~' _)
- (/////.throw extension.incorrect-arity [(~ g!name) 1 (list.size (~ g!inputs))]))))))))))
+ (/////.throw /////extension.incorrect-arity [(~ g!name) 1 (list.size (~ g!inputs))]))))))))))
(arity: nullary 0)
(arity: unary 1)
diff --git a/stdlib/source/lux/tool/compiler/phase/generation/js/extension/host.lux b/stdlib/source/lux/tool/compiler/phase/generation/js/extension/host.lux
index 519852967..f623242a0 100644
--- a/stdlib/source/lux/tool/compiler/phase/generation/js/extension/host.lux
+++ b/stdlib/source/lux/tool/compiler/phase/generation/js/extension/host.lux
@@ -8,15 +8,15 @@
["." dictionary]]]
[host
["_" js]]]
- [//
- ["." common (#+ Nullary Binary Trinary Variadic)]
- [//
- ["///." runtime (#+ Handler Bundle)]
- ["//." ///
- ["." extension
+ ["." // #_
+ ["#." common (#+ Nullary Binary Trinary Variadic)]
+ ["#/" // #_
+ ["#." runtime (#+ Handler Bundle)]
+ ["#//" ///
+ ["#." extension
["." bundle]]
- [//
- ["." synthesis]]]]])
+ ["#/" // #_
+ ["#." synthesis]]]]])
(do-template [<name> <js>]
[(def: (<name> _) Nullary <js>)]
@@ -29,11 +29,11 @@
(def: (js//global name generate inputs)
Handler
(case inputs
- (^ (list (synthesis.text global)))
+ (^ (list (//////synthesis.text global)))
(:: /////.monad wrap (_.var global))
_
- (/////.throw extension.incorrect-syntax name)))
+ (/////.throw /////extension.incorrect-syntax name)))
(def: (js//call name generate inputs)
Handler
@@ -45,15 +45,15 @@
(wrap (_.apply/* functionJS argsJS+)))
_
- (/////.throw extension.incorrect-syntax name)))
+ (/////.throw /////extension.incorrect-syntax name)))
(def: js
Bundle
(|> bundle.empty
- (bundle.install "null" (common.nullary js//null))
- (bundle.install "undefined" (common.nullary js//undefined))
- (bundle.install "object" (common.nullary js//object))
- (bundle.install "array" (common.variadic _.array))
+ (bundle.install "null" (//common.nullary js//null))
+ (bundle.install "undefined" (//common.nullary js//undefined))
+ (bundle.install "object" (//common.nullary js//object))
+ (bundle.install "array" (//common.variadic _.array))
(bundle.install "global" js//global)
(bundle.install "call" js//call)))
@@ -67,7 +67,7 @@
(wrap (_.new constructorJS argsJS+)))
_
- (/////.throw extension.incorrect-syntax name)))
+ (/////.throw /////extension.incorrect-syntax name)))
(def: (object//call name generate inputs)
Handler
@@ -82,7 +82,7 @@
(_.do "apply" (list& objectJS argsJS+)))))
_
- (/////.throw extension.incorrect-syntax name)))
+ (/////.throw /////extension.incorrect-syntax name)))
(def: (object//set [fieldJS valueJS objectJS])
Trinary
@@ -94,9 +94,9 @@
(|> bundle.empty
(bundle.install "new" object//new)
(bundle.install "call" object//call)
- (bundle.install "read" (common.binary (product.uncurry ///runtime.js//get)))
- (bundle.install "write" (common.trinary object//set))
- (bundle.install "delete" (common.binary (product.uncurry ///runtime.js//delete)))
+ (bundle.install "read" (//common.binary (product.uncurry ///runtime.js//get)))
+ (bundle.install "write" (//common.trinary object//set))
+ (bundle.install "delete" (//common.binary (product.uncurry ///runtime.js//delete)))
)))
(def: (array//write [indexJS valueJS arrayJS])
@@ -107,10 +107,10 @@
Bundle
(<| (bundle.prefix "array")
(|> bundle.empty
- (bundle.install "read" (common.binary (product.uncurry ///runtime.array//read)))
- (bundle.install "write" (common.trinary array//write))
- (bundle.install "delete" (common.binary (product.uncurry ///runtime.array//delete)))
- (bundle.install "length" (common.unary (_.the "length")))
+ (bundle.install "read" (//common.binary (product.uncurry ///runtime.array//read)))
+ (bundle.install "write" (//common.trinary array//write))
+ (bundle.install "delete" (//common.binary (product.uncurry ///runtime.array//delete)))
+ (bundle.install "length" (//common.unary (_.the "length")))
)))
(def: #export bundle
diff --git a/stdlib/source/lux/tool/compiler/phase/generation/js/function.lux b/stdlib/source/lux/tool/compiler/phase/generation/js/function.lux
index ca647a81a..1d74112e2 100644
--- a/stdlib/source/lux/tool/compiler/phase/generation/js/function.lux
+++ b/stdlib/source/lux/tool/compiler/phase/generation/js/function.lux
@@ -11,18 +11,17 @@
["." list ("#/." functor fold)]]]
[host
["_" js (#+ Expression Computation Var)]]]
- [//
- ["." runtime (#+ Operation Phase)]
- ["." reference]
- ["//." case]
- ["/." //
- ["common-." reference]
- ["//." // ("#/." monad)
- [//
+ ["." // #_
+ [runtime (#+ Operation Phase)]
+ ["#." reference]
+ ["#." case]
+ ["#/" //
+ ["#." reference]
+ ["#/" // ("#/." monad)
+ ["." // #_
[reference (#+ Register Variable)]
[analysis (#+ Variant Tuple Environment Arity Abstraction Application Analysis)]
- [synthesis (#+ Synthesis)]
- ["." name]]]]])
+ [synthesis (#+ Synthesis)]]]]])
(def: #export (apply generate [functionS argsS+])
(-> Phase (Application Synthesis) (Operation Computation))
@@ -32,7 +31,7 @@
(wrap (_.apply/* functionO argsO+))))
(def: #export capture
- (common-reference.foreign _.var))
+ (///reference.foreign _.var))
(def: (with-closure inits function-definition)
(-> (List Expression) Computation (Operation Computation))
@@ -63,7 +62,7 @@
(///.with-anchor (_.var function-name)
(generate bodyS))))
closureO+ (: (Operation (List Expression))
- (monad.map @ (:: reference.system variable) environment))
+ (monad.map @ (:: //reference.system variable) environment))
#let [arityO (|> arity .int _.i32)
@num-args (_.var "num_args")
@self (_.var function-name)
diff --git a/stdlib/source/lux/tool/compiler/phase/generation/js/loop.lux b/stdlib/source/lux/tool/compiler/phase/generation/js/loop.lux
index 4e3c7d8a9..ba12e4c03 100644
--- a/stdlib/source/lux/tool/compiler/phase/generation/js/loop.lux
+++ b/stdlib/source/lux/tool/compiler/phase/generation/js/loop.lux
@@ -10,12 +10,11 @@
["." list ("#/." functor)]]]
[host
["_" js (#+ Computation Var)]]]
- [//
+ ["." // #_
[runtime (#+ Operation Phase)]
- ["." reference]
- ["//." case]
- ["/." //
- ["//." //
+ ["#." case]
+ ["#/" //
+ ["#/" //
[//
[synthesis (#+ Scope Synthesis)]]]]])
diff --git a/stdlib/source/lux/tool/compiler/phase/generation/js/primitive.lux b/stdlib/source/lux/tool/compiler/phase/generation/js/primitive.lux
index 139fcb191..1eb6141f9 100644
--- a/stdlib/source/lux/tool/compiler/phase/generation/js/primitive.lux
+++ b/stdlib/source/lux/tool/compiler/phase/generation/js/primitive.lux
@@ -7,8 +7,8 @@
["." frac]]]
[host
["_" js (#+ Computation)]]]
- [//
- ["//." runtime]])
+ ["." // #_
+ ["#." runtime]])
(def: #export bit
(-> Bit Computation)
diff --git a/stdlib/source/lux/tool/compiler/phase/generation/js/structure.lux b/stdlib/source/lux/tool/compiler/phase/generation/js/structure.lux
index 623516cdb..c6b413afb 100644
--- a/stdlib/source/lux/tool/compiler/phase/generation/js/structure.lux
+++ b/stdlib/source/lux/tool/compiler/phase/generation/js/structure.lux
@@ -4,19 +4,19 @@
["." monad (#+ do)]]
[host
["_" js (#+ Expression)]]]
- [//
- ["//." runtime (#+ Operation Phase)]
- ["//." primitive]
- ["/." ///
- [//
+ ["." // #_
+ ["#." runtime (#+ Operation Phase)]
+ ["#." primitive]
+ ["#//" ///
+ ["#/" // #_
[analysis (#+ Variant Tuple)]
- ["." synthesis (#+ Synthesis)]]]])
+ ["#." synthesis (#+ Synthesis)]]]])
(def: #export (tuple generate elemsS+)
(-> Phase (Tuple Synthesis) (Operation Expression))
(case elemsS+
#.Nil
- (:: ////.monad wrap (//primitive.text synthesis.unit))
+ (:: ////.monad wrap (//primitive.text /////synthesis.unit))
(#.Cons singletonS #.Nil)
(generate singletonS)
diff --git a/stdlib/source/lux/tool/compiler/phase/generation/reference.lux b/stdlib/source/lux/tool/compiler/phase/generation/reference.lux
index 878d96e83..f8c875ccc 100644
--- a/stdlib/source/lux/tool/compiler/phase/generation/reference.lux
+++ b/stdlib/source/lux/tool/compiler/phase/generation/reference.lux
@@ -7,10 +7,10 @@
format]]
[type (#+ :share)]]
["." //
- ["/." // ("#/." monad)
- [//
+ ["#/" // ("#/." monad)
+ ["#/" // #_
[synthesis (#+ Synthesis)]
- ["." reference (#+ Register Variable Reference)]]]])
+ ["#." reference (#+ Register Variable Reference)]]]])
(signature: #export (System expression)
(: (-> Register expression)
@@ -56,10 +56,10 @@
variable}
{(All [anchor statement]
(-> Variable (//.Operation anchor expression statement)))
- (|>> (case> (#reference.Local register)
+ (|>> (case> (#////reference.Local register)
(local register)
- (#reference.Foreign register)
+ (#////reference.Foreign register)
(foreign register))
////wrap)})
constant (:share [expression]
@@ -74,8 +74,8 @@
(def: variable variable)
(def: constant constant)
(def: reference
- (|>> (case> (#reference.Constant value)
+ (|>> (case> (#////reference.Constant value)
(constant value)
- (#reference.Variable value)
+ (#////reference.Variable value)
(variable value)))))))
diff --git a/stdlib/source/lux/tool/compiler/phase/generation/scheme/case.jvm.lux b/stdlib/source/lux/tool/compiler/phase/generation/scheme/case.jvm.lux
index aa04dc975..142e4a165 100644
--- a/stdlib/source/lux/tool/compiler/phase/generation/scheme/case.jvm.lux
+++ b/stdlib/source/lux/tool/compiler/phase/generation/scheme/case.jvm.lux
@@ -11,19 +11,18 @@
["." list ("#/." functor fold)]]]
[host
["_" scheme (#+ Expression Computation Var)]]]
- [//
- ["." runtime (#+ Operation Phase)]
- ["//." primitive]
- ["." reference]
- [//
- ["common-." reference]
- ["//." // ("#/." monad)
- [//
+ ["." // #_
+ ["#." runtime (#+ Operation Phase)]
+ ["#." primitive]
+ ["#/" // #_
+ ["#." reference]
+ ["#/" // ("#/." monad)
+ ["#/" // #_
[reference (#+ Register)]
- ["." synthesis (#+ Synthesis Path)]]]]])
+ ["#." synthesis (#+ Synthesis Path)]]]]])
(def: #export register
- (common-reference.local _.var))
+ (///reference.local _.var))
(def: #export (let generate [valueS register bodyS])
(-> Phase [Synthesis Register Synthesis]
@@ -41,8 +40,8 @@
[valueO (generate valueS)]
(wrap (list/fold (function (_ [idx tail?] source)
(.let [method (.if tail?
- runtime.product//right
- runtime.product//left)]
+ //runtime.product//right
+ //runtime.product//left)]
(method source (_.int (.int idx)))))
valueO
pathP))))
@@ -105,13 +104,13 @@
(def: (pattern-matching' generate pathP)
(-> Phase Path (Operation Expression))
(.case pathP
- (^ (synthesis.path/then bodyS))
+ (^ (/////synthesis.path/then bodyS))
(generate bodyS)
- #synthesis.Pop
+ #/////synthesis.Pop
(/////wrap pop-cursor!)
- (#synthesis.Bind register)
+ (#/////synthesis.Bind register)
(/////wrap (_.define (..register register) [(list) #.None]
cursor-top))
@@ -119,25 +118,25 @@
(^ (<tag> value))
(/////wrap (_.when (|> value <format> (<=> cursor-top) _.not/1)
fail-pm!)))
- ([synthesis.path/bit //primitive.bit _.eqv?/2]
- [synthesis.path/i64 (<| //primitive.i64 .int) _.=/2]
- [synthesis.path/f64 //primitive.f64 _.=/2]
- [synthesis.path/text //primitive.text _.eqv?/2])
+ ([/////synthesis.path/bit //primitive.bit _.eqv?/2]
+ [/////synthesis.path/i64 (<| //primitive.i64 .int) _.=/2]
+ [/////synthesis.path/f64 //primitive.f64 _.=/2]
+ [/////synthesis.path/text //primitive.text _.eqv?/2])
(^template [<pm> <flag> <prep>]
(^ (<pm> idx))
- (/////wrap (_.let (list [@temp (|> idx <prep> .int _.int (runtime.sum//get cursor-top <flag>))])
+ (/////wrap (_.let (list [@temp (|> idx <prep> .int _.int (//runtime.sum//get cursor-top <flag>))])
(_.if (_.null?/1 @temp)
fail-pm!
(push-cursor! @temp)))))
- ([synthesis.side/left _.nil (<|)]
- [synthesis.side/right (_.string "") inc])
+ ([/////synthesis.side/left _.nil (<|)]
+ [/////synthesis.side/right (_.string "") inc])
(^template [<pm> <getter> <prep>]
(^ (<pm> idx))
(/////wrap (|> idx <prep> .int _.int (<getter> cursor-top) push-cursor!)))
- ([synthesis.member/left runtime.product//left (<|)]
- [synthesis.member/right runtime.product//right inc])
+ ([/////synthesis.member/left //runtime.product//left (<|)]
+ [/////synthesis.member/right //runtime.product//right inc])
(^template [<tag> <computation>]
(^ (<tag> leftP rightP))
@@ -145,14 +144,14 @@
[leftO (pattern-matching' generate leftP)
rightO (pattern-matching' generate rightP)]
(wrap <computation>)))
- ([synthesis.path/seq (_.begin (list leftO
- rightO))]
- [synthesis.path/alt (_.with-exception-handler
- (pm-catch (_.begin (list restore-cursor!
- rightO)))
- (_.lambda [(list) #.None]
- (_.begin (list save-cursor!
- leftO))))])
+ ([/////synthesis.path/seq (_.begin (list leftO
+ rightO))]
+ [/////synthesis.path/alt (_.with-exception-handler
+ (pm-catch (_.begin (list restore-cursor!
+ rightO)))
+ (_.lambda [(list) #.None]
+ (_.begin (list save-cursor!
+ leftO))))])
_
(////.throw unrecognized-path [])))
diff --git a/stdlib/source/lux/tool/compiler/phase/generation/scheme/extension/common.jvm.lux b/stdlib/source/lux/tool/compiler/phase/generation/scheme/extension/common.jvm.lux
index 602eb923b..bcb98f893 100644
--- a/stdlib/source/lux/tool/compiler/phase/generation/scheme/extension/common.jvm.lux
+++ b/stdlib/source/lux/tool/compiler/phase/generation/scheme/extension/common.jvm.lux
@@ -17,13 +17,13 @@
["s" syntax (#+ syntax:)]]
[host (#+ import:)
["_" scheme (#+ Expression Computation)]]]
- [///
- ["." runtime (#+ Operation Phase Handler Bundle)]
- ["//." ///
- ["." extension
+ ["." /// #_
+ ["#." runtime (#+ Operation Phase Handler Bundle)]
+ ["#//" ///
+ ["#." extension
["." bundle]]
- [//
- ["." synthesis (#+ Synthesis)]]]])
+ ["#/" // #_
+ ["#." synthesis (#+ Synthesis)]]]])
(syntax: (Vector {size s.nat} elemT)
(wrap (list (` [(~+ (list.repeat size elemT))]))))
@@ -52,7 +52,7 @@
((~' wrap) ((~ g!extension) [(~+ g!input+)])))
(~' _)
- (/////.throw extension.incorrect-arity [(~ g!name) 1 (list.size (~ g!inputs))]))))))))))
+ (/////.throw /////extension.incorrect-arity [(~ g!name) 1 (list.size (~ g!inputs))]))))))))))
(arity: nullary 0)
(arity: unary 1)
@@ -71,7 +71,7 @@
Bundle
(|> bundle.empty
(bundle.install "is?" (binary (product.uncurry _.eq?/2)))
- (bundle.install "try" (unary runtime.lux//try))))
+ (bundle.install "try" (unary ///runtime.lux//try))))
(do-template [<name> <op>]
[(def: (<name> [subjectO paramO])
@@ -95,7 +95,7 @@
(def: (bit::logical-right-shift [subjectO paramO])
Binary
- (runtime.bit//logical-right-shift (_.remainder/2 (_.int +64) paramO) subjectO))
+ (///runtime.bit//logical-right-shift (_.remainder/2 (_.int +64) paramO) subjectO))
(def: bundle::bit
Bundle
@@ -193,7 +193,7 @@
(bundle.install "max" (nullary frac::max))
(bundle.install "to-int" (unary _.exact/1))
(bundle.install "encode" (unary _.number->string/1))
- (bundle.install "decode" (unary runtime.frac//decode)))))
+ (bundle.install "decode" (unary ///runtime.frac//decode)))))
(def: (text::char [subjectO paramO])
Binary
@@ -221,7 +221,7 @@
(def: (void code)
(-> Expression Computation)
- (_.begin (list code (_.string synthesis.unit))))
+ (_.begin (list code (_.string //////synthesis.unit))))
(def: bundle::io
Bundle
@@ -230,7 +230,7 @@
(bundle.install "log" (unary (|>> io::log ..void)))
(bundle.install "error" (unary _.raise/1))
(bundle.install "exit" (unary _.exit/1))
- (bundle.install "current-time" (nullary (function (_ _) (runtime.io//current-time (_.string synthesis.unit))))))))
+ (bundle.install "current-time" (nullary (function (_ _) (///runtime.io//current-time (_.string //////synthesis.unit))))))))
(def: #export bundle
Bundle
diff --git a/stdlib/source/lux/tool/compiler/phase/generation/scheme/function.jvm.lux b/stdlib/source/lux/tool/compiler/phase/generation/scheme/function.jvm.lux
index 891ef736c..dea1064e1 100644
--- a/stdlib/source/lux/tool/compiler/phase/generation/scheme/function.jvm.lux
+++ b/stdlib/source/lux/tool/compiler/phase/generation/scheme/function.jvm.lux
@@ -11,18 +11,17 @@
["." list ("#/." functor)]]]
[host
["_" scheme (#+ Expression Computation Var)]]]
- [//
- ["." runtime (#+ Operation Phase)]
- ["." reference]
- ["//." case]
- ["/." //
- ["common-." reference]
- ["//." // ("#/." monad)
- [//
+ ["." // #_
+ ["#." runtime (#+ Operation Phase)]
+ ["#." reference]
+ ["#." case]
+ ["#/" //
+ ["#." reference]
+ ["#/" // ("#/." monad)
+ ["#/" // #_
[reference (#+ Register Variable)]
[analysis (#+ Variant Tuple Environment Arity Abstraction Application Analysis)]
- [synthesis (#+ Synthesis)]
- ["." name]]]]])
+ [synthesis (#+ Synthesis)]]]]])
(def: #export (apply generate [functionS argsS+])
(-> Phase (Application Synthesis) (Operation Computation))
@@ -32,7 +31,7 @@
(wrap (_.apply/* functionO argsO+))))
(def: #export capture
- (common-reference.foreign _.var))
+ (///reference.foreign _.var))
(def: (with-closure function-name inits function-definition)
(-> Text (List Expression) Computation (Operation Computation))
@@ -65,7 +64,7 @@
(///.with-anchor (_.var function-name)
(generate bodyS))))
closureO+ (: (Operation (List Expression))
- (monad.map @ (:: reference.system variable) environment))
+ (monad.map @ (:: //reference.system variable) environment))
#let [arityO (|> arity .int _.int)
apply-poly (.function (_ args func)
(_.apply/2 (_.global "apply") func args))
@@ -82,10 +81,10 @@
(_.apply/2 (_.global "apply") (_.global "values") @curried)]))
bodyO))
(_.if (|> @num-args (_.>/2 arityO))
- (let [arity-args (runtime.slice (_.int +0) arityO @curried)
- output-func-args (runtime.slice arityO
- (|> @num-args (_.-/2 arityO))
- @curried)]
+ (let [arity-args (//runtime.slice (_.int +0) arityO @curried)
+ output-func-args (//runtime.slice arityO
+ (|> @num-args (_.-/2 arityO))
+ @curried)]
(|> @function
(apply-poly arity-args)
(apply-poly output-func-args))))
diff --git a/stdlib/source/lux/tool/compiler/phase/generation/scheme/loop.jvm.lux b/stdlib/source/lux/tool/compiler/phase/generation/scheme/loop.jvm.lux
index a177d6290..e5038dc58 100644
--- a/stdlib/source/lux/tool/compiler/phase/generation/scheme/loop.jvm.lux
+++ b/stdlib/source/lux/tool/compiler/phase/generation/scheme/loop.jvm.lux
@@ -10,12 +10,11 @@
["." list ("#/." functor)]]]
[host
["_" scheme (#+ Computation Var)]]]
- [//
+ ["." // #_
[runtime (#+ Operation Phase)]
- ["." reference]
- ["//." case]
- ["/." //
- ["//." //
+ ["#." case]
+ ["#/" //
+ ["#/" //
[//
[synthesis (#+ Scope Synthesis)]]]]])
diff --git a/stdlib/source/lux/tool/compiler/phase/generation/scheme/runtime.jvm.lux b/stdlib/source/lux/tool/compiler/phase/generation/scheme/runtime.jvm.lux
index 063e0c55f..a3490be46 100644
--- a/stdlib/source/lux/tool/compiler/phase/generation/scheme/runtime.jvm.lux
+++ b/stdlib/source/lux/tool/compiler/phase/generation/scheme/runtime.jvm.lux
@@ -16,11 +16,11 @@
[host
["_" scheme (#+ Expression Computation Var)]]]
["." ///
- ["//." //
- [//
+ ["#/" //
+ ["#/" // #_
[analysis (#+ Variant)]
- ["." name]
- ["." synthesis]]]])
+ ["#." name]
+ ["#." synthesis]]]])
(do-template [<name> <base>]
[(type: #export <name>
@@ -34,7 +34,7 @@
(def: prefix Text "LuxRuntime")
-(def: unit (_.string synthesis.unit))
+(def: unit (_.string /////synthesis.unit))
(def: #export variant-tag "lux-variant")
@@ -79,10 +79,10 @@
(syntax: (runtime: {[name args] declaration}
definition)
(let [implementation (code.local-identifier (format "@@" name))
- runtime (format prefix "__" (name.normalize name))
+ runtime (format prefix "__" (/////name.normalize name))
@runtime (` (_.var (~ (code.text runtime))))
argsC+ (list/map code.local-identifier args)
- argsLC+ (list/map (|>> name.normalize (format "LRV__") code.text (~) (_.var) (`))
+ argsLC+ (list/map (|>> /////name.normalize (format "LRV__") code.text (~) (_.var) (`))
args)
declaration (` ((~ (code.local-identifier name))
(~+ argsC+)))
@@ -129,7 +129,7 @@
(wrap (list (` (let [(~+ (|> vars
(list/map (function (_ var)
(list (code.local-identifier var)
- (` (_.var (~ (code.text (format "LRV__" (name.normalize var)))))))))
+ (` (_.var (~ (code.text (format "LRV__" (/////name.normalize var)))))))))
list/join))]
(~ body))))))
@@ -137,16 +137,16 @@
(with-vars [error]
(_.with-exception-handler
(_.lambda [(list error) #.None]
- (..left error))
+ (..left error))
(_.lambda [(list) #.None]
- (..right (_.apply/* op (list ..unit)))))))
+ (..right (_.apply/* op (list ..unit)))))))
(runtime: (lux//program-args program-args)
(with-vars [@loop @input @output]
(_.letrec (list [@loop (_.lambda [(list @input @output) #.None]
- (_.if (_.eqv?/2 _.nil @input)
- @output
- (_.apply/2 @loop (_.cdr/1 @input) (..some (_.vector/* (list (_.car/1 @input) @output))))))])
+ (_.if (_.eqv?/2 _.nil @input)
+ @output
+ (_.apply/2 @loop (_.cdr/1 @input) (..some (_.vector/* (list (_.car/1 @input) @output))))))])
(_.apply/2 @loop (_.reverse/1 program-args) ..none))))
(def: runtime//lux
diff --git a/stdlib/source/lux/tool/compiler/phase/statement.lux b/stdlib/source/lux/tool/compiler/phase/statement.lux
index 87736643c..7e55e2dc6 100644
--- a/stdlib/source/lux/tool/compiler/phase/statement.lux
+++ b/stdlib/source/lux/tool/compiler/phase/statement.lux
@@ -8,13 +8,13 @@
format]]
["." macro]]
["." //
- ["//." macro (#+ Expander)]
- ["//." extension]
+ ["#." macro (#+ Expander)]
+ ["#." extension]
[".P" analysis
["." type]]
- [//
- ["/" statement (#+ Phase)]
- ["." analysis]]])
+ ["#/" // #_
+ ["#." analysis]
+ ["/" statement (#+ Phase)]]])
(exception: #export (not-a-statement {code Code})
(exception.report
@@ -43,7 +43,7 @@
[macroA (type.with-type Macro
(analyze macro))]
(case macroA
- (^ (analysis.constant macro-name))
+ (^ (///analysis.constant macro-name))
(do @
[?macro (//extension.lift (macro.find-macro macro-name))
macro (case ?macro
diff --git a/stdlib/source/lux/tool/compiler/phase/synthesis.lux b/stdlib/source/lux/tool/compiler/phase/synthesis.lux
index 17af9a6fa..c5152ff6a 100644
--- a/stdlib/source/lux/tool/compiler/phase/synthesis.lux
+++ b/stdlib/source/lux/tool/compiler/phase/synthesis.lux
@@ -9,70 +9,69 @@
[collection
["." list ("#/." functor)]
["." dictionary (#+ Dictionary)]]]]
- [/
- ["/." function]
- ["/." case]
- ["." // ("#/." monad)
- ["//." extension]
- [//
- ["." reference]
- ["." analysis (#+ Analysis)]
+ ["." / #_
+ ["#." function]
+ ["#." case]
+ ["#/" // ("#/." monad)
+ ["#." extension]
+ ["#/" // #_
+ ["#." analysis (#+ Analysis)]
["/" synthesis (#+ Synthesis Phase)]]]])
(def: (primitive analysis)
- (-> analysis.Primitive /.Primitive)
+ (-> ///analysis.Primitive /.Primitive)
(case analysis
- #analysis.Unit
+ #///analysis.Unit
(#/.Text /.unit)
(^template [<analysis> <synthesis>]
(<analysis> value)
(<synthesis> value))
- ([#analysis.Bit #/.Bit]
- [#analysis.Frac #/.F64]
- [#analysis.Text #/.Text])
+ ([#///analysis.Bit #/.Bit]
+ [#///analysis.Frac #/.F64]
+ [#///analysis.Text #/.Text])
(^template [<analysis> <synthesis>]
(<analysis> value)
(<synthesis> (.i64 value)))
- ([#analysis.Nat #/.I64]
- [#analysis.Int #/.I64]
- [#analysis.Rev #/.I64])))
+ ([#///analysis.Nat #/.I64]
+ [#///analysis.Int #/.I64]
+ [#///analysis.Rev #/.I64])))
(def: #export (phase analysis)
Phase
(case analysis
- (#analysis.Primitive analysis')
+ (#///analysis.Primitive analysis')
(///wrap (#/.Primitive (..primitive analysis')))
- (#analysis.Structure structure)
+ (#///analysis.Structure structure)
(case structure
- (#analysis.Variant variant)
+ (#///analysis.Variant variant)
(do //.monad
- [valueS (phase (get@ #analysis.value variant))]
- (wrap (/.variant (set@ #analysis.value valueS variant))))
+ [valueS (phase (get@ #///analysis.value variant))]
+ (wrap (/.variant (set@ #///analysis.value valueS variant))))
- (#analysis.Tuple tuple)
+ (#///analysis.Tuple tuple)
(|> tuple
(monad.map //.monad phase)
(///map (|>> /.tuple))))
- (#analysis.Reference reference)
+ (#///analysis.Reference reference)
(///wrap (#/.Reference reference))
- (#analysis.Case inputA branchesAB+)
+ (#///analysis.Case inputA branchesAB+)
(/case.synthesize phase inputA branchesAB+)
- (^ (analysis.no-op value))
+ (^ (///analysis.no-op value))
(phase value)
- (#analysis.Apply _)
+ (#///analysis.Apply _)
(/function.apply phase analysis)
- (#analysis.Function environmentA bodyA)
+ (#///analysis.Function environmentA bodyA)
(/function.abstraction phase environmentA bodyA)
- (#analysis.Extension name args)
+ (#///analysis.Extension name args)
(function (_ state)
(|> (//extension.apply phase [name args])
(//.run' state)
diff --git a/stdlib/source/lux/tool/compiler/phase/synthesis/case.lux b/stdlib/source/lux/tool/compiler/phase/synthesis/case.lux
index 94a2637fe..52d7b09a7 100644
--- a/stdlib/source/lux/tool/compiler/phase/synthesis/case.lux
+++ b/stdlib/source/lux/tool/compiler/phase/synthesis/case.lux
@@ -14,9 +14,9 @@
[collection
["." list ("#/." fold monoid)]]]]
["." /// ("#/." monad)
- [//
- ["." reference]
- ["." analysis (#+ Pattern Match Analysis)]
+ ["#/" //
+ ["#." reference]
+ ["#." analysis (#+ Pattern Match Analysis)]
["/" synthesis (#+ Path Synthesis Operation Phase)]]])
(def: clean-up
@@ -26,28 +26,28 @@
(def: (path' pattern end? thenC)
(-> Pattern Bit (Operation Path) (Operation Path))
(case pattern
- (#analysis.Simple simple)
+ (#////analysis.Simple simple)
(case simple
- #analysis.Unit
+ #////analysis.Unit
thenC
(^template [<from> <to>]
(<from> value)
(////map (|>> (#/.Seq (#/.Test (|> value <to>))))
thenC))
- ([#analysis.Bit #/.Bit]
- [#analysis.Nat (<| #/.I64 .i64)]
- [#analysis.Int (<| #/.I64 .i64)]
- [#analysis.Rev (<| #/.I64 .i64)]
- [#analysis.Frac #/.F64]
- [#analysis.Text #/.Text]))
-
- (#analysis.Bind register)
+ ([#////analysis.Bit #/.Bit]
+ [#////analysis.Nat (<| #/.I64 .i64)]
+ [#////analysis.Int (<| #/.I64 .i64)]
+ [#////analysis.Rev (<| #/.I64 .i64)]
+ [#////analysis.Frac #/.F64]
+ [#////analysis.Text #/.Text]))
+
+ (#////analysis.Bind register)
(<| (:: ///.monad map (|>> (#/.Seq (#/.Bind register))))
/.with-new-local
thenC)
- (#analysis.Complex (#analysis.Variant [lefts right? value-pattern]))
+ (#////analysis.Complex (#////analysis.Variant [lefts right? value-pattern]))
(<| (////map (|>> (#/.Seq (#/.Access (#/.Side (if right?
(#.Right lefts)
(#.Left lefts)))))))
@@ -55,7 +55,7 @@
(when> [(new> (not end?) [])] [(////map ..clean-up)])
thenC)
- (#analysis.Complex (#analysis.Tuple tuple))
+ (#////analysis.Complex (#////analysis.Tuple tuple))
(let [tuple::last (dec (list.size tuple))]
(list/fold (function (_ [tuple::lefts tuple::member] nextC)
(let [right? (n/= tuple::last tuple::lefts)
@@ -125,12 +125,12 @@
(do ///.monad
[inputS (synthesize^ inputA)]
(with-expansions [<unnecesary-let>
- (as-is (^multi (^ (#analysis.Reference (reference.local outputR)))
+ (as-is (^multi (^ (#////analysis.Reference (////reference.local outputR)))
(n/= inputR outputR))
(wrap inputS))
<let>
- (as-is [[(#analysis.Bind inputR) headB/bodyA]
+ (as-is [[(#////analysis.Bind inputR) headB/bodyA]
#.Nil]
(case headB/bodyA
<unnecesary-let>
@@ -142,10 +142,10 @@
(wrap (/.branch/let [inputS inputR headB/bodyS])))))
<if>
- (as-is (^or (^ [[(analysis.pattern/bit #1) thenA]
- (list [(analysis.pattern/bit #0) elseA])])
- (^ [[(analysis.pattern/bit #0) elseA]
- (list [(analysis.pattern/bit #1) thenA])]))
+ (as-is (^or (^ [[(////analysis.pattern/bit #1) thenA]
+ (list [(////analysis.pattern/bit #0) elseA])])
+ (^ [[(////analysis.pattern/bit #0) elseA]
+ (list [(////analysis.pattern/bit #1) thenA])]))
(do @
[thenS (synthesize^ thenA)
elseS (synthesize^ elseA)]
diff --git a/stdlib/source/lux/tool/compiler/phase/synthesis/function.lux b/stdlib/source/lux/tool/compiler/phase/synthesis/function.lux
index b5c97e825..547e684c2 100644
--- a/stdlib/source/lux/tool/compiler/phase/synthesis/function.lux
+++ b/stdlib/source/lux/tool/compiler/phase/synthesis/function.lux
@@ -10,18 +10,18 @@
[collection
["." list ("#/." functor monoid fold)]
["dict" dictionary (#+ Dictionary)]]]]
- [//
- ["//." loop (#+ Transform)]
- ["/." // ("#/." monad)
- [//
- ["." reference (#+ Register Variable)]
- ["." analysis (#+ Environment Arity Analysis)]
+ ["." // #_
+ ["#." loop (#+ Transform)]
+ ["#/" // ("#/." monad)
+ ["#/" // #_
+ ["#." reference (#+ Register Variable)]
+ ["#." analysis (#+ Environment Arity Analysis)]
["/" synthesis (#+ Path Synthesis Operation Phase)]]]])
(exception: #export (cannot-find-foreign-variable-in-environment {foreign Register} {environment Environment})
(ex.report ["Foreign" (%n foreign)]
["Environment" (|> environment
- (list/map reference.%variable)
+ (list/map ////reference.%variable)
(text.join-with " "))]))
(def: arity-arguments
@@ -40,7 +40,7 @@
(def: #export (apply phase)
(-> Phase Phase)
(function (_ exprA)
- (let [[funcA argsA] (analysis.application exprA)]
+ (let [[funcA argsA] (////analysis.application exprA)]
(do ///.monad
[funcS (phase funcA)
argsS (monad.map @ phase argsA)
@@ -95,10 +95,10 @@
(monad.map ///.monad
(function (_ variable)
(case variable
- (#reference.Local register)
- (////wrap (#reference.Local (inc register)))
+ (#////reference.Local register)
+ (////wrap (#////reference.Local (inc register)))
- (#reference.Foreign register)
+ (#////reference.Foreign register)
(find-foreign super register)))
sub))
@@ -107,12 +107,12 @@
(case expression
(#/.Structure structure)
(case structure
- (#analysis.Variant [lefts right? subS])
+ (#////analysis.Variant [lefts right? subS])
(|> subS
(grow environment)
(////map (|>> [lefts right?] /.variant)))
- (#analysis.Tuple membersS+)
+ (#////analysis.Tuple membersS+)
(|> membersS+
(monad.map ///.monad (grow environment))
(////map (|>> /.tuple))))
@@ -122,17 +122,17 @@
(#/.Reference reference)
(case reference
- (#reference.Variable variable)
+ (#////reference.Variable variable)
(case variable
- (#reference.Local register)
+ (#////reference.Local register)
(////wrap (/.variable/local (inc register)))
- (#reference.Foreign register)
+ (#////reference.Foreign register)
(|> register
(find-foreign environment)
(////map (|>> /.variable))))
- (#reference.Constant constant)
+ (#////reference.Constant constant)
(////wrap expression))
(#/.Control control)
diff --git a/stdlib/source/lux/tool/compiler/phase/synthesis/loop.lux b/stdlib/source/lux/tool/compiler/phase/synthesis/loop.lux
index ecf13440b..ce5b5e3be 100644
--- a/stdlib/source/lux/tool/compiler/phase/synthesis/loop.lux
+++ b/stdlib/source/lux/tool/compiler/phase/synthesis/loop.lux
@@ -10,12 +10,12 @@
[macro
["." code]
["." syntax]]]
- [///
+ ["." /// #_
## TODO: Remove the 'extension' import ASAP.
- ["///." extension]
- [//
- ["." reference (#+ Register Variable)]
- ["." analysis (#+ Environment)]
+ ["#." extension]
+ ["#/" //
+ ["#." reference (#+ Register Variable)]
+ ["#." analysis (#+ Environment)]
["/" synthesis (#+ Path Abstraction Synthesis)]]])
(type: #export (Transform a)
@@ -28,7 +28,7 @@
#.None #0))
(template: #export (self)
- (#/.Reference (reference.local 0)))
+ (#/.Reference (////reference.local 0)))
(template: (recursive-apply args)
(#/.Apply (self) args))
@@ -44,10 +44,10 @@
(#/.Structure structure)
(case structure
- (#analysis.Variant variantS)
- (proper? (get@ #analysis.value variantS))
+ (#////analysis.Variant variantS)
+ (proper? (get@ #////analysis.value variantS))
- (#analysis.Tuple membersS+)
+ (#////analysis.Tuple membersS+)
(list.every? proper? membersS+))
(#/.Control controlS)
@@ -88,7 +88,7 @@
(#/.Function functionS)
(case functionS
(#/.Abstraction environment arity bodyS)
- (list.every? reference.self? environment)
+ (list.every? ////reference.self? environment)
(#/.Apply funcS argsS)
(and (proper? funcS)
@@ -165,7 +165,7 @@
(-> Environment (Transform Variable))
(function (_ variable)
(case variable
- (#reference.Foreign register)
+ (#////reference.Foreign register)
(list.nth register environment)
_
@@ -198,31 +198,31 @@
(case exprS
(#/.Structure structureS)
(case structureS
- (#analysis.Variant variantS)
+ (#////analysis.Variant variantS)
(do maybe.monad
- [valueS' (|> variantS (get@ #analysis.value) recur)]
+ [valueS' (|> variantS (get@ #////analysis.value) recur)]
(wrap (|> variantS
- (set@ #analysis.value valueS')
- #analysis.Variant
+ (set@ #////analysis.value valueS')
+ #////analysis.Variant
#/.Structure)))
- (#analysis.Tuple membersS+)
+ (#////analysis.Tuple membersS+)
(|> membersS+
(monad.map maybe.monad recur)
- (maybe/map (|>> #analysis.Tuple #/.Structure))))
+ (maybe/map (|>> #////analysis.Tuple #/.Structure))))
(#/.Reference reference)
(case reference
- (^ (reference.constant constant))
+ (^ (////reference.constant constant))
(#.Some exprS)
- (^ (reference.local register))
- (#.Some (#/.Reference (reference.local (n/+ offset register))))
+ (^ (////reference.local register))
+ (#.Some (#/.Reference (////reference.local (n/+ offset register))))
- (^ (reference.foreign register))
+ (^ (////reference.foreign register))
(|> scope-environment
(list.nth register)
- (maybe/map (|>> #reference.Variable #/.Reference))))
+ (maybe/map (|>> #////reference.Variable #/.Reference))))
(^ (/.branch/case [inputS pathS]))
(do maybe.monad
diff --git a/stdlib/source/lux/tool/compiler/synthesis.lux b/stdlib/source/lux/tool/compiler/synthesis.lux
index a287caf5e..1e56a90a3 100644
--- a/stdlib/source/lux/tool/compiler/synthesis.lux
+++ b/stdlib/source/lux/tool/compiler/synthesis.lux
@@ -11,10 +11,10 @@
[collection
["." list ("#/." functor)]
["." dictionary (#+ Dictionary)]]]]
- [//
- ["//." reference (#+ Register Variable Reference)]
- ["//." analysis (#+ Environment Arity Composite Analysis)]
- ["." phase
+ ["." // #_
+ ["#." reference (#+ Register Variable Reference)]
+ ["#." analysis (#+ Environment Arity Composite Analysis)]
+ ["#." phase
["." extension (#+ Extension)]]])
(type: #export Resolver (Dictionary Variable Variable))
@@ -192,7 +192,7 @@
(def: #export with-new-local
(All [a] (-> (Operation a) (Operation a)))
- (<<| (do phase.monad
+ (<<| (do //phase.monad
[locals ..locals])
(..with-locals (inc locals))))
diff --git a/stdlib/source/lux/world/db/jdbc.jvm.lux b/stdlib/source/lux/world/db/jdbc.jvm.lux
index d66918206..285eff34a 100644
--- a/stdlib/source/lux/world/db/jdbc.jvm.lux
+++ b/stdlib/source/lux/world/db/jdbc.jvm.lux
@@ -22,9 +22,9 @@
[host (#+ import:)]]
[//
["." sql]]
- [/
- ["/." input (#+ Input)]
- ["/." output (#+ Output)]])
+ ["." / #_
+ ["#." input (#+ Input)]
+ ["#." output (#+ Output)]])
(import: #long java/sql/ResultSet
(getRow [] #try int)
diff --git a/stdlib/source/lux/world/net/http/request.lux b/stdlib/source/lux/world/net/http/request.lux
index b0d177c09..fac71de93 100644
--- a/stdlib/source/lux/world/net/http/request.lux
+++ b/stdlib/source/lux/world/net/http/request.lux
@@ -21,9 +21,9 @@
[world
["." binary (#+ Binary)]]]
["." // (#+ Body Response Server)
- ["//." response]
- ["//." query]
- ["//." cookie]])
+ ["#." response]
+ ["#." query]
+ ["#." cookie]])
(def: (merge inputs)
(-> (List Binary) Binary)
diff --git a/stdlib/source/lux/world/net/http/route.lux b/stdlib/source/lux/world/net/http/route.lux
index c35b06773..4359735c6 100644
--- a/stdlib/source/lux/world/net/http/route.lux
+++ b/stdlib/source/lux/world/net/http/route.lux
@@ -8,8 +8,8 @@
["." maybe]
["." text ("#/." equivalence)]]]
["." // (#+ URI Server)
- ["//." status]
- ["//." response]])
+ ["#." status]
+ ["#." response]])
(do-template [<scheme> <name>]
[(def: #export (<name> server)
diff --git a/stdlib/source/program/licentia.lux b/stdlib/source/program/licentia.lux
index 46fa8345f..0b7bca16f 100644
--- a/stdlib/source/program/licentia.lux
+++ b/stdlib/source/program/licentia.lux
@@ -32,9 +32,9 @@
[world
["." file (#+ Path File)]]
[host (#+ import:)]]
- [/
- ["/." input]
- ["/." output]])
+ ["." / #_
+ ["#." input]
+ ["#." output]])
(with-expansions [<expiry> (as-is "2019-04-01")]
(to-do <expiry> "Replace _.work with _.covered-work or _.licensed-work")
diff --git a/stdlib/source/program/licentia/license.lux b/stdlib/source/program/licentia/license.lux
index c77718ce7..375ed8c12 100644
--- a/stdlib/source/program/licentia/license.lux
+++ b/stdlib/source/program/licentia/license.lux
@@ -1,8 +1,8 @@
(.module:
[lux #*]
- [/
- ["/." copyright]
- [time (#+ Days Months Period)]])
+ ["." / #_
+ [time (#+ Days Months Period)]
+ ["#." copyright]])
(type: #export Identification
{#name Text
diff --git a/stdlib/source/program/licentia/license/notice.lux b/stdlib/source/program/licentia/license/notice.lux
index b16dfbc9e..b1cf5658e 100644
--- a/stdlib/source/program/licentia/license/notice.lux
+++ b/stdlib/source/program/licentia/license/notice.lux
@@ -5,9 +5,9 @@
format]
[collection
["." list ("#/." functor)]]]]
- [//
- ["//." time]
- ["//." copyright]
+ ["." // #_
+ ["#." time]
+ ["#." copyright]
["_" term]
[//
["$" document]]])
diff --git a/stdlib/source/test/lux.lux b/stdlib/source/test/lux.lux
index 87bf92b1b..85ed47228 100644
--- a/stdlib/source/test/lux.lux
+++ b/stdlib/source/test/lux.lux
@@ -105,12 +105,12 @@
## ["._interpreter" type]]
]
## TODO: Must have 100% coverage on tests.
- [/
- ["/." cli]
- ["/." io]
- ["/." host
- ["/." jvm]]
- ["/." control]]
+ ["." / #_
+ ["#." cli]
+ ["#." io]
+ ["#." host
+ ["#/." jvm]]
+ ["#." control]]
## [control
## [concurrency
## [promise (#+)]
@@ -420,7 +420,7 @@
($_ _.and
/host.test
(<| (_.context "/jvm JVM (Java Virtual Machine)")
- /jvm.test)))
+ /host/jvm.test)))
(<| (_.context "/control")
/control.test)
))
diff --git a/stdlib/source/test/lux/control.lux b/stdlib/source/test/lux/control.lux
index 70e1dfa1d..22bd9741c 100644
--- a/stdlib/source/test/lux/control.lux
+++ b/stdlib/source/test/lux/control.lux
@@ -1,24 +1,24 @@
(.module:
[lux #*
["_" test (#+ Test)]]
- [/
- ["/." continuation]
- ["/." exception]
- ["/." interval]
- ["/." parser]
- ["/." pipe]
- ["/." reader]
- ["/." region]
- ["/." state]
- ["/." thread]
- ["/." writer]
+ ["." / #_
+ ["#." continuation]
+ ["#." exception]
+ ["#." interval]
+ ["#." parser]
+ ["#." pipe]
+ ["#." reader]
+ ["#." region]
+ ["#." state]
+ ["#." thread]
+ ["#." writer]
[concurrency
- ["/." actor]
- ["/." atom]
- ["/." frp]]
+ ["#." actor]
+ ["#." atom]
+ ["#." frp]]
[security
- ["/." privacy]
- ["/." integrity]]])
+ ["#." privacy]
+ ["#." integrity]]])
(def: concurrency
Test
diff --git a/stdlib/source/test/lux/host/jvm.jvm.lux b/stdlib/source/test/lux/host/jvm.jvm.lux
index 73cf967f9..b0655ebd3 100644
--- a/stdlib/source/test/lux/host/jvm.jvm.lux
+++ b/stdlib/source/test/lux/host/jvm.jvm.lux
@@ -23,15 +23,15 @@
["r" random]]
["_" test (#+ Test)]]
{1
- [/
- ["/." loader (#+ Library)]
- ["/." version]
- ["/." name]
- ["/." descriptor]
- ["/." field]
- ["/." class]
+ ["." / #_
+ ["#." loader (#+ Library)]
+ ["#." version]
+ ["#." name]
+ ["#." descriptor]
+ ["#." field]
+ ["#." class]
[modifier
- ["/.M" inner]]]})
+ ["#.M" inner]]]})
(def: (write-class! name bytecode)
(-> Text Binary (IO Text))