aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/tool
diff options
context:
space:
mode:
authorEduardo Julian2022-04-08 05:42:36 -0400
committerEduardo Julian2022-04-08 05:42:36 -0400
commit0d909187d5b9effcd08f533d50af7d29c0d6bfd8 (patch)
treec50f12c5e47e3db90c3a701b54ee9953da942210 /stdlib/source/library/lux/tool
parente5e4c2aff562e5c01fefb808d1d68a40f29c9cc5 (diff)
De-sigil-ification: $
Diffstat (limited to 'stdlib/source/library/lux/tool')
-rw-r--r--stdlib/source/library/lux/tool/compiler/default/platform.lux14
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux.lux110
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/analysis/complex.lux12
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/analysis/scope.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/function.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/reference.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/js.lux14
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/jvm.lux282
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/lua.lux14
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux10
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/php.lux14
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/python.lux14
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/ruby.lux10
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/scheme.lux6
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/jvm.lux546
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/lux.lux10
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/common_lisp/common.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/js/common.lux18
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/js/host.lux22
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/jvm.lux8
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/jvm/common.lux242
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/jvm/host.lux430
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/lua/common.lux12
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/lua/host.lux10
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/php/common.lux12
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/php/host.lux10
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/python/common.lux26
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/python/host.lux10
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/r/common.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/ruby/common.lux24
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/ruby/host.lux6
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/scheme/common.lux12
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/scheme/host.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/case.lux12
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/extension/common.lux6
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/runtime.lux18
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/case.lux88
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/function.lux64
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/loop.lux30
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/runtime.lux630
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/case.lux238
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function.lux40
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/field/constant.lux36
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/field/variable.lux66
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/field/variable/count.lux34
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/field/variable/partial.lux16
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/method.lux20
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/method/apply.lux132
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/method/implementation.lux18
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/method/init.lux22
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/method/new.lux32
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/method/reset.lux60
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/host.lux12
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/loop.lux54
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/program.lux130
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/reference.lux10
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/runtime.lux490
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/value.lux22
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/case.lux70
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/function.lux96
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/loop.lux26
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/runtime.lux240
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/case.lux62
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/function.lux62
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/loop.lux22
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/runtime.lux432
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/case.lux90
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/function.lux54
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/loop.lux22
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/runtime.lux240
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/case.lux40
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/function.lux118
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/loop.lux78
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/procedure/common.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/runtime.lux684
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/case.lux114
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/function.lux58
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/loop.lux72
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/runtime.lux384
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/runtime.lux14
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/syntax.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/synthesis.lux92
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/synthesis/access.lux8
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/synthesis/access/member.lux8
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/synthesis/access/side.lux8
-rw-r--r--stdlib/source/library/lux/tool/compiler/meta/archive.lux16
-rw-r--r--stdlib/source/library/lux/tool/compiler/meta/archive/artifact.lux10
-rw-r--r--stdlib/source/library/lux/tool/compiler/meta/archive/artifact/category.lux16
-rw-r--r--stdlib/source/library/lux/tool/compiler/meta/archive/module/descriptor.lux42
-rw-r--r--stdlib/source/library/lux/tool/compiler/meta/archive/module/document.lux6
-rw-r--r--stdlib/source/library/lux/tool/compiler/meta/archive/registry.lux40
-rw-r--r--stdlib/source/library/lux/tool/compiler/meta/archive/signature.lux18
-rw-r--r--stdlib/source/library/lux/tool/compiler/meta/archive/unit.lux6
-rw-r--r--stdlib/source/library/lux/tool/compiler/meta/cache/dependency/artifact.lux38
-rw-r--r--stdlib/source/library/lux/tool/compiler/meta/cli.lux36
-rw-r--r--stdlib/source/library/lux/tool/compiler/meta/cli/compiler.lux8
-rw-r--r--stdlib/source/library/lux/tool/compiler/meta/export.lux8
-rw-r--r--stdlib/source/library/lux/tool/compiler/meta/io/archive.lux22
-rw-r--r--stdlib/source/library/lux/tool/compiler/meta/packager/scheme.lux14
99 files changed, 3786 insertions, 3786 deletions
diff --git a/stdlib/source/library/lux/tool/compiler/default/platform.lux b/stdlib/source/library/lux/tool/compiler/default/platform.lux
index 4937ec9c1..ac43de9f2 100644
--- a/stdlib/source/library/lux/tool/compiler/default/platform.lux
+++ b/stdlib/source/library/lux/tool/compiler/default/platform.lux
@@ -100,13 +100,13 @@
(All (_ a)
(-> (Writer a)
(Writer [(module.Module a) Registry])))
- ($_ _.and
- ($_ _.and
- _.nat
- descriptor.writer
- (document.writer //))
- registry.writer
- ))
+ (all _.and
+ (all _.and
+ _.nat
+ descriptor.writer
+ (document.writer //))
+ registry.writer
+ ))
(def: (cache_module context platform @module key format entry)
(All (_ <type_vars> document)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux.lux b/stdlib/source/library/lux/tool/compiler/language/lux.lux
index f237ebeae..eb6cd78d7 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux.lux
@@ -23,80 +23,80 @@
(def: .public writer
(Writer .Module)
(let [definition (is (Writer Definition)
- ($_ _.and _.bit _.type _.any))
+ (all _.and _.bit _.type _.any))
labels (is (Writer [Text (List Text)])
(_.and _.text (_.list _.text)))
global_type (is (Writer [Bit Type (Either [Text (List Text)]
[Text (List Text)])])
- ($_ _.and _.bit _.type (_.or labels labels)))
+ (all _.and _.bit _.type (_.or labels labels)))
global_label (is (Writer .Label)
- ($_ _.and _.bit _.type (_.list _.text) _.nat))
+ (all _.and _.bit _.type (_.list _.text) _.nat))
alias (is (Writer Alias)
(_.and _.text _.text))
global (is (Writer Global)
- ($_ _.or
- definition
- global_type
- global_label
- global_label
- alias))]
- ($_ _.and
- ... #module_hash
- _.nat
- ... #module_aliases
- (_.list alias)
- ... #definitions
- (_.list (_.and _.text global))
- ... #imports
- (_.list _.text)
- ... #module_state
- _.any)))
+ (all _.or
+ definition
+ global_type
+ global_label
+ global_label
+ alias))]
+ (all _.and
+ ... #module_hash
+ _.nat
+ ... #module_aliases
+ (_.list alias)
+ ... #definitions
+ (_.list (_.and _.text global))
+ ... #imports
+ (_.list _.text)
+ ... #module_state
+ _.any)))
(def: .public parser
(Parser .Module)
(let [definition (is (Parser Definition)
- ($_ <>.and
- <binary>.bit
- <binary>.type
- <binary>.any))
+ (all <>.and
+ <binary>.bit
+ <binary>.type
+ <binary>.any))
labels (is (Parser [Text (List Text)])
- ($_ <>.and
- <binary>.text
- (<binary>.list <binary>.text)))
+ (all <>.and
+ <binary>.text
+ (<binary>.list <binary>.text)))
global_type (is (Parser [Bit Type (Either [Text (List Text)]
[Text (List Text)])])
- ($_ <>.and
- <binary>.bit
- <binary>.type
- (<binary>.or labels labels)))
- global_label (is (Parser .Label)
- ($_ <>.and
+ (all <>.and
<binary>.bit
<binary>.type
- (<binary>.list <binary>.text)
- <binary>.nat))
+ (<binary>.or labels labels)))
+ global_label (is (Parser .Label)
+ (all <>.and
+ <binary>.bit
+ <binary>.type
+ (<binary>.list <binary>.text)
+ <binary>.nat))
alias (is (Parser Alias)
- ($_ <>.and
- <binary>.text
- <binary>.text))
+ (all <>.and
+ <binary>.text
+ <binary>.text))
global (is (Parser Global)
- ($_ <binary>.or
- definition
- global_type
- global_label
- global_label
- alias))]
- ($_ <>.and
- ... #module_hash
- <binary>.nat
- ... #module_aliases
- (<binary>.list alias)
- ... #definitions
- (<binary>.list (<>.and <binary>.text global))
- ... #imports
- (<binary>.list <binary>.text)
- ... #module_state
- (# <>.monad in {.#Cached}))))
+ (all <binary>.or
+ definition
+ global_type
+ global_label
+ global_label
+ alias))]
+ (all <>.and
+ ... #module_hash
+ <binary>.nat
+ ... #module_aliases
+ (<binary>.list alias)
+ ... #definitions
+ (<binary>.list (<>.and <binary>.text global))
+ ... #imports
+ (<binary>.list <binary>.text)
+ ... #module_state
+ (# <>.monad in {.#Cached}))))
(def: .public key
(Key .Module)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/analysis/complex.lux b/stdlib/source/library/lux/tool/compiler/language/lux/analysis/complex.lux
index 738795545..f4cf115d5 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/analysis/complex.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/analysis/complex.lux
@@ -75,14 +75,14 @@
(def: (hash value)
(case value
{#Variant [lefts right? value]}
- ($_ n.* 2
- (# n.hash hash lefts)
- (# bit.hash hash right?)
- (# super hash value))
+ (all n.* 2
+ (# n.hash hash lefts)
+ (# bit.hash hash right?)
+ (# super hash value))
{#Tuple members}
- ($_ n.* 3
- (# (list.hash super) hash members))
+ (all n.* 3
+ (# (list.hash super) hash members))
)))
(def: .public (format %it it)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/analysis/scope.lux b/stdlib/source/library/lux/tool/compiler/language/lux/analysis/scope.lux
index 578cad62c..040298209 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/analysis/scope.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/analysis/scope.lux
@@ -2,7 +2,7 @@
[library
[lux {"-" local}
[abstract
- monad]
+ [monad {"+" do}]]
[control
["[0]" maybe ("[1]#[0]" monad)]
["[0]" try]
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/function.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/function.lux
index 5bdfe1718..6416fbe77 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/function.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/function.lux
@@ -3,7 +3,7 @@
[lux {"-" function}
["[0]" meta]
[abstract
- monad]
+ [monad {"+" do}]]
[control
["[0]" maybe]
["[0]" try]
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/reference.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/reference.lux
index 6f23ba667..e5f1914ab 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/reference.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/reference.lux
@@ -3,7 +3,7 @@
[lux "*"
["[0]" meta]
[abstract
- monad]
+ [monad {"+" do}]]
[control
["[0]" exception {"+" exception:}]]
[data
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/js.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/js.lux
index 1d0c1f86b..39a8ef632 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/js.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/js.lux
@@ -76,7 +76,7 @@
(def: array::write
Handler
(custom
- [($_ <>.and <code>.any <code>.any <code>.any)
+ [(all <>.and <code>.any <code>.any <code>.any)
(function (_ extension phase archive [indexC valueC arrayC])
(<| analysis/type.with_var
(function (_ [@read :read:]))
@@ -95,7 +95,7 @@
(def: array::delete
Handler
(custom
- [($_ <>.and <code>.any <code>.any)
+ [(all <>.and <code>.any <code>.any)
(function (_ extension phase archive [indexC arrayC])
(<| analysis/type.with_var
(function (_ [@read :read:]))
@@ -123,7 +123,7 @@
(def: object::new
Handler
(custom
- [($_ <>.and <code>.any (<code>.tuple (<>.some <code>.any)))
+ [(all <>.and <code>.any (<code>.tuple (<>.some <code>.any)))
(function (_ extension phase archive [constructorC inputsC])
(do [! phase.monad]
[constructorA (analysis/type.expecting Any
@@ -135,7 +135,7 @@
(def: object::get
Handler
(custom
- [($_ <>.and <code>.text <code>.any)
+ [(all <>.and <code>.text <code>.any)
(function (_ extension phase archive [fieldC objectC])
(do phase.monad
[objectA (analysis/type.expecting Any
@@ -147,7 +147,7 @@
(def: object::do
Handler
(custom
- [($_ <>.and <code>.text <code>.any (<code>.tuple (<>.some <code>.any)))
+ [(all <>.and <code>.text <code>.any (<code>.tuple (<>.some <code>.any)))
(function (_ extension phase archive [methodC objectC inputsC])
(do [! phase.monad]
[objectA (analysis/type.expecting Any
@@ -183,7 +183,7 @@
(def: js::apply
Handler
(custom
- [($_ <>.and <code>.any (<code>.tuple (<>.some <code>.any)))
+ [(all <>.and <code>.any (<code>.tuple (<>.some <code>.any)))
(function (_ extension phase archive [abstractionC inputsC])
(do [! phase.monad]
[abstractionA (analysis/type.expecting Any
@@ -206,7 +206,7 @@
(def: js::function
Handler
(custom
- [($_ <>.and <code>.nat <code>.any)
+ [(all <>.and <code>.nat <code>.any)
(function (_ extension phase archive [arity abstractionC])
(do phase.monad
[.let [inputT (type.tuple (list.repeated arity Any))]
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/jvm.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/jvm.lux
index 3547f8029..6a54bf8e5 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/jvm.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/jvm.lux
@@ -231,7 +231,7 @@
(def: member
(Parser Member)
- ($_ <>.and <code>.text <code>.text))
+ (all <>.and <code>.text <code>.text))
(type: Method_Signature
(Record
@@ -918,7 +918,7 @@
(def: (object::instance? class_loader)
(-> java/lang/ClassLoader Handler)
(..custom
- [($_ <>.and <code>.text <code>.any)
+ [(all <>.and <code>.text <code>.any)
(function (_ extension_name analyse archive [sub_class objectC])
(do phase.monad
[_ (..ensure_fresh_class! class_loader sub_class)
@@ -1070,7 +1070,7 @@
(def: (put::static class_loader)
(-> java/lang/ClassLoader Handler)
(..custom
- [($_ <>.and ..member <code>.any)
+ [(all <>.and ..member <code>.any)
(function (_ extension_name analyse archive [[class field] valueC])
(do phase.monad
[_ (..ensure_fresh_class! class_loader class)
@@ -1095,7 +1095,7 @@
(def: (get::virtual class_loader)
(-> java/lang/ClassLoader Handler)
(..custom
- [($_ <>.and ..member <code>.any)
+ [(all <>.and ..member <code>.any)
(function (_ extension_name analyse archive [[class field] objectC])
(do phase.monad
[_ (..ensure_fresh_class! class_loader class)
@@ -1120,7 +1120,7 @@
(def: (put::virtual class_loader)
(-> java/lang/ClassLoader Handler)
(..custom
- [($_ <>.and ..member <code>.any <code>.any)
+ [(all <>.and ..member <code>.any <code>.any)
(function (_ extension_name analyse archive [[class field] valueC objectC])
(do phase.monad
[_ (..ensure_fresh_class! class_loader class)
@@ -1516,7 +1516,7 @@
(def: (invoke::static class_loader)
(-> java/lang/ClassLoader Handler)
(..custom
- [($_ <>.and ..type_vars ..member ..type_vars (<>.some ..input))
+ [(all <>.and ..type_vars ..member ..type_vars (<>.some ..input))
(function (_ extension_name analyse archive [class_tvars [class method] method_tvars argsTC])
(do phase.monad
[_ (..ensure_fresh_class! class_loader class)
@@ -1534,7 +1534,7 @@
(def: (invoke::virtual class_loader)
(-> java/lang/ClassLoader Handler)
(..custom
- [($_ <>.and ..type_vars ..member ..type_vars <code>.any (<>.some ..input))
+ [(all <>.and ..type_vars ..member ..type_vars <code>.any (<>.some ..input))
(function (_ extension_name analyse archive [class_tvars [class method] method_tvars objectC argsTC])
(do phase.monad
[_ (..ensure_fresh_class! class_loader class)
@@ -1559,7 +1559,7 @@
(def: (invoke::special class_loader)
(-> java/lang/ClassLoader Handler)
(..custom
- [($_ <>.and ..type_vars ..member ..type_vars <code>.any (<>.some ..input))
+ [(all <>.and ..type_vars ..member ..type_vars <code>.any (<>.some ..input))
(function (_ extension_name analyse archive [class_tvars [class method] method_tvars objectC argsTC])
(do phase.monad
[_ (..ensure_fresh_class! class_loader class)
@@ -1584,7 +1584,7 @@
(def: (invoke::interface class_loader)
(-> java/lang/ClassLoader Handler)
(..custom
- [($_ <>.and ..type_vars ..member ..type_vars <code>.any (<>.some ..input))
+ [(all <>.and ..type_vars ..member ..type_vars <code>.any (<>.some ..input))
(function (_ extension_name analyse archive [class_tvars [class_name method] method_tvars objectC argsTC])
(do phase.monad
[_ (..ensure_fresh_class! class_loader class_name)
@@ -1613,7 +1613,7 @@
(def: (invoke::constructor class_loader)
(-> java/lang/ClassLoader Handler)
(..custom
- [($_ <>.and ..type_vars <code>.text ..type_vars (<>.some ..input))
+ [(all <>.and ..type_vars <code>.text ..type_vars (<>.some ..input))
(function (_ extension_name analyse archive [class_tvars class method_tvars argsTC])
(do phase.monad
[_ (..ensure_fresh_class! class_loader class)
@@ -1781,12 +1781,12 @@
(def: .public visibility'
(<text>.Parser Visibility)
- ($_ <>.or
- (<text>.this ..public_tag)
- (<text>.this ..private_tag)
- (<text>.this ..protected_tag)
- (<text>.this ..default_tag)
- ))
+ (all <>.or
+ (<text>.this ..public_tag)
+ (<text>.this ..private_tag)
+ (<text>.this ..protected_tag)
+ (<text>.this ..default_tag)
+ ))
(def: .public visibility
(Parser Visibility)
@@ -1826,14 +1826,14 @@
(Parser (Abstract_Method Code))
(<| <code>.form
(<>.after (<code>.this_text ..abstract_tag))
- ($_ <>.and
- <code>.text
- ..visibility
- (<code>.tuple (<>.some ..annotation))
- (<code>.tuple (<>.some ..var))
- (<code>.tuple (<>.some ..argument))
- ..return
- (<code>.tuple (<>.some ..class)))))
+ (all <>.and
+ <code>.text
+ ..visibility
+ (<code>.tuple (<>.some ..annotation))
+ (<code>.tuple (<>.some ..var))
+ (<code>.tuple (<>.some ..argument))
+ ..return
+ (<code>.tuple (<>.some ..class)))))
(def: (method_mapping of_class parameters)
(-> Mapping (List (Type Var)) (Check Mapping))
@@ -1888,16 +1888,16 @@
(Parser (Constructor Code))
(<| <code>.form
(<>.after (<code>.this_text ..constructor_tag))
- ($_ <>.and
- ..visibility
- <code>.bit
- (<code>.tuple (<>.some ..annotation))
- (<code>.tuple (<>.some ..var))
- (<code>.tuple (<>.some ..class))
- <code>.text
- (<code>.tuple (<>.some ..argument))
- (<code>.tuple (<>.some ..input))
- <code>.any)))
+ (all <>.and
+ ..visibility
+ <code>.bit
+ (<code>.tuple (<>.some ..annotation))
+ (<code>.tuple (<>.some ..var))
+ (<code>.tuple (<>.some ..class))
+ <code>.text
+ (<code>.tuple (<>.some ..argument))
+ (<code>.tuple (<>.some ..input))
+ <code>.any)))
(def: .public (analyse_constructor_method analyse archive selfT mapping method)
(-> Phase Archive .Type Mapping (Constructor Code) (Operation Analysis))
@@ -1968,18 +1968,18 @@
(Parser (Virtual_Method Code))
(<| <code>.form
(<>.after (<code>.this_text ..virtual_tag))
- ($_ <>.and
- <code>.text
- ..visibility
- <code>.bit
- <code>.bit
- (<code>.tuple (<>.some ..annotation))
- (<code>.tuple (<>.some ..var))
- <code>.text
- (<code>.tuple (<>.some ..argument))
- ..return
- (<code>.tuple (<>.some ..class))
- <code>.any)))
+ (all <>.and
+ <code>.text
+ ..visibility
+ <code>.bit
+ <code>.bit
+ (<code>.tuple (<>.some ..annotation))
+ (<code>.tuple (<>.some ..var))
+ <code>.text
+ (<code>.tuple (<>.some ..argument))
+ ..return
+ (<code>.tuple (<>.some ..class))
+ <code>.any)))
(type: .public (Method_Declaration a)
(Record
@@ -1993,14 +1993,14 @@
(def: .public method_declaration
(Parser (Method_Declaration Code))
(<code>.form
- ($_ <>.and
- <code>.text
- (<code>.tuple (<>.some ..annotation))
- (<code>.tuple (<>.some ..var))
- (<code>.tuple (<>.some ..class))
- (<code>.tuple (<>.some ..type))
- ..return
- )))
+ (all <>.and
+ <code>.text
+ (<code>.tuple (<>.some ..annotation))
+ (<code>.tuple (<>.some ..var))
+ (<code>.tuple (<>.some ..class))
+ (<code>.tuple (<>.some ..type))
+ ..return
+ )))
(def: .public (analyse_virtual_method analyse archive selfT mapping method)
(-> Phase Archive .Type Mapping (Virtual_Method Code) (Operation Analysis))
@@ -2066,16 +2066,16 @@
(Parser (Static_Method Code))
(<| <code>.form
(<>.after (<code>.this_text ..static_tag))
- ($_ <>.and
- <code>.text
- ..visibility
- <code>.bit
- (<code>.tuple (<>.some ..annotation))
- (<code>.tuple (<>.some ..var))
- (<code>.tuple (<>.some ..argument))
- ..return
- (<code>.tuple (<>.some ..class))
- <code>.any)))
+ (all <>.and
+ <code>.text
+ ..visibility
+ <code>.bit
+ (<code>.tuple (<>.some ..annotation))
+ (<code>.tuple (<>.some ..var))
+ (<code>.tuple (<>.some ..argument))
+ ..return
+ (<code>.tuple (<>.some ..class))
+ <code>.any)))
(def: .public (analyse_static_method analyse archive mapping method)
(-> Phase Archive Mapping (Static_Method Code) (Operation Analysis))
@@ -2140,18 +2140,18 @@
(Parser (Overriden_Method Code))
(<| <code>.form
(<>.after (<code>.this_text ..overriden_tag))
- ($_ <>.and
- ..class
- <code>.text
- <code>.bit
- (<code>.tuple (<>.some ..annotation))
- (<code>.tuple (<>.some ..var))
- <code>.text
- (<code>.tuple (<>.some ..argument))
- ..return
- (<code>.tuple (<>.some ..class))
- <code>.any
- )))
+ (all <>.and
+ ..class
+ <code>.text
+ <code>.bit
+ (<code>.tuple (<>.some ..annotation))
+ (<code>.tuple (<>.some ..var))
+ <code>.text
+ (<code>.tuple (<>.some ..argument))
+ ..return
+ (<code>.tuple (<>.some ..class))
+ <code>.any
+ )))
(exception: .public (unknown_super [name Text
supers (List (Type Class))])
@@ -2396,9 +2396,9 @@
(try#each (|>> (format.result class.writer)
[name])
(class.class version.v6_0
- ($_ modifier#composite
- class.public
- modifier)
+ (all modifier#composite
+ class.public
+ modifier)
(name.internal name)
{.#Some signature}
(..class_name super)
@@ -2409,11 +2409,11 @@
(def: constant::modifier
(Modifier field.Field)
- ($_ modifier#composite
- field.public
- field.static
- field.final
- ))
+ (all modifier#composite
+ field.public
+ field.static
+ field.final
+ ))
(def: (field_definition field)
(-> Field (Resource field.Field))
@@ -2484,24 +2484,24 @@
_.return
{.#Left valueT}
- ($_ _.composite
- (mock_value valueT)
- (case (jvm.primitive? valueT)
- {.#Left classT}
- _.areturn
-
- {.#Right primitiveT}
- (cond (# jvm.equivalence = jvm.long primitiveT)
- _.lreturn
+ (all _.composite
+ (mock_value valueT)
+ (case (jvm.primitive? valueT)
+ {.#Left classT}
+ _.areturn
+
+ {.#Right primitiveT}
+ (cond (# jvm.equivalence = jvm.long primitiveT)
+ _.lreturn
- (# jvm.equivalence = jvm.float primitiveT)
- _.freturn
+ (# jvm.equivalence = jvm.float primitiveT)
+ _.freturn
- (# jvm.equivalence = jvm.double primitiveT)
- _.dreturn
+ (# jvm.equivalence = jvm.double primitiveT)
+ _.dreturn
- ... jvm.boolean jvm.byte jvm.short jvm.int jvm.char
- _.ireturn)))))
+ ... jvm.boolean jvm.byte jvm.short jvm.int jvm.char
+ _.ireturn)))))
(def: (mock_method super method)
(-> (Type Class) (Method_Definition Code) (Resource method.Method))
@@ -2509,32 +2509,32 @@
{#Constructor [privacy strict_floating_point? annotations variables exceptions
self arguments constructor_arguments
body]}
- (method.method ($_ modifier#composite
- (..method_privacy privacy)
- (if strict_floating_point?
- method.strict
- modifier.empty))
+ (method.method (all modifier#composite
+ (..method_privacy privacy)
+ (if strict_floating_point?
+ method.strict
+ modifier.empty))
..constructor_name
#0 (jvm.method [variables (list#each product.right arguments) jvm.void exceptions])
(list)
- {.#Some ($_ _.composite
- (_.aload 0)
- (|> constructor_arguments
- (list#each (|>> product.left ..mock_value))
- (monad.all _.monad))
- (|> (jvm.method [(list) (list#each product.left constructor_arguments) jvm.void (list)])
- (_.invokespecial super ..constructor_name))
- _.return
- )})
+ {.#Some (all _.composite
+ (_.aload 0)
+ (|> constructor_arguments
+ (list#each (|>> product.left ..mock_value))
+ (monad.all _.monad))
+ (|> (jvm.method [(list) (list#each product.left constructor_arguments) jvm.void (list)])
+ (_.invokespecial super ..constructor_name))
+ _.return
+ )})
{#Overriden_Method [super name strict_floating_point? annotations variables
self arguments return exceptions
body]}
- (method.method ($_ modifier#composite
- method.public
- (if strict_floating_point?
- method.strict
- modifier.empty))
+ (method.method (all modifier#composite
+ method.public
+ (if strict_floating_point?
+ method.strict
+ modifier.empty))
name
#0 (jvm.method [variables (list#each product.right arguments) return exceptions])
(list)
@@ -2543,14 +2543,14 @@
{#Virtual_Method [name privacy final? strict_floating_point? annotations variables
self arguments return exceptions
body]}
- (method.method ($_ modifier#composite
- (..method_privacy privacy)
- (if strict_floating_point?
- method.strict
- modifier.empty)
- (if final?
- method.final
- modifier.empty))
+ (method.method (all modifier#composite
+ (..method_privacy privacy)
+ (if strict_floating_point?
+ method.strict
+ modifier.empty)
+ (if final?
+ method.final
+ modifier.empty))
name
#0 (jvm.method [variables (list#each product.right arguments) return exceptions])
(list)
@@ -2559,12 +2559,12 @@
{#Static_Method [name privacy strict_floating_point? annotations
variables arguments return exceptions
body]}
- (method.method ($_ modifier#composite
- method.static
- (..method_privacy privacy)
- (if strict_floating_point?
- method.strict
- modifier.empty))
+ (method.method (all modifier#composite
+ method.static
+ (..method_privacy privacy)
+ (if strict_floating_point?
+ method.strict
+ modifier.empty))
name
#0 (jvm.method [variables (list#each product.right arguments) return exceptions])
(list)
@@ -2572,9 +2572,9 @@
{#Abstract_Method [name privacy annotations
variables arguments return exceptions]}
- (method.method ($_ modifier#composite
- method.abstract
- (..method_privacy privacy))
+ (method.method (all modifier#composite
+ method.abstract
+ (..method_privacy privacy))
name
#0 (jvm.method [variables (list#each product.right arguments) return exceptions])
(list)
@@ -2594,12 +2594,12 @@
(def: (class::anonymous class_loader host)
(-> java/lang/ClassLoader runtime.Host Handler)
(..custom
- [($_ <>.and
- (<code>.tuple (<>.some ..var))
- ..class
- (<code>.tuple (<>.some ..class))
- (<code>.tuple (<>.some ..input))
- (<code>.tuple (<>.some ..overriden_method_definition)))
+ [(all <>.and
+ (<code>.tuple (<>.some ..var))
+ ..class
+ (<code>.tuple (<>.some ..class))
+ (<code>.tuple (<>.some ..input))
+ (<code>.tuple (<>.some ..overriden_method_definition)))
(function (_ extension_name analyse archive [parameters
super_class
super_interfaces
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/lua.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/lua.lux
index a0e5d2a1c..6f5b62016 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/lua.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/lua.lux
@@ -88,7 +88,7 @@
(def: array::write
Handler
(custom
- [($_ <>.and <code>.any <code>.any <code>.any)
+ [(all <>.and <code>.any <code>.any <code>.any)
(function (_ extension phase archive [indexC valueC arrayC])
(<| analysis/type.with_var
(function (_ [@read :read:]))
@@ -107,7 +107,7 @@
(def: array::delete
Handler
(custom
- [($_ <>.and <code>.any <code>.any)
+ [(all <>.and <code>.any <code>.any)
(function (_ extension phase archive [indexC arrayC])
(<| analysis/type.with_var
(function (_ [@read :read:]))
@@ -135,7 +135,7 @@
(def: object::get
Handler
(custom
- [($_ <>.and <code>.text <code>.any)
+ [(all <>.and <code>.text <code>.any)
(function (_ extension phase archive [fieldC objectC])
(do phase.monad
[objectA (analysis/type.expecting ..Object
@@ -147,7 +147,7 @@
(def: object::do
Handler
(custom
- [($_ <>.and <code>.text <code>.any (<code>.tuple (<>.some <code>.any)))
+ [(all <>.and <code>.text <code>.any (<code>.tuple (<>.some <code>.any)))
(function (_ extension phase archive [methodC objectC inputsC])
(do [! phase.monad]
[objectA (analysis/type.expecting ..Object
@@ -204,7 +204,7 @@
(def: lua::apply
Handler
(custom
- [($_ <>.and <code>.any (<code>.tuple (<>.some <code>.any)))
+ [(all <>.and <code>.any (<code>.tuple (<>.some <code>.any)))
(function (_ extension phase archive [abstractionC inputsC])
(do [! phase.monad]
[abstractionA (analysis/type.expecting ..Function
@@ -216,7 +216,7 @@
(def: lua::power
Handler
(custom
- [($_ <>.and <code>.any <code>.any)
+ [(all <>.and <code>.any <code>.any)
(function (_ extension phase archive [powerC baseC])
(do [! phase.monad]
[powerA (analysis/type.expecting Frac
@@ -238,7 +238,7 @@
(def: lua::function
Handler
(custom
- [($_ <>.and <code>.nat <code>.any)
+ [(all <>.and <code>.nat <code>.any)
(function (_ extension phase archive [arity abstractionC])
(do phase.monad
[.let [inputT (type.tuple (list.repeated arity Any))]
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux
index bf2f53507..6ff97bb35 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux
@@ -96,11 +96,11 @@
(def: lux::syntax_char_case!
(..custom
- [($_ <>.and
- <code>.any
- (<code>.tuple (<>.some (<>.and (<code>.tuple (<>.many ..text_char))
- <code>.any)))
- <code>.any)
+ [(all <>.and
+ <code>.any
+ (<code>.tuple (<>.some (<>.and (<code>.tuple (<>.many ..text_char))
+ <code>.any)))
+ <code>.any)
(function (_ extension_name phase archive [input conditionals else])
(do [! ////.monad]
[input (<| (typeA.expecting text.Char)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/php.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/php.lux
index 760db788c..6d7b0d128 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/php.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/php.lux
@@ -72,7 +72,7 @@
(def: array::write
Handler
(custom
- [($_ <>.and <c>.any <c>.any <c>.any)
+ [(all <>.and <c>.any <c>.any <c>.any)
(function (_ extension phase archive [indexC valueC arrayC])
(<| analysis/type.with_var
(function (_ [@var :var:]))
@@ -89,7 +89,7 @@
(def: array::delete
Handler
(custom
- [($_ <>.and <c>.any <c>.any)
+ [(all <>.and <c>.any <c>.any)
(function (_ extension phase archive [indexC arrayC])
(<| analysis/type.with_var
(function (_ [@var :var:]))
@@ -127,7 +127,7 @@
(def: object::new
Handler
(custom
- [($_ <>.and <c>.text (<>.some <c>.any))
+ [(all <>.and <c>.text (<>.some <c>.any))
(function (_ extension phase archive [constructor inputsC])
(do [! phase.monad]
[inputsA (monad.each ! (|>> (phase archive) (analysis/type.with_type Any)) inputsC)
@@ -137,7 +137,7 @@
(def: object::get
Handler
(custom
- [($_ <>.and <c>.text <c>.any)
+ [(all <>.and <c>.text <c>.any)
(function (_ extension phase archive [fieldC objectC])
(do phase.monad
[objectA (analysis/type.with_type ..Object
@@ -149,7 +149,7 @@
(def: object::do
Handler
(custom
- [($_ <>.and <c>.text <c>.any (<>.some <c>.any))
+ [(all <>.and <c>.text <c>.any (<>.some <c>.any))
(function (_ extension phase archive [methodC objectC inputsC])
(do [! phase.monad]
[objectA (analysis/type.with_type ..Object
@@ -183,7 +183,7 @@
(def: php::apply
Handler
(custom
- [($_ <>.and <c>.any (<>.some <c>.any))
+ [(all <>.and <c>.any (<>.some <c>.any))
(function (_ extension phase archive [abstractionC inputsC])
(do [! phase.monad]
[abstractionA (analysis/type.with_type ..Function
@@ -195,7 +195,7 @@
(def: php::pack
Handler
(custom
- [($_ <>.and <c>.any <c>.any)
+ [(all <>.and <c>.any <c>.any)
(function (_ extension phase archive [formatC dataC])
(do [! phase.monad]
[formatA (analysis/type.with_type Text
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/python.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/python.lux
index ceecbce4f..9156e497b 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/python.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/python.lux
@@ -76,7 +76,7 @@
(def: array::write
Handler
(custom
- [($_ <>.and <code>.any <code>.any <code>.any)
+ [(all <>.and <code>.any <code>.any <code>.any)
(function (_ extension phase archive [indexC valueC arrayC])
(<| analysis/type.with_var
(function (_ [@read :read:]))
@@ -95,7 +95,7 @@
(def: array::delete
Handler
(custom
- [($_ <>.and <code>.any <code>.any)
+ [(all <>.and <code>.any <code>.any)
(function (_ extension phase archive [indexC arrayC])
(<| analysis/type.with_var
(function (_ [@read :read:]))
@@ -139,7 +139,7 @@
(def: object::get
Handler
(custom
- [($_ <>.and <code>.text <code>.any)
+ [(all <>.and <code>.text <code>.any)
(function (_ extension phase archive [fieldC objectC])
(do phase.monad
[objectA (analysis/type.expecting ..Object
@@ -151,7 +151,7 @@
(def: object::do
Handler
(custom
- [($_ <>.and <code>.text <code>.any (<code>.tuple (<>.some <code>.any)))
+ [(all <>.and <code>.text <code>.any (<code>.tuple (<>.some <code>.any)))
(function (_ extension phase archive [methodC objectC inputsC])
(do [! phase.monad]
[objectA (analysis/type.expecting ..Object
@@ -193,7 +193,7 @@
(def: python::apply
Handler
(custom
- [($_ <>.and <code>.any (<code>.tuple (<>.some <code>.any)))
+ [(all <>.and <code>.any (<code>.tuple (<>.some <code>.any)))
(function (_ extension phase archive [abstractionC inputsC])
(do [! phase.monad]
[abstractionA (analysis/type.expecting ..Function
@@ -205,7 +205,7 @@
(def: python::function
Handler
(custom
- [($_ <>.and <code>.nat <code>.any)
+ [(all <>.and <code>.nat <code>.any)
(function (_ extension phase archive [arity abstractionC])
(do phase.monad
[.let [inputT (type.tuple (list.repeated arity Any))]
@@ -218,7 +218,7 @@
(def: python::exec
Handler
(custom
- [($_ <>.and <code>.any <code>.any)
+ [(all <>.and <code>.any <code>.any)
(function (_ extension phase archive [codeC globalsC])
(do phase.monad
[codeA (analysis/type.expecting Text
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/ruby.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/ruby.lux
index 8af81e312..9ab5d8351 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/ruby.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/ruby.lux
@@ -76,7 +76,7 @@
(def: array::write
Handler
(custom
- [($_ <>.and <code>.any <code>.any <code>.any)
+ [(all <>.and <code>.any <code>.any <code>.any)
(function (_ extension phase archive [indexC valueC arrayC])
(<| analysis/type.with_var
(function (_ [@read :read:]))
@@ -95,7 +95,7 @@
(def: array::delete
Handler
(custom
- [($_ <>.and <code>.any <code>.any)
+ [(all <>.and <code>.any <code>.any)
(function (_ extension phase archive [indexC arrayC])
(<| analysis/type.with_var
(function (_ [@read :read:]))
@@ -135,7 +135,7 @@
(def: object::get
Handler
(custom
- [($_ <>.and <code>.text <code>.any)
+ [(all <>.and <code>.text <code>.any)
(function (_ extension phase archive [fieldC objectC])
(do phase.monad
[objectA (<| (analysis/type.expecting ..Object)
@@ -147,7 +147,7 @@
(def: object::do
Handler
(custom
- [($_ <>.and <code>.text <code>.any (<code>.tuple (<>.some <code>.any)))
+ [(all <>.and <code>.text <code>.any (<code>.tuple (<>.some <code>.any)))
(function (_ extension phase archive [methodC objectC inputsC])
(do [! phase.monad]
[objectA (<| (analysis/type.expecting ..Object)
@@ -180,7 +180,7 @@
(def: ruby::apply
Handler
(custom
- [($_ <>.and <code>.any (<code>.tuple (<>.some <code>.any)))
+ [(all <>.and <code>.any (<code>.tuple (<>.some <code>.any)))
(function (_ extension phase archive [abstractionC inputsC])
(do [! phase.monad]
[abstractionA (<| (analysis/type.expecting ..Function)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/scheme.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/scheme.lux
index da2c2e828..fb119ae7e 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/scheme.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/scheme.lux
@@ -72,7 +72,7 @@
(def: array::write
Handler
(custom
- [($_ <>.and <c>.any <c>.any <c>.any)
+ [(all <>.and <c>.any <c>.any <c>.any)
(function (_ extension phase archive [indexC valueC arrayC])
(<| analysis/type.with_var
(function (_ [@var :var:]))
@@ -89,7 +89,7 @@
(def: array::delete
Handler
(custom
- [($_ <>.and <c>.any <c>.any)
+ [(all <>.and <c>.any <c>.any)
(function (_ extension phase archive [indexC arrayC])
(<| analysis/type.with_var
(function (_ [@var :var:]))
@@ -140,7 +140,7 @@
(def: scheme::apply
Handler
(custom
- [($_ <>.and <c>.any (<>.some <c>.any))
+ [(all <>.and <c>.any (<>.some <c>.any))
(function (_ extension phase archive [abstractionC inputsC])
(do [! phase.monad]
[abstractionA (analysis/type.with_type ..Function
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/jvm.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/jvm.lux
index 0906183ef..1a30f6bc6 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/jvm.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/jvm.lux
@@ -111,14 +111,14 @@
(def: visibility'
(<text>.Parser (Modifier field.Field))
- (`` ($_ <>.either
- (~~ (template [<label> <modifier>]
- [(<>.after (<text>.this <label>) (<>#in <modifier>))]
+ (`` (all <>.either
+ (~~ (template [<label> <modifier>]
+ [(<>.after (<text>.this <label>) (<>#in <modifier>))]
- ["public" field.public]
- ["private" field.private]
- ["protected" field.protected]
- ["default" modifier.empty])))))
+ ["public" field.public]
+ ["private" field.private]
+ ["protected" field.protected]
+ ["default" modifier.empty])))))
(def: visibility
(Parser (Modifier field.Field))
@@ -126,23 +126,23 @@
(def: inheritance
(Parser (Modifier class.Class))
- (`` ($_ <>.either
- (~~ (template [<label> <modifier>]
- [(<>.after (<code>.this_text <label>) (<>#in <modifier>))]
+ (`` (all <>.either
+ (~~ (template [<label> <modifier>]
+ [(<>.after (<code>.this_text <label>) (<>#in <modifier>))]
- ["final" class.final]
- ["abstract" class.abstract]
- ["default" modifier.empty])))))
+ ["final" class.final]
+ ["abstract" class.abstract]
+ ["default" modifier.empty])))))
(def: state
(Parser (Modifier field.Field))
- (`` ($_ <>.either
- (~~ (template [<label> <modifier>]
- [(<>.after (<code>.this_text <label>) (<>#in <modifier>))]
+ (`` (all <>.either
+ (~~ (template [<label> <modifier>]
+ [(<>.after (<code>.this_text <label>) (<>#in <modifier>))]
- ["volatile" field.volatile]
- ["final" field.final]
- ["default" modifier.empty])))))
+ ["volatile" field.volatile]
+ ["final" field.final]
+ ["default" modifier.empty])))))
(type: Annotation Any)
@@ -161,12 +161,12 @@
(Parser Constant)
(<| <code>.form
(<>.after (<code>.this_text "constant"))
- ($_ <>.and
- <code>.text
- (<code>.tuple (<>.some ..annotation))
- ..field_type
- <code>.any
- )))
+ (all <>.and
+ <code>.text
+ (<code>.tuple (<>.some ..annotation))
+ ..field_type
+ <code>.any
+ )))
(type: Variable
[Text (Modifier field.Field) (Modifier field.Field) Bit (List Annotation) (Type Value)])
@@ -175,14 +175,14 @@
(Parser Variable)
(<| <code>.form
(<>.after (<code>.this_text "variable"))
- ($_ <>.and
- <code>.text
- ..visibility
- ..state
- (<>.parses? (<code>.this_text jvm.static_tag))
- (<code>.tuple (<>.some ..annotation))
- ..field_type
- )))
+ (all <>.and
+ <code>.text
+ ..visibility
+ ..state
+ (<>.parses? (<code>.this_text jvm.static_tag))
+ (<code>.tuple (<>.some ..annotation))
+ ..field_type
+ )))
(type: Field
(Variant
@@ -191,10 +191,10 @@
(def: field
(Parser Field)
- ($_ <>.or
- ..constant
- ..variable
- ))
+ (all <>.or
+ ..constant
+ ..variable
+ ))
(type: (Method_Definition a)
(Variant
@@ -206,13 +206,13 @@
(def: method
(Parser (Method_Definition Code))
- ($_ <>.or
- jvm.constructor_definition
- jvm.virtual_method_definition
- jvm.static_method_definition
- jvm.overriden_method_definition
- jvm.abstract_method_definition
- ))
+ (all <>.or
+ jvm.constructor_definition
+ jvm.virtual_method_definition
+ jvm.static_method_definition
+ jvm.overriden_method_definition
+ jvm.abstract_method_definition
+ ))
(def: $Object
(Type Class)
@@ -220,10 +220,10 @@
(def: constant::modifier
(Modifier field.Field)
- ($_ modifier#composite
- field.public
- field.static
- field.final))
+ (all modifier#composite
+ field.public
+ field.static
+ field.final))
(def: (field_definition field)
(-> Field (Resource field.Field))
@@ -254,12 +254,12 @@
... TODO: Handle annotations.
{#Variable [name visibility state static? annotations type]}
- (field.field ($_ modifier#composite
- (if static?
- field.static
- modifier.empty)
- visibility
- state)
+ (field.field (all modifier#composite
+ (if static?
+ field.static
+ modifier.empty)
+ visibility
+ state)
name #1 type sequence.empty)))
(def: annotation_parameter_synthesis
@@ -295,114 +295,114 @@
(<synthesis>.function 1)
(<synthesis>.loop (<>.exactly 0 <synthesis>.any))
<synthesis>.tuple
- ($_ <>.either
- (<| (<>.after (<synthesis>.this_text ""))
- (<>#each (host.hidden_method_body arity))
- <synthesis>.any)
- <synthesis>.any)))
+ (all <>.either
+ (<| (<>.after (<synthesis>.this_text ""))
+ (<>#each (host.hidden_method_body arity))
+ <synthesis>.any)
+ <synthesis>.any)))
(def: constructor_synthesis
(<synthesis>.Parser (jvm.Constructor Synthesis))
(<| <synthesis>.tuple
(<>.after (<synthesis>.this_text jvm.constructor_tag))
- ($_ <>.and
- (<text>.then jvm.visibility' <synthesis>.text)
- <synthesis>.bit
- (<synthesis>.tuple (<>.some ..annotation_synthesis))
- (<synthesis>.tuple (<>.some ..var_type_synthesis))
- (<synthesis>.tuple (<>.some ..class_type_synthesis))
- <synthesis>.text
- (do <>.monad
- [args (<synthesis>.tuple (<>.some ..argument_synthesis))]
- ($_ <>.and
- (in args)
- (<synthesis>.tuple (<>.some ..input_synthesis))
- (..method_body (list.size args))))
- )))
+ (all <>.and
+ (<text>.then jvm.visibility' <synthesis>.text)
+ <synthesis>.bit
+ (<synthesis>.tuple (<>.some ..annotation_synthesis))
+ (<synthesis>.tuple (<>.some ..var_type_synthesis))
+ (<synthesis>.tuple (<>.some ..class_type_synthesis))
+ <synthesis>.text
+ (do <>.monad
+ [args (<synthesis>.tuple (<>.some ..argument_synthesis))]
+ (all <>.and
+ (in args)
+ (<synthesis>.tuple (<>.some ..input_synthesis))
+ (..method_body (list.size args))))
+ )))
(def: overriden_method_synthesis
(<synthesis>.Parser (jvm.Overriden_Method Synthesis))
(<| <synthesis>.tuple
(<>.after (<synthesis>.this_text jvm.overriden_tag))
- ($_ <>.and
- ..class_type_synthesis
- <synthesis>.text
- <synthesis>.bit
- (<synthesis>.tuple (<>.some ..annotation_synthesis))
- (<synthesis>.tuple (<>.some ..var_type_synthesis))
- <synthesis>.text
- (do <>.monad
- [args (<synthesis>.tuple (<>.some ..argument_synthesis))]
- ($_ <>.and
- (in args)
- ..return_type_synthesis
- (<synthesis>.tuple (<>.some ..class_type_synthesis))
- (..method_body (list.size args))))
- )))
+ (all <>.and
+ ..class_type_synthesis
+ <synthesis>.text
+ <synthesis>.bit
+ (<synthesis>.tuple (<>.some ..annotation_synthesis))
+ (<synthesis>.tuple (<>.some ..var_type_synthesis))
+ <synthesis>.text
+ (do <>.monad
+ [args (<synthesis>.tuple (<>.some ..argument_synthesis))]
+ (all <>.and
+ (in args)
+ ..return_type_synthesis
+ (<synthesis>.tuple (<>.some ..class_type_synthesis))
+ (..method_body (list.size args))))
+ )))
(def: virtual_method_synthesis
(<synthesis>.Parser (jvm.Virtual_Method Synthesis))
(<| <synthesis>.tuple
(<>.after (<synthesis>.this_text jvm.virtual_tag))
- ($_ <>.and
- <synthesis>.text
- (<text>.then jvm.visibility' <synthesis>.text)
- <synthesis>.bit
- <synthesis>.bit
- (<synthesis>.tuple (<>.some ..annotation_synthesis))
- (<synthesis>.tuple (<>.some ..var_type_synthesis))
- <synthesis>.text
- (do <>.monad
- [args (<synthesis>.tuple (<>.some ..argument_synthesis))]
- ($_ <>.and
- (in args)
- ..return_type_synthesis
- (<synthesis>.tuple (<>.some ..class_type_synthesis))
- (..method_body (list.size args))))
- )))
+ (all <>.and
+ <synthesis>.text
+ (<text>.then jvm.visibility' <synthesis>.text)
+ <synthesis>.bit
+ <synthesis>.bit
+ (<synthesis>.tuple (<>.some ..annotation_synthesis))
+ (<synthesis>.tuple (<>.some ..var_type_synthesis))
+ <synthesis>.text
+ (do <>.monad
+ [args (<synthesis>.tuple (<>.some ..argument_synthesis))]
+ (all <>.and
+ (in args)
+ ..return_type_synthesis
+ (<synthesis>.tuple (<>.some ..class_type_synthesis))
+ (..method_body (list.size args))))
+ )))
(def: static_method_synthesis
(<synthesis>.Parser (jvm.Static_Method Synthesis))
(<| <synthesis>.tuple
(<>.after (<synthesis>.this_text jvm.static_tag))
- ($_ <>.and
- <synthesis>.text
- (<text>.then jvm.visibility' <synthesis>.text)
- <synthesis>.bit
- (<synthesis>.tuple (<>.some ..annotation_synthesis))
- (<synthesis>.tuple (<>.some ..var_type_synthesis))
- (do <>.monad
- [args (<synthesis>.tuple (<>.some ..argument_synthesis))]
- ($_ <>.and
- (in args)
- ..return_type_synthesis
- (<synthesis>.tuple (<>.some ..class_type_synthesis))
- (..method_body (list.size args))))
- )))
+ (all <>.and
+ <synthesis>.text
+ (<text>.then jvm.visibility' <synthesis>.text)
+ <synthesis>.bit
+ (<synthesis>.tuple (<>.some ..annotation_synthesis))
+ (<synthesis>.tuple (<>.some ..var_type_synthesis))
+ (do <>.monad
+ [args (<synthesis>.tuple (<>.some ..argument_synthesis))]
+ (all <>.and
+ (in args)
+ ..return_type_synthesis
+ (<synthesis>.tuple (<>.some ..class_type_synthesis))
+ (..method_body (list.size args))))
+ )))
(def: abstract_method_synthesis
(<synthesis>.Parser (jvm.Abstract_Method Synthesis))
(<| <synthesis>.tuple
(<>.after (<synthesis>.this_text jvm.abstract_tag))
- ($_ <>.and
- <synthesis>.text
- (<text>.then jvm.visibility' <synthesis>.text)
- (<synthesis>.tuple (<>.some ..annotation_synthesis))
- (<synthesis>.tuple (<>.some ..var_type_synthesis))
- (<synthesis>.tuple (<>.some ..argument_synthesis))
- ..return_type_synthesis
- (<synthesis>.tuple (<>.some ..class_type_synthesis))
- )))
+ (all <>.and
+ <synthesis>.text
+ (<text>.then jvm.visibility' <synthesis>.text)
+ (<synthesis>.tuple (<>.some ..annotation_synthesis))
+ (<synthesis>.tuple (<>.some ..var_type_synthesis))
+ (<synthesis>.tuple (<>.some ..argument_synthesis))
+ ..return_type_synthesis
+ (<synthesis>.tuple (<>.some ..class_type_synthesis))
+ )))
(def: method_synthesis
(<synthesis>.Parser (Method_Definition Synthesis))
- ($_ <>.or
- ..constructor_synthesis
- ..virtual_method_synthesis
- ..static_method_synthesis
- ..overriden_method_synthesis
- ..abstract_method_synthesis
- ))
+ (all <>.or
+ ..constructor_synthesis
+ ..virtual_method_synthesis
+ ..static_method_synthesis
+ ..overriden_method_synthesis
+ ..abstract_method_synthesis
+ ))
(def: composite
(-> (List (Bytecode Any)) (Bytecode Any))
@@ -419,17 +419,17 @@
[(n.+ 1 jvm_register)
(if (n.= lux_register jvm_register)
(_#in [])
- ($_ _.composite
- (_.aload jvm_register)
- (_.astore lux_register)))]
+ (all _.composite
+ (_.aload jvm_register)
+ (_.astore lux_register)))]
{.#Right argumentT}
(template.let [(wrap_primitive <shift> <load> <type>)
[[(n.+ <shift> jvm_register)
- ($_ _.composite
- (<load> jvm_register)
- (value.wrap <type>)
- (_.astore lux_register))]]]
+ (all _.composite
+ (<load> jvm_register)
+ (value.wrap <type>)
+ (_.astore lux_register))]]]
(`` (cond (~~ (template [<shift> <load> <type>]
[(# type.equivalence = <type> argumentT)
(wrap_primitive <shift> <load> <type>)]
@@ -451,7 +451,7 @@
list.enumeration
(list#mix (function (_ [lux_register type] [jvm_register before])
(let [[jvm_register' after] (method_argument (n.+ offset lux_register) type jvm_register)]
- [jvm_register' ($_ _.composite before after)]))
+ [jvm_register' (all _.composite before after)]))
(is [Register (Bytecode Any)] [offset (_#in [])]))
product.right))
@@ -473,22 +473,22 @@
type.void
(list)])
argumentsT (list#each product.right arguments)]]
- (in (method.method ($_ modifier#composite
- (..method_privacy privacy)
- (if strict_floating_point?
- method.strict
- modifier.empty))
+ (in (method.method (all modifier#composite
+ (..method_privacy privacy)
+ (if strict_floating_point?
+ method.strict
+ modifier.empty))
..constructor_name
#1 (type.method [method_tvars argumentsT type.void exceptions])
(list)
- {.#Some ($_ _.composite
- (_.aload 0)
- (..composite constructor_argumentsG)
- (_.invokespecial super_class ..constructor_name super_constructorT)
- (method_arguments 1 argumentsT)
- bodyG
- _.return
- )})))))
+ {.#Some (all _.composite
+ (_.aload 0)
+ (..composite constructor_argumentsG)
+ (_.invokespecial super_class ..constructor_name super_constructorT)
+ (method_arguments 1 argumentsT)
+ bodyG
+ _.return
+ )})))))
(def: (method_return returnT)
(-> (Type Return) (Bytecode Any))
@@ -501,18 +501,18 @@
{.#Left returnT}
(case (type.class? returnT)
{.#Some class_name}
- ($_ _.composite
- (_.checkcast returnT)
- _.areturn)
+ (all _.composite
+ (_.checkcast returnT)
+ _.areturn)
{.#None}
_.areturn)
{.#Right returnT}
(template.let [(unwrap_primitive <return> <type>)
- [($_ _.composite
- (value.unwrap <type>)
- <return>)]]
+ [(all _.composite
+ (value.unwrap <type>)
+ <return>)]]
(`` (cond (~~ (template [<return> <type>]
[(# type.equivalence = <type> returnT)
(unwrap_primitive <return> <type>)]
@@ -539,18 +539,18 @@
(do !
[bodyG (generate archive bodyS)
.let [argumentsT (list#each product.right arguments)]]
- (in (method.method ($_ modifier#composite
- method.public
- (if strict_floating_point?
- method.strict
- modifier.empty))
+ (in (method.method (all modifier#composite
+ method.public
+ (if strict_floating_point?
+ method.strict
+ modifier.empty))
method_name
#1 (type.method [method_tvars argumentsT returnJ exceptionsJ])
(list)
- {.#Some ($_ _.composite
- (method_arguments 1 argumentsT)
- bodyG
- (method_return returnJ))}))))))
+ {.#Some (all _.composite
+ (method_arguments 1 argumentsT)
+ bodyG
+ (method_return returnJ))}))))))
(def: (virtual_method_generation archive method)
(-> Archive (jvm.Virtual_Method Synthesis) (Operation (Resource Method)))
@@ -563,21 +563,21 @@
(do !
[bodyG (generate archive bodyS)
.let [argumentsT (list#each product.right arguments)]]
- (in (method.method ($_ modifier#composite
- (..method_privacy privacy)
- (if strict_floating_point?
- method.strict
- modifier.empty)
- (if final?
- method.final
- modifier.empty))
+ (in (method.method (all modifier#composite
+ (..method_privacy privacy)
+ (if strict_floating_point?
+ method.strict
+ modifier.empty)
+ (if final?
+ method.final
+ modifier.empty))
method_name
#1 (type.method [method_tvars argumentsT returnJ exceptionsJ])
(list)
- {.#Some ($_ _.composite
- (method_arguments 1 argumentsT)
- bodyG
- (method_return returnJ))}))))))
+ {.#Some (all _.composite
+ (method_arguments 1 argumentsT)
+ bodyG
+ (method_return returnJ))}))))))
(def: (static_method_generation archive method)
(-> Archive (jvm.Static_Method Synthesis) (Operation (Resource Method)))
@@ -590,27 +590,27 @@
(do !
[bodyG (generate archive bodyS)
.let [argumentsT (list#each product.right arguments)]]
- (in (method.method ($_ modifier#composite
- (..method_privacy privacy)
- method.static
- (if strict_floating_point?
- method.strict
- modifier.empty))
+ (in (method.method (all modifier#composite
+ (..method_privacy privacy)
+ method.static
+ (if strict_floating_point?
+ method.strict
+ modifier.empty))
method_name
#1 (type.method [method_tvars argumentsT returnJ exceptionsJ])
(list)
- {.#Some ($_ _.composite
- (method_arguments 0 argumentsT)
- bodyG
- (method_return returnJ))}))))))
+ {.#Some (all _.composite
+ (method_arguments 0 argumentsT)
+ bodyG
+ (method_return returnJ))}))))))
(def: (abstract_method_generation method)
(-> (jvm.Abstract_Method Synthesis) (Resource Method))
(let [[name privacy annotations variables
arguments return exceptions] method]
- (method.method ($_ modifier#composite
- (..method_privacy privacy)
- method.abstract)
+ (method.method (all modifier#composite
+ (..method_privacy privacy)
+ method.abstract)
name
#1 (type.method [variables (list#each product.right arguments) return exceptions])
(list)
@@ -687,9 +687,9 @@
(try#each (|>> (format.result class.writer)
[name])
(class.class version.v6_0
- ($_ modifier#composite
- class.public
- modifier)
+ (all modifier#composite
+ class.public
+ modifier)
(name.internal name)
{.#Some signature}
(..class_name super)
@@ -724,24 +724,24 @@
_.return
{.#Left valueT}
- ($_ _.composite
- (mock_value valueT)
- (case (type.primitive? valueT)
- {.#Left classT}
- _.areturn
-
- {.#Right primitiveT}
- (cond (# type.equivalence = type.long primitiveT)
- _.lreturn
+ (all _.composite
+ (mock_value valueT)
+ (case (type.primitive? valueT)
+ {.#Left classT}
+ _.areturn
+
+ {.#Right primitiveT}
+ (cond (# type.equivalence = type.long primitiveT)
+ _.lreturn
- (# type.equivalence = type.float primitiveT)
- _.freturn
+ (# type.equivalence = type.float primitiveT)
+ _.freturn
- (# type.equivalence = type.double primitiveT)
- _.dreturn
+ (# type.equivalence = type.double primitiveT)
+ _.dreturn
- ... type.boolean type.byte type.short type.int type.char
- _.ireturn)))))
+ ... type.boolean type.byte type.short type.int type.char
+ _.ireturn)))))
(def: (mock_method super method)
(-> (Type Class) (Method_Definition Code) (Resource method.Method))
@@ -749,32 +749,32 @@
{#Constructor [privacy strict_floating_point? annotations variables exceptions
self arguments constructor_arguments
body]}
- (method.method ($_ modifier#composite
- (..method_privacy privacy)
- (if strict_floating_point?
- method.strict
- modifier.empty))
+ (method.method (all modifier#composite
+ (..method_privacy privacy)
+ (if strict_floating_point?
+ method.strict
+ modifier.empty))
..constructor_name
#1 (type.method [variables (list#each product.right arguments) type.void exceptions])
(list)
- {.#Some ($_ _.composite
- (_.aload 0)
- (|> constructor_arguments
- (list#each (|>> product.left ..mock_value))
- (monad.all _.monad))
- (|> (type.method [(list) (list#each product.left constructor_arguments) type.void (list)])
- (_.invokespecial super ..constructor_name))
- _.return
- )})
+ {.#Some (all _.composite
+ (_.aload 0)
+ (|> constructor_arguments
+ (list#each (|>> product.left ..mock_value))
+ (monad.all _.monad))
+ (|> (type.method [(list) (list#each product.left constructor_arguments) type.void (list)])
+ (_.invokespecial super ..constructor_name))
+ _.return
+ )})
{#Overriden_Method [super name strict_floating_point? annotations variables
self arguments return exceptions
body]}
- (method.method ($_ modifier#composite
- method.public
- (if strict_floating_point?
- method.strict
- modifier.empty))
+ (method.method (all modifier#composite
+ method.public
+ (if strict_floating_point?
+ method.strict
+ modifier.empty))
name
#1 (type.method [variables (list#each product.right arguments) return exceptions])
(list)
@@ -783,14 +783,14 @@
{#Virtual_Method [name privacy final? strict_floating_point? annotations variables
self arguments return exceptions
body]}
- (method.method ($_ modifier#composite
- (..method_privacy privacy)
- (if strict_floating_point?
- method.strict
- modifier.empty)
- (if final?
- method.final
- modifier.empty))
+ (method.method (all modifier#composite
+ (..method_privacy privacy)
+ (if strict_floating_point?
+ method.strict
+ modifier.empty)
+ (if final?
+ method.final
+ modifier.empty))
name
#1 (type.method [variables (list#each product.right arguments) return exceptions])
(list)
@@ -799,12 +799,12 @@
{#Static_Method [name privacy strict_floating_point? annotations
variables arguments return exceptions
body]}
- (method.method ($_ modifier#composite
- method.static
- (..method_privacy privacy)
- (if strict_floating_point?
- method.strict
- modifier.empty))
+ (method.method (all modifier#composite
+ method.static
+ (..method_privacy privacy)
+ (if strict_floating_point?
+ method.strict
+ modifier.empty))
name
#1 (type.method [variables (list#each product.right arguments) return exceptions])
(list)
@@ -812,9 +812,9 @@
{#Abstract_Method [name privacy annotations
variables arguments return exceptions]}
- (method.method ($_ modifier#composite
- method.abstract
- (..method_privacy privacy))
+ (method.method (all modifier#composite
+ method.abstract
+ (..method_privacy privacy))
name
#1 (type.method [variables (list#each product.right arguments) return exceptions])
(list)
@@ -855,14 +855,14 @@
(def: jvm::class
(Handler Anchor (Bytecode Any) Definition)
(/.custom
- [($_ <>.and
- ..class_declaration
- jvm.class
- (<code>.tuple (<>.some jvm.class))
- ..inheritance
- (<code>.tuple (<>.some ..annotation))
- (<code>.tuple (<>.some ..field))
- (<code>.tuple (<>.some ..method)))
+ [(all <>.and
+ ..class_declaration
+ jvm.class
+ (<code>.tuple (<>.some jvm.class))
+ ..inheritance
+ (<code>.tuple (<>.some ..annotation))
+ (<code>.tuple (<>.some ..field))
+ (<code>.tuple (<>.some ..method)))
(function (_ extension phase archive
[class_declaration
super
@@ -904,9 +904,9 @@
bytecode (<| (# ! each (format.result class.writer))
phase.lifted
(class.class version.v6_0
- ($_ modifier#composite
- class.public
- inheritance)
+ (all modifier#composite
+ class.public
+ inheritance)
(name.internal name)
{.#Some type_declaration}
(..class_name super)
@@ -920,9 +920,9 @@
(def: (method_declaration (open "/[0]"))
(-> (jvm.Method_Declaration Code) (Resource Method))
(let [type (type.method [/#type_variables /#arguments /#return /#exceptions])]
- (method.method ($_ modifier#composite
- method.public
- method.abstract)
+ (method.method (all modifier#composite
+ method.public
+ method.abstract)
/#name
#1 type
(list)
@@ -931,22 +931,22 @@
(def: jvm::class::interface
(Handler Anchor (Bytecode Any) Definition)
(/.custom
- [($_ <>.and
- ..class_declaration
- (<code>.tuple (<>.some jvm.class))
- ... TODO: Handle annotations.
- (<code>.tuple (<>.some ..annotation))
- (<>.some jvm.method_declaration))
+ [(all <>.and
+ ..class_declaration
+ (<code>.tuple (<>.some jvm.class))
+ ... TODO: Handle annotations.
+ (<code>.tuple (<>.some ..annotation))
+ (<>.some jvm.method_declaration))
(function (_ extension_name phase archive [[name parameters] supers annotations method_declarations])
(directive.lifted_generation
(do [! phase.monad]
[bytecode (<| (# ! each (format.result class.writer))
phase.lifted
(class.class version.v6_0
- ($_ modifier#composite
- class.public
- class.abstract
- class.interface)
+ (all modifier#composite
+ class.public
+ class.abstract
+ class.interface)
(name.internal name)
{.#Some (signature.inheritance (list#each type.signature parameters)
(type.signature $Object)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/lux.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/lux.lux
index a25d02ed7..2d07295c0 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/lux.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/lux.lux
@@ -274,10 +274,10 @@
(def: (def::type_tagged expander host_analysis)
(-> Expander /////analysis.Bundle Handler)
(..custom
- [($_ <>.and <code>.local <code>.any
- (<>.or (<code>.variant (<>.some <code>.text))
- (<code>.tuple (<>.some <code>.text)))
- <code>.any)
+ [(all <>.and <code>.local <code>.any
+ (<>.or (<code>.variant (<>.some <code>.text))
+ (<code>.tuple (<>.some <code>.text)))
+ <code>.any)
(function (_ extension_name phase archive [short_name valueC labels exported?C])
(do phase.monad
[current_module (/////directive.lifted_analysis
@@ -366,7 +366,7 @@
(def: def::alias
Handler
(..custom
- [($_ <>.and <code>.local <code>.symbol)
+ [(all <>.and <code>.local <code>.symbol)
(function (_ extension_name phase archive [alias def_name])
(do phase.monad
[_ (///.lifted
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/common_lisp/common.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/common_lisp/common.lux
index 9e68d5992..1c4b6e9d3 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/common_lisp/common.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/common_lisp/common.lux
@@ -56,10 +56,10 @@
... ... TODO: Get rid of this ASAP
... (def: lux::syntax_char_case!
-... (..custom [($_ <>.and
+... (..custom [(all <>.and
... <s>.any
... <s>.any
-... (<>.some (<s>.tuple ($_ <>.and
+... (<>.some (<s>.tuple (all <>.and
... (<s>.tuple (<>.many <s>.i64))
... <s>.any))))
... (function (_ extension_name phase archive [input else conditionals])
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/js/common.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/js/common.lux
index 3d2fd35f3..a85bc1fb6 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/js/common.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/js/common.lux
@@ -94,9 +94,9 @@
... [[IO]]
(def: (io//log messageG)
(Unary Expression)
- ($_ _.,
- (//runtime.io//log messageG)
- //runtime.unit))
+ (all _.,
+ (//runtime.io//log messageG)
+ //runtime.unit))
(def: .public (statement expression archive synthesis)
Phase!
@@ -149,12 +149,12 @@
... TODO: Get rid of this ASAP
(def: lux::syntax_char_case!
- (..custom [($_ <>.and
- <s>.any
- <s>.any
- (<>.some (<s>.tuple ($_ <>.and
- (<s>.tuple (<>.many <s>.i64))
- <s>.any))))
+ (..custom [(all <>.and
+ <s>.any
+ <s>.any
+ (<>.some (<s>.tuple (all <>.and
+ (<s>.tuple (<>.many <s>.i64))
+ <s>.any))))
(function (_ extension_name phase archive [input else conditionals])
(do [! /////.monad]
[inputG (phase archive input)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/js/host.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/js/host.lux
index 5037742a3..783dde8e3 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/js/host.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/js/host.lux
@@ -64,7 +64,7 @@
(def: object::new
(custom
- [($_ <>.and <s>.any (<>.some <s>.any))
+ [(all <>.and <s>.any (<>.some <s>.any))
(function (_ extension phase archive [constructorS inputsS])
(do [! ////////phase.monad]
[constructorG (phase archive constructorS)
@@ -74,7 +74,7 @@
(def: object::get
Handler
(custom
- [($_ <>.and <s>.text <s>.any)
+ [(all <>.and <s>.text <s>.any)
(function (_ extension phase archive [fieldS objectS])
(do ////////phase.monad
[objectG (phase archive objectS)]
@@ -83,7 +83,7 @@
(def: object::do
Handler
(custom
- [($_ <>.and <s>.text <s>.any (<>.some <s>.any))
+ [(all <>.and <s>.text <s>.any (<>.some <s>.any))
(function (_ extension phase archive [methodS objectS inputsS])
(do [! ////////phase.monad]
[objectG (phase archive objectS)
@@ -119,7 +119,7 @@
(def: js::apply
(custom
- [($_ <>.and <s>.any (<>.some <s>.any))
+ [(all <>.and <s>.any (<>.some <s>.any))
(function (_ extension phase archive [abstractionS inputsS])
(do [! ////////phase.monad]
[abstractionG (phase archive abstractionS)
@@ -128,7 +128,7 @@
(def: js::function
(custom
- [($_ <>.and <s>.i64 <s>.any)
+ [(all <>.and <s>.i64 <s>.any)
(function (_ extension phase archive [arity abstractionS])
(do [! ////////phase.monad]
[abstractionG (phase archive abstractionS)
@@ -139,12 +139,12 @@
(list.repeated (.nat arity) []))
g!abstraction (variable "abstraction")]
(in (_.closure g!inputs
- ($_ _.then
- (_.define g!abstraction abstractionG)
- (_.return (case (.nat arity)
- 0 (_.apply_1 g!abstraction //runtime.unit)
- 1 (_.apply_* g!abstraction g!inputs)
- _ (_.apply_1 g!abstraction (_.array g!inputs)))))))))]))
+ (all _.then
+ (_.define g!abstraction abstractionG)
+ (_.return (case (.nat arity)
+ 0 (_.apply_1 g!abstraction //runtime.unit)
+ 1 (_.apply_* g!abstraction g!inputs)
+ _ (_.apply_1 g!abstraction (_.array g!inputs)))))))))]))
(def: .public bundle
Bundle
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/jvm.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/jvm.lux
index 87684f26d..4b27edabb 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/jvm.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/jvm.lux
@@ -14,7 +14,7 @@
(def: .public bundle
Bundle
- ($_ dictionary.composite
- /common.bundle
- /host.bundle
- ))
+ (all dictionary.composite
+ /common.bundle
+ /host.bundle
+ ))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/jvm/common.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/jvm/common.lux
index eb7cb76d4..7ecc092e8 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/jvm/common.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/jvm/common.lux
@@ -68,15 +68,15 @@
(def: lux_int
(Bytecode Any)
- ($_ _.composite
- _.i2l
- (///value.wrap type.long)))
+ (all _.composite
+ _.i2l
+ (///value.wrap type.long)))
(def: jvm_int
(Bytecode Any)
- ($_ _.composite
- (///value.unwrap type.long)
- _.l2i))
+ (all _.composite
+ (///value.unwrap type.long)
+ _.l2i))
(def: (predicate bytecode)
(-> (-> Label (Bytecode Any))
@@ -84,23 +84,23 @@
(do _.monad
[@then _.new_label
@end _.new_label]
- ($_ _.composite
- (bytecode @then)
- (_.getstatic $Boolean "FALSE" $Boolean)
- (_.goto @end)
- (_.set_label @then)
- (_.getstatic $Boolean "TRUE" $Boolean)
- (_.set_label @end)
- )))
+ (all _.composite
+ (bytecode @then)
+ (_.getstatic $Boolean "FALSE" $Boolean)
+ (_.goto @end)
+ (_.set_label @then)
+ (_.getstatic $Boolean "TRUE" $Boolean)
+ (_.set_label @end)
+ )))
... TODO: Get rid of this ASAP
(def: lux::syntax_char_case!
- (..custom [($_ <>.and
- <synthesis>.any
- <synthesis>.any
- (<>.some (<synthesis>.tuple ($_ <>.and
- (<synthesis>.tuple (<>.many <synthesis>.i64))
- <synthesis>.any))))
+ (..custom [(all <>.and
+ <synthesis>.any
+ <synthesis>.any
+ (<>.some (<synthesis>.tuple (all <>.and
+ (<synthesis>.tuple (<>.many <synthesis>.i64))
+ <synthesis>.any))))
(function (_ extension_name phase archive [inputS elseS conditionalsS])
(do [! /////.monad]
[@end ///runtime.forge_label
@@ -115,10 +115,10 @@
(in [(list#each (function (_ char)
[(try.trusted (signed.s4 (.int char))) @branch])
chars)
- ($_ _.composite
- (_.set_label @branch)
- branchG
- (_.when_continuous (_.goto @end)))])))
+ (all _.composite
+ (_.set_label @branch)
+ branchG
+ (_.when_continuous (_.goto @end)))])))
conditionalsS))
.let [table (|> conditionalsG+
(list#each product.left)
@@ -128,29 +128,29 @@
(monad.all _.monad))]]
(in (do _.monad
[@else _.new_label]
- ($_ _.composite
- inputG (///value.unwrap type.long) _.l2i
- (_.lookupswitch @else table)
- conditionalsG
- (_.set_label @else)
- elseG
- (<| (_.when_acknowledged @end)
- (_.set_label @end))
- )))))]))
+ (all _.composite
+ inputG (///value.unwrap type.long) _.l2i
+ (_.lookupswitch @else table)
+ conditionalsG
+ (_.set_label @else)
+ elseG
+ (<| (_.when_acknowledged @end)
+ (_.set_label @end))
+ )))))]))
(def: (lux::is [referenceG sampleG])
(Binary (Bytecode Any))
- ($_ _.composite
- referenceG
- sampleG
- (..predicate _.if_acmpeq)))
+ (all _.composite
+ referenceG
+ sampleG
+ (..predicate _.if_acmpeq)))
(def: (lux::try riskyG)
(Unary (Bytecode Any))
- ($_ _.composite
- riskyG
- (_.checkcast ///function.class)
- ///runtime.try))
+ (all _.composite
+ riskyG
+ (_.checkcast ///function.class)
+ ///runtime.try))
(def: bundle::lux
Bundle
@@ -162,10 +162,10 @@
(template [<name> <op>]
[(def: (<name> [maskG inputG])
(Binary (Bytecode Any))
- ($_ _.composite
- inputG (///value.unwrap type.long)
- maskG (///value.unwrap type.long)
- <op> (///value.wrap type.long)))]
+ (all _.composite
+ inputG (///value.unwrap type.long)
+ maskG (///value.unwrap type.long)
+ <op> (///value.wrap type.long)))]
[i64::and _.land]
[i64::or _.lor]
@@ -175,10 +175,10 @@
(template [<name> <op>]
[(def: (<name> [shiftG inputG])
(Binary (Bytecode Any))
- ($_ _.composite
- inputG (///value.unwrap type.long)
- shiftG ..jvm_int
- <op> (///value.wrap type.long)))]
+ (all _.composite
+ inputG (///value.unwrap type.long)
+ shiftG ..jvm_int
+ <op> (///value.wrap type.long)))]
[i64::left_shifted _.lshl]
[i64::right_shifted _.lushr]
@@ -187,10 +187,10 @@
(template [<name> <type> <op>]
[(def: (<name> [paramG subjectG])
(Binary (Bytecode Any))
- ($_ _.composite
- subjectG (///value.unwrap <type>)
- paramG (///value.unwrap <type>)
- <op> (///value.wrap <type>)))]
+ (all _.composite
+ subjectG (///value.unwrap <type>)
+ paramG (///value.unwrap <type>)
+ <op> (///value.wrap <type>)))]
[i64::+ type.long _.ladd]
[i64::- type.long _.lsub]
@@ -209,12 +209,12 @@
[(template [<name> <reference>]
[(def: (<name> [paramG subjectG])
(Binary (Bytecode Any))
- ($_ _.composite
- subjectG (///value.unwrap <type>)
- paramG (///value.unwrap <type>)
- <cmp>
- <reference>
- (..predicate _.if_icmpeq)))]
+ (all _.composite
+ subjectG (///value.unwrap <type>)
+ paramG (///value.unwrap <type>)
+ <cmp>
+ <reference>
+ (..predicate _.if_icmpeq)))]
[<eq> _.iconst_0]
[<lt> _.iconst_m1])]
@@ -230,29 +230,29 @@
(template [<name> <prepare> <transform>]
[(def: (<name> inputG)
(Unary (Bytecode Any))
- ($_ _.composite
- inputG
- <prepare>
- <transform>))]
+ (all _.composite
+ inputG
+ <prepare>
+ <transform>))]
[i64::f64
(///value.unwrap type.long)
- ($_ _.composite
- _.l2d
- (///value.wrap type.double))]
+ (all _.composite
+ _.l2d
+ (///value.wrap type.double))]
[i64::char
(///value.unwrap type.long)
- ($_ _.composite
- _.l2i
- _.i2c
- (..::toString ..$Character type.char))]
+ (all _.composite
+ _.l2i
+ _.i2c
+ (..::toString ..$Character type.char))]
[f64::i64
(///value.unwrap type.double)
- ($_ _.composite
- _.d2l
- (///value.wrap type.long))]
+ (all _.composite
+ _.d2l
+ (///value.wrap type.long))]
[f64::encode
(///value.unwrap type.double)
@@ -299,21 +299,21 @@
(def: (text::size inputG)
(Unary (Bytecode Any))
- ($_ _.composite
- inputG
- (_.checkcast $String)
- (_.invokevirtual ..$String "length" (type.method [(list) (list) type.int (list)]))
- ..lux_int))
+ (all _.composite
+ inputG
+ (_.checkcast $String)
+ (_.invokevirtual ..$String "length" (type.method [(list) (list) type.int (list)]))
+ ..lux_int))
(def: no_op (Bytecode Any) (_#in []))
(template [<name> <pre_subject> <pre_param> <op> <post>]
[(def: (<name> [paramG subjectG])
(Binary (Bytecode Any))
- ($_ _.composite
- subjectG <pre_subject>
- paramG <pre_param>
- <op> <post>))]
+ (all _.composite
+ subjectG <pre_subject>
+ paramG <pre_param>
+ <op> <post>))]
[text::= ..no_op ..no_op
(_.invokevirtual ..$Object "equals" (type.method [(list) (list ..$Object) type.boolean (list)]))
@@ -328,20 +328,20 @@
(def: (text::concat [leftG rightG])
(Binary (Bytecode Any))
- ($_ _.composite
- leftG (_.checkcast $String)
- rightG (_.checkcast $String)
- (_.invokevirtual ..$String "concat" (type.method [(list) (list ..$String) ..$String (list)]))))
+ (all _.composite
+ leftG (_.checkcast $String)
+ rightG (_.checkcast $String)
+ (_.invokevirtual ..$String "concat" (type.method [(list) (list ..$String) ..$String (list)]))))
(def: (text::clip [offset! length! subject!])
(Trinary (Bytecode Any))
- ($_ _.composite
- subject! (_.checkcast $String)
- offset! ..jvm_int
- _.dup
- length! ..jvm_int
- _.iadd
- (_.invokevirtual ..$String "substring" (type.method [(list) (list type.int type.int) ..$String (list)]))))
+ (all _.composite
+ subject! (_.checkcast $String)
+ offset! ..jvm_int
+ _.dup
+ length! ..jvm_int
+ _.iadd
+ (_.invokevirtual ..$String "substring" (type.method [(list) (list type.int type.int) ..$String (list)]))))
(def: index_method (type.method [(list) (list ..$String type.int) type.int (list)]))
(def: (text::index [startG partG textG])
@@ -349,21 +349,21 @@
(do _.monad
[@not_found _.new_label
@end _.new_label]
- ($_ _.composite
- textG (_.checkcast $String)
- partG (_.checkcast $String)
- startG ..jvm_int
- (_.invokevirtual ..$String "indexOf" index_method)
- _.dup
- _.iconst_m1
- (_.if_icmpeq @not_found)
- ..lux_int
- ///runtime.some_injection
- (_.goto @end)
- (_.set_label @not_found)
- _.pop
- ///runtime.none_injection
- (_.set_label @end))))
+ (all _.composite
+ textG (_.checkcast $String)
+ partG (_.checkcast $String)
+ startG ..jvm_int
+ (_.invokevirtual ..$String "indexOf" index_method)
+ _.dup
+ _.iconst_m1
+ (_.if_icmpeq @not_found)
+ ..lux_int
+ ///runtime.some_injection
+ (_.goto @end)
+ (_.set_label @not_found)
+ _.pop
+ ///runtime.none_injection
+ (_.set_label @end))))
(def: bundle::text
Bundle
@@ -380,22 +380,22 @@
(def: string_method (type.method [(list) (list ..$String) type.void (list)]))
(def: (io::log messageG)
(Unary (Bytecode Any))
- ($_ _.composite
- (_.getstatic ..$System "out" ..$PrintStream)
- messageG
- (_.checkcast $String)
- (_.invokevirtual ..$PrintStream "println" ..string_method)
- ///runtime.unit))
+ (all _.composite
+ (_.getstatic ..$System "out" ..$PrintStream)
+ messageG
+ (_.checkcast $String)
+ (_.invokevirtual ..$PrintStream "println" ..string_method)
+ ///runtime.unit))
(def: (io::error messageG)
(Unary (Bytecode Any))
- ($_ _.composite
- (_.new ..$Error)
- _.dup
- messageG
- (_.checkcast $String)
- (_.invokespecial ..$Error "<init>" ..string_method)
- _.athrow))
+ (all _.composite
+ (_.new ..$Error)
+ _.dup
+ messageG
+ (_.checkcast $String)
+ (_.invokespecial ..$Error "<init>" ..string_method)
+ _.athrow))
(def: bundle::io
Bundle
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/jvm/host.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/jvm/host.lux
index f5fbdaf17..908057f4d 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/jvm/host.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/jvm/host.lux
@@ -82,9 +82,9 @@
(template [<name> <0>]
[(def: <name>
(Bytecode Any)
- ($_ _.composite
- _.l2i
- <0>))]
+ (all _.composite
+ _.l2i
+ <0>))]
[l2s _.i2s]
[l2b _.i2b]
@@ -96,9 +96,9 @@
(Unary (Bytecode Any))
(if (same? _.nop <conversion>)
inputG
- ($_ _.composite
- inputG
- <conversion>)))]
+ (all _.composite
+ inputG
+ <conversion>)))]
[_.d2f conversion::double_to_float]
[_.d2i conversion::double_to_int]
@@ -171,10 +171,10 @@
(template [<name> <op>]
[(def: (<name> [parameter! subject!])
(Binary (Bytecode Any))
- ($_ _.composite
- subject!
- parameter!
- <op>))]
+ (all _.composite
+ subject!
+ parameter!
+ <op>))]
[int::+ _.iadd]
[int::- _.isub]
@@ -223,15 +223,15 @@
(do _.monad
[@then _.new_label
@end _.new_label]
- ($_ _.composite
- subject
- reference
- (<op> @then)
- falseG
- (_.goto @end)
- (_.set_label @then)
- trueG
- (_.set_label @end))))]
+ (all _.composite
+ subject
+ reference
+ (<op> @then)
+ falseG
+ (_.goto @end)
+ (_.set_label @then)
+ trueG
+ (_.set_label @end))))]
[int::= _.if_icmpeq]
[int::< _.if_icmplt]
@@ -246,17 +246,17 @@
(do _.monad
[@then _.new_label
@end _.new_label]
- ($_ _.composite
- subject
- reference
- <op>
- (_.int (i32.i32 (.i64 <reference>)))
- (_.if_icmpeq @then)
- falseG
- (_.goto @end)
- (_.set_label @then)
- trueG
- (_.set_label @end))))]
+ (all _.composite
+ subject
+ reference
+ <op>
+ (_.int (i32.i32 (.i64 <reference>)))
+ (_.if_icmpeq @then)
+ falseG
+ (_.goto @end)
+ (_.set_label @then)
+ trueG
+ (_.set_label @end))))]
[long::= _.lcmp +0]
[long::< _.lcmp -1]
@@ -389,22 +389,22 @@
(function (_ extension_name generate archive arrayS)
(do //////.monad
[arrayG (generate archive arrayS)]
- (in ($_ _.composite
- arrayG
- (_.checkcast (type.array jvm_primitive))
- _.arraylength))))]))
+ (in (all _.composite
+ arrayG
+ (_.checkcast (type.array jvm_primitive))
+ _.arraylength))))]))
(def: array::length::object
Handler
(..custom
- [($_ <>.and ..object_array <synthesis>.any)
+ [(all <>.and ..object_array <synthesis>.any)
(function (_ extension_name generate archive [elementJT arrayS])
(do //////.monad
[arrayG (generate archive arrayS)]
- (in ($_ _.composite
- arrayG
- (_.checkcast (type.array elementJT))
- _.arraylength))))]))
+ (in (all _.composite
+ arrayG
+ (_.checkcast (type.array elementJT))
+ _.arraylength))))]))
(def: (new_primitive_array_handler jvm_primitive)
(-> Primitive_Array_Type Handler)
@@ -413,82 +413,82 @@
(function (_ extension_name generate archive [lengthS])
(do //////.monad
[lengthG (generate archive lengthS)]
- (in ($_ _.composite
- lengthG
- (_.newarray jvm_primitive)))))]))
+ (in (all _.composite
+ lengthG
+ (_.newarray jvm_primitive)))))]))
(def: array::new::object
Handler
(..custom
- [($_ <>.and ..object <synthesis>.any)
+ [(all <>.and ..object <synthesis>.any)
(function (_ extension_name generate archive [objectJT lengthS])
(do //////.monad
[lengthG (generate archive lengthS)]
- (in ($_ _.composite
- lengthG
- (_.anewarray objectJT)))))]))
+ (in (all _.composite
+ lengthG
+ (_.anewarray objectJT)))))]))
(def: (read_primitive_array_handler jvm_primitive loadG)
(-> (Type Primitive) (Bytecode Any) Handler)
(..custom
- [($_ <>.and <synthesis>.any <synthesis>.any)
+ [(all <>.and <synthesis>.any <synthesis>.any)
(function (_ extension_name generate archive [idxS arrayS])
(do //////.monad
[arrayG (generate archive arrayS)
idxG (generate archive idxS)]
- (in ($_ _.composite
- arrayG
- (_.checkcast (type.array jvm_primitive))
- idxG
- loadG))))]))
+ (in (all _.composite
+ arrayG
+ (_.checkcast (type.array jvm_primitive))
+ idxG
+ loadG))))]))
(def: array::read::object
Handler
(..custom
- [($_ <>.and ..object_array <synthesis>.any <synthesis>.any)
+ [(all <>.and ..object_array <synthesis>.any <synthesis>.any)
(function (_ extension_name generate archive [elementJT idxS arrayS])
(do //////.monad
[arrayG (generate archive arrayS)
idxG (generate archive idxS)]
- (in ($_ _.composite
- arrayG
- (_.checkcast (type.array elementJT))
- idxG
- _.aaload))))]))
+ (in (all _.composite
+ arrayG
+ (_.checkcast (type.array elementJT))
+ idxG
+ _.aaload))))]))
(def: (write_primitive_array_handler jvm_primitive storeG)
(-> (Type Primitive) (Bytecode Any) Handler)
(..custom
- [($_ <>.and <synthesis>.any <synthesis>.any <synthesis>.any)
+ [(all <>.and <synthesis>.any <synthesis>.any <synthesis>.any)
(function (_ extension_name generate archive [idxS valueS arrayS])
(do //////.monad
[arrayG (generate archive arrayS)
idxG (generate archive idxS)
valueG (generate archive valueS)]
- (in ($_ _.composite
- arrayG
- (_.checkcast (type.array jvm_primitive))
- _.dup
- idxG
- valueG
- storeG))))]))
+ (in (all _.composite
+ arrayG
+ (_.checkcast (type.array jvm_primitive))
+ _.dup
+ idxG
+ valueG
+ storeG))))]))
(def: array::write::object
Handler
(..custom
- [($_ <>.and ..object_array <synthesis>.any <synthesis>.any <synthesis>.any)
+ [(all <>.and ..object_array <synthesis>.any <synthesis>.any <synthesis>.any)
(function (_ extension_name generate archive [elementJT idxS valueS arrayS])
(do //////.monad
[arrayG (generate archive arrayS)
idxG (generate archive idxS)
valueG (generate archive valueS)]
- (in ($_ _.composite
- arrayG
- (_.checkcast (type.array elementJT))
- _.dup
- idxG
- valueG
- _.aastore))))]))
+ (in (all _.composite
+ arrayG
+ (_.checkcast (type.array elementJT))
+ _.dup
+ idxG
+ valueG
+ _.aastore))))]))
(def: bundle::array
Bundle
@@ -549,30 +549,30 @@
(do _.monad
[@then _.new_label
@end _.new_label]
- ($_ _.composite
- objectG
- (_.ifnull @then)
- ..falseG
- (_.goto @end)
- (_.set_label @then)
- ..trueG
- (_.set_label @end))))
+ (all _.composite
+ objectG
+ (_.ifnull @then)
+ ..falseG
+ (_.goto @end)
+ (_.set_label @then)
+ ..trueG
+ (_.set_label @end))))
(def: (object::synchronized [monitorG exprG])
(Binary (Bytecode Any))
- ($_ _.composite
- monitorG
- _.dup
- _.monitorenter
- exprG
- _.swap
- _.monitorexit))
+ (all _.composite
+ monitorG
+ _.dup
+ _.monitorenter
+ exprG
+ _.swap
+ _.monitorexit))
(def: (object::throw exceptionG)
(Unary (Bytecode Any))
- ($_ _.composite
- exceptionG
- _.athrow))
+ (all _.composite
+ exceptionG
+ _.athrow))
(def: $Class (type.class "java.lang.Class" (list)))
(def: $String (type.class "java.lang.String" (list)))
@@ -584,41 +584,41 @@
(function (_ extension_name generate archive [class])
(do //////.monad
[]
- (in ($_ _.composite
- (_.string class)
- (_.invokestatic ..$Class "forName" (type.method [(list) (list ..$String) ..$Class (list)]))))))]))
+ (in (all _.composite
+ (_.string class)
+ (_.invokestatic ..$Class "forName" (type.method [(list) (list ..$String) ..$Class (list)]))))))]))
(def: object::instance?
Handler
(..custom
- [($_ <>.and <synthesis>.text <synthesis>.any)
+ [(all <>.and <synthesis>.text <synthesis>.any)
(function (_ extension_name generate archive [class objectS])
(do //////.monad
[objectG (generate archive objectS)]
- (in ($_ _.composite
- objectG
- (_.instanceof (type.class class (list)))
- (///value.wrap type.boolean)))))]))
+ (in (all _.composite
+ objectG
+ (_.instanceof (type.class class (list)))
+ (///value.wrap type.boolean)))))]))
(def: object::cast
Handler
(..custom
- [($_ <>.and <synthesis>.text <synthesis>.text <synthesis>.any)
+ [(all <>.and <synthesis>.text <synthesis>.text <synthesis>.any)
(function (_ extension_name generate archive [from to valueS])
(do //////.monad
[valueG (generate archive valueS)]
(in (`` (cond (~~ (template [<object> <type>]
[(and (text#= (..reflection <type>) from)
(text#= <object> to))
- ($_ _.composite
- valueG
- (///value.wrap <type>))
+ (all _.composite
+ valueG
+ (///value.wrap <type>))
(and (text#= <object> from)
(text#= (..reflection <type>) to))
- ($_ _.composite
- valueG
- (///value.unwrap <type>))]
+ (all _.composite
+ valueG
+ (///value.unwrap <type>))]
[box.boolean type.boolean]
[box.byte type.byte]
@@ -647,7 +647,7 @@
(def: get::static
Handler
(..custom
- [($_ <>.and <synthesis>.text <synthesis>.text ..value)
+ [(all <>.and <synthesis>.text <synthesis>.text ..value)
(function (_ extension_name generate archive [class field :unboxed:])
(# //////.monad in (_.getstatic (type.class class (list)) field :unboxed:)))]))
@@ -657,39 +657,39 @@
(def: put::static
Handler
(..custom
- [($_ <>.and <synthesis>.text <synthesis>.text ..value <synthesis>.any)
+ [(all <>.and <synthesis>.text <synthesis>.text ..value <synthesis>.any)
(function (_ extension_name generate archive [class field :unboxed: valueS])
(do //////.monad
[valueG (generate archive valueS)]
- (in ($_ _.composite
- valueG
- (case (parser.object? :unboxed:)
- {.#Some :unboxed:}
- (_.checkcast :unboxed:)
-
- {.#None}
- (_#in []))
- (_.putstatic (type.class class (list)) field :unboxed:)
- ..unitG))))]))
+ (in (all _.composite
+ valueG
+ (case (parser.object? :unboxed:)
+ {.#Some :unboxed:}
+ (_.checkcast :unboxed:)
+
+ {.#None}
+ (_#in []))
+ (_.putstatic (type.class class (list)) field :unboxed:)
+ ..unitG))))]))
(def: get::virtual
Handler
(..custom
- [($_ <>.and <synthesis>.text <synthesis>.text ..value <synthesis>.any)
+ [(all <>.and <synthesis>.text <synthesis>.text ..value <synthesis>.any)
(function (_ extension_name generate archive [class field :unboxed: objectS])
(do //////.monad
[objectG (generate archive objectS)
.let [:class: (type.class class (list))
getG (_.getfield :class: field :unboxed:)]]
- (in ($_ _.composite
- objectG
- (_.checkcast :class:)
- getG))))]))
+ (in (all _.composite
+ objectG
+ (_.checkcast :class:)
+ getG))))]))
(def: put::virtual
Handler
(..custom
- [($_ <>.and <synthesis>.text <synthesis>.text ..value <synthesis>.any <synthesis>.any)
+ [(all <>.and <synthesis>.text <synthesis>.text ..value <synthesis>.any <synthesis>.any)
(function (_ extension_name generate archive [class field :unboxed: valueS objectS])
(do //////.monad
[valueG (generate archive valueS)
@@ -697,18 +697,18 @@
.let [:class: (type.class class (list))
putG (case (parser.object? :unboxed:)
{.#Some :unboxed:}
- ($_ _.composite
- (_.checkcast :unboxed:)
- (_.putfield :class: field :unboxed:))
+ (all _.composite
+ (_.checkcast :unboxed:)
+ (_.putfield :class: field :unboxed:))
{.#None}
(_.putfield :class: field :unboxed:))]]
- (in ($_ _.composite
- objectG
- (_.checkcast :class:)
- _.dup
- valueG
- putG))))]))
+ (in (all _.composite
+ objectG
+ (_.checkcast :class:)
+ _.dup
+ valueG
+ putG))))]))
(type: Input
(Typed Synthesis))
@@ -726,9 +726,9 @@
(in [valueT valueG])
{.#Left valueT}
- (in [valueT ($_ _.composite
- valueG
- (_.checkcast valueT))]))))
+ (in [valueT (all _.composite
+ valueG
+ (_.checkcast valueT))]))))
(def: (prepare_output outputT)
(-> (Type Return) (Bytecode Any))
@@ -742,32 +742,32 @@
(def: invoke::static
Handler
(..custom
- [($_ <>.and ..class <synthesis>.text ..return (<>.some ..input))
+ [(all <>.and ..class <synthesis>.text ..return (<>.some ..input))
(function (_ extension_name generate archive [class method outputT inputsTS])
(do [! //////.monad]
[inputsTG (monad.each ! (generate_input generate archive) inputsTS)]
- (in ($_ _.composite
- (monad.each _.monad product.right inputsTG)
- (_.invokestatic class method (type.method [(list) (list#each product.left inputsTG) outputT (list)]))
- (prepare_output outputT)))))]))
+ (in (all _.composite
+ (monad.each _.monad product.right inputsTG)
+ (_.invokestatic class method (type.method [(list) (list#each product.left inputsTG) outputT (list)]))
+ (prepare_output outputT)))))]))
(template [<check_cast?> <name> <invoke>]
[(def: <name>
Handler
(..custom
- [($_ <>.and ..class <synthesis>.text ..return <synthesis>.any (<>.some ..input))
+ [(all <>.and ..class <synthesis>.text ..return <synthesis>.any (<>.some ..input))
(function (_ extension_name generate archive [class method outputT objectS inputsTS])
(do [! //////.monad]
[objectG (generate archive objectS)
inputsTG (monad.each ! (generate_input generate archive) inputsTS)]
- (in ($_ _.composite
- objectG
- (if <check_cast?>
- (_.checkcast class)
- (_#in []))
- (monad.each _.monad product.right inputsTG)
- (<invoke> class method (type.method [(list) (list#each product.left inputsTG) outputT (list)]))
- (prepare_output outputT)))))]))]
+ (in (all _.composite
+ objectG
+ (if <check_cast?>
+ (_.checkcast class)
+ (_#in []))
+ (monad.each _.monad product.right inputsTG)
+ (<invoke> class method (type.method [(list) (list#each product.left inputsTG) outputT (list)]))
+ (prepare_output outputT)))))]))]
[#1 invoke::virtual _.invokevirtual]
[#0 invoke::special _.invokespecial]
@@ -777,15 +777,15 @@
(def: invoke::constructor
Handler
(..custom
- [($_ <>.and ..class (<>.some ..input))
+ [(all <>.and ..class (<>.some ..input))
(function (_ extension_name generate archive [class inputsTS])
(do [! //////.monad]
[inputsTG (monad.each ! (generate_input generate archive) inputsTS)]
- (in ($_ _.composite
- (_.new class)
- _.dup
- (monad.each _.monad product.right inputsTG)
- (_.invokespecial class "<init>" (type.method [(list) (list#each product.left inputsTG) type.void (list)]))))))]))
+ (in (all _.composite
+ (_.new class)
+ _.dup
+ (monad.each _.monad product.right inputsTG)
+ (_.invokespecial class "<init>" (type.method [(list) (list#each product.left inputsTG) type.void (list)]))))))]))
(def: bundle::member
Bundle
@@ -993,42 +993,42 @@
{.#Left type}
(_.checkcast type))]
- ($_ _.composite
- (_.aload (++ register))
- then!))))
+ (all _.composite
+ (_.aload (++ register))
+ then!))))
list.reversed
(list#mix _.composite (_#in [])))
store_captured! (|> env
list.size
list.indices
(monad.each _.monad (.function (_ register)
- ($_ _.composite
- (_.aload 0)
- (_.aload (n.+ inputs_offset (++ register)))
- (_.putfield class (///reference.foreign_name register) $Object)))))]
+ (all _.composite
+ (_.aload 0)
+ (_.aload (n.+ inputs_offset (++ register)))
+ (_.putfield class (///reference.foreign_name register) $Object)))))]
(method.method method.public "<init>"
#1 (anonymous_init_method env inputsTG)
(list)
- {.#Some ($_ _.composite
- (_.aload 0)
- inputs!
- (_.invokespecial super_class "<init>" (type.method [(list) (list#each product.left inputsTG) type.void (list)]))
- store_captured!
- _.return)})))
+ {.#Some (all _.composite
+ (_.aload 0)
+ inputs!
+ (_.invokespecial super_class "<init>" (type.method [(list) (list#each product.left inputsTG) type.void (list)]))
+ store_captured!
+ _.return)})))
(def: (anonymous_instance generate archive class env inputsTI)
(-> Phase Archive (Type category.Class) (Environment Synthesis) (List (Typed (Bytecode Any))) (Operation (Bytecode Any)))
(do [! //////.monad]
[captureG+ (monad.each ! (generate archive) env)]
- (in ($_ _.composite
- (_.new class)
- _.dup
- (|> inputsTI
- (list#each product.right)
- list.reversed
- (list#mix _.composite (_#in [])))
- (monad.all _.monad captureG+)
- (_.invokespecial class "<init>" (anonymous_init_method env inputsTI))))))
+ (in (all _.composite
+ (_.new class)
+ _.dup
+ (|> inputsTI
+ (list#each product.right)
+ list.reversed
+ (list#mix _.composite (_#in [])))
+ (monad.all _.monad captureG+)
+ (_.invokespecial class "<init>" (anonymous_init_method env inputsTI))))))
(def: (returnG returnT)
(-> (Type Return) (Bytecode Any))
@@ -1041,18 +1041,18 @@
{.#Left returnT}
(case (type.class? returnT)
{.#Some class_name}
- ($_ _.composite
- (_.checkcast returnT)
- _.areturn)
+ (all _.composite
+ (_.checkcast returnT)
+ _.areturn)
{.#None}
_.areturn)
{.#Right returnT}
(template.let [(unwrap_primitive <return> <type>)
- [($_ _.composite
- (///value.unwrap <type>)
- <return>)]]
+ [(all _.composite
+ (///value.unwrap <type>)
+ <return>)]]
(`` (cond (~~ (template [<return> <type>]
[(# type.equivalence = <type> returnT)
(unwrap_primitive <return> <type>)]
@@ -1085,10 +1085,10 @@
list.together
(monad.each ! (cache/artifact.dependencies archive)))
all_method_dependencies (monad.each ! (|>> product.right (method_dependencies archive)) overriden_methods)]
- (in (cache/artifact.all ($_ list#composite
- all_input_dependencies
- all_closure_dependencies
- all_method_dependencies)))))
+ (in (cache/artifact.all (all list#composite
+ all_input_dependencies
+ all_closure_dependencies
+ all_method_dependencies)))))
(def: (prepare_argument lux_register argumentT jvm_register)
(-> Register (Type Value) Register [Register (Bytecode Any)])
@@ -1097,17 +1097,17 @@
[(n.+ 1 jvm_register)
(if (n.= lux_register jvm_register)
(_#in [])
- ($_ _.composite
- (_.aload jvm_register)
- (_.astore lux_register)))]
+ (all _.composite
+ (_.aload jvm_register)
+ (_.astore lux_register)))]
{.#Right argumentT}
(template.let [(wrap_primitive <shift> <load> <type>)
[[(n.+ <shift> jvm_register)
- ($_ _.composite
- (<load> jvm_register)
- (///value.wrap <type>)
- (_.astore lux_register))]]]
+ (all _.composite
+ (<load> jvm_register)
+ (///value.wrap <type>)
+ (_.astore lux_register))]]]
(`` (cond (~~ (template [<shift> <load> <type>]
[(# type.equivalence = <type> argumentT)
(wrap_primitive <shift> <load> <type>)]
@@ -1130,9 +1130,9 @@
(list#mix (function (_ [lux_register type] [jvm_register before])
(let [[jvm_register' after] (prepare_argument (n.+ offset lux_register) type jvm_register)]
[jvm_register'
- ($_ _.composite
- before
- after)]))
+ (all _.composite
+ before
+ after)]))
(is [Register (Bytecode Any)]
[offset
(_#in [])]))
@@ -1184,28 +1184,28 @@
(phase archive bodyS))
.let [argumentsT (list#each product.right arguments)
methodT (type.method [vars argumentsT returnT exceptionsT])]]
- (in (method.method ($_ modifier#composite
- method.public
- method.final
- (if strict_fp?
- method.strict
- modifier#identity))
+ (in (method.method (all modifier#composite
+ method.public
+ method.final
+ (if strict_fp?
+ method.strict
+ modifier#identity))
name
#1 methodT
(list)
- {.#Some ($_ _.composite
- (prepare_arguments 1 argumentsT)
- bodyG
- (returnG returnT))})))))
+ {.#Some (all _.composite
+ (prepare_arguments 1 argumentsT)
+ bodyG
+ (returnG returnT))})))))
(def: class::anonymous
Handler
(..custom
- [($_ <>.and
- ..class
- (<synthesis>.tuple (<>.some ..class))
- (<synthesis>.tuple (<>.some ..input))
- (<synthesis>.tuple (<>.some ..overriden_method_definition)))
+ [(all <>.and
+ ..class
+ (<synthesis>.tuple (<>.some ..class))
+ (<synthesis>.tuple (<>.some ..input))
+ (<synthesis>.tuple (<>.some ..overriden_method_definition)))
(function (_ extension_name generate archive [super_class
super_interfaces
inputsTS
@@ -1224,7 +1224,7 @@
(monad.each ! (method_definition generate archive artifact_id)))
bytecode (<| (# ! each (format.result class.writer))
//////.lifted
- (class.class version.v6_0 ($_ modifier#composite class.public class.final)
+ (class.class version.v6_0 (all modifier#composite class.public class.final)
(name.internal anonymous_class_name)
{.#None}
(name.internal (..reflection super_class))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/lua/common.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/lua/common.lux
index ea9f1b1c9..cb29b9c89 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/lua/common.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/lua/common.lux
@@ -112,12 +112,12 @@
... TODO: Get rid of this ASAP
(def: lux::syntax_char_case!
- (..custom [($_ <>.and
- <s>.any
- <s>.any
- (<>.some (<s>.tuple ($_ <>.and
- (<s>.tuple (<>.many <s>.i64))
- <s>.any))))
+ (..custom [(all <>.and
+ <s>.any
+ <s>.any
+ (<>.some (<s>.tuple (all <>.and
+ (<s>.tuple (<>.many <s>.i64))
+ <s>.any))))
(function (_ extension_name phase archive [input else conditionals])
(|> conditionals
(list#each (function (_ [chars branch])
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/lua/host.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/lua/host.lux
index d854e210d..1d3f9cae4 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/lua/host.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/lua/host.lux
@@ -67,7 +67,7 @@
(def: object::get
Handler
(custom
- [($_ <>.and <s>.text <s>.any)
+ [(all <>.and <s>.text <s>.any)
(function (_ extension phase archive [fieldS objectS])
(do ////////phase.monad
[objectG (phase archive objectS)]
@@ -76,7 +76,7 @@
(def: object::do
Handler
(custom
- [($_ <>.and <s>.text <s>.any (<>.some <s>.any))
+ [(all <>.and <s>.text <s>.any (<>.some <s>.any))
(function (_ extension phase archive [methodS objectS inputsS])
(do [! ////////phase.monad]
[objectG (phase archive objectS)
@@ -141,7 +141,7 @@
(def: lua::apply
(custom
- [($_ <>.and <s>.any (<>.some <s>.any))
+ [(all <>.and <s>.any (<>.some <s>.any))
(function (_ extension phase archive [abstractionS inputsS])
(do [! ////////phase.monad]
[abstractionG (phase archive abstractionS)
@@ -150,7 +150,7 @@
(def: lua::power
(custom
- [($_ <>.and <s>.any <s>.any)
+ [(all <>.and <s>.any <s>.any)
(function (_ extension phase archive [powerS baseS])
(do [! ////////phase.monad]
[powerG (phase archive powerS)
@@ -166,7 +166,7 @@
(def: lua::function
(custom
- [($_ <>.and <s>.i64 <s>.any)
+ [(all <>.and <s>.i64 <s>.any)
(function (_ extension phase archive [arity abstractionS])
(do [! ////////phase.monad]
[abstractionG (phase archive abstractionS)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/php/common.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/php/common.lux
index 1caff3899..e592ebd5c 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/php/common.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/php/common.lux
@@ -56,12 +56,12 @@
... TODO: Get rid of this ASAP
(def: lux::syntax_char_case!
- (..custom [($_ <>.and
- <s>.any
- <s>.any
- (<>.some (<s>.tuple ($_ <>.and
- (<s>.tuple (<>.many <s>.i64))
- <s>.any))))
+ (..custom [(all <>.and
+ <s>.any
+ <s>.any
+ (<>.some (<s>.tuple (all <>.and
+ (<s>.tuple (<>.many <s>.i64))
+ <s>.any))))
(function (_ extension_name phase archive [input else conditionals])
(do [! /////.monad]
[inputG (phase archive input)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/php/host.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/php/host.lux
index 4f4f010da..2e257bcfc 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/php/host.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/php/host.lux
@@ -62,7 +62,7 @@
(def: object::new
(custom
- [($_ <>.and <s>.text (<>.some <s>.any))
+ [(all <>.and <s>.text (<>.some <s>.any))
(function (_ extension phase archive [constructor inputsS])
(do [! ////////phase.monad]
[inputsG (monad.each ! (phase archive) inputsS)]
@@ -71,7 +71,7 @@
(def: object::get
Handler
(custom
- [($_ <>.and <s>.text <s>.any)
+ [(all <>.and <s>.text <s>.any)
(function (_ extension phase archive [fieldS objectS])
(do ////////phase.monad
[objectG (phase archive objectS)]
@@ -80,7 +80,7 @@
(def: object::do
Handler
(custom
- [($_ <>.and <s>.text <s>.any (<>.some <s>.any))
+ [(all <>.and <s>.text <s>.any (<>.some <s>.any))
(function (_ extension phase archive [methodS objectS inputsS])
(do [! ////////phase.monad]
[objectG (phase archive objectS)
@@ -113,7 +113,7 @@
(def: php::apply
(custom
- [($_ <>.and <s>.any (<>.some <s>.any))
+ [(all <>.and <s>.any (<>.some <s>.any))
(function (_ extension phase archive [abstractionS inputsS])
(do [! ////////phase.monad]
[abstractionG (phase archive abstractionS)
@@ -122,7 +122,7 @@
(def: php::pack
(custom
- [($_ <>.and <s>.any <s>.any)
+ [(all <>.and <s>.any <s>.any)
(function (_ extension phase archive [formatS dataS])
(do [! ////////phase.monad]
[formatG (phase archive formatS)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/python/common.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/python/common.lux
index 12260ae49..9de656cd2 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/python/common.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/python/common.lux
@@ -103,12 +103,12 @@
... TODO: Get rid of this ASAP
(def: lux::syntax_char_case!
- (..custom [($_ <>.and
- <synthesis>.any
- <synthesis>.any
- (<>.some (<synthesis>.tuple ($_ <>.and
- (<synthesis>.tuple (<>.many <synthesis>.i64))
- <synthesis>.any))))
+ (..custom [(all <>.and
+ <synthesis>.any
+ <synthesis>.any
+ (<>.some (<synthesis>.tuple (all <>.and
+ (<synthesis>.tuple (<>.many <synthesis>.i64))
+ <synthesis>.any))))
(function (_ extension_name phase archive [input else conditionals])
(do [! /////.monad]
[inputG (phase archive input)
@@ -137,7 +137,7 @@
... conditionals)}))
... @closure (_.var (reference.artifact artifact_id))
... closure (_.def @closure dependencies
- ... ($_ _.then
+ ... (all _.then
... (_.set (list @input) inputG)
... (list#mix (function (_ [test then!] else!)
... (_.if test then! else!))
@@ -149,12 +149,12 @@
... (in (_.apply/* @closure dependencies))
(in (<| (as (Expression Any))
(is (Statement Any))
- ($_ _.then
- (_.set (list @input) inputG)
- (list#mix (function (_ [test then!] else!)
- (_.if test then! else!))
- else!
- conditionals!))))))]))
+ (all _.then
+ (_.set (list @input) inputG)
+ (list#mix (function (_ [test then!] else!)
+ (_.if test then! else!))
+ else!
+ conditionals!))))))]))
(def: lux_procs
Bundle
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/python/host.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/python/host.lux
index 1522dc667..766979aa0 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/python/host.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/python/host.lux
@@ -68,7 +68,7 @@
(def: object::get
Handler
(custom
- [($_ <>.and <s>.text <s>.any)
+ [(all <>.and <s>.text <s>.any)
(function (_ extension phase archive [fieldS objectS])
(do ////////phase.monad
[objectG (phase archive objectS)]
@@ -77,7 +77,7 @@
(def: object::do
Handler
(custom
- [($_ <>.and <s>.text <s>.any (<>.some <s>.any))
+ [(all <>.and <s>.text <s>.any (<>.some <s>.any))
(function (_ extension phase archive [methodS objectS inputsS])
(do [! ////////phase.monad]
[objectG (phase archive objectS)
@@ -119,7 +119,7 @@
(def: python::apply
(custom
- [($_ <>.and <s>.any (<>.some <s>.any))
+ [(all <>.and <s>.any (<>.some <s>.any))
(function (_ extension phase archive [abstractionS inputsS])
(do [! ////////phase.monad]
[abstractionG (phase archive abstractionS)
@@ -128,7 +128,7 @@
(def: python::function
(custom
- [($_ <>.and <s>.i64 <s>.any)
+ [(all <>.and <s>.i64 <s>.any)
(function (_ extension phase archive [arity abstractionS])
(do [! ////////phase.monad]
[abstractionG (phase archive abstractionS)
@@ -145,7 +145,7 @@
(def: python::exec
(custom
- [($_ <>.and <s>.any <s>.any)
+ [(all <>.and <s>.any <s>.any)
(function (_ extension phase archive [codeS globalsS])
(do [! ////////phase.monad]
[codeG (phase archive codeS)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/r/common.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/r/common.lux
index e48ccb29c..5b6428fa8 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/r/common.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/r/common.lux
@@ -56,10 +56,10 @@
... ... ... TODO: Get rid of this ASAP
... ... (def: lux::syntax_char_case!
-... ... (..custom [($_ <>.and
+... ... (..custom [(all <>.and
... ... <s>.any
... ... <s>.any
-... ... (<>.some (<s>.tuple ($_ <>.and
+... ... (<>.some (<s>.tuple (all <>.and
... ... (<s>.tuple (<>.many <s>.i64))
... ... <s>.any))))
... ... (function (_ extension_name phase archive [input else conditionals])
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/ruby/common.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/ruby/common.lux
index 0221c118b..2a838bef9 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/ruby/common.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/ruby/common.lux
@@ -102,12 +102,12 @@
... TODO: Get rid of this ASAP
(def: lux::syntax_char_case!
- (..custom [($_ <>.and
- <s>.any
- <s>.any
- (<>.some (<s>.tuple ($_ <>.and
- (<s>.tuple (<>.many <s>.i64))
- <s>.any))))
+ (..custom [(all <>.and
+ <s>.any
+ <s>.any
+ (<>.some (<s>.tuple (all <>.and
+ (<s>.tuple (<>.many <s>.i64))
+ <s>.any))))
(function (_ extension_name phase archive [input else conditionals])
(do [! /////.monad]
[inputG (phase archive input)
@@ -135,12 +135,12 @@
... (in (_.apply_lambda/* (list inputG) closure))
(in (<| (as Expression)
(is Statement)
- ($_ _.then
- (_.set (list @input) inputG)
- (list#mix (function (_ [test then!] else!)
- (_.if test then! else!))
- else!
- conditionals!))))))]))
+ (all _.then
+ (_.set (list @input) inputG)
+ (list#mix (function (_ [test then!] else!)
+ (_.if test then! else!))
+ else!
+ conditionals!))))))]))
(def: lux_procs
Bundle
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/ruby/host.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/ruby/host.lux
index bb512a883..2c6013cf1 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/ruby/host.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/ruby/host.lux
@@ -67,7 +67,7 @@
(def: object::get
Handler
(custom
- [($_ <>.and <s>.text <s>.any)
+ [(all <>.and <s>.text <s>.any)
(function (_ extension phase archive [fieldS objectS])
(do ////////phase.monad
[objectG (phase archive objectS)]
@@ -76,7 +76,7 @@
(def: object::do
Handler
(custom
- [($_ <>.and <s>.text <s>.any (<>.some <s>.any))
+ [(all <>.and <s>.text <s>.any (<>.some <s>.any))
(function (_ extension phase archive [methodS objectS inputsS])
(do [! ////////phase.monad]
[objectG (phase archive objectS)
@@ -108,7 +108,7 @@
(def: ruby::apply
(custom
- [($_ <>.and <s>.any (<>.some <s>.any))
+ [(all <>.and <s>.any (<>.some <s>.any))
(function (_ extension phase archive [abstractionS inputsS])
(do [! ////////phase.monad]
[abstractionG (phase archive abstractionS)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/scheme/common.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/scheme/common.lux
index c73614b6d..144415363 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/scheme/common.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/scheme/common.lux
@@ -56,12 +56,12 @@
... TODO: Get rid of this ASAP
(def: lux::syntax_char_case!
- (..custom [($_ <>.and
- <s>.any
- <s>.any
- (<>.some (<s>.tuple ($_ <>.and
- (<s>.tuple (<>.many <s>.i64))
- <s>.any))))
+ (..custom [(all <>.and
+ <s>.any
+ <s>.any
+ (<>.some (<s>.tuple (all <>.and
+ (<s>.tuple (<>.many <s>.i64))
+ <s>.any))))
(function (_ extension_name phase archive [input else conditionals])
(do [! /////.monad]
[@input (# ! each _.var (generation.symbol "input"))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/scheme/host.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/scheme/host.lux
index 2b4e5cd45..6b53f712f 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/scheme/host.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/scheme/host.lux
@@ -89,7 +89,7 @@
(def: scheme::apply
(custom
- [($_ <>.and <s>.any (<>.some <s>.any))
+ [(all <>.and <s>.any (<>.some <s>.any))
(function (_ extension phase archive [abstractionS inputsS])
(do [! ////////phase.monad]
[abstractionG (phase archive abstractionS)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/case.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/case.lux
index 43ca63829..2f5b895e3 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/case.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/case.lux
@@ -131,12 +131,12 @@
(def: (alternation @otherwise pre! post!)
(-> _.Tag (Expression Any) (Expression Any) (Expression Any))
- (_.tagbody ($_ list#composite
- (list ..save!
- pre!
- @otherwise)
- ..restore!
- (list post!))))
+ (_.tagbody (all list#composite
+ (list ..save!
+ pre!
+ @otherwise)
+ ..restore!
+ (list post!))))
(def: (pattern_matching' expression archive)
(Generator [Var/1 _.Tag _.Tag Path])
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/extension/common.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/extension/common.lux
index fe6ef4179..527ee9822 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/extension/common.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/extension/common.lux
@@ -114,9 +114,9 @@
(def: (void code)
(-> (Expression Any) (Expression Any))
- ($_ _.progn
- code
- ///runtime.unit))
+ (all _.progn
+ code
+ ///runtime.unit))
(def: io_procs
Bundle
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/runtime.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/runtime.lux
index 4fc1e5427..947dd7cc7 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/runtime.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/runtime.lux
@@ -165,9 +165,9 @@
(def: last_index
(|>> _.length/1 [(_.int +1)] _.-/2))
-(with_expansions [<recur> (these ($_ _.then
- (_.; (_.set lefts (_.-/2 [last_index_right lefts])))
- (_.; (_.set tuple (_.nth last_index_right tuple)))))]
+(with_expansions [<recur> (these (all _.then
+ (_.; (_.set lefts (_.-/2 [last_index_right lefts])))
+ (_.; (_.set tuple (_.nth last_index_right tuple)))))]
(template: (!recur <side>)
(<side> (_.-/2 [last_index_right lefts])
(_.elt/2 [tuple last_index_right])))
@@ -272,12 +272,12 @@
(list @io//exit))
(def: runtime
- (_.progn ($_ list#composite
- runtime//adt
- runtime//lux
- runtime//i64
- runtime//text
- runtime//io)))
+ (_.progn (all list#composite
+ runtime//adt
+ runtime//lux
+ runtime//i64
+ runtime//text
+ runtime//io)))
(def: .public generate
(Operation [Registry Output])
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/case.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/case.lux
index 1573a17e5..515518eb7 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/case.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/case.lux
@@ -53,9 +53,9 @@
(do ///////phase.monad
[this (expression archive this)
that (statement expression archive that)]
- (in ($_ _.then
- (_.statement this)
- that))))
+ (in (all _.then
+ (_.statement this)
+ that))))
(def: .public (let expression archive [valueS register bodyS])
(Generator [Synthesis Register Synthesis])
@@ -72,9 +72,9 @@
(do ///////phase.monad
[valueO (expression archive valueS)
bodyO (statement expression archive bodyS)]
- (in ($_ _.then
- (_.define (..register register) valueO)
- bodyO))))
+ (in (all _.then
+ (_.define (..register register) valueO)
+ bodyO))))
(def: .public (if expression archive [testS thenS elseS])
(Generator [Synthesis Synthesis Synthesis])
@@ -152,15 +152,15 @@
(template [<name> <flag>]
[(def: (<name> simple? idx)
(-> Bit Nat Statement)
- ($_ _.then
- (_.set @temp (//runtime.sum//get ..peek_cursor <flag>
- (|> idx .int _.i32)))
- (.if simple?
- (_.when (_.= _.null @temp)
- ..fail_pm!)
- (_.if (_.= _.null @temp)
- ..fail_pm!
- (push_cursor! @temp)))))]
+ (all _.then
+ (_.set @temp (//runtime.sum//get ..peek_cursor <flag>
+ (|> idx .int _.i32)))
+ (.if simple?
+ (_.when (_.= _.null @temp)
+ ..fail_pm!)
+ (_.if (_.= _.null @temp)
+ ..fail_pm!
+ (push_cursor! @temp)))))]
[left_choice _.null]
[right_choice //runtime.unit]
@@ -168,14 +168,14 @@
(def: (alternation pre! post!)
(-> Statement Statement Statement)
- ($_ _.then
- (_.do_while (_.boolean false)
- ($_ _.then
- ..save_cursor!
- pre!))
- ($_ _.then
- ..restore_cursor!
- post!)))
+ (all _.then
+ (_.do_while (_.boolean false)
+ (all _.then
+ ..save_cursor!
+ pre!))
+ (all _.then
+ ..restore_cursor!
+ post!)))
(def: (optimized_pattern_matching again pathP)
(-> (-> Path (Operation Statement))
@@ -198,9 +198,9 @@
(/////synthesis.!bind_top register thenP)))
(do ///////phase.monad
[then! (again thenP)]
- (in {.#Some ($_ _.then
- (_.define (..register register) (_.at (_.i32 +0) ..peek_cursor))
- then!)}))
+ (in {.#Some (all _.then
+ (_.define (..register register) (_.at (_.i32 +0) ..peek_cursor))
+ then!)}))
... Extra optimization
(^.template [<pm> <getter>]
@@ -209,26 +209,26 @@
(/////synthesis.!bind_top register thenP)))
(do ///////phase.monad
[then! (again thenP)]
- (in {.#Some ($_ _.then
- (_.define (..register register) (<getter> (_.i32 (.int lefts)) ..peek_cursor))
- then!)}))])
+ (in {.#Some (all _.then
+ (_.define (..register register) (<getter> (_.i32 (.int lefts)) ..peek_cursor))
+ then!)}))])
([/////synthesis.member/left //runtime.tuple//left]
[/////synthesis.member/right //runtime.tuple//right])
(pattern (/////synthesis.!bind_top register thenP))
(do ///////phase.monad
[then! (again thenP)]
- (in {.#Some ($_ _.then
- (_.define (..register register) ..peek_and_pop_cursor)
- then!)}))
+ (in {.#Some (all _.then
+ (_.define (..register register) ..peek_and_pop_cursor)
+ then!)}))
(pattern (/////synthesis.!multi_pop nextP))
(.let [[extra_pops nextP'] (////synthesis/case.count_pops nextP)]
(do ///////phase.monad
[next! (again nextP')]
- (in {.#Some ($_ _.then
- (multi_pop_cursor! (n.+ 2 extra_pops))
- next!)})))
+ (in {.#Some (all _.then
+ (multi_pop_cursor! (n.+ 2 extra_pops))
+ next!)})))
_
(///////phase#in {.#None})))
@@ -322,21 +322,21 @@
(-> Phase! Phase Archive Path (Operation Statement))
(do ///////phase.monad
[pattern_matching! (pattern_matching' statement expression archive pathP)]
- (in ($_ _.then
- (_.do_while (_.boolean false)
- pattern_matching!)
- (_.throw (_.string ////synthesis/case.pattern_matching_error))))))
+ (in (all _.then
+ (_.do_while (_.boolean false)
+ pattern_matching!)
+ (_.throw (_.string ////synthesis/case.pattern_matching_error))))))
(def: .public (case! statement expression archive [valueS pathP])
(Generator! [Synthesis Path])
(do ///////phase.monad
[stack_init (expression archive valueS)
pattern_matching! (pattern_matching statement expression archive pathP)]
- (in ($_ _.then
- (_.declare @temp)
- (_.define @cursor (_.array (list stack_init)))
- (_.define @savepoint (_.array (list)))
- pattern_matching!))))
+ (in (all _.then
+ (_.declare @temp)
+ (_.define @cursor (_.array (list stack_init)))
+ (_.define @savepoint (_.array (list)))
+ pattern_matching!))))
(def: .public (case statement expression archive [valueS pathP])
(-> Phase! (Generator [Synthesis Path]))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/function.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/function.lux
index 39fdda23a..4f3b402f6 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/function.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/function.lux
@@ -89,42 +89,42 @@
(|> func (_.do "apply" (list _.null args))))
initialize_self! (_.define (//case.register 0) @self)
initialize! (list#mix (.function (_ post pre!)
- ($_ _.then
- pre!
- (_.define (..input post) (_.at (_.i32 (.int post)) @@arguments))))
+ (all _.then
+ pre!
+ (_.define (..input post) (_.at (_.i32 (.int post)) @@arguments))))
initialize_self!
(list.indices arity))]
environment (monad.each ! (expression archive) environment)
.let [[definition instantiation] (with_closure @self environment
- ($_ _.then
- (_.define @num_args (_.the "length" @@arguments))
- (<| (_.if (|> @num_args (_.= arityO))
- ($_ _.then
- initialize!
- (_.with_label (_.label @scope)
- (_.do_while (_.boolean true)
- body!))))
- (_.if (|> @num_args (_.> arityO))
- (let [arity_inputs (|> (_.array (list))
- (_.the "slice")
- (_.do "call" (list @@arguments (_.i32 +0) arityO)))
- extra_inputs (|> (_.array (list))
- (_.the "slice")
- (_.do "call" (list @@arguments arityO)))]
- (_.return (|> @self
- (apply_poly arity_inputs)
- (apply_poly extra_inputs)))))
- ... (|> @num_args (_.< arityO))
- (let [all_inputs (|> (_.array (list))
- (_.the "slice")
- (_.do "call" (list @@arguments)))]
- ($_ _.then
- (_.define @curried all_inputs)
- (_.return (_.closure (list)
- (let [@missing all_inputs]
- (_.return (apply_poly (_.do "concat" (list @missing) @curried)
- @self))))))))
- ))]
+ (all _.then
+ (_.define @num_args (_.the "length" @@arguments))
+ (<| (_.if (|> @num_args (_.= arityO))
+ (all _.then
+ initialize!
+ (_.with_label (_.label @scope)
+ (_.do_while (_.boolean true)
+ body!))))
+ (_.if (|> @num_args (_.> arityO))
+ (let [arity_inputs (|> (_.array (list))
+ (_.the "slice")
+ (_.do "call" (list @@arguments (_.i32 +0) arityO)))
+ extra_inputs (|> (_.array (list))
+ (_.the "slice")
+ (_.do "call" (list @@arguments arityO)))]
+ (_.return (|> @self
+ (apply_poly arity_inputs)
+ (apply_poly extra_inputs)))))
+ ... (|> @num_args (_.< arityO))
+ (let [all_inputs (|> (_.array (list))
+ (_.the "slice")
+ (_.do "call" (list @@arguments)))]
+ (all _.then
+ (_.define @curried all_inputs)
+ (_.return (_.closure (list)
+ (let [@missing all_inputs]
+ (_.return (apply_poly (_.do "concat" (list @missing) @curried)
+ @self))))))))
+ ))]
_ (/////generation.execute! definition)
_ (/////generation.save! (product.right function_name) {.#None} definition)]
(in instantiation)))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/loop.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/loop.lux
index 5321ca9f8..8d92a81dd 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/loop.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/loop.lux
@@ -41,12 +41,12 @@
(pattern (list binding))
(let [$binding (//case.register offset)]
- ($_ _.then
- (if initial?
- (_.define $binding binding)
- (_.set $binding binding))
- body
- ))
+ (all _.then
+ (if initial?
+ (_.define $binding binding)
+ (_.set $binding binding))
+ body
+ ))
_
(|> bindings
@@ -104,12 +104,12 @@
[[offset @scope] /////generation.anchor
argsO+ (monad.each ! (expression archive) argsS+)
$iteration (# ! each ..$iteration /////generation.next)]
- (in ($_ _.then
- (_.define @temp (_.array argsO+))
- (..setup $iteration
- false offset
- (|> argsO+
- list.enumeration
- (list#each (function (_ [idx _])
- (_.at (_.i32 (.int idx)) @temp))))
- (_.continue_at (_.label @scope)))))))
+ (in (all _.then
+ (_.define @temp (_.array argsO+))
+ (..setup $iteration
+ false offset
+ (|> argsO+
+ list.enumeration
+ (list#each (function (_ [idx _])
+ (_.at (_.i32 (.int idx)) @temp))))
+ (_.continue_at (_.label @scope)))))))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/runtime.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/runtime.lux
index 36db99857..57f34fed4 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/runtime.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/runtime.lux
@@ -140,33 +140,33 @@
(_.at (..last_index tuple)
tuple))
-(with_expansions [<recur> (these ($_ _.then
- (_.set lefts (_.- last_index_right lefts))
- (_.set tuple (_.at last_index_right tuple))))]
+(with_expansions [<recur> (these (all _.then
+ (_.set lefts (_.- last_index_right lefts))
+ (_.set tuple (_.at last_index_right tuple))))]
(runtime: (tuple//left lefts tuple)
(with_vars [last_index_right]
(<| (_.while (_.boolean true))
- ($_ _.then
- (_.define last_index_right (..last_index tuple))
- (_.if (_.> lefts last_index_right)
- ... No need for recursion
- (_.return (_.at lefts tuple))
- ... Needs recursion
- <recur>)))))
+ (all _.then
+ (_.define last_index_right (..last_index tuple))
+ (_.if (_.> lefts last_index_right)
+ ... No need for recursion
+ (_.return (_.at lefts tuple))
+ ... Needs recursion
+ <recur>)))))
(runtime: (tuple//right lefts tuple)
(with_vars [last_index_right right_index]
(<| (_.while (_.boolean true))
- ($_ _.then
- (_.define last_index_right (..last_index tuple))
- (_.define right_index (_.+ (_.i32 +1) lefts))
- (<| (_.if (_.= last_index_right right_index)
- (_.return (_.at right_index tuple)))
- (_.if (_.> last_index_right right_index)
- ... Needs recursion.
- <recur>)
- (_.return (_.do "slice" (list right_index) tuple)))
- )))))
+ (all _.then
+ (_.define last_index_right (..last_index tuple))
+ (_.define right_index (_.+ (_.i32 +1) lefts))
+ (<| (_.if (_.= last_index_right right_index)
+ (_.return (_.at right_index tuple)))
+ (_.if (_.> last_index_right right_index)
+ ... Needs recursion.
+ <recur>)
+ (_.return (_.do "slice" (list right_index) tuple)))
+ )))))
(def: .public variant_tag_field "_lux_tag")
(def: .public variant_flag_field "_lux_flag")
@@ -176,11 +176,11 @@
(let [@this (_.var "this")]
(with_vars [tag is_last value]
(_.closure (list tag is_last value)
- ($_ _.then
- (_.set (_.the ..variant_tag_field @this) tag)
- (_.set (_.the ..variant_flag_field @this) is_last)
- (_.set (_.the ..variant_value_field @this) value)
- )))))
+ (all _.then
+ (_.set (_.the ..variant_tag_field @this) tag)
+ (_.set (_.the ..variant_flag_field @this) is_last)
+ (_.set (_.the ..variant_value_field @this) value)
+ )))))
(def: .public (variant tag last? value)
(-> Expression Expression Expression Computation)
@@ -192,11 +192,11 @@
actual##right? (|> sum (_.the ..variant_flag_field))
actual##value (|> sum (_.the ..variant_value_field))
is_last? (_.= ..unit actual##right?)
- recur! ($_ _.then
- (_.set expected##lefts (|> expected##lefts
- (_.- actual##lefts)
- (_.- (_.i32 +1))))
- (_.set sum actual##value))]
+ recur! (all _.then
+ (_.set expected##lefts (|> expected##lefts
+ (_.- actual##lefts)
+ (_.- (_.i32 +1))))
+ (_.set sum actual##value))]
(<| (_.while (_.boolean true))
(_.if (_.= expected##lefts actual##lefts)
(_.if (_.= expected##right? actual##right?)
@@ -232,12 +232,12 @@
(def: runtime//structure
Statement
- ($_ _.then
- @tuple//left
- @tuple//right
- @variant//new
- @sum//get
- ))
+ (all _.then
+ @tuple//left
+ @tuple//right
+ @variant//new
+ @sum//get
+ ))
(runtime: (lux//try op)
(with_vars [ex]
@@ -246,22 +246,22 @@
(runtime: (lux//program_args inputs)
(with_vars [output idx]
- ($_ _.then
- (_.define output ..none)
- (_.for idx
- (..last_index inputs)
- (_.>= (_.i32 +0) idx)
- (_.-- idx)
- (_.set output (..some (_.array (list (_.at idx inputs)
- output)))))
- (_.return output))))
+ (all _.then
+ (_.define output ..none)
+ (_.for idx
+ (..last_index inputs)
+ (_.>= (_.i32 +0) idx)
+ (_.-- idx)
+ (_.set output (..some (_.array (list (_.at idx inputs)
+ output)))))
+ (_.return output))))
(def: runtime//lux
Statement
- ($_ _.then
- @lux//try
- @lux//program_args
- ))
+ (all _.then
+ @lux//try
+ @lux//program_args
+ ))
(def: .public i64_low_field Text "_lux_low")
(def: .public i64_high_field Text "_lux_high")
@@ -270,10 +270,10 @@
(let [@this (_.var "this")]
(with_vars [high low]
(_.closure (list high low)
- ($_ _.then
- (_.set (_.the ..i64_high_field @this) high)
- (_.set (_.the ..i64_low_field @this) low)
- )))))
+ (all _.then
+ (_.set (_.the ..i64_high_field @this) high)
+ (_.set (_.the ..i64_low_field @this) low)
+ )))))
(def: .public (i64 high low)
(-> Expression Expression Computation)
@@ -309,58 +309,58 @@
(|>> (_.< (_.i32 +32))))
(runtime: (i64##left_shifted input shift)
- ($_ _.then
- (..cap_shift! shift)
- (_.return (<| (..no_shift! shift input)
- (_.? (..small_shift? shift)
- (let [high (_.bit_or (|> input (_.the ..i64_high_field) (_.left_shift shift))
- (|> input (_.the ..i64_low_field) (_.logic_right_shift (_.- shift (_.i32 +32)))))
- low (|> input (_.the ..i64_low_field) (_.left_shift shift))]
- (..i64 high low)))
- (let [high (|> input (_.the ..i64_low_field) (_.left_shift (_.- (_.i32 +32) shift)))]
- (..i64 high (_.i32 +0)))))
- ))
+ (all _.then
+ (..cap_shift! shift)
+ (_.return (<| (..no_shift! shift input)
+ (_.? (..small_shift? shift)
+ (let [high (_.bit_or (|> input (_.the ..i64_high_field) (_.left_shift shift))
+ (|> input (_.the ..i64_low_field) (_.logic_right_shift (_.- shift (_.i32 +32)))))
+ low (|> input (_.the ..i64_low_field) (_.left_shift shift))]
+ (..i64 high low)))
+ (let [high (|> input (_.the ..i64_low_field) (_.left_shift (_.- (_.i32 +32) shift)))]
+ (..i64 high (_.i32 +0)))))
+ ))
(runtime: (i64##arithmetic_right_shifted input shift)
- ($_ _.then
- (..cap_shift! shift)
- (_.return (<| (..no_shift! shift input)
- (_.? (..small_shift? shift)
- (let [high (|> input (_.the ..i64_high_field) (_.arithmetic_right_shift shift))
- low (|> input (_.the ..i64_low_field) (_.logic_right_shift shift)
- (_.bit_or (|> input (_.the ..i64_high_field) (_.left_shift (_.- shift (_.i32 +32))))))]
- (..i64 high low)))
- (let [high (_.? (|> input (_.the ..i64_high_field) (_.>= (_.i32 +0)))
- (_.i32 +0)
- (_.i32 -1))
- low (|> input (_.the ..i64_high_field) (_.arithmetic_right_shift (_.- (_.i32 +32) shift)))]
- (..i64 high low))))))
+ (all _.then
+ (..cap_shift! shift)
+ (_.return (<| (..no_shift! shift input)
+ (_.? (..small_shift? shift)
+ (let [high (|> input (_.the ..i64_high_field) (_.arithmetic_right_shift shift))
+ low (|> input (_.the ..i64_low_field) (_.logic_right_shift shift)
+ (_.bit_or (|> input (_.the ..i64_high_field) (_.left_shift (_.- shift (_.i32 +32))))))]
+ (..i64 high low)))
+ (let [high (_.? (|> input (_.the ..i64_high_field) (_.>= (_.i32 +0)))
+ (_.i32 +0)
+ (_.i32 -1))
+ low (|> input (_.the ..i64_high_field) (_.arithmetic_right_shift (_.- (_.i32 +32) shift)))]
+ (..i64 high low))))))
(runtime: (i64##right_shifted input shift)
- ($_ _.then
- (..cap_shift! shift)
- (_.return (<| (..no_shift! shift input)
- (_.? (..small_shift? shift)
- (let [high (|> input (_.the ..i64_high_field) (_.logic_right_shift shift))
- low (|> input (_.the ..i64_low_field) (_.logic_right_shift shift)
- (_.bit_or (|> input (_.the ..i64_high_field) (_.left_shift (_.- shift (_.i32 +32))))))]
- (..i64 high low)))
- (_.? (|> shift (_.= (_.i32 +32)))
- (..i64 (_.i32 +0) (|> input (_.the ..i64_high_field))))
- (..i64 (_.i32 +0)
- (|> input (_.the ..i64_high_field) (_.logic_right_shift (_.- (_.i32 +32) shift))))))))
+ (all _.then
+ (..cap_shift! shift)
+ (_.return (<| (..no_shift! shift input)
+ (_.? (..small_shift? shift)
+ (let [high (|> input (_.the ..i64_high_field) (_.logic_right_shift shift))
+ low (|> input (_.the ..i64_low_field) (_.logic_right_shift shift)
+ (_.bit_or (|> input (_.the ..i64_high_field) (_.left_shift (_.- shift (_.i32 +32))))))]
+ (..i64 high low)))
+ (_.? (|> shift (_.= (_.i32 +32)))
+ (..i64 (_.i32 +0) (|> input (_.the ..i64_high_field))))
+ (..i64 (_.i32 +0)
+ (|> input (_.the ..i64_high_field) (_.logic_right_shift (_.- (_.i32 +32) shift))))))))
(def: runtime//bit
Statement
- ($_ _.then
- @i64##and
- @i64##or
- @i64##xor
- @i64##not
- @i64##left_shifted
- @i64##arithmetic_right_shifted
- @i64##right_shifted
- ))
+ (all _.then
+ @i64##and
+ @i64##or
+ @i64##xor
+ @i64##not
+ @i64##left_shifted
+ @i64##arithmetic_right_shifted
+ @i64##right_shifted
+ ))
(runtime: i64##2^16
(_.left_shift (_.i32 +16) (_.i32 +1)))
@@ -416,38 +416,38 @@
(with_vars [l48 l32 l16 l00
r48 r32 r16 r00
x48 x32 x16 x00]
- ($_ _.then
- (_.define l48 (hh subject))
- (_.define l32 (hl subject))
- (_.define l16 (lh subject))
- (_.define l00 (ll subject))
-
- (_.define r48 (hh parameter))
- (_.define r32 (hl parameter))
- (_.define r16 (lh parameter))
- (_.define r00 (ll parameter))
-
- (_.define x00 (_.+ l00 r00))
-
- (_.define x16 (|> (high_16 x00)
- (_.+ l16)
- (_.+ r16)))
- (_.set x00 (low_16 x00))
-
- (_.define x32 (|> (high_16 x16)
- (_.+ l32)
- (_.+ r32)))
- (_.set x16 (low_16 x16))
-
- (_.define x48 (|> (high_16 x32)
- (_.+ l48)
- (_.+ r48)
- low_16))
- (_.set x32 (low_16 x32))
-
- (_.return (..i64 (_.bit_or (up_16 x48) x32)
- (_.bit_or (up_16 x16) x00)))
- ))))
+ (all _.then
+ (_.define l48 (hh subject))
+ (_.define l32 (hl subject))
+ (_.define l16 (lh subject))
+ (_.define l00 (ll subject))
+
+ (_.define r48 (hh parameter))
+ (_.define r32 (hl parameter))
+ (_.define r16 (lh parameter))
+ (_.define r00 (ll parameter))
+
+ (_.define x00 (_.+ l00 r00))
+
+ (_.define x16 (|> (high_16 x00)
+ (_.+ l16)
+ (_.+ r16)))
+ (_.set x00 (low_16 x00))
+
+ (_.define x32 (|> (high_16 x16)
+ (_.+ l32)
+ (_.+ r32)))
+ (_.set x16 (low_16 x16))
+
+ (_.define x48 (|> (high_16 x32)
+ (_.+ l48)
+ (_.+ r48)
+ low_16))
+ (_.set x32 (low_16 x32))
+
+ (_.return (..i64 (_.bit_or (up_16 x48) x32)
+ (_.bit_or (up_16 x16) x00)))
+ ))))
(runtime: (i64##opposite value)
(_.return (_.? (i64##= i64##min value)
@@ -483,56 +483,56 @@
(with_vars [l48 l32 l16 l00
r48 r32 r16 r00
x48 x32 x16 x00]
- ($_ _.then
- (_.define l48 (hh subject))
- (_.define l32 (hl subject))
- (_.define l16 (lh subject))
- (_.define l00 (ll subject))
-
- (_.define r48 (hh parameter))
- (_.define r32 (hl parameter))
- (_.define r16 (lh parameter))
- (_.define r00 (ll parameter))
-
- (_.define x00 (_.* l00 r00))
- (_.define x16 (high_16 x00))
- (_.set x00 (low_16 x00))
-
- (_.set x16 (|> x16 (_.+ (_.* l16 r00))))
- (_.define x32 (high_16 x16)) (_.set x16 (low_16 x16))
- (_.set x16 (|> x16 (_.+ (_.* l00 r16))))
- (_.set x32 (|> x32 (_.+ (high_16 x16)))) (_.set x16 (low_16 x16))
-
- (_.set x32 (|> x32 (_.+ (_.* l32 r00))))
- (_.define x48 (high_16 x32)) (_.set x32 (low_16 x32))
- (_.set x32 (|> x32 (_.+ (_.* l16 r16))))
- (_.set x48 (|> x48 (_.+ (high_16 x32)))) (_.set x32 (low_16 x32))
- (_.set x32 (|> x32 (_.+ (_.* l00 r32))))
- (_.set x48 (|> x48 (_.+ (high_16 x32)))) (_.set x32 (low_16 x32))
-
- (_.set x48 (|> x48
- (_.+ (_.* l48 r00))
- (_.+ (_.* l32 r16))
- (_.+ (_.* l16 r32))
- (_.+ (_.* l00 r48))
- low_16))
-
- (_.return (..i64 (_.bit_or (up_16 x48) x32)
- (_.bit_or (up_16 x16) x00)))
- ))))
+ (all _.then
+ (_.define l48 (hh subject))
+ (_.define l32 (hl subject))
+ (_.define l16 (lh subject))
+ (_.define l00 (ll subject))
+
+ (_.define r48 (hh parameter))
+ (_.define r32 (hl parameter))
+ (_.define r16 (lh parameter))
+ (_.define r00 (ll parameter))
+
+ (_.define x00 (_.* l00 r00))
+ (_.define x16 (high_16 x00))
+ (_.set x00 (low_16 x00))
+
+ (_.set x16 (|> x16 (_.+ (_.* l16 r00))))
+ (_.define x32 (high_16 x16)) (_.set x16 (low_16 x16))
+ (_.set x16 (|> x16 (_.+ (_.* l00 r16))))
+ (_.set x32 (|> x32 (_.+ (high_16 x16)))) (_.set x16 (low_16 x16))
+
+ (_.set x32 (|> x32 (_.+ (_.* l32 r00))))
+ (_.define x48 (high_16 x32)) (_.set x32 (low_16 x32))
+ (_.set x32 (|> x32 (_.+ (_.* l16 r16))))
+ (_.set x48 (|> x48 (_.+ (high_16 x32)))) (_.set x32 (low_16 x32))
+ (_.set x32 (|> x32 (_.+ (_.* l00 r32))))
+ (_.set x48 (|> x48 (_.+ (high_16 x32)))) (_.set x32 (low_16 x32))
+
+ (_.set x48 (|> x48
+ (_.+ (_.* l48 r00))
+ (_.+ (_.* l32 r16))
+ (_.+ (_.* l16 r32))
+ (_.+ (_.* l00 r48))
+ low_16))
+
+ (_.return (..i64 (_.bit_or (up_16 x48) x32)
+ (_.bit_or (up_16 x16) x00)))
+ ))))
(runtime: (i64##< parameter subject)
(let [negative? (|>> (_.the ..i64_high_field) (_.< (_.i32 +0)))]
(with_vars [-subject? -parameter?]
- ($_ _.then
- (_.define -subject? (negative? subject))
- (_.define -parameter? (negative? parameter))
- (_.return (<| (_.? (_.and -subject? (_.not -parameter?))
- (_.boolean true))
- (_.? (_.and (_.not -subject?) -parameter?)
- (_.boolean false))
- (negative? (i64##- parameter subject))))
- ))))
+ (all _.then
+ (_.define -subject? (negative? subject))
+ (_.define -parameter? (negative? parameter))
+ (_.return (<| (_.? (_.and -subject? (_.not -parameter?))
+ (_.boolean true))
+ (_.? (_.and (_.not -subject?) -parameter?)
+ (_.boolean false))
+ (negative? (i64##- parameter subject))))
+ ))))
(def: (i64##<= param subject)
(-> Expression Expression Expression)
@@ -555,20 +555,20 @@
(_.return i64##one))
(with_vars [approximation]
(let [subject/2 (..i64##arithmetic_right_shifted subject (_.i32 +1))]
- ($_ _.then
- (_.define approximation (i64##left_shifted (i64##/ parameter
- subject/2)
- (_.i32 +1)))
- (_.if (i64##= i64##zero approximation)
- (_.return (_.? (..negative? parameter)
- i64##one
- i64##-one))
- (let [remainder (i64##- (i64##* approximation
- parameter)
- subject)]
- (_.return (i64##+ (i64##/ parameter
- remainder)
- approximation)))))))))
+ (all _.then
+ (_.define approximation (i64##left_shifted (i64##/ parameter
+ subject/2)
+ (_.i32 +1)))
+ (_.if (i64##= i64##zero approximation)
+ (_.return (_.? (..negative? parameter)
+ i64##one
+ i64##-one))
+ (let [remainder (i64##- (i64##* approximation
+ parameter)
+ subject)]
+ (_.return (i64##+ (i64##/ parameter
+ remainder)
+ approximation)))))))))
(_.if (i64##= i64##min parameter)
(_.return i64##zero))
(_.if (..negative? subject)
@@ -580,43 +580,43 @@
(_.if (..negative? parameter)
(_.return (i64##opposite (i64##/ (i64##opposite parameter) subject))))
(with_vars [result remainder]
- ($_ _.then
- (_.define result i64##zero)
- (_.define remainder subject)
- (_.while (i64##<= remainder parameter)
- (with_vars [approximate approximate_result approximate_remainder log2 delta]
- (let [approximate_result' (i64##of_number approximate)
- approx_remainder (i64##* parameter approximate_result)]
- ($_ _.then
- (_.define approximate (|> (i64##number remainder)
- (_./ (i64##number parameter))
- (_.apply_1 (_.var "Math.floor"))
- (_.apply_2 (_.var "Math.max") (_.i32 +1))))
- (_.define log2 (|> approximate
- (_.apply_1 (_.var "Math.log"))
- (_./ (_.var "Math.LN2"))
- (_.apply_1 (_.var "Math.ceil"))))
- (_.define delta (_.? (_.> (_.i32 +48) log2)
- (_.apply_2 (_.var "Math.pow")
- (_.i32 +2)
- (_.- (_.i32 +48)
- log2))
- (_.i32 +1)))
- (_.define approximate_result approximate_result')
- (_.define approximate_remainder approx_remainder)
- (_.while (_.or (..negative? approximate_remainder)
- (i64##< approximate_remainder
- remainder))
- ($_ _.then
- (_.set approximate (_.- delta approximate))
- (_.set approximate_result approximate_result')
- (_.set approximate_remainder approx_remainder)))
- (_.set result (i64##+ (_.? (i64##= i64##zero approximate_result)
- i64##one
- approximate_result)
- result))
- (_.set remainder (i64##- approximate_remainder remainder))))))
- (_.return result)))))
+ (all _.then
+ (_.define result i64##zero)
+ (_.define remainder subject)
+ (_.while (i64##<= remainder parameter)
+ (with_vars [approximate approximate_result approximate_remainder log2 delta]
+ (let [approximate_result' (i64##of_number approximate)
+ approx_remainder (i64##* parameter approximate_result)]
+ (all _.then
+ (_.define approximate (|> (i64##number remainder)
+ (_./ (i64##number parameter))
+ (_.apply_1 (_.var "Math.floor"))
+ (_.apply_2 (_.var "Math.max") (_.i32 +1))))
+ (_.define log2 (|> approximate
+ (_.apply_1 (_.var "Math.log"))
+ (_./ (_.var "Math.LN2"))
+ (_.apply_1 (_.var "Math.ceil"))))
+ (_.define delta (_.? (_.> (_.i32 +48) log2)
+ (_.apply_2 (_.var "Math.pow")
+ (_.i32 +2)
+ (_.- (_.i32 +48)
+ log2))
+ (_.i32 +1)))
+ (_.define approximate_result approximate_result')
+ (_.define approximate_remainder approx_remainder)
+ (_.while (_.or (..negative? approximate_remainder)
+ (i64##< approximate_remainder
+ remainder))
+ (all _.then
+ (_.set approximate (_.- delta approximate))
+ (_.set approximate_result approximate_result')
+ (_.set approximate_remainder approx_remainder)))
+ (_.set result (i64##+ (_.? (i64##= i64##zero approximate_result)
+ i64##one
+ approximate_result)
+ result))
+ (_.set remainder (i64##- approximate_remainder remainder))))))
+ (_.return result)))))
(runtime: (i64##% parameter subject)
(let [flat (|> subject
@@ -626,39 +626,39 @@
(def: runtime//i64
Statement
- ($_ _.then
- ..runtime//bit
-
- @i64##2^16
- @i64##2^32
- @i64##2^64
- @i64##2^63
- @i64##unsigned_low
- @i64##new
- @i64##zero
- @i64##min
- @i64##max
- @i64##one
- @i64##=
- @i64##+
- @i64##opposite
- @i64##-one
- @i64##number
- @i64##of_number
- @i64##-
- @i64##*
- @i64##<
- @i64##/
- @i64##%
- ))
+ (all _.then
+ ..runtime//bit
+
+ @i64##2^16
+ @i64##2^32
+ @i64##2^64
+ @i64##2^63
+ @i64##unsigned_low
+ @i64##new
+ @i64##zero
+ @i64##min
+ @i64##max
+ @i64##one
+ @i64##=
+ @i64##+
+ @i64##opposite
+ @i64##-one
+ @i64##number
+ @i64##of_number
+ @i64##-
+ @i64##*
+ @i64##<
+ @i64##/
+ @i64##%
+ ))
(runtime: (text//index start part text)
(with_vars [idx]
- ($_ _.then
- (_.define idx (|> text (_.do "indexOf" (list part (i64##number start)))))
- (_.return (_.? (_.= (_.i32 -1) idx)
- ..none
- (..some (i64##of_number idx)))))))
+ (all _.then
+ (_.define idx (|> text (_.do "indexOf" (list part (i64##number start)))))
+ (_.return (_.? (_.= (_.i32 -1) idx)
+ ..none
+ (..some (i64##of_number idx)))))))
(runtime: (text//clip offset length text)
(_.return (|> text (_.do "substring" (list (_.the ..i64_low_field offset)
@@ -667,19 +667,19 @@
(runtime: (text//char idx text)
(with_vars [result]
- ($_ _.then
- (_.define result (|> text (_.do "charCodeAt" (list (_.the ..i64_low_field idx)))))
- (_.if (_.not_a_number? result)
- (_.throw (_.string "[Lux Error] Cannot get char from text."))
- (_.return (i64##of_number result))))))
+ (all _.then
+ (_.define result (|> text (_.do "charCodeAt" (list (_.the ..i64_low_field idx)))))
+ (_.if (_.not_a_number? result)
+ (_.throw (_.string "[Lux Error] Cannot get char from text."))
+ (_.return (i64##of_number result))))))
(def: runtime//text
Statement
- ($_ _.then
- @text//index
- @text//clip
- @text//char
- ))
+ (all _.then
+ @text//index
+ @text//clip
+ @text//char
+ ))
(runtime: (io//log message)
(let [console (_.var "console")
@@ -687,16 +687,16 @@
end! (_.return ..unit)]
(<| (_.if (|> console _.type_of (_.= (_.string "undefined")) _.not
(_.and (_.the "log" console)))
- ($_ _.then
- (_.statement (|> console (_.do "log" (list message))))
- end!))
+ (all _.then
+ (_.statement (|> console (_.do "log" (list message))))
+ end!))
(_.if (|> print _.type_of (_.= (_.string "undefined")) _.not)
- ($_ _.then
- (_.statement (_.apply_1 print (_.? (_.= (_.string "string")
- (_.type_of message))
- message
- (_.apply_1 (_.var "JSON.stringify") message))))
- end!))
+ (all _.then
+ (_.statement (_.apply_1 print (_.? (_.= (_.string "string")
+ (_.type_of message))
+ message
+ (_.apply_1 (_.var "JSON.stringify") message))))
+ end!))
end!)))
(runtime: (io//error message)
@@ -704,65 +704,65 @@
(def: runtime//io
Statement
- ($_ _.then
- @io//log
- @io//error
- ))
+ (all _.then
+ @io//log
+ @io//error
+ ))
(runtime: (js//get object field)
(with_vars [temp]
- ($_ _.then
- (_.define temp (_.at field object))
- (_.return (_.? (_.= _.undefined temp)
- ..none
- (..some temp))))))
+ (all _.then
+ (_.define temp (_.at field object))
+ (_.return (_.? (_.= _.undefined temp)
+ ..none
+ (..some temp))))))
(runtime: (js//set object field input)
- ($_ _.then
- (_.set (_.at field object) input)
- (_.return object)))
+ (all _.then
+ (_.set (_.at field object) input)
+ (_.return object)))
(runtime: (js//delete object field)
- ($_ _.then
- (_.statement (_.delete (_.at field object)))
- (_.return object)))
+ (all _.then
+ (_.statement (_.delete (_.at field object)))
+ (_.return object)))
(def: runtime//js
Statement
- ($_ _.then
- @js//get
- @js//set
- @js//delete
- ))
+ (all _.then
+ @js//get
+ @js//set
+ @js//delete
+ ))
(runtime: (array//write idx value array)
- ($_ _.then
- (_.set (_.at (_.the ..i64_low_field idx) array) value)
- (_.return array)))
+ (all _.then
+ (_.set (_.at (_.the ..i64_low_field idx) array) value)
+ (_.return array)))
(runtime: (array//delete idx array)
- ($_ _.then
- (_.statement (_.delete (_.at (_.the ..i64_low_field idx) array)))
- (_.return array)))
+ (all _.then
+ (_.statement (_.delete (_.at (_.the ..i64_low_field idx) array)))
+ (_.return array)))
(def: runtime//array
Statement
- ($_ _.then
- @array//write
- @array//delete
- ))
+ (all _.then
+ @array//write
+ @array//delete
+ ))
(def: runtime
Statement
- ($_ _.then
- runtime//structure
- runtime//i64
- runtime//text
- runtime//io
- runtime//js
- runtime//array
- runtime//lux
- ))
+ (all _.then
+ runtime//structure
+ runtime//i64
+ runtime//text
+ runtime//io
+ runtime//js
+ runtime//array
+ runtime//lux
+ ))
(def: module_id
0)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/case.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/case.lux
index 4e237921c..455121d02 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/case.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/case.lux
@@ -46,9 +46,9 @@
1 _.pop
2 _.pop2
_ ... (n.> 2)
- ($_ _.composite
- _.pop2
- (pop_alt (n.- 2 stack_depth)))))
+ (all _.composite
+ _.pop2
+ (pop_alt (n.- 2 stack_depth)))))
(def: int
(-> (I64 Any) (Bytecode Any))
@@ -60,34 +60,34 @@
(def: peek
(Bytecode Any)
- ($_ _.composite
- _.dup
- (//runtime.get //runtime.stack_head)))
+ (all _.composite
+ _.dup
+ (//runtime.get //runtime.stack_head)))
(def: pop
(Bytecode Any)
- ($_ _.composite
- (//runtime.get //runtime.stack_tail)
- (_.checkcast //type.stack)))
+ (all _.composite
+ (//runtime.get //runtime.stack_tail)
+ (_.checkcast //type.stack)))
(def: (left_projection lefts)
(-> Nat (Bytecode Any))
- ($_ _.composite
- (_.checkcast //type.tuple)
- (..int lefts)
- (.case lefts
- 0
- _.aaload
-
- lefts
- //runtime.left_projection)))
+ (all _.composite
+ (_.checkcast //type.tuple)
+ (..int lefts)
+ (.case lefts
+ 0
+ _.aaload
+
+ lefts
+ //runtime.left_projection)))
(def: (right_projection lefts)
(-> Nat (Bytecode Any))
- ($_ _.composite
- (_.checkcast //type.tuple)
- (..int lefts)
- //runtime.right_projection))
+ (all _.composite
+ (_.checkcast //type.tuple)
+ (..int lefts)
+ //runtime.right_projection))
(def: equals@Object
(.let [class (type.class "java.lang.Object" (list))
@@ -96,9 +96,9 @@
(def: (path|bind register)
(-> Register (Operation (Bytecode Any)))
- (operation#in ($_ _.composite
- ..peek
- (_.astore register))))
+ (operation#in (all _.composite
+ ..peek
+ (_.astore register))))
(def: (path|bit_fork again @else [when thenP elseP])
(-> (-> Path (Operation (Bytecode Any)))
@@ -115,13 +115,13 @@
.let [if! (.if when _.ifeq _.ifne)]]
(in (do _.monad
[@else _.new_label]
- ($_ _.composite
- ..peek
- (//value.unwrap type.boolean)
- (if! @else)
- then!
- (_.set_label @else)
- else!)))))
+ (all _.composite
+ ..peek
+ (//value.unwrap type.boolean)
+ (if! @else)
+ then!
+ (_.set_label @else)
+ else!)))))
(template [<name> <type> <unwrap> <dup> <pop> <test> <comparison> <if>]
[(def: (<name> again @else cons)
@@ -134,23 +134,23 @@
[then! (again thenP)]
(in (do _.monad
[@else _.new_label]
- ($_ _.composite
- <dup>
- (<test> test)
- <comparison>
- (<if> @else)
- <pop>
- then!
- (_.set_label @else)
- else!)))))
- ($_ _.composite
- <pop>
- (_.goto @else))
+ (all _.composite
+ <dup>
+ (<test> test)
+ <comparison>
+ (<if> @else)
+ <pop>
+ then!
+ (_.set_label @else)
+ else!)))))
+ (all _.composite
+ <pop>
+ (_.goto @else))
{.#Item cons})]
- (in ($_ _.composite
- ..peek
- <unwrap>
- fork!))))]
+ (in (all _.composite
+ ..peek
+ <unwrap>
+ fork!))))]
[path|i64_fork (I64 Any) (//value.unwrap type.long) _.dup2 _.pop2 ..long _.lcmp _.ifne]
[path|f64_fork Frac (//value.unwrap type.double) _.dup2 _.pop2 _.double _.dcmpl _.ifne]
@@ -178,34 +178,34 @@
{synthesis.#Then bodyS}
(do phase.monad
[body! (phase archive bodyS)]
- (in ($_ _.composite
- (..pop_alt stack_depth)
- body!
- (_.when_continuous (_.goto @end)))))
+ (in (all _.composite
+ (..pop_alt stack_depth)
+ body!
+ (_.when_continuous (_.goto @end)))))
(pattern (synthesis.side lefts right?))
(operation#in
(do _.monad
[@success _.new_label]
- ($_ _.composite
- ..peek
- (_.checkcast //type.variant)
- (//structure.lefts lefts)
- (//structure.right? right?)
- //runtime.case
- _.dup
- (_.ifnonnull @success)
- _.pop
- (_.goto @else)
- (_.set_label @success)
- //runtime.push)))
+ (all _.composite
+ ..peek
+ (_.checkcast //type.variant)
+ (//structure.lefts lefts)
+ (//structure.right? right?)
+ //runtime.case
+ _.dup
+ (_.ifnonnull @success)
+ _.pop
+ (_.goto @else)
+ (_.set_label @success)
+ //runtime.push)))
(^.template [<pattern> <projection>]
[(pattern (<pattern> lefts))
- (operation#in ($_ _.composite
- ..peek
- (<projection> lefts)
- //runtime.push))
+ (operation#in (all _.composite
+ ..peek
+ (<projection> lefts)
+ //runtime.push))
... Extra optimization
(pattern (synthesis.path/seq
@@ -213,11 +213,11 @@
(synthesis.!bind_top register thenP)))
(do phase.monad
[then! (path' stack_depth @else @end phase archive thenP)]
- (in ($_ _.composite
- ..peek
- (<projection> lefts)
- (_.astore register)
- then!)))])
+ (in (all _.composite
+ ..peek
+ (<projection> lefts)
+ (_.astore register)
+ then!)))])
([synthesis.member/left ..left_projection]
[synthesis.member/right ..right_projection])
@@ -225,21 +225,21 @@
(do phase.monad
[left! (path' stack_depth @else @end phase archive leftP)
right! (path' stack_depth @else @end phase archive rightP)]
- (in ($_ _.composite
- left!
- right!)))
+ (in (all _.composite
+ left!
+ right!)))
{synthesis.#Alt leftP rightP}
(do phase.monad
[@alt_else //runtime.forge_label
left! (path' (++ stack_depth) @alt_else @end phase archive leftP)
right! (path' stack_depth @else @end phase archive rightP)]
- (in ($_ _.composite
- _.dup
- left!
- (_.set_label @alt_else)
- _.pop
- right!)))
+ (in (all _.composite
+ _.dup
+ left!
+ (_.set_label @alt_else)
+ _.pop
+ right!)))
)))
(def: (path @end phase archive path)
@@ -247,15 +247,15 @@
(do phase.monad
[@else //runtime.forge_label
path! (..path' 1 @else @end phase archive path)]
- (in ($_ _.composite
- path!
- (<| (_.when_acknowledged @else)
- ($_ _.composite
- (_.set_label @else)
- //runtime.pm_failure
- (_.goto @end)
- ))
- ))))
+ (in (all _.composite
+ path!
+ (<| (_.when_acknowledged @else)
+ (all _.composite
+ (_.set_label @else)
+ //runtime.pm_failure
+ (_.goto @end)
+ ))
+ ))))
(def: .public (if phase archive [testS thenS elseS])
(Generator [Synthesis Synthesis Synthesis])
@@ -266,36 +266,36 @@
(in (do _.monad
[@else _.new_label
@end _.new_label]
- ($_ _.composite
- test!
- (//value.unwrap type.boolean)
- (_.ifeq @else)
- then!
- (_.when_continuous (_.goto @end))
- (_.set_label @else)
- else!
- (<| (_.when_acknowledged @end)
- (_.set_label @end)))))))
+ (all _.composite
+ test!
+ (//value.unwrap type.boolean)
+ (_.ifeq @else)
+ then!
+ (_.when_continuous (_.goto @end))
+ (_.set_label @else)
+ else!
+ (<| (_.when_acknowledged @end)
+ (_.set_label @end)))))))
(def: .public (exec phase archive [this that])
(Generator [Synthesis Synthesis])
(do phase.monad
[this! (phase archive this)
that! (phase archive that)]
- (in ($_ _.composite
- this!
- _.pop
- that!))))
+ (in (all _.composite
+ this!
+ _.pop
+ that!))))
(def: .public (let phase archive [inputS register bodyS])
(Generator [Synthesis Register Synthesis])
(do phase.monad
[input! (phase archive inputS)
body! (phase archive bodyS)]
- (in ($_ _.composite
- input!
- (_.astore register)
- body!))))
+ (in (all _.composite
+ input!
+ (_.astore register)
+ body!))))
(def: .public (get phase archive [path recordS])
(Generator [(List Member) Synthesis])
@@ -305,9 +305,9 @@
(.let [next! (.if (the member.#right? step)
(..right_projection (the member.#lefts step))
(..left_projection (the member.#lefts step)))]
- ($_ _.composite
- so_far!
- next!)))
+ (all _.composite
+ so_far!
+ next!)))
record!
(list.reversed path)))))
@@ -317,10 +317,10 @@
[@end //runtime.forge_label
value! (phase archive valueS)
path! (..path @end phase archive path)]
- (in ($_ _.composite
- _.aconst_null
- value!
- //runtime.push
- path!
- (<| (_.when_acknowledged @end)
- (_.set_label @end))))))
+ (in (all _.composite
+ _.aconst_null
+ value!
+ //runtime.push
+ path!
+ (<| (_.when_acknowledged @end)
+ (_.set_label @end))))))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function.lux
index 1de6aba52..77f1a415f 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function.lux
@@ -92,9 +92,9 @@
(def: modifier
(Modifier Class)
- ($_ modifier#composite
- class.public
- class.final))
+ (all modifier#composite
+ class.public
+ class.final))
(def: this_offset 1)
@@ -131,18 +131,18 @@
(Generator [(Bytecode Any) (List Synthesis)])
(do [! phase.monad]
[inputsG (monad.each ! (generate archive) inputsS)]
- (in ($_ _.composite
- abstractionG
- (|> inputsG
- (list.sub /arity.maximum)
- (monad.each _.monad
- (function (_ batchG)
- ($_ _.composite
- (_.checkcast /abstract.class)
- (monad.all _.monad batchG)
- (_.invokevirtual /abstract.class //runtime.apply::name (//runtime.apply::type (list.size batchG)))
- ))))
- ))))
+ (in (all _.composite
+ abstractionG
+ (|> inputsG
+ (list.sub /arity.maximum)
+ (monad.each _.monad
+ (function (_ batchG)
+ (all _.composite
+ (_.checkcast /abstract.class)
+ (monad.all _.monad batchG)
+ (_.invokevirtual /abstract.class //runtime.apply::name (//runtime.apply::type (list.size batchG)))
+ ))))
+ ))))
(def: (apply/? generate archive [abstractionS inputsS])
(Generator Apply)
@@ -156,11 +156,11 @@
[.let [:abstraction: (type.class (//runtime.class_name @abstraction) (list))]
abstractionG (//reference.constant archive $abstraction)
inputsG (monad.each ! (generate archive) inputsS)]
- (in ($_ _.composite
- abstractionG
- (monad.all _.monad inputsG)
- (/implementation.call :abstraction: arity)
- ))))
+ (in (all _.composite
+ abstractionG
+ (monad.all _.monad inputsG)
+ (/implementation.call :abstraction: arity)
+ ))))
(def: (apply/> generate archive [$abstraction @abstraction arity inputsS])
(Generator [Symbol unit.ID Arity (List Synthesis)])
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/field/constant.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/field/constant.lux
index 7d0bc8ae0..bccc114a9 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/field/constant.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/field/constant.lux
@@ -1,25 +1,25 @@
(.using
- [library
- [lux {"-" Type type}
- [data
- [collection
- ["[0]" sequence]]]
- [target
- [jvm
- ["[0]" field {"+" Field}]
- ["[0]" modifier {"+" Modifier} ("[1]#[0]" monoid)]
- [type {"+" Type}
- [category {"+" Value}]]
- [constant
- [pool {"+" Resource}]]]]]])
+ [library
+ [lux {"-" Type type}
+ [data
+ [collection
+ ["[0]" sequence]]]
+ [target
+ [jvm
+ ["[0]" field {"+" Field}]
+ ["[0]" modifier {"+" Modifier} ("[1]#[0]" monoid)]
+ [type {"+" Type}
+ [category {"+" Value}]]
+ [constant
+ [pool {"+" Resource}]]]]]])
(def: modifier
(Modifier Field)
- ($_ modifier#composite
- field.public
- field.static
- field.final
- ))
+ (all modifier#composite
+ field.public
+ field.static
+ field.final
+ ))
(def: .public (constant name type)
(-> Text (Type Value) (Resource Field))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/field/variable.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/field/variable.lux
index 4e0684215..179fdb273 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/field/variable.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/field/variable.lux
@@ -1,48 +1,48 @@
(.using
- [library
- [lux {"-" Type type}
- [data
- [collection
- ["[0]" list ("[1]#[0]" functor)]
- ["[0]" sequence]]]
- [target
- [jvm
- ["[0]" modifier {"+" Modifier} ("[1]#[0]" monoid)]
- ["[0]" field {"+" Field}]
- ["_" bytecode {"+" Bytecode}]
- [type {"+" Type}
- [category {"+" Value Class}]]
- [constant
- [pool {"+" Resource}]]]]]]
- ["[0]" //// "_"
- ["[1][0]" type]
- ["[1][0]" reference]
- [//////
- [reference
- [variable {"+" Register}]]]])
+ [library
+ [lux {"-" Type type}
+ [data
+ [collection
+ ["[0]" list ("[1]#[0]" functor)]
+ ["[0]" sequence]]]
+ [target
+ [jvm
+ ["[0]" modifier {"+" Modifier} ("[1]#[0]" monoid)]
+ ["[0]" field {"+" Field}]
+ ["_" bytecode {"+" Bytecode}]
+ [type {"+" Type}
+ [category {"+" Value Class}]]
+ [constant
+ [pool {"+" Resource}]]]]]]
+ ["[0]" //// "_"
+ ["[1][0]" type]
+ ["[1][0]" reference]
+ [//////
+ [reference
+ [variable {"+" Register}]]]])
(def: .public type ////type.value)
(def: .public (get class name)
(-> (Type Class) Text (Bytecode Any))
- ($_ _.composite
- ////reference.this
- (_.getfield class name ..type)
- ))
+ (all _.composite
+ ////reference.this
+ (_.getfield class name ..type)
+ ))
(def: .public (put naming class register value)
(-> (-> Register Text) (Type Class) Register (Bytecode Any) (Bytecode Any))
- ($_ _.composite
- ////reference.this
- value
- (_.putfield class (naming register) ..type)))
+ (all _.composite
+ ////reference.this
+ value
+ (_.putfield class (naming register) ..type)))
(def: modifier
(Modifier Field)
- ($_ modifier#composite
- field.private
- field.final
- ))
+ (all modifier#composite
+ field.private
+ field.final
+ ))
(def: .public (variable name type)
(-> Text (Type Value) (Resource Field))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/field/variable/count.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/field/variable/count.lux
index a73192e16..c3a960653 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/field/variable/count.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/field/variable/count.lux
@@ -1,17 +1,17 @@
(.using
- [library
- [lux {"-" type}
- [control
- ["[0]" try]]
- [target
- [jvm
- ["_" bytecode {"+" Bytecode}]
- ["[0]" type]
- [encoding
- [name {"+" External}]
- ["[0]" signed]]]]]]
- ["[0]" //// "_"
- ["[1][0]" abstract]])
+ [library
+ [lux {"-" type}
+ [control
+ ["[0]" try]]
+ [target
+ [jvm
+ ["_" bytecode {"+" Bytecode}]
+ ["[0]" type]
+ [encoding
+ [name {"+" External}]
+ ["[0]" signed]]]]]]
+ ["[0]" //// "_"
+ ["[1][0]" abstract]])
(def: .public field "partials")
(def: .public type type.int)
@@ -28,7 +28,7 @@
(def: .public value
(Bytecode Any)
- ($_ _.composite
- ..this
- (_.getfield ////abstract.class ..field ..type)
- ))
+ (all _.composite
+ ..this
+ (_.getfield ////abstract.class ..field ..type)
+ ))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/field/variable/partial.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/field/variable/partial.lux
index a0880a4e2..d6f86409c 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/field/variable/partial.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/field/variable/partial.lux
@@ -31,11 +31,11 @@
(def: .public (initial amount)
(-> Nat (Bytecode Any))
- ($_ _.composite
- (|> _.aconst_null
- (list.repeated amount)
- (monad.all _.monad))
- (_#in [])))
+ (all _.composite
+ (|> _.aconst_null
+ (list.repeated amount)
+ (monad.all _.monad))
+ (_#in [])))
(def: .public (get class register)
(-> (Type Class) Register (Bytecode Any))
@@ -52,7 +52,7 @@
(def: .public (new arity)
(-> Arity (Bytecode Any))
(if (arity.multiary? arity)
- ($_ _.composite
- //count.initial
- (initial (n.- ///arity.minimum arity)))
+ (all _.composite
+ //count.initial
+ (initial (n.- ///arity.minimum arity)))
(_#in [])))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/method.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/method.lux
index 2f7a0afe3..e684f86bc 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/method.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/method.lux
@@ -1,14 +1,14 @@
(.using
- [library
- [lux "*"
- [target
- [jvm
- ["[0]" modifier {"+" Modifier} ("[1]#[0]" monoid)]
- ["[0]" method {"+" Method}]]]]])
+ [library
+ [lux "*"
+ [target
+ [jvm
+ ["[0]" modifier {"+" Modifier} ("[1]#[0]" monoid)]
+ ["[0]" method {"+" Method}]]]]])
(def: .public modifier
(Modifier Method)
- ($_ modifier#composite
- method.public
- method.strict
- ))
+ (all modifier#composite
+ method.public
+ method.strict
+ ))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/method/apply.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/method/apply.lux
index cd8ecbbb5..e4b3c7802 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/method/apply.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/method/apply.lux
@@ -50,31 +50,31 @@
(def: (increment by)
(-> Nat (Bytecode Any))
- ($_ _.composite
- (<| _.int .i64 by)
- _.iadd))
+ (all _.composite
+ (<| _.int .i64 by)
+ _.iadd))
(def: (inputs offset amount)
(-> Register Nat (Bytecode Any))
- ($_ _.composite
- (|> amount
- list.indices
- (monad.each _.monad (|>> (n.+ offset) _.aload)))
- (_#in [])
- ))
+ (all _.composite
+ (|> amount
+ list.indices
+ (monad.each _.monad (|>> (n.+ offset) _.aload)))
+ (_#in [])
+ ))
(def: (apply offset amount)
(-> Register Nat (Bytecode Any))
(let [arity (n.min amount ///arity.maximum)]
- ($_ _.composite
- (_.checkcast ///abstract.class)
- (..inputs offset arity)
- (_.invokevirtual ///abstract.class ////runtime.apply::name (////runtime.apply::type arity))
- (if (n.> ///arity.maximum amount)
- (apply (n.+ ///arity.maximum offset)
- (n.- ///arity.maximum amount))
- (_#in []))
- )))
+ (all _.composite
+ (_.checkcast ///abstract.class)
+ (..inputs offset arity)
+ (_.invokevirtual ///abstract.class ////runtime.apply::name (////runtime.apply::type arity))
+ (if (n.> ///arity.maximum amount)
+ (apply (n.+ ///arity.maximum offset)
+ (n.- ///arity.maximum amount))
+ (_#in []))
+ )))
(def: this_offset 1)
@@ -87,11 +87,11 @@
#0 (////runtime.apply::type apply_arity)
(list)
{.#Some (case num_partials
- 0 ($_ _.composite
- ////reference.this
- (..inputs ..this_offset apply_arity)
- (//implementation.call class function_arity)
- _.areturn)
+ 0 (all _.composite
+ ////reference.this
+ (..inputs ..this_offset apply_arity)
+ (//implementation.call class function_arity)
+ _.areturn)
_ (do _.monad
[@default _.new_label
@labelsH _.new_label
@@ -108,51 +108,51 @@
already_partial? (n.> 0 stage)
exact_match? (i.= over_extent (.int stage))
has_more_than_necessary? (i.> over_extent (.int stage))]
- ($_ _.composite
- (_.set_label @case)
- (cond exact_match?
- ($_ _.composite
- ////reference.this
- (if already_partial?
- (_.invokevirtual class //reset.name (//reset.type class))
- (_#in []))
- current_partials
- (..inputs ..this_offset apply_arity)
- (//implementation.call class function_arity)
- _.areturn)
-
- has_more_than_necessary?
- (let [arity_inputs (|> function_arity (n.- stage))
- additional_inputs (|> apply_arity (n.- arity_inputs))]
- ($_ _.composite
+ (all _.composite
+ (_.set_label @case)
+ (cond exact_match?
+ (all _.composite
////reference.this
- (_.invokevirtual class //reset.name (//reset.type class))
+ (if already_partial?
+ (_.invokevirtual class //reset.name (//reset.type class))
+ (_#in []))
current_partials
- (..inputs ..this_offset arity_inputs)
+ (..inputs ..this_offset apply_arity)
(//implementation.call class function_arity)
- (apply (n.+ ..this_offset arity_inputs) additional_inputs)
- _.areturn))
+ _.areturn)
+
+ has_more_than_necessary?
+ (let [arity_inputs (|> function_arity (n.- stage))
+ additional_inputs (|> apply_arity (n.- arity_inputs))]
+ (all _.composite
+ ////reference.this
+ (_.invokevirtual class //reset.name (//reset.type class))
+ current_partials
+ (..inputs ..this_offset arity_inputs)
+ (//implementation.call class function_arity)
+ (apply (n.+ ..this_offset arity_inputs) additional_inputs)
+ _.areturn))
- ... (i.< over_extent (.int stage))
- (let [current_environment (|> (list.indices (list.size environment))
- (list#each (///foreign.get class))
- (monad.all _.monad))
- missing_partials (|> _.aconst_null
- (list.repeated (|> num_partials (n.- apply_arity) (n.- stage)))
- (monad.all _.monad))]
- ($_ _.composite
- (_.new class)
- _.dup
- current_environment
- ///count.value
- (..increment apply_arity)
- current_partials
- (..inputs ..this_offset apply_arity)
- missing_partials
- (_.invokespecial class //init.name (//init.type environment function_arity))
- _.areturn)))))))
+ ... (i.< over_extent (.int stage))
+ (let [current_environment (|> (list.indices (list.size environment))
+ (list#each (///foreign.get class))
+ (monad.all _.monad))
+ missing_partials (|> _.aconst_null
+ (list.repeated (|> num_partials (n.- apply_arity) (n.- stage)))
+ (monad.all _.monad))]
+ (all _.composite
+ (_.new class)
+ _.dup
+ current_environment
+ ///count.value
+ (..increment apply_arity)
+ current_partials
+ (..inputs ..this_offset apply_arity)
+ missing_partials
+ (_.invokespecial class //init.name (//init.type environment function_arity))
+ _.areturn)))))))
(monad.all _.monad))]]
- ($_ _.composite
- ///count.value
- (_.tableswitch (try.trusted (signed.s4 +0)) @default [@labelsH @labelsT])
- cases)))})))
+ (all _.composite
+ ///count.value
+ (_.tableswitch (try.trusted (signed.s4 +0)) @default [@labelsH @labelsT])
+ cases)))})))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/method/implementation.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/method/implementation.lux
index 165c3e502..eb17c5044 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/method/implementation.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/method/implementation.lux
@@ -36,10 +36,10 @@
(list)]))
(def: modifier
- ($_ modifier#composite
- method.static
- //.modifier
- ))
+ (all modifier#composite
+ method.static
+ //.modifier
+ ))
(def: .public (method :it: arity @begin body)
(-> (Type Class) Arity Label (Bytecode Any) (Resource Method))
@@ -47,11 +47,11 @@
..name
#0 (..type :it: arity)
(list)
- {.#Some ($_ _.composite
- (_.set_label @begin)
- body
- (_.when_continuous _.areturn)
- )}))
+ {.#Some (all _.composite
+ (_.set_label @begin)
+ body
+ (_.when_continuous _.areturn)
+ )}))
(def: .public (call :it: arity)
(-> (Type Class) Arity (Bytecode Any))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/method/init.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/method/init.lux
index 554f0cb8e..d909c1aaf 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/method/init.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/method/init.lux
@@ -67,11 +67,11 @@
(def: .public (super environment_size arity)
(-> Nat Arity (Bytecode Any))
(let [arity_register (++ environment_size)]
- ($_ _.composite
- (if (arity.unary? arity)
- ..no_partials
- (_.iload arity_register))
- (_.invokespecial ///abstract.class ..name ///abstract.init))))
+ (all _.composite
+ (if (arity.unary? arity)
+ ..no_partials
+ (_.iload arity_register))
+ (_.invokespecial ///abstract.class ..name ///abstract.init))))
(def: (store_all amount put offset)
(-> Nat
@@ -96,9 +96,9 @@
(method.method //.modifier ..name
#0 (..type environment arity)
(list)
- {.#Some ($_ _.composite
- ////reference.this
- (..super environment_size arity)
- (store_all environment_size (///foreign.put class) offset_foreign)
- (store_all (-- arity) (///partial.put class) offset_partial)
- _.return)})))
+ {.#Some (all _.composite
+ ////reference.this
+ (..super environment_size arity)
+ (store_all environment_size (///foreign.put class) offset_foreign)
+ (store_all (-- arity) (///partial.put class) offset_partial)
+ _.return)})))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/method/new.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/method/new.lux
index 5087f0357..06c0b32d3 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/method/new.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/method/new.lux
@@ -45,12 +45,12 @@
(def: .public (instance' foreign_setup class environment arity)
(-> (List (Bytecode Any)) (Type Class) (Environment Synthesis) Arity (Bytecode Any))
- ($_ _.composite
- (_.new class)
- _.dup
- (monad.all _.monad foreign_setup)
- (///partial.new arity)
- (_.invokespecial class //init.name (//init.type environment arity))))
+ (all _.composite
+ (_.new class)
+ _.dup
+ (monad.all _.monad foreign_setup)
+ (///partial.new arity)
+ (_.invokespecial class //init.name (//init.type environment arity))))
(def: .public (instance generate archive class environment arity)
(-> Phase Archive (Type Class) (Environment Synthesis) Arity (Operation (Bytecode Any)))
@@ -70,13 +70,13 @@
(method.method //.modifier //init.name
#0 (//init.type environment arity)
(list)
- {.#Some ($_ _.composite
- ////reference.this
- (//init.super environment_size arity)
- (monad.each _.monad (function (_ register)
- (///foreign.put class register (_.aload (after_this register))))
- (list.indices environment_size))
- (monad.each _.monad (function (_ register)
- (///partial.put class register (_.aload (after_arity register))))
- (list.indices (n.- ///arity.minimum arity)))
- _.areturn)})))
+ {.#Some (all _.composite
+ ////reference.this
+ (//init.super environment_size arity)
+ (monad.each _.monad (function (_ register)
+ (///foreign.put class register (_.aload (after_this register))))
+ (list.indices environment_size))
+ (monad.each _.monad (function (_ register)
+ (///partial.put class register (_.aload (after_arity register))))
+ (list.indices (n.- ///arity.minimum arity)))
+ _.areturn)})))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/method/reset.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/method/reset.lux
index 037f2958d..ea9f1fc21 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/method/reset.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/method/reset.lux
@@ -1,30 +1,30 @@
(.using
- [library
- [lux {"-" Type type}
- [data
- [collection
- ["[0]" list ("[1]#[0]" functor)]]]
- [target
- [jvm
- ["[0]" method {"+" Method}]
- ["_" bytecode {"+" Bytecode}]
- [constant
- [pool {"+" Resource}]]
- ["[0]" type {"+" Type}
- ["[0]" category {"+" Class}]]]]]]
- ["[0]" //
- ["[1][0]" new]
+ [library
+ [lux {"-" Type type}
+ [data
+ [collection
+ ["[0]" list ("[1]#[0]" functor)]]]
+ [target
+ [jvm
+ ["[0]" method {"+" Method}]
+ ["_" bytecode {"+" Bytecode}]
+ [constant
+ [pool {"+" Resource}]]
+ ["[0]" type {"+" Type}
+ ["[0]" category {"+" Class}]]]]]]
+ ["[0]" //
+ ["[1][0]" new]
+ ["/[1]" // "_"
+ [field
+ [variable
+ ["[1][0]" foreign]]]
["/[1]" // "_"
- [field
- [variable
- ["[1][0]" foreign]]]
- ["/[1]" // "_"
- ["[1][0]" reference]
- [////
- [analysis {"+" Environment}]
- [synthesis {"+" Synthesis}]
- [///
- ["[0]" arity {"+" Arity}]]]]]])
+ ["[1][0]" reference]
+ [////
+ [analysis {"+" Environment}]
+ [synthesis {"+" Synthesis}]
+ [///
+ ["[0]" arity {"+" Arity}]]]]]])
(def: .public name "reset")
@@ -43,8 +43,8 @@
(method.method //.modifier ..name
#0 (..type class)
(list)
- {.#Some ($_ _.composite
- (if (arity.multiary? arity)
- (//new.instance' (..current_environment class environment) class environment arity)
- ////reference.this)
- _.areturn)}))
+ {.#Some (all _.composite
+ (if (arity.multiary? arity)
+ (//new.instance' (..current_environment class environment) class environment arity)
+ ////reference.this)
+ _.areturn)}))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/host.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/host.lux
index d512d7050..d9f873984 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/host.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/host.lux
@@ -62,10 +62,10 @@
(import: java/lang/ClassLoader
"[1]::[0]")
-(def: value::modifier ($_ modifier#composite field.public field.final field.static))
+(def: value::modifier (all modifier#composite field.public field.final field.static))
(def: init::type (type.method [(list) (list) type.void (list)]))
-(def: init::modifier ($_ modifier#composite method.public method.static method.strict))
+(def: init::modifier (all modifier#composite method.public method.static method.strict))
(exception: .public (cannot_load [class Text
error Text])
@@ -126,10 +126,10 @@
#0 ..init::type
(list)
{.#Some
- ($_ _.composite
- valueG
- (_.putstatic (type.class bytecode_name (list)) //value.field :value:)
- _.return)}))
+ (all _.composite
+ valueG
+ (_.putstatic (type.class bytecode_name (list)) //value.field :value:)
+ _.return)}))
(sequence.sequence))]
(io.run! (do [! (try.with io.monad)]
[bytecode (# ! each (format.result class.writer)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/loop.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/loop.lux
index 0d510baa6..167e22442 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/loop.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/loop.lux
@@ -54,23 +54,23 @@
[fetchG (translate archive updateS)
.let [storeG (_.astore register)]]
(in [fetchG storeG]))))))]
- (in ($_ _.composite
- ... It may look weird that first I fetch all the values separately,
- ... and then I store them all.
- ... It must be done that way in order to avoid a potential bug.
- ... Let's say that you'll recur with 2 expressions: X and Y.
- ... If Y depends on the value of X, and you don't perform fetches
- ... and stores separately, then by the time Y is evaluated, it
- ... will refer to the new value of X, instead of the old value, as
- ... should be the case.
- (|> updatesG
- (list#each product.left)
- (monad.all _.monad))
- (|> updatesG
- list.reversed
- (list#each product.right)
- (monad.all _.monad))
- (_.goto @begin)))))
+ (in (all _.composite
+ ... It may look weird that first I fetch all the values separately,
+ ... and then I store them all.
+ ... It must be done that way in order to avoid a potential bug.
+ ... Let's say that you'll recur with 2 expressions: X and Y.
+ ... If Y depends on the value of X, and you don't perform fetches
+ ... and stores separately, then by the time Y is evaluated, it
+ ... will refer to the new value of X, instead of the old value, as
+ ... should be the case.
+ (|> updatesG
+ (list#each product.left)
+ (monad.all _.monad))
+ (|> updatesG
+ list.reversed
+ (list#each product.right)
+ (monad.all _.monad))
+ (_.goto @begin)))))
(def: .public (scope translate archive [offset initsS+ iterationS])
(Generator [Nat (List Synthesis) Synthesis])
@@ -82,13 +82,13 @@
.let [initializationG (list#each (function (_ [index initG])
[initG (_.astore (n.+ offset index))])
(list.enumeration initsI+))]]
- (in ($_ _.composite
- (|> initializationG
- (list#each product.left)
- (monad.all _.monad))
- (|> initializationG
- list.reversed
- (list#each product.right)
- (monad.all _.monad))
- (_.set_label @begin)
- iterationG))))
+ (in (all _.composite
+ (|> initializationG
+ (list#each product.left)
+ (monad.all _.monad))
+ (|> initializationG
+ list.reversed
+ (list#each product.right)
+ (monad.all _.monad))
+ (_.set_label @begin)
+ iterationG))))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/program.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/program.lux
index 2b761e907..dacdd2318 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/program.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/program.lux
@@ -47,67 +47,67 @@
(def: main::modifier
(Modifier Method)
- ($_ modifier#composite
- method.public
- method.static
- method.strict
- ))
+ (all modifier#composite
+ method.public
+ method.static
+ method.strict
+ ))
(def: program::modifier
(Modifier Class)
- ($_ modifier#composite
- class.public
- class.final
- ))
+ (all modifier#composite
+ class.public
+ class.final
+ ))
(def: list:end
//runtime.none_injection)
(def: amount_of_inputs
(Bytecode Any)
- ($_ _.composite
- _.aload_0
- _.arraylength))
+ (all _.composite
+ _.aload_0
+ _.arraylength))
(def: decrease
(Bytecode Any)
- ($_ _.composite
- _.iconst_1
- _.isub))
+ (all _.composite
+ _.iconst_1
+ _.isub))
(def: head
(Bytecode Any)
- ($_ _.composite
- _.dup
- _.aload_0
- _.swap
- _.aaload
- _.swap
- _.dup_x2
- _.pop))
+ (all _.composite
+ _.dup
+ _.aload_0
+ _.swap
+ _.aaload
+ _.swap
+ _.dup_x2
+ _.pop))
(def: pair
(Bytecode Any)
- (let [empty_pair ($_ _.composite
- _.iconst_2
- (_.anewarray ^Object)
- )
+ (let [empty_pair (all _.composite
+ _.iconst_2
+ (_.anewarray ^Object)
+ )
set_side! (is (-> (Bytecode Any) (Bytecode Any))
(function (_ index)
- ($_ _.composite
- ... ?P
- _.dup_x1 ... P?P
- _.swap ... PP?
- index ... PP?I
- _.swap ... PPI?
- _.aastore ... P
- )))]
- ($_ _.composite
- ... RL
- empty_pair ... RLP
- (set_side! _.iconst_0) ... RP
- (set_side! _.iconst_1) ... P
- )))
+ (all _.composite
+ ... ?P
+ _.dup_x1 ... P?P
+ _.swap ... PP?
+ index ... PP?I
+ _.swap ... PPI?
+ _.aastore ... P
+ )))]
+ (all _.composite
+ ... RL
+ empty_pair ... RLP
+ (set_side! _.iconst_0) ... RP
+ (set_side! _.iconst_1) ... P
+ )))
(def: list:item //runtime.right_injection)
@@ -116,30 +116,30 @@
(do _.monad
[@loop _.new_label
@end _.new_label]
- ($_ _.composite
- ..list:end
- ..amount_of_inputs
- (_.set_label @loop)
- ..decrease
- _.dup
- (_.iflt @end)
- ..head
- ..pair
- ..list:item
- _.swap
- (_.goto @loop)
- (_.set_label @end)
- _.pop)))
+ (all _.composite
+ ..list:end
+ ..amount_of_inputs
+ (_.set_label @loop)
+ ..decrease
+ _.dup
+ (_.iflt @end)
+ ..head
+ ..pair
+ ..list:item
+ _.swap
+ (_.goto @loop)
+ (_.set_label @end)
+ _.pop)))
(def: feed_inputs
//runtime.apply)
(def: run_io
(Bytecode Any)
- ($_ _.composite
- (_.checkcast //function/abstract.class)
- //runtime.unit
- //runtime.apply))
+ (all _.composite
+ (_.checkcast //function/abstract.class)
+ //runtime.unit
+ //runtime.apply))
(def: .public (program artifact_name context program)
(-> (-> unit.ID Text) (Program (Bytecode Any) Definition))
@@ -147,12 +147,12 @@
main (method.method ..main::modifier "main"
#0 ..main::type
(list)
- {.#Some ($_ _.composite
- program
- ..input_list
- ..feed_inputs
- ..run_io
- _.return)})
+ {.#Some (all _.composite
+ program
+ ..input_list
+ ..feed_inputs
+ ..run_io
+ _.return)})
class (artifact_name context)]
[class
(<| (format.result class.writer)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/reference.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/reference.lux
index cc36c0cd2..725952b30 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/reference.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/reference.lux
@@ -44,11 +44,11 @@
(do [! ////.monad]
[bytecode_name (# ! each //runtime.class_name
(generation.context archive))]
- (in ($_ _.composite
- ..this
- (_.getfield (type.class bytecode_name (list))
- (..foreign_name variable)
- //type.value)))))
+ (in (all _.composite
+ ..this
+ (_.getfield (type.class bytecode_name (list))
+ (..foreign_name variable)
+ //type.value)))))
(def: .public (variable archive variable)
(-> Archive Variable (Operation (Bytecode Any)))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/runtime.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/runtime.lux
index 136c1c359..cb82ec642 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/runtime.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/runtime.lux
@@ -109,11 +109,11 @@
(def: modifier
(Modifier Method)
- ($_ modifier#composite
- method.public
- method.static
- method.strict
- ))
+ (all modifier#composite
+ method.public
+ method.static
+ method.strict
+ ))
(def: this
(Bytecode Any)
@@ -121,19 +121,19 @@
(def: .public (get index)
(-> (Bytecode Any) (Bytecode Any))
- ($_ _.composite
- index
- _.aaload))
+ (all _.composite
+ index
+ _.aaload))
(def: (set! index value)
(-> (Bytecode Any) (Bytecode Any) (Bytecode Any))
- ($_ _.composite
- ... A
- _.dup ... AA
- index ... AAI
- value ... AAIV
- _.aastore ... A
- ))
+ (all _.composite
+ ... A
+ _.dup ... AA
+ index ... AAI
+ value ... AAIV
+ _.aastore ... A
+ ))
(def: .public unit (_.string synthesis.unit))
@@ -146,70 +146,70 @@
(def: variant_value _.iconst_2)
(def: variant::method
- (let [new_variant ($_ _.composite
- _.iconst_3
- (_.anewarray //type.value))
- $lefts ($_ _.composite
- _.iload_0
- (//value.wrap type.int))
+ (let [new_variant (all _.composite
+ _.iconst_3
+ (_.anewarray //type.value))
+ $lefts (all _.composite
+ _.iload_0
+ (//value.wrap type.int))
$right? _.aload_1
$value _.aload_2]
(method.method ..modifier ..variant::name
#0 ..variant::type
(list)
- {.#Some ($_ _.composite
- new_variant ... A[3]
- (..set! ..variant_lefts $lefts) ... A[3]
- (..set! ..variant_right? $right?) ... A[3]
- (..set! ..variant_value $value) ... A[3]
- _.areturn)})))
+ {.#Some (all _.composite
+ new_variant ... A[3]
+ (..set! ..variant_lefts $lefts) ... A[3]
+ (..set! ..variant_right? $right?) ... A[3]
+ (..set! ..variant_value $value) ... A[3]
+ _.areturn)})))
(def: .public left_right? _.aconst_null)
(def: .public right_right? ..unit)
(def: .public left_injection
(Bytecode Any)
- ($_ _.composite
- _.iconst_0
- ..left_right?
- _.dup2_x1
- _.pop2
- ..variant))
+ (all _.composite
+ _.iconst_0
+ ..left_right?
+ _.dup2_x1
+ _.pop2
+ ..variant))
(def: .public right_injection
(Bytecode Any)
- ($_ _.composite
- _.iconst_0
- ..right_right?
- _.dup2_x1
- _.pop2
- ..variant))
+ (all _.composite
+ _.iconst_0
+ ..right_right?
+ _.dup2_x1
+ _.pop2
+ ..variant))
(def: .public some_injection ..right_injection)
(def: .public none_injection
(Bytecode Any)
- ($_ _.composite
- _.iconst_0
- ..left_right?
- ..unit
- ..variant))
+ (all _.composite
+ _.iconst_0
+ ..left_right?
+ ..unit
+ ..variant))
(def: (risky $unsafe)
(-> (Bytecode Any) (Bytecode Any))
(do _.monad
[@try _.new_label
@handler _.new_label]
- ($_ _.composite
- (_.try @try @handler @handler //type.error)
- (_.set_label @try)
- $unsafe
- ..some_injection
- _.areturn
- (_.set_label @handler)
- ..none_injection
- _.areturn
- )))
+ (all _.composite
+ (_.try @try @handler @handler //type.error)
+ (_.set_label @try)
+ $unsafe
+ ..some_injection
+ _.areturn
+ (_.set_label @handler)
+ ..none_injection
+ _.areturn
+ )))
(def: decode_frac::name "decode_frac")
(def: decode_frac::type (type.method [(list) (list //type.text) //type.variant (list)]))
@@ -221,11 +221,11 @@
(list)
{.#Some
(..risky
- ($_ _.composite
- _.aload_0
- (_.invokestatic //type.frac "parseDouble" (type.method [(list) (list //type.text) type.double (list)]))
- (//value.wrap type.double)
- ))}))
+ (all _.composite
+ _.aload_0
+ (_.invokestatic //type.frac "parseDouble" (type.method [(list) (list //type.text) type.double (list)]))
+ (//value.wrap type.double)
+ ))}))
(def: .public log!
(Bytecode Any)
@@ -234,19 +234,19 @@
out (_.getstatic ^System "out" ^PrintStream)
print_type (type.method [(list) (list //type.value) type.void (list)])
print! (function (_ method) (_.invokevirtual ^PrintStream method print_type))]
- ($_ _.composite
- out (_.string "LUX LOG: ") (print! "print")
- out _.swap (print! "println"))))
+ (all _.composite
+ out (_.string "LUX LOG: ") (print! "print")
+ out _.swap (print! "println"))))
(def: exception_constructor (type.method [(list) (list //type.text) type.void (list)]))
(def: (illegal_state_exception message)
(-> Text (Bytecode Any))
(let [^IllegalStateException (type.class "java.lang.IllegalStateException" (list))]
- ($_ _.composite
- (_.new ^IllegalStateException)
- _.dup
- (_.string message)
- (_.invokespecial ^IllegalStateException "<init>" ..exception_constructor))))
+ (all _.composite
+ (_.new ^IllegalStateException)
+ _.dup
+ (_.string message)
+ (_.invokespecial ^IllegalStateException "<init>" ..exception_constructor))))
(def: failure::type
(type.method [(list) (list) type.void (list)]))
@@ -257,9 +257,9 @@
#0 ..failure::type
(list)
{.#Some
- ($_ _.composite
- (..illegal_state_exception message)
- _.athrow)}))
+ (all _.composite
+ (..illegal_state_exception message)
+ _.athrow)}))
(def: pm_failure::name "pm_failure")
(def: .public pm_failure (..procedure ..pm_failure::name ..failure::type))
@@ -279,16 +279,16 @@
#0 ..push::type
(list)
{.#Some
- (let [new_stack_frame! ($_ _.composite
- _.iconst_2
- (_.anewarray //type.value))
+ (let [new_stack_frame! (all _.composite
+ _.iconst_2
+ (_.anewarray //type.value))
$head _.aload_1
$tail _.aload_0]
- ($_ _.composite
- new_stack_frame!
- (..set! ..stack_head $head)
- (..set! ..stack_tail $tail)
- _.areturn))}))
+ (all _.composite
+ new_stack_frame!
+ (..set! ..stack_head $head)
+ (..set! ..stack_tail $tail)
+ _.areturn))}))
(def: case::name "case")
(def: case::type (type.method [(list) (list //type.variant //type.lefts //type.right?) //type.value (list)]))
@@ -309,67 +309,67 @@
$lefts _.iload_1
$right? _.aload_2
- ::lefts ($_ _.composite
- (..get ..variant_lefts)
- (//value.unwrap type.int))
+ ::lefts (all _.composite
+ (..get ..variant_lefts)
+ (//value.unwrap type.int))
::right? (..get ..variant_right?)
::value (..get ..variant_value)
not_found _.aconst_null
- super_nested_lefts ($_ _.composite
- _.swap
- _.isub
- (_.int (i32.i32 (.i64 +1)))
- _.isub)
- super_nested ($_ _.composite
- ... lefts, sumT
- super_nested_lefts ... super_lefts
- $variant ::right? ... super_lefts, super_right
- $variant ::value ... super_lefts, super_right, super_value
- ..variant)
-
- update_$variant ($_ _.composite
- $variant ::value
- (_.checkcast //type.variant)
- _.astore_0)
- update_$lefts ($_ _.composite
- _.isub
- (_.int (i32.i32 (.i64 +1)))
- _.isub)
+ super_nested_lefts (all _.composite
+ _.swap
+ _.isub
+ (_.int (i32.i32 (.i64 +1)))
+ _.isub)
+ super_nested (all _.composite
+ ... lefts, sumT
+ super_nested_lefts ... super_lefts
+ $variant ::right? ... super_lefts, super_right
+ $variant ::value ... super_lefts, super_right, super_value
+ ..variant)
+
+ update_$variant (all _.composite
+ $variant ::value
+ (_.checkcast //type.variant)
+ _.astore_0)
+ update_$lefts (all _.composite
+ _.isub
+ (_.int (i32.i32 (.i64 +1)))
+ _.isub)
again (is (-> Label (Bytecode Any))
(function (_ @)
- ($_ _.composite
- ... lefts, sumT
- update_$variant ... lefts, sumT
- update_$lefts ... sub_lefts
- (_.goto @))))]]
- ($_ _.composite
- $lefts
- (_.set_label @loop)
- $variant ::lefts
- _.dup2 (_.if_icmpeq @lefts_match!)
- _.dup2 (_.if_icmpgt @maybe_nested)
- $right? (_.ifnull @mismatch!) ... lefts, sumT
- super_nested ... super_variant
- _.areturn
- (_.set_label @lefts_match!) ... lefts, sumT
- $right? ... lefts, sumT, wants_right?
- $variant ::right? ... lefts, sumT, wants_right?, is_right?
- (_.if_acmpeq @perfect_match!) ... lefts, sumT
- (_.set_label @mismatch!) ... lefts, sumT
- ... _.pop2
- not_found
- _.areturn
- (_.set_label @maybe_nested) ... lefts, sumT
- $variant ::right? ... lefts, sumT, right?
- (_.ifnull @mismatch!) ... lefts, sumT
- (again @loop)
- (_.set_label @perfect_match!) ... lefts, sumT
- ... _.pop2
- $variant ::value
- _.areturn
- ))}))
+ (all _.composite
+ ... lefts, sumT
+ update_$variant ... lefts, sumT
+ update_$lefts ... sub_lefts
+ (_.goto @))))]]
+ (all _.composite
+ $lefts
+ (_.set_label @loop)
+ $variant ::lefts
+ _.dup2 (_.if_icmpeq @lefts_match!)
+ _.dup2 (_.if_icmpgt @maybe_nested)
+ $right? (_.ifnull @mismatch!) ... lefts, sumT
+ super_nested ... super_variant
+ _.areturn
+ (_.set_label @lefts_match!) ... lefts, sumT
+ $right? ... lefts, sumT, wants_right?
+ $variant ::right? ... lefts, sumT, wants_right?, is_right?
+ (_.if_acmpeq @perfect_match!) ... lefts, sumT
+ (_.set_label @mismatch!) ... lefts, sumT
+ ... _.pop2
+ not_found
+ _.areturn
+ (_.set_label @maybe_nested) ... lefts, sumT
+ $variant ::right? ... lefts, sumT, right?
+ (_.ifnull @mismatch!) ... lefts, sumT
+ (again @loop)
+ (_.set_label @perfect_match!) ... lefts, sumT
+ ... _.pop2
+ $variant ::value
+ _.areturn
+ ))}))
(def: projection_type (type.method [(list) (list //type.tuple //type.offset) //type.value (list)]))
@@ -382,29 +382,29 @@
(def: projection::method2
[(Resource Method) (Resource Method)]
(let [$tuple _.aload_0
- $tuple::size ($_ _.composite
- $tuple
- _.arraylength)
+ $tuple::size (all _.composite
+ $tuple
+ _.arraylength)
$lefts _.iload_1
- $last_right ($_ _.composite
- $tuple::size
- _.iconst_1
- _.isub)
-
- update_$lefts ($_ _.composite
- $lefts $last_right _.isub
- _.istore_1)
- update_$tuple ($_ _.composite
- $tuple $last_right _.aaload (_.checkcast //type.tuple)
- _.astore_0)
+ $last_right (all _.composite
+ $tuple::size
+ _.iconst_1
+ _.isub)
+
+ update_$lefts (all _.composite
+ $lefts $last_right _.isub
+ _.istore_1)
+ update_$tuple (all _.composite
+ $tuple $last_right _.aaload (_.checkcast //type.tuple)
+ _.astore_0)
recur (is (-> Label (Bytecode Any))
(function (_ @loop)
- ($_ _.composite
- update_$lefts
- update_$tuple
- (_.goto @loop))))
+ (all _.composite
+ update_$lefts
+ update_$tuple
+ (_.goto @loop))))
left_projection::method
(method.method ..modifier ..left_projection::name
@@ -414,17 +414,17 @@
(do _.monad
[@loop _.new_label
@recursive _.new_label
- .let [::left ($_ _.composite
- $lefts
- _.aaload)]]
- ($_ _.composite
- (_.set_label @loop)
- $lefts $last_right (_.if_icmpge @recursive)
- $tuple ::left
- _.areturn
- (_.set_label @recursive)
- ... Recursive
- (recur @loop)))})
+ .let [::left (all _.composite
+ $lefts
+ _.aaload)]]
+ (all _.composite
+ (_.set_label @loop)
+ $lefts $last_right (_.if_icmpge @recursive)
+ $tuple ::left
+ _.areturn
+ (_.set_label @recursive)
+ ... Recursive
+ (recur @loop)))})
right_projection::method
(method.method ..modifier ..right_projection::name
@@ -435,34 +435,34 @@
[@loop _.new_label
@not_tail _.new_label
@slice _.new_label
- .let [$right ($_ _.composite
- $lefts
- _.iconst_1
- _.iadd)
- $::nested ($_ _.composite
- $tuple
- _.swap
- _.aaload)
- super_nested ($_ _.composite
- $tuple
- $right
- $tuple::size
- (_.invokestatic (type.class "java.util.Arrays" (list)) "copyOfRange"
- (type.method [(list) (list //type.tuple //type.index //type.index) //type.tuple (list)])))]]
- ($_ _.composite
- (_.set_label @loop)
- $last_right $right
- _.dup2 (_.if_icmpne @not_tail)
- ... _.pop
- $::nested
- _.areturn
- (_.set_label @not_tail)
- (_.if_icmpgt @slice)
- ... Must recurse
- (recur @loop)
- (_.set_label @slice)
- super_nested
- _.areturn))})]
+ .let [$right (all _.composite
+ $lefts
+ _.iconst_1
+ _.iadd)
+ $::nested (all _.composite
+ $tuple
+ _.swap
+ _.aaload)
+ super_nested (all _.composite
+ $tuple
+ $right
+ $tuple::size
+ (_.invokestatic (type.class "java.util.Arrays" (list)) "copyOfRange"
+ (type.method [(list) (list //type.tuple //type.index //type.index) //type.tuple (list)])))]]
+ (all _.composite
+ (_.set_label @loop)
+ $last_right $right
+ _.dup2 (_.if_icmpne @not_tail)
+ ... _.pop
+ $::nested
+ _.areturn
+ (_.set_label @not_tail)
+ (_.if_icmpgt @slice)
+ ... Must recurse
+ (recur @loop)
+ (_.set_label @slice)
+ super_nested
+ _.areturn))})]
[left_projection::method
right_projection::method]))
@@ -493,44 +493,44 @@
.let [$unsafe ..this
^StringWriter (type.class "java.io.StringWriter" (list))
- string_writer ($_ _.composite
- (_.new ^StringWriter)
- _.dup
- (_.invokespecial ^StringWriter "<init>" (type.method [(list) (list) type.void (list)])))
+ string_writer (all _.composite
+ (_.new ^StringWriter)
+ _.dup
+ (_.invokespecial ^StringWriter "<init>" (type.method [(list) (list) type.void (list)])))
^PrintWriter (type.class "java.io.PrintWriter" (list))
- print_writer ($_ _.composite
- ... WTW
- (_.new ^PrintWriter) ... WTWP
- _.dup_x1 ... WTPWP
- _.swap ... WTPPW
- ..true ... WTPPWZ
- (_.invokespecial ^PrintWriter "<init>" (type.method [(list) (list (type.class "java.io.Writer" (list)) type.boolean) type.void (list)]))
- ... WTP
- )
- unsafe_application ($_ _.composite
- $unsafe
- ..unit
- ..apply)
- stack_trace ($_ _.composite
- ... T
- string_writer ... TW
- _.dup_x1 ... WTW
- print_writer ... WTP
- (_.invokevirtual //type.error "printStackTrace" (type.method [(list) (list ^PrintWriter) type.void (list)])) ... W
- (_.invokevirtual ^StringWriter "toString" (type.method [(list) (list) //type.text (list)])) ... S
- )]]
- ($_ _.composite
- (_.try @try @handler @handler //type.error)
- (_.set_label @try)
- unsafe_application
- ..right_injection
- _.areturn
- (_.set_label @handler) ... T
- stack_trace ... S
- ..left_injection
- _.areturn
- ))}))
+ print_writer (all _.composite
+ ... WTW
+ (_.new ^PrintWriter) ... WTWP
+ _.dup_x1 ... WTPWP
+ _.swap ... WTPPW
+ ..true ... WTPPWZ
+ (_.invokespecial ^PrintWriter "<init>" (type.method [(list) (list (type.class "java.io.Writer" (list)) type.boolean) type.void (list)]))
+ ... WTP
+ )
+ unsafe_application (all _.composite
+ $unsafe
+ ..unit
+ ..apply)
+ stack_trace (all _.composite
+ ... T
+ string_writer ... TW
+ _.dup_x1 ... WTW
+ print_writer ... WTP
+ (_.invokevirtual //type.error "printStackTrace" (type.method [(list) (list ^PrintWriter) type.void (list)])) ... W
+ (_.invokevirtual ^StringWriter "toString" (type.method [(list) (list) //type.text (list)])) ... S
+ )]]
+ (all _.composite
+ (_.try @try @handler @handler //type.error)
+ (_.set_label @try)
+ unsafe_application
+ ..right_injection
+ _.areturn
+ (_.set_label @handler) ... T
+ stack_trace ... S
+ ..left_injection
+ _.areturn
+ ))}))
(def: reflection
(All (_ category)
@@ -543,9 +543,9 @@
(Operation [artifact.ID (Maybe Text) Binary])
(let [class (..reflection ..class)
modifier (is (Modifier Class)
- ($_ modifier#composite
- class.public
- class.final))
+ (all modifier#composite
+ class.public
+ class.final))
bytecode (<| (format.result class.writer)
try.trusted
(class.class jvm/version.v6_0
@@ -585,13 +585,13 @@
(let [previous_inputs (|> arity
list.indices
(monad.each _.monad _.aload))]
- ($_ _.composite
- previous_inputs
- (_.invokevirtual //function.class ..apply::name (..apply::type (-- arity)))
- (_.checkcast //function.class)
- (_.aload arity)
- (_.invokevirtual //function.class ..apply::name (..apply::type //function/arity.minimum))
- _.areturn))})))
+ (all _.composite
+ previous_inputs
+ (_.invokevirtual //function.class ..apply::name (..apply::type (-- arity)))
+ (_.checkcast //function.class)
+ (_.aload arity)
+ (_.invokevirtual //function.class ..apply::name (..apply::type //function/arity.minimum))
+ _.areturn))})))
(partial_list (method.method (modifier#composite method.public method.abstract)
..apply::name
#0 (..apply::type //function/arity.minimum)
@@ -602,17 +602,17 @@
(list)
{.#Some
(let [$partials _.iload_1]
- ($_ _.composite
- ..this
- (_.invokespecial ^Object "<init>" (type.method [(list) (list) type.void (list)]))
- ..this
- $partials
- (_.putfield //function.class //function/count.field //function/count.type)
- _.return))})
+ (all _.composite
+ ..this
+ (_.invokespecial ^Object "<init>" (type.method [(list) (list) type.void (list)]))
+ ..this
+ $partials
+ (_.putfield //function.class //function/count.field //function/count.type)
+ _.return))})
modifier (is (Modifier Class)
- ($_ modifier#composite
- class.public
- class.abstract))
+ (all modifier#composite
+ class.public
+ class.abstract))
class (..reflection //function.class)
partial_count (is (Resource Field)
(field.field (modifier#composite field.public field.final)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/value.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/value.lux
index 0bef710e1..e40b7d122 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/value.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/value.lux
@@ -1,12 +1,12 @@
(.using
- [library
- [lux {"-" Type Primitive type}
- [target
- [jvm
- ["_" bytecode {"+" Bytecode}]
- ["[0]" type {"+" Type} ("[1]#[0]" equivalence)
- [category {"+" Primitive}]
- ["[0]" box]]]]]])
+ [library
+ [lux {"-" Type Primitive type}
+ [target
+ [jvm
+ ["_" bytecode {"+" Bytecode}]
+ ["[0]" type {"+" Type} ("[1]#[0]" equivalence)
+ [category {"+" Primitive}]
+ ["[0]" box]]]]]])
(def: .public field "value")
@@ -44,6 +44,6 @@
(def: .public (unwrap type)
(-> (Type Primitive) (Bytecode Any))
(let [wrapper (type.class (primitive_wrapper type) (list))]
- ($_ _.composite
- (_.checkcast wrapper)
- (_.invokevirtual wrapper (primitive_unwrap type) (type.method [(list) (list) type (list)])))))
+ (all _.composite
+ (_.checkcast wrapper)
+ (_.invokevirtual wrapper (primitive_unwrap type) (type.method [(list) (list) type (list)])))))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/case.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/case.lux
index 2c35a85bd..18776639d 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/case.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/case.lux
@@ -56,9 +56,9 @@
[this (expression archive this)
that (statement expression archive that)
$dummy (# ! each _.var (/////generation.symbol "_exec"))]
- (in ($_ _.then
- (_.set (list $dummy) this)
- that))))
+ (in (all _.then
+ (_.set (list $dummy) this)
+ that))))
(def: .public (let expression archive [valueS register bodyS])
(Generator [Synthesis Register Synthesis])
@@ -76,9 +76,9 @@
(do ///////phase.monad
[valueO (expression archive valueS)
bodyO (statement expression archive bodyS)]
- (in ($_ _.then
- (_.local/1 (..register register) valueO)
- bodyO))))
+ (in (all _.then
+ (_.local/1 (..register register) valueO)
+ bodyO))))
(def: .public (get expression archive [pathP valueS])
(Generator [(List Member) Synthesis])
@@ -154,15 +154,15 @@
(template [<name> <flag>]
[(def: (<name> simple? idx)
(-> Bit Nat Statement)
- ($_ _.then
- (_.set (list @temp) (//runtime.sum//get ..peek <flag>
- (|> idx .int _.int)))
- (.if simple?
- (_.when (_.= _.nil @temp)
- fail!)
- (_.if (_.= _.nil @temp)
- fail!
- (..push! @temp)))))]
+ (all _.then
+ (_.set (list @temp) (//runtime.sum//get ..peek <flag>
+ (|> idx .int _.int)))
+ (.if simple?
+ (_.when (_.= _.nil @temp)
+ fail!)
+ (_.if (_.= _.nil @temp)
+ fail!
+ (..push! @temp)))))]
[left_choice _.nil]
[right_choice //runtime.unit]
@@ -170,14 +170,14 @@
(def: (alternation pre! post!)
(-> Statement Statement Statement)
- ($_ _.then
- (_.while (_.boolean true)
- ($_ _.then
- ..save!
- pre!))
- ($_ _.then
- ..restore!
- post!)))
+ (all _.then
+ (_.while (_.boolean true)
+ (all _.then
+ ..save!
+ pre!))
+ (all _.then
+ ..restore!
+ post!)))
(def: (pattern_matching' statement expression archive)
(-> Phase! Phase Archive Path (Operation Statement))
@@ -248,9 +248,9 @@
(pattern (/////synthesis.!bind_top register thenP))
(do ///////phase.monad
[then! (again thenP)]
- (///////phase#in ($_ _.then
- (_.local/1 (..register register) ..peek_and_pop)
- then!)))
+ (///////phase#in (all _.then
+ (_.local/1 (..register register) ..peek_and_pop)
+ then!)))
(^.template [<tag> <combinator>]
[(pattern (<tag> preP postP))
@@ -265,10 +265,10 @@
(-> Phase! Phase Archive Path (Operation Statement))
(do ///////phase.monad
[pattern_matching! (pattern_matching' statement expression archive pathP)]
- (in ($_ _.then
- (_.while (_.boolean true)
- pattern_matching!)
- (_.statement (|> (_.var "error") (_.apply (list (_.string ////synthesis/case.pattern_matching_error)))))))))
+ (in (all _.then
+ (_.while (_.boolean true)
+ pattern_matching!)
+ (_.statement (|> (_.var "error") (_.apply (list (_.string ////synthesis/case.pattern_matching_error)))))))))
(def: .public dependencies
(-> Path (List Var))
@@ -288,11 +288,11 @@
(do ///////phase.monad
[stack_init (expression archive valueS)
pattern_matching! (pattern_matching statement expression archive pathP)]
- (in ($_ _.then
- (_.local (list @temp))
- (_.local/1 @cursor (_.array (list stack_init)))
- (_.local/1 @savepoint (_.array (list)))
- pattern_matching!))))
+ (in (all _.then
+ (_.local (list @temp))
+ (_.local/1 @cursor (_.array (list stack_init)))
+ (_.local/1 @savepoint (_.array (list)))
+ pattern_matching!))))
(def: .public (case statement expression archive [valueS pathP])
(-> Phase! (Generator [Synthesis Path]))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/function.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/function.lux
index c4fa6bb64..de0387fd7 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/function.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/function.lux
@@ -55,9 +55,9 @@
(let [@inits (|> (list.enumeration inits)
(list#each (|>> product.left ..capture)))]
[(_.function @self @inits
- ($_ _.then
- (_.local_function @self @args body!)
- (_.return @self)))
+ (all _.then
+ (_.local_function @self @args body!)
+ (_.return @self)))
(_.apply inits @self)])))
(def: input
@@ -85,9 +85,9 @@
@self (_.var (///reference.artifact function_name))
initialize_self! (_.local/1 (//case.register 0) @self)
initialize! (list#mix (.function (_ post pre!)
- ($_ _.then
- pre!
- (_.local/1 (..input post) (_.item (|> post ++ .int _.int) @curried))))
+ (all _.then
+ pre!
+ (_.local/1 (..input post) (_.item (|> post ++ .int _.int) @curried))))
initialize_self!
(list.indices arity))
pack (|>> (list) _.array)
@@ -96,48 +96,48 @@
(_.apply (list it) (_.var "table.unpack"))))
@var_args (_.var "...")]
.let [[definition instantiation] (with_closure closureO+ @self (list @var_args)
- ($_ _.then
- (_.local/1 @curried (pack @var_args))
- (_.local/1 @num_args (_.length @curried))
- (<| (_.if (|> @num_args (_.= arityO))
- ($_ _.then
- initialize!
- (_.set_label @scope)
- body!))
- (_.if (|> @num_args (_.> arityO))
- (let [arity_inputs (_.apply (list @curried
- (_.int +1)
- arityO
- (_.int +1)
- (_.array (list)))
- (_.var "table.move"))
- extra_inputs (_.apply (list @curried
- (_.+ (_.int +1) arityO)
- @num_args
- (_.int +1)
- (_.array (list)))
- (_.var "table.move"))]
- (_.return (|> @self
- (_.apply (list (unpack arity_inputs)))
- (_.apply (list (unpack extra_inputs)))))))
- ... (|> @num_args (_.< arityO))
- (_.return (_.closure (list @var_args)
- (let [@extra_args (_.var "extra_args")]
- ($_ _.then
- (_.local/1 @extra_args (pack @var_args))
- (_.return (_.apply (list (unpack (_.apply (list @extra_args
- (_.int +1)
- (_.length @extra_args)
- (_.+ (_.int +1) @num_args)
- (_.apply (list @curried
- (_.int +1)
- @num_args
- (_.int +1)
- (_.array (list)))
- (_.var "table.move")))
- (_.var "table.move"))))
- @self)))))))
- ))]
+ (all _.then
+ (_.local/1 @curried (pack @var_args))
+ (_.local/1 @num_args (_.length @curried))
+ (<| (_.if (|> @num_args (_.= arityO))
+ (all _.then
+ initialize!
+ (_.set_label @scope)
+ body!))
+ (_.if (|> @num_args (_.> arityO))
+ (let [arity_inputs (_.apply (list @curried
+ (_.int +1)
+ arityO
+ (_.int +1)
+ (_.array (list)))
+ (_.var "table.move"))
+ extra_inputs (_.apply (list @curried
+ (_.+ (_.int +1) arityO)
+ @num_args
+ (_.int +1)
+ (_.array (list)))
+ (_.var "table.move"))]
+ (_.return (|> @self
+ (_.apply (list (unpack arity_inputs)))
+ (_.apply (list (unpack extra_inputs)))))))
+ ... (|> @num_args (_.< arityO))
+ (_.return (_.closure (list @var_args)
+ (let [@extra_args (_.var "extra_args")]
+ (all _.then
+ (_.local/1 @extra_args (pack @var_args))
+ (_.return (_.apply (list (unpack (_.apply (list @extra_args
+ (_.int +1)
+ (_.length @extra_args)
+ (_.+ (_.int +1) @num_args)
+ (_.apply (list @curried
+ (_.int +1)
+ @num_args
+ (_.int +1)
+ (_.array (list)))
+ (_.var "table.move")))
+ (_.var "table.move"))))
+ @self)))))))
+ ))]
_ (/////generation.execute! definition)
_ (/////generation.save! (product.right function_name) {.#None} definition)]
(in instantiation)))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/loop.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/loop.lux
index 57e35ab75..9883feaaf 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/loop.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/loop.lux
@@ -44,11 +44,11 @@
(list#each (|>> product.left (n.+ offset) //case.register)))]
(if as_expression?
body
- ($_ _.then
- (if initial?
- (_.let variables (_.multi bindings))
- (_.set variables (_.multi bindings)))
- body))))
+ (all _.then
+ (if initial?
+ (_.let variables (_.multi bindings))
+ (_.set variables (_.multi bindings)))
+ body))))
(def: .public (scope! statement expression archive as_expression? [start initsS+ bodyS])
... (Generator! (Scope Synthesis))
@@ -70,9 +70,9 @@
(statement expression archive bodyS))]
(in [initsO+
(..setup true start initsO+ as_expression?
- ($_ _.then
- (_.set_label @scope)
- body!))]))))
+ (all _.then
+ (_.set_label @scope)
+ body!))]))))
(def: .public (scope statement expression archive [start initsS+ bodyS])
(-> Phase! (Generator (Scope Synthesis)))
@@ -105,11 +105,11 @@
foreigns
(let [@context (_.var (format (_.code @loop) "_context"))]
[(_.function @context foreigns
- ($_ _.then
- (<| (_.local_function @loop locals)
- scope!)
- (_.return @loop)
- ))
+ (all _.then
+ (<| (_.local_function @loop locals)
+ scope!)
+ (_.return @loop)
+ ))
(_.apply foreigns @context)])))]
_ (/////generation.execute! directive)
_ (/////generation.save! artifact_id {.#None} directive)]
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/runtime.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/runtime.lux
index be52af3e7..9864bd037 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/runtime.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/runtime.lux
@@ -166,49 +166,49 @@
(def: last_index
(|>> _.length (_.- (_.int +1))))
-(with_expansions [<recur> (these ($_ _.then
- (_.set (list lefts) (_.- last_index_right lefts))
- (_.set (list tuple) (..item last_index_right tuple))))]
+(with_expansions [<recur> (these (all _.then
+ (_.set (list lefts) (_.- last_index_right lefts))
+ (_.set (list tuple) (..item last_index_right tuple))))]
(runtime: (tuple//left lefts tuple)
(with_vars [last_index_right]
(<| (_.while (_.boolean true))
- ($_ _.then
- (_.local/1 last_index_right (..last_index tuple))
- (_.if (_.> lefts last_index_right)
- ... No need for recursion
- (_.return (..item lefts tuple))
- ... Needs recursion
- <recur>)))))
+ (all _.then
+ (_.local/1 last_index_right (..last_index tuple))
+ (_.if (_.> lefts last_index_right)
+ ... No need for recursion
+ (_.return (..item lefts tuple))
+ ... Needs recursion
+ <recur>)))))
(runtime: (tuple//right lefts tuple)
(with_vars [last_index_right right_index]
(<| (_.while (_.boolean true))
- ($_ _.then
- (_.local/1 last_index_right (..last_index tuple))
- (_.local/1 right_index (_.+ (_.int +1) lefts))
- (<| (_.if (_.= last_index_right right_index)
- (_.return (..item right_index tuple)))
- (_.if (_.> last_index_right right_index)
- ... Needs recursion.
- <recur>)
- (_.return (_.apply (list tuple
- (_.+ (_.int +1) right_index)
- (_.length tuple)
- (_.int +1)
- (_.array (list)))
- (_.var "table.move"))))
- )))))
+ (all _.then
+ (_.local/1 last_index_right (..last_index tuple))
+ (_.local/1 right_index (_.+ (_.int +1) lefts))
+ (<| (_.if (_.= last_index_right right_index)
+ (_.return (..item right_index tuple)))
+ (_.if (_.> last_index_right right_index)
+ ... Needs recursion.
+ <recur>)
+ (_.return (_.apply (list tuple
+ (_.+ (_.int +1) right_index)
+ (_.length tuple)
+ (_.int +1)
+ (_.array (list)))
+ (_.var "table.move"))))
+ )))))
(runtime: (sum//get sum expected##right? expected##lefts)
(let [mismatch! (_.return _.nil)
actual##lefts (_.the ..variant_tag_field sum)
actual##right? (_.the ..variant_flag_field sum)
actual##value (_.the ..variant_value_field sum)
- recur! ($_ _.then
- (_.set (list expected##lefts) (|> expected##lefts
- (_.- actual##lefts)
- (_.- (_.int +1))))
- (_.set (list sum) actual##value))]
+ recur! (all _.then
+ (_.set (list expected##lefts) (|> expected##lefts
+ (_.- actual##lefts)
+ (_.- (_.int +1))))
+ (_.set (list sum) actual##value))]
(<| (_.while (_.boolean true))
(_.if (_.= expected##lefts actual##lefts)
(_.if (_.= expected##right? actual##right?)
@@ -228,37 +228,37 @@
(def: runtime//adt
Statement
- ($_ _.then
- @tuple//left
- @tuple//right
- @sum//get
- ))
+ (all _.then
+ @tuple//left
+ @tuple//right
+ @sum//get
+ ))
(runtime: (lux//try risky)
(with_vars [success value]
- ($_ _.then
- (_.let (list success value) (|> risky (_.apply (list ..unit))
- _.return (_.closure (list))
- list _.apply (|> (_.var "pcall"))))
- (_.if success
- (_.return (..right value))
- (_.return (..left value))))))
+ (all _.then
+ (_.let (list success value) (|> risky (_.apply (list ..unit))
+ _.return (_.closure (list))
+ list _.apply (|> (_.var "pcall"))))
+ (_.if success
+ (_.return (..right value))
+ (_.return (..left value))))))
(runtime: (lux//program_args raw)
(with_vars [tail head idx]
- ($_ _.then
- (_.let (list tail) ..none)
- (<| (_.for_step idx (_.length raw) (_.int +1) (_.int -1))
- (_.set (list tail) (..some (_.array (list (_.item idx raw)
- tail)))))
- (_.return tail))))
+ (all _.then
+ (_.let (list tail) ..none)
+ (<| (_.for_step idx (_.length raw) (_.int +1) (_.int -1))
+ (_.set (list tail) (..some (_.array (list (_.item idx raw)
+ tail)))))
+ (_.return tail))))
(def: runtime//lux
Statement
- ($_ _.then
- @lux//try
- @lux//program_args
- ))
+ (all _.then
+ @lux//try
+ @lux//program_args
+ ))
(def: cap_shift
(_.% (_.int +64)))
@@ -270,25 +270,25 @@
(let [mask (|> (_.int +1)
(_.bit_shl (_.- param (_.int +64)))
(_.- (_.int +1)))]
- ($_ _.then
- (_.set (list param) (..cap_shift param))
- (_.return (|> subject
- (_.bit_shr param)
- (_.bit_and mask))))))
+ (all _.then
+ (_.set (list param) (..cap_shift param))
+ (_.return (|> subject
+ (_.bit_shr param)
+ (_.bit_and mask))))))
(runtime: (i64//division param subject)
(with_vars [floored]
- ($_ _.then
- (_.local/1 floored (_.// param subject))
- (let [potentially_floored? (_.< (_.int +0) floored)
- inexact? (|> subject
- (_.% param)
- (_.= (_.int +0))
- _.not)]
- (_.if (_.and potentially_floored?
- inexact?)
- (_.return (_.+ (_.int +1) floored))
- (_.return floored))))))
+ (all _.then
+ (_.local/1 floored (_.// param subject))
+ (let [potentially_floored? (_.< (_.int +0) floored)
+ inexact? (|> subject
+ (_.% param)
+ (_.= (_.int +0))
+ _.not)]
+ (_.if (_.and potentially_floored?
+ inexact?)
+ (_.return (_.+ (_.int +1) floored))
+ (_.return floored))))))
(runtime: (i64//remainder param subject)
(_.return (_.- (|> subject (..i64//division param) (_.* param))
@@ -296,12 +296,12 @@
(def: runtime//i64
Statement
- ($_ _.then
- @i64//left_shifted
- @i64//right_shifted
- @i64//division
- @i64//remainder
- ))
+ (all _.then
+ @i64//left_shifted
+ @i64//right_shifted
+ @i64//division
+ @i64//remainder
+ ))
(def: (find_byte_index subject param start)
(-> Expression Expression Expression Expression)
@@ -327,22 +327,22 @@
(_.var "_VERSION")))
(runtime: (text//index subject param start)
- (with_expansions [<rembulan> ($_ _.then
- (_.local/1 byte_index (|> start
- (_.+ (_.int +1))
- (..find_byte_index subject param)))
- (_.if (_.= _.nil byte_index)
- (_.return ..none)
- (_.return (..some (..lux_index byte_index)))))
- <normal> ($_ _.then
- (_.local/1 byte_index (|> start
- (..byte_index subject)
- (..find_byte_index subject param)))
- (_.if (_.= _.nil byte_index)
- (_.return ..none)
- (_.return (..some (|> byte_index
- (..char_index subject)
- ..lux_index)))))]
+ (with_expansions [<rembulan> (all _.then
+ (_.local/1 byte_index (|> start
+ (_.+ (_.int +1))
+ (..find_byte_index subject param)))
+ (_.if (_.= _.nil byte_index)
+ (_.return ..none)
+ (_.return (..some (..lux_index byte_index)))))
+ <normal> (all _.then
+ (_.local/1 byte_index (|> start
+ (..byte_index subject)
+ (..find_byte_index subject param)))
+ (_.if (_.= _.nil byte_index)
+ (_.return ..none)
+ (_.return (..some (|> byte_index
+ (..char_index subject)
+ ..lux_index)))))]
(with_vars [byte_index]
(for @.lua <normal>
(_.if ..on_rembulan?
@@ -374,18 +374,18 @@
(runtime: (text//char idx text)
(with_expansions [<rembulan> (with_vars [char]
- ($_ _.then
- (_.local/1 char (_.apply (list text idx)
- (_.var "string.byte")))
- (_.if (_.= _.nil char)
- (_.statement (_.error/1 (_.string "[Lux Error] Cannot get char from text.")))
- (_.return char))))
+ (all _.then
+ (_.local/1 char (_.apply (list text idx)
+ (_.var "string.byte")))
+ (_.if (_.= _.nil char)
+ (_.statement (_.error/1 (_.string "[Lux Error] Cannot get char from text.")))
+ (_.return char))))
<normal> (with_vars [offset char]
- ($_ _.then
- (_.local/1 offset (_.apply (list text idx) (_.var "utf8.offset")))
- (_.if (_.= _.nil offset)
- (_.statement (_.error/1 (_.string "[Lux Error] Cannot get char from text.")))
- (_.return (_.apply (list text offset) (_.var "utf8.codepoint"))))))]
+ (all _.then
+ (_.local/1 offset (_.apply (list text idx) (_.var "utf8.offset")))
+ (_.if (_.= _.nil offset)
+ (_.statement (_.error/1 (_.string "[Lux Error] Cannot get char from text.")))
+ (_.return (_.apply (list text offset) (_.var "utf8.codepoint"))))))]
(for @.lua <normal>
(_.if ..on_rembulan?
<rembulan>
@@ -393,33 +393,33 @@
(def: runtime//text
Statement
- ($_ _.then
- @text//index
- @text//clip
- @text//size
- @text//char
- ))
+ (all _.then
+ @text//index
+ @text//clip
+ @text//size
+ @text//char
+ ))
(runtime: (array//write idx value array)
- ($_ _.then
- (_.set (list (..item idx array)) value)
- (_.return array)))
+ (all _.then
+ (_.set (list (..item idx array)) value)
+ (_.return array)))
(def: runtime//array
Statement
- ($_ _.then
- @array//write
- ))
+ (all _.then
+ @array//write
+ ))
(def: runtime
Statement
- ($_ _.then
- ..runtime//adt
- ..runtime//lux
- ..runtime//i64
- ..runtime//text
- ..runtime//array
- ))
+ (all _.then
+ ..runtime//adt
+ ..runtime//lux
+ ..runtime//i64
+ ..runtime//text
+ ..runtime//array
+ ))
(def: .public generate
(Operation [Registry Output])
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/case.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/case.lux
index 761b34fab..1d2c9aea8 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/case.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/case.lux
@@ -59,9 +59,9 @@
(do ///////phase.monad
[valueO (expression archive valueS)
body! (statement expression archive bodyS)]
- (in ($_ _.then
- (_.set! (..register register) valueO)
- body!))))
+ (in (all _.then
+ (_.set! (..register register) valueO)
+ body!))))
(def: .public (if expression archive [testS thenS elseS])
(Generator [Synthesis Synthesis Synthesis])
@@ -137,14 +137,14 @@
(template [<name> <flag> <prep>]
[(def: (<name> simple? idx)
(-> Bit Nat Statement)
- ($_ _.then
- (_.set! @temp (|> idx <prep> .int _.int (//runtime.sum//get ..peek <flag>)))
- (.if simple?
- (_.when (_.is_null/1 @temp)
- fail!)
- (_.if (_.is_null/1 @temp)
- fail!
- (..push! @temp)))))]
+ (all _.then
+ (_.set! @temp (|> idx <prep> .int _.int (//runtime.sum//get ..peek <flag>)))
+ (.if simple?
+ (_.when (_.is_null/1 @temp)
+ fail!)
+ (_.if (_.is_null/1 @temp)
+ fail!
+ (..push! @temp)))))]
[left_choice _.null (<|)]
[right_choice (_.string "") ++]
@@ -152,14 +152,14 @@
(def: (alternation pre! post!)
(-> Statement Statement Statement)
- ($_ _.then
- (_.do_while (_.bool false)
- ($_ _.then
- ..save!
- pre!))
- ($_ _.then
- ..restore!
- post!)))
+ (all _.then
+ (_.do_while (_.bool false)
+ (all _.then
+ ..save!
+ pre!))
+ (all _.then
+ ..restore!
+ post!)))
(def: (pattern_matching' statement expression archive)
(Generator! Path)
@@ -229,15 +229,15 @@
(pattern (/////synthesis.!bind_top register thenP))
(do ///////phase.monad
[then! (again thenP)]
- (///////phase#in ($_ _.then
- (_.set! (..register register) ..peek_and_pop)
- then!)))
+ (///////phase#in (all _.then
+ (_.set! (..register register) ..peek_and_pop)
+ then!)))
... (pattern (/////synthesis.!multi_pop nextP))
... (.let [[extra_pops nextP'] (////synthesis/case.count_pops nextP)]
... (do ///////phase.monad
... [next! (again nextP')]
- ... (///////phase#in ($_ _.then
+ ... (///////phase#in (all _.then
... (..multi_pop! (n.+ 2 extra_pops))
... next!))))
@@ -254,10 +254,10 @@
(Generator! Path)
(do ///////phase.monad
[iteration! (pattern_matching' statement expression archive pathP)]
- (in ($_ _.then
- (_.do_while (_.bool false)
- iteration!)
- (_.throw (_.new (_.constant "Exception") (list (_.string ////synthesis/case.pattern_matching_error))))))))
+ (in (all _.then
+ (_.do_while (_.bool false)
+ iteration!)
+ (_.throw (_.new (_.constant "Exception") (list (_.string ////synthesis/case.pattern_matching_error))))))))
(def: .public dependencies
(-> Path (List Var))
@@ -277,10 +277,10 @@
(do ///////phase.monad
[stack_init (expression archive valueS)
pattern_matching! (pattern_matching statement expression archive pathP)]
- (in ($_ _.then
- (_.set! @cursor (_.array/* (list stack_init)))
- (_.set! @savepoint (_.array/* (list)))
- pattern_matching!))))
+ (in (all _.then
+ (_.set! @cursor (_.array/* (list stack_init)))
+ (_.set! @savepoint (_.array/* (list)))
+ pattern_matching!))))
(def: .public (case statement expression archive [valueS pathP])
(-> Phase! (Generator [Synthesis Path]))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/function.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/function.lux
index 5e6c9ea30..dfbc53fd3 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/function.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/function.lux
@@ -51,20 +51,20 @@
(-> (List Expression) Global Var Statement [Statement Expression])
(case inits
{.#End}
- [($_ _.then
- (_.set! @selfL (_.closure (list (_.reference @selfL)) (list) body!))
- (_.set! @selfG @selfL))
+ [(all _.then
+ (_.set! @selfL (_.closure (list (_.reference @selfL)) (list) body!))
+ (_.set! @selfG @selfL))
@selfG]
_
(let [@inits (|> (list.enumeration inits)
(list#each (|>> product.left ..capture)))]
[(_.set! @selfG (_.closure (list) (list#each _.parameter @inits)
- ($_ _.then
- (_.set! @selfL (_.closure (partial_list (_.reference @selfL) (list#each _.reference @inits))
- (list)
- body!))
- (_.return @selfL))))
+ (all _.then
+ (_.set! @selfL (_.closure (partial_list (_.reference @selfL) (list#each _.reference @inits))
+ (list)
+ body!))
+ (_.return @selfL))))
(_.apply/* inits @selfG)])))
(def: .public (function statement expression archive [environment arity bodyS])
@@ -85,32 +85,32 @@
@selfL (_.var (///reference.artifact function_name))
initialize_self! (_.set! (//case.register 0) @selfL)
initialize! (list#mix (.function (_ post pre!)
- ($_ _.then
- pre!
- (_.set! (..input post) (_.item (|> post .int _.int) @curried))))
+ (all _.then
+ pre!
+ (_.set! (..input post) (_.item (|> post .int _.int) @curried))))
initialize_self!
(list.indices arity))]
.let [[definition instantiation] (..with_closure closureG+ @selfG @selfL
- ($_ _.then
- (_.set! @num_args (_.func_num_args/0 []))
- (_.set! @curried (_.func_get_args/0 []))
- (_.cond (list [(|> @num_args (_.=== arityG))
- ($_ _.then
- initialize!
- (_.set_label @scope)
- body!)]
- [(|> @num_args (_.> arityG))
- (let [arity_inputs (_.array_slice/3 [@curried (_.int +0) arityG])
- extra_inputs (_.array_slice/2 [@curried arityG])
- next (_.call_user_func_array/2 [@selfL arity_inputs])]
- (_.return (_.call_user_func_array/2 [next extra_inputs])))])
- ... (|> @num_args (_.< arityG))
- (let [@missing (_.var "missing")]
- (_.return (<| (_.closure (list (_.reference @selfL) (_.reference @curried)) (list))
- ($_ _.then
- (_.set! @missing (_.func_get_args/0 []))
- (_.return (_.call_user_func_array/2 [@selfL (_.array_merge/+ @curried (list @missing))])))))))
- ))]
+ (all _.then
+ (_.set! @num_args (_.func_num_args/0 []))
+ (_.set! @curried (_.func_get_args/0 []))
+ (_.cond (list [(|> @num_args (_.=== arityG))
+ (all _.then
+ initialize!
+ (_.set_label @scope)
+ body!)]
+ [(|> @num_args (_.> arityG))
+ (let [arity_inputs (_.array_slice/3 [@curried (_.int +0) arityG])
+ extra_inputs (_.array_slice/2 [@curried arityG])
+ next (_.call_user_func_array/2 [@selfL arity_inputs])]
+ (_.return (_.call_user_func_array/2 [next extra_inputs])))])
+ ... (|> @num_args (_.< arityG))
+ (let [@missing (_.var "missing")]
+ (_.return (<| (_.closure (list (_.reference @selfL) (_.reference @curried)) (list))
+ (all _.then
+ (_.set! @missing (_.func_get_args/0 []))
+ (_.return (_.call_user_func_array/2 [@selfL (_.array_merge/+ @curried (list @missing))])))))))
+ ))]
_ (/////generation.execute! definition)
_ (/////generation.save! (product.right function_name) definition)]
(in instantiation)))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/loop.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/loop.lux
index 1f2d6253c..fb76fdea7 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/loop.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/loop.lux
@@ -63,9 +63,9 @@
body! (/////generation.with_anchor [start @scope]
(statement expression archive bodyS))]
(in (..setup start initsO+
- ($_ _.then
- (_.set_label @scope)
- body!))))))
+ (all _.then
+ (_.set_label @scope)
+ body!))))))
(def: .public (scope statement expression archive [start initsS+ bodyS])
(-> Phase! (Generator (Scope Synthesis)))
@@ -114,11 +114,11 @@
(do [! ///////phase.monad]
[[offset @scope] /////generation.anchor
argsO+ (monad.each ! (expression archive) argsS+)]
- (in ($_ _.then
- (_.set! @temp (_.array/* argsO+))
- (..setup offset
- (|> argsO+
- list.enumeration
- (list#each (function (_ [idx _])
- (_.item (_.int (.int idx)) @temp))))
- (_.go_to @scope))))))
+ (in (all _.then
+ (_.set! @temp (_.array/* argsO+))
+ (..setup offset
+ (|> argsO+
+ list.enumeration
+ (list#each (function (_ [idx _])
+ (_.item (_.int (.int idx)) @temp))))
+ (_.go_to @scope))))))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/runtime.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/runtime.lux
index 5baba49fc..dfa7afe2f 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/runtime.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/runtime.lux
@@ -128,22 +128,22 @@
(~ code))))))))))))))))
(runtime: (io//log! message)
- ($_ _.then
- (_.echo message)
- (_.echo (_.string text.new_line))
- (_.return ..unit)))
+ (all _.then
+ (_.echo message)
+ (_.echo (_.string text.new_line))
+ (_.return ..unit)))
(runtime: (io//throw! message)
- ($_ _.then
- (_.throw (_.new (_.constant "Exception") (list message)))
- (_.return ..unit)))
+ (all _.then
+ (_.throw (_.new (_.constant "Exception") (list message)))
+ (_.return ..unit)))
(def: runtime//io
Statement
- ($_ _.then
- @io//log!
- @io//throw!
- ))
+ (all _.then
+ @io//log!
+ @io//throw!
+ ))
(def: .public tuple_size_field
"_lux_size")
@@ -161,16 +161,16 @@
(_.return (_.count/1 array))))
(runtime: (array//write idx value array)
- ($_ _.then
- (_.set! (_.item idx array) value)
- (_.return array)))
+ (all _.then
+ (_.set! (_.item idx array) value)
+ (_.return array)))
(def: runtime//array
Statement
- ($_ _.then
- @array//length
- @array//write
- ))
+ (all _.then
+ @array//length
+ @array//write
+ ))
(def: jphp_last_index
(|>> ..tuple_size (_.- (_.int +1))))
@@ -178,14 +178,14 @@
(def: normal_last_index
(|>> _.count/1 (_.- (_.int +1))))
-(with_expansions [<recur> (these ($_ _.then
- (_.set! lefts (_.- last_index_right lefts))
- (_.set! tuple (_.item last_index_right tuple))))]
+(with_expansions [<recur> (these (all _.then
+ (_.set! lefts (_.- last_index_right lefts))
+ (_.set! tuple (_.item last_index_right tuple))))]
(runtime: (tuple//make size values)
(_.if ..jphp?
- ($_ _.then
- (_.set! (..tuple_size values) size)
- (_.return values))
+ (all _.then
+ (_.set! (..tuple_size values) size)
+ (_.return values))
... https://www.php.net/manual/en/language.operators.assignment.php
... https://www.php.net/manual/en/language.references.php
... https://www.php.net/manual/en/functions.arguments.php
@@ -196,50 +196,50 @@
(runtime: (tuple//left lefts tuple)
(with_vars [last_index_right]
(<| (_.while (_.bool true))
- ($_ _.then
- (_.if ..jphp?
- (_.set! last_index_right (..jphp_last_index tuple))
- (_.set! last_index_right (..normal_last_index tuple)))
- (_.if (_.> lefts last_index_right)
- ... No need for recursion
- (_.return (_.item lefts tuple))
- ... Needs recursion
- <recur>)))))
+ (all _.then
+ (_.if ..jphp?
+ (_.set! last_index_right (..jphp_last_index tuple))
+ (_.set! last_index_right (..normal_last_index tuple)))
+ (_.if (_.> lefts last_index_right)
+ ... No need for recursion
+ (_.return (_.item lefts tuple))
+ ... Needs recursion
+ <recur>)))))
... TODO: Get rid of this as soon as JPHP is no longer necessary.
(runtime: (tuple//slice offset input)
(with_vars [size index output]
- ($_ _.then
- (_.set! size (..array//length input))
- (_.set! index (_.int +0))
- (_.set! output (_.array/* (list)))
- (<| (_.while (|> index (_.+ offset) (_.< size)))
- ($_ _.then
- (_.set! (_.item index output) (_.item (_.+ offset index) input))
- (_.set! index (_.+ (_.int +1) index))
- ))
- (_.return (..tuple//make (_.- offset size) output))
- )))
+ (all _.then
+ (_.set! size (..array//length input))
+ (_.set! index (_.int +0))
+ (_.set! output (_.array/* (list)))
+ (<| (_.while (|> index (_.+ offset) (_.< size)))
+ (all _.then
+ (_.set! (_.item index output) (_.item (_.+ offset index) input))
+ (_.set! index (_.+ (_.int +1) index))
+ ))
+ (_.return (..tuple//make (_.- offset size) output))
+ )))
(runtime: (tuple//right lefts tuple)
(with_vars [last_index_right right_index]
(<| (_.while (_.bool true))
- ($_ _.then
- (_.if ..jphp?
- (_.set! last_index_right (..jphp_last_index tuple))
- (_.set! last_index_right (..normal_last_index tuple)))
- (_.set! right_index (_.+ (_.int +1) lefts))
- (_.cond (list [(_.=== last_index_right right_index)
- (_.return (_.item right_index tuple))]
- [(_.> last_index_right right_index)
- ... Needs recursion.
- <recur>])
- (_.if ..jphp?
- (_.return (..tuple//make (_.- right_index (..tuple_size tuple))
- (..tuple//slice right_index tuple)))
- (_.return (..tuple//make (_.- right_index (_.count/1 tuple))
- (_.array_slice/2 [(_.do "getArrayCopy" (list) tuple) right_index])))))
- )))))
+ (all _.then
+ (_.if ..jphp?
+ (_.set! last_index_right (..jphp_last_index tuple))
+ (_.set! last_index_right (..normal_last_index tuple)))
+ (_.set! right_index (_.+ (_.int +1) lefts))
+ (_.cond (list [(_.=== last_index_right right_index)
+ (_.return (_.item right_index tuple))]
+ [(_.> last_index_right right_index)
+ ... Needs recursion.
+ <recur>])
+ (_.if ..jphp?
+ (_.return (..tuple//make (_.- right_index (..tuple_size tuple))
+ (..tuple//slice right_index tuple)))
+ (_.return (..tuple//make (_.- right_index (_.count/1 tuple))
+ (_.array_slice/2 [(_.do "getArrayCopy" (list) tuple) right_index])))))
+ )))))
(def: .public variant_tag_field "_lux_tag")
(def: .public variant_flag_field "_lux_flag")
@@ -283,9 +283,9 @@
is_last? (_.=== ..unit sum_flag)
test_recursion! (_.if is_last?
... Must recurse.
- ($_ _.then
- (_.set! wantedTag (_.- sum_tag wantedTag))
- (_.set! sum sum_value))
+ (all _.then
+ (_.set! wantedTag (_.- sum_tag wantedTag))
+ (_.set! sum sum_value))
no_match!)]
(<| (_.while (_.bool true))
(_.cond (list [(_.=== sum_tag wantedTag)
@@ -302,20 +302,20 @@
(def: runtime//adt
Statement
- ($_ _.then
- @tuple//make
- @tuple//left
- @tuple//slice
- @tuple//right
- @sum//make
- @sum//get
- ))
+ (all _.then
+ @tuple//make
+ @tuple//left
+ @tuple//slice
+ @tuple//right
+ @sum//make
+ @sum//get
+ ))
(runtime: (lux//try op)
(with_vars [value]
- (_.try ($_ _.then
- (_.set! value (_.apply/1 op [..unit]))
- (_.return (..right value)))
+ (_.try (all _.then
+ (_.set! value (_.apply/1 op [..unit]))
+ (_.return (..right value)))
(list (with_vars [error]
[_.#class (_.constant "Exception")
_.#exception error
@@ -323,18 +323,18 @@
(runtime: (lux//program_args inputs)
(with_vars [head tail]
- ($_ _.then
- (_.set! tail ..none)
- (<| (_.for_each (_.array_reverse/1 inputs) head)
- (_.set! tail (..some (_.array/* (list head tail)))))
- (_.return tail))))
+ (all _.then
+ (_.set! tail ..none)
+ (<| (_.for_each (_.array_reverse/1 inputs) head)
+ (_.set! tail (..some (_.array/* (list head tail)))))
+ (_.return tail))))
(def: runtime//lux
Statement
- ($_ _.then
- @lux//try
- @lux//program_args
- ))
+ (all _.then
+ @lux//try
+ @lux//program_args
+ ))
(def: .public high
(-> (I64 Any) (I64 Any))
@@ -358,13 +358,13 @@
(_.- (_.int +1))
(_.bit_shl (_.int +1))
(_.+ (_.int +1)))]
- ($_ _.then
- (_.set! param (_.% (_.int +64) param))
- (_.if (_.=== (_.int +0) param)
- (_.return subject)
- (_.return (|> subject
- (_.bit_shr param)
- (_.bit_and mask)))))))
+ (all _.then
+ (_.set! param (_.% (_.int +64) param))
+ (_.if (_.=== (_.int +0) param)
+ (_.return subject)
+ (_.return (|> subject
+ (_.bit_shr param)
+ (_.bit_and mask)))))))
(runtime: (i64//char code)
(_.if ..jphp?
@@ -389,41 +389,41 @@
(with_vars [l48 l32 l16 l00
r48 r32 r16 r00
x48 x32 x16 x00]
- ($_ _.then
- (_.set! l48 (hh subject))
- (_.set! l32 (hl subject))
- (_.set! l16 (lh subject))
- (_.set! l00 (ll subject))
-
- (_.set! r48 (hh parameter))
- (_.set! r32 (hl parameter))
- (_.set! r16 (lh parameter))
- (_.set! r00 (ll parameter))
-
- (_.set! x00 (_.+ l00 r00))
-
- (_.set! x16 (|> (high_16 x00)
- (_.+ l16)
- (_.+ r16)))
- (_.set! x00 (low_16 x00))
-
- (_.set! x32 (|> (high_16 x16)
- (_.+ l32)
- (_.+ r32)))
- (_.set! x16 (low_16 x16))
-
- (_.set! x48 (|> (high_16 x32)
- (_.+ l48)
- (_.+ r48)
- low_16))
- (_.set! x32 (low_16 x32))
-
- (let [high32 (_.bit_or (up_16 x48) x32)
- low32 (_.bit_or (up_16 x16) x00)]
- (_.return (|> high32
- (_.bit_shl (_.int +32))
- (_.bit_or low32))))
- ))))
+ (all _.then
+ (_.set! l48 (hh subject))
+ (_.set! l32 (hl subject))
+ (_.set! l16 (lh subject))
+ (_.set! l00 (ll subject))
+
+ (_.set! r48 (hh parameter))
+ (_.set! r32 (hl parameter))
+ (_.set! r16 (lh parameter))
+ (_.set! r00 (ll parameter))
+
+ (_.set! x00 (_.+ l00 r00))
+
+ (_.set! x16 (|> (high_16 x00)
+ (_.+ l16)
+ (_.+ r16)))
+ (_.set! x00 (low_16 x00))
+
+ (_.set! x32 (|> (high_16 x16)
+ (_.+ l32)
+ (_.+ r32)))
+ (_.set! x16 (low_16 x16))
+
+ (_.set! x48 (|> (high_16 x32)
+ (_.+ l48)
+ (_.+ r48)
+ low_16))
+ (_.set! x32 (low_16 x32))
+
+ (let [high32 (_.bit_or (up_16 x48) x32)
+ low32 (_.bit_or (up_16 x16) x00)]
+ (_.return (|> high32
+ (_.bit_shl (_.int +32))
+ (_.bit_or low32))))
+ ))))
(runtime: (i64//negate value)
(let [i64//min (_.int (.int (hex "80,00,00,00,00,00,00,00")))]
@@ -448,57 +448,57 @@
(with_vars [l48 l32 l16 l00
r48 r32 r16 r00
x48 x32 x16 x00]
- ($_ _.then
- (_.set! l48 (hh subject))
- (_.set! l32 (hl subject))
- (_.set! l16 (lh subject))
- (_.set! l00 (ll subject))
-
- (_.set! r48 (hh parameter))
- (_.set! r32 (hl parameter))
- (_.set! r16 (lh parameter))
- (_.set! r00 (ll parameter))
-
- (_.set! x00 (_.* l00 r00))
- (_.set! x16 (high_16 x00))
- (_.set! x00 (low_16 x00))
-
- (_.set! x16 (|> x16 (_.+ (_.* l16 r00))))
- (_.set! x32 (high_16 x16)) (_.set! x16 (low_16 x16))
- (_.set! x16 (|> x16 (_.+ (_.* l00 r16))))
- (_.set! x32 (|> x32 (_.+ (high_16 x16)))) (_.set! x16 (low_16 x16))
-
- (_.set! x32 (|> x32 (_.+ (_.* l32 r00))))
- (_.set! x48 (high_16 x32)) (_.set! x32 (low_16 x32))
- (_.set! x32 (|> x32 (_.+ (_.* l16 r16))))
- (_.set! x48 (|> x48 (_.+ (high_16 x32)))) (_.set! x32 (low_16 x32))
- (_.set! x32 (|> x32 (_.+ (_.* l00 r32))))
- (_.set! x48 (|> x48 (_.+ (high_16 x32)))) (_.set! x32 (low_16 x32))
-
- (_.set! x48 (|> x48
- (_.+ (_.* l48 r00))
- (_.+ (_.* l32 r16))
- (_.+ (_.* l16 r32))
- (_.+ (_.* l00 r48))
- low_16))
-
- (let [high32 (_.bit_or (up_16 x48) x32)
- low32 (_.bit_or (up_16 x16) x00)]
- (_.return (|> high32
- (_.bit_shl (_.int +32))
- (_.bit_or low32))))
- ))))
+ (all _.then
+ (_.set! l48 (hh subject))
+ (_.set! l32 (hl subject))
+ (_.set! l16 (lh subject))
+ (_.set! l00 (ll subject))
+
+ (_.set! r48 (hh parameter))
+ (_.set! r32 (hl parameter))
+ (_.set! r16 (lh parameter))
+ (_.set! r00 (ll parameter))
+
+ (_.set! x00 (_.* l00 r00))
+ (_.set! x16 (high_16 x00))
+ (_.set! x00 (low_16 x00))
+
+ (_.set! x16 (|> x16 (_.+ (_.* l16 r00))))
+ (_.set! x32 (high_16 x16)) (_.set! x16 (low_16 x16))
+ (_.set! x16 (|> x16 (_.+ (_.* l00 r16))))
+ (_.set! x32 (|> x32 (_.+ (high_16 x16)))) (_.set! x16 (low_16 x16))
+
+ (_.set! x32 (|> x32 (_.+ (_.* l32 r00))))
+ (_.set! x48 (high_16 x32)) (_.set! x32 (low_16 x32))
+ (_.set! x32 (|> x32 (_.+ (_.* l16 r16))))
+ (_.set! x48 (|> x48 (_.+ (high_16 x32)))) (_.set! x32 (low_16 x32))
+ (_.set! x32 (|> x32 (_.+ (_.* l00 r32))))
+ (_.set! x48 (|> x48 (_.+ (high_16 x32)))) (_.set! x32 (low_16 x32))
+
+ (_.set! x48 (|> x48
+ (_.+ (_.* l48 r00))
+ (_.+ (_.* l32 r16))
+ (_.+ (_.* l16 r32))
+ (_.+ (_.* l00 r48))
+ low_16))
+
+ (let [high32 (_.bit_or (up_16 x48) x32)
+ low32 (_.bit_or (up_16 x16) x00)]
+ (_.return (|> high32
+ (_.bit_shl (_.int +32))
+ (_.bit_or low32))))
+ ))))
(def: runtime//i64
Statement
- ($_ _.then
- @i64//right_shifted
- @i64//char
- @i64//+
- @i64//negate
- @i64//-
- @i64//*
- ))
+ (all _.then
+ @i64//right_shifted
+ @i64//char
+ @i64//+
+ @i64//negate
+ @i64//-
+ @i64//*
+ ))
(runtime: (text//size value)
(_.if ..jphp?
@@ -510,16 +510,16 @@
(_.return (..some (_.int +0)))
(with_vars [idx]
(_.if ..jphp?
- ($_ _.then
- (_.set! idx (_.strpos/3 [subject param start]))
- (_.if (_.=== (_.bool false) idx)
- (_.return ..none)
- (_.return (..some idx))))
- ($_ _.then
- (_.set! idx (_.iconv_strpos/3 [subject param start]))
- (_.if (_.=== (_.bool false) idx)
- (_.return ..none)
- (_.return (..some idx))))))))
+ (all _.then
+ (_.set! idx (_.strpos/3 [subject param start]))
+ (_.if (_.=== (_.bool false) idx)
+ (_.return ..none)
+ (_.return (..some idx))))
+ (all _.then
+ (_.set! idx (_.iconv_strpos/3 [subject param start]))
+ (_.if (_.=== (_.bool false) idx)
+ (_.return ..none)
+ (_.return (..some idx))))))))
(def: (within? top value)
(-> Expression Expression Computation)
@@ -545,35 +545,35 @@
(def: runtime//text
Statement
- ($_ _.then
- @text//size
- @text//index
- @text//clip
- @text//char
- ))
+ (all _.then
+ @text//size
+ @text//index
+ @text//clip
+ @text//char
+ ))
(runtime: (f64//decode value)
(with_vars [output]
- ($_ _.then
- (_.set! output (_.floatval/1 value))
- (_.if (_.=== (_.float +0.0) output)
- (_.if ($_ _.or
- (_.=== (_.string "0.0") output)
- (_.=== (_.string "+0.0") output)
- (_.=== (_.string "-0.0") output)
- (_.=== (_.string "0") output)
- (_.=== (_.string "+0") output)
- (_.=== (_.string "-0") output))
- (_.return (..some output))
- (_.return ..none))
- (_.return (..some output)))
- )))
+ (all _.then
+ (_.set! output (_.floatval/1 value))
+ (_.if (_.=== (_.float +0.0) output)
+ (_.if (all _.or
+ (_.=== (_.string "0.0") output)
+ (_.=== (_.string "+0.0") output)
+ (_.=== (_.string "-0.0") output)
+ (_.=== (_.string "0") output)
+ (_.=== (_.string "+0") output)
+ (_.=== (_.string "-0") output))
+ (_.return (..some output))
+ (_.return ..none))
+ (_.return (..some output)))
+ )))
(def: runtime//f64
Statement
- ($_ _.then
- @f64//decode
- ))
+ (all _.then
+ @f64//decode
+ ))
(def: check_necessary_conditions!
Statement
@@ -585,16 +585,16 @@
(def: runtime
Statement
- ($_ _.then
- check_necessary_conditions!
- runtime//array
- runtime//adt
- runtime//lux
- runtime//i64
- runtime//f64
- runtime//text
- runtime//io
- ))
+ (all _.then
+ check_necessary_conditions!
+ runtime//array
+ runtime//adt
+ runtime//lux
+ runtime//i64
+ runtime//f64
+ runtime//text
+ runtime//io
+ ))
(def: .public generate
(Operation [Registry Output])
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/case.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/case.lux
index aed266e9f..0479e132e 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/case.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/case.lux
@@ -69,9 +69,9 @@
(do ///////phase.monad
[valueO (expression archive valueS)
bodyO (statement expression archive bodyS)]
- (in ($_ _.then
- (_.set (list (..register register)) valueO)
- bodyO))))
+ (in (all _.then
+ (_.set (list (..register register)) valueO)
+ bodyO))))
(def: .public (exec expression archive [pre post])
(Generator [Synthesis Synthesis])
@@ -85,9 +85,9 @@
(do ///////phase.monad
[pre (expression archive pre)
post (statement expression archive post)]
- (in ($_ _.then
- (_.statement pre)
- post))))
+ (in (all _.then
+ (_.statement pre)
+ post))))
(def: .public (if expression archive [testS thenS elseS])
(Generator [Synthesis Synthesis Synthesis])
@@ -158,16 +158,16 @@
(template [<name> <flag>]
[(def: (<name> simple? idx)
(-> Bit Nat (Statement Any))
- ($_ _.then
- (_.set (list @temp) (//runtime.sum::get ..peek <flag>
- (|> idx .int _.int)))
- (.if simple?
- (_.when (_.= _.none @temp)
- fail_pm!)
- (_.if (_.= _.none @temp)
- fail_pm!
- (..push! @temp))
- )))]
+ (all _.then
+ (_.set (list @temp) (//runtime.sum::get ..peek <flag>
+ (|> idx .int _.int)))
+ (.if simple?
+ (_.when (_.= _.none @temp)
+ fail_pm!)
+ (_.if (_.= _.none @temp)
+ fail_pm!
+ (..push! @temp))
+ )))]
[left_choice _.none]
[right_choice //runtime.unit]
@@ -179,23 +179,23 @@
(_.while (_.bool true)
body!
{.#None})
- ($_ _.then
- (_.set (list g!once) (_.bool true))
- (_.while g!once
- ($_ _.then
- (_.set (list g!once) (_.bool false))
- body!)
- {.#Some _.continue}))))
+ (all _.then
+ (_.set (list g!once) (_.bool true))
+ (_.while g!once
+ (all _.then
+ (_.set (list g!once) (_.bool false))
+ body!)
+ {.#Some _.continue}))))
(def: (alternation in_closure? g!once pre! post!)
(-> Bit SVar (Statement Any) (Statement Any) (Statement Any))
- ($_ _.then
- (..with_looping in_closure? g!once
- ($_ _.then
- ..save!
- pre!))
- ..restore!
- post!))
+ (all _.then
+ (..with_looping in_closure? g!once
+ (all _.then
+ ..save!
+ pre!))
+ ..restore!
+ post!))
(def: (primitive_pattern_matching again pathP)
(-> (-> Path (Operation (Statement Any)))
@@ -281,17 +281,17 @@
(pattern (/////synthesis.!bind_top register thenP))
(do !
[then! (again thenP)]
- (///////phase#in ($_ _.then
- (_.set (list (..register register)) ..peek_and_pop)
- then!)))
+ (///////phase#in (all _.then
+ (_.set (list (..register register)) ..peek_and_pop)
+ then!)))
(pattern (/////synthesis.!multi_pop nextP))
(.let [[extra_pops nextP'] (case.count_pops nextP)]
(do !
[next! (again nextP')]
- (///////phase#in ($_ _.then
- (..multi_pop! (n.+ 2 extra_pops))
- next!))))
+ (///////phase#in (all _.then
+ (..multi_pop! (n.+ 2 extra_pops))
+ next!))))
(pattern (/////synthesis.path/seq preP postP))
(do !
@@ -314,10 +314,10 @@
(do ///////phase.monad
[pattern_matching! (pattern_matching' in_closure? statement expression archive pathP)
g!once (..symbol "once")]
- (in ($_ _.then
- (..with_looping in_closure? g!once
- pattern_matching!)
- (_.raise (_.Exception/1 (_.string case.pattern_matching_error)))))))
+ (in (all _.then
+ (..with_looping in_closure? g!once
+ pattern_matching!)
+ (_.raise (_.Exception/1 (_.string case.pattern_matching_error)))))))
(def: .public dependencies
(-> Path (List SVar))
@@ -337,11 +337,11 @@
(do ///////phase.monad
[stack_init (expression archive valueS)
pattern_matching! (pattern_matching in_closure? statement expression archive pathP)]
- (in ($_ _.then
- (_.set (list @cursor) (_.list (list stack_init)))
- (_.set (list @savepoint) (_.list (list)))
- pattern_matching!
- ))))
+ (in (all _.then
+ (_.set (list @cursor) (_.list (list stack_init)))
+ (_.set (list @savepoint) (_.list (list)))
+ pattern_matching!
+ ))))
(def: .public (case statement expression archive [valueS pathP])
(-> Phase! (Generator [Synthesis Path]))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/function.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/function.lux
index efbefac6b..077cdf100 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/function.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/function.lux
@@ -59,9 +59,9 @@
[.let [directive (_.def @function
(|> (list.enumeration inits)
(list#each (|>> product.left ..capture)))
- ($_ _.then
- function_definition
- (_.return @function)))]
+ (all _.then
+ function_definition
+ (_.return @function)))]
_ (/////generation.execute! directive)
_ (/////generation.save! function_id {.#None} directive)]
(in (_.apply/* inits @function)))))
@@ -85,32 +85,32 @@
(_.apply/* (list (_.splat_poly args)) func))
initialize_self! (_.set (list (//case.register 0)) @self)
initialize! (list#mix (.function (_ post pre!)
- ($_ _.then
- pre!
- (_.set (list (..input post)) (_.item (|> post .int _.int) @curried))))
+ (all _.then
+ pre!
+ (_.set (list (..input post)) (_.item (|> post .int _.int) @curried))))
initialize_self!
(list.indices arity))]]
(with_closure function_artifact @self environment
(_.def @self (list (_.poly @curried))
- ($_ _.then
- (_.set (list @num_args) (_.len/1 @curried))
- (<| (_.if (|> @num_args (_.= arityO))
- (<| (_.then initialize!)
- //loop.set_scope
- body!))
- (_.if (|> @num_args (_.> arityO))
- (let [arity_inputs (_.slice (_.int +0) arityO @curried)
- extra_inputs (_.slice arityO @num_args @curried)]
- (_.return (|> @self
- (apply_poly arity_inputs)
- (apply_poly extra_inputs)))))
- ... (|> @num_args (_.< arityO))
- (let [@next (_.var "next")
- @missing (_.var "missing")]
- ($_ _.then
- (_.def @next (list (_.poly @missing))
- (_.return (|> @self (apply_poly (|> @curried (_.+ @missing))))))
- (_.return @next)
- )))
- )))
+ (all _.then
+ (_.set (list @num_args) (_.len/1 @curried))
+ (<| (_.if (|> @num_args (_.= arityO))
+ (<| (_.then initialize!)
+ //loop.set_scope
+ body!))
+ (_.if (|> @num_args (_.> arityO))
+ (let [arity_inputs (_.slice (_.int +0) arityO @curried)
+ extra_inputs (_.slice arityO @num_args @curried)]
+ (_.return (|> @self
+ (apply_poly arity_inputs)
+ (apply_poly extra_inputs)))))
+ ... (|> @num_args (_.< arityO))
+ (let [@next (_.var "next")
+ @missing (_.var "missing")]
+ (all _.then
+ (_.def @next (list (_.poly @missing))
+ (_.return (|> @self (apply_poly (|> @curried (_.+ @missing))))))
+ (_.return @next)
+ )))
+ )))
))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/loop.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/loop.lux
index 5c6d545f1..951fcbb18 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/loop.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/loop.lux
@@ -40,9 +40,9 @@
(let [variables (|> bindings
list.enumeration
(list#each (|>> product.left (n.+ offset) //case.register)))]
- ($_ _.then
- (_.set variables (_.multi bindings))
- body)))
+ (all _.then
+ (_.set variables (_.multi bindings))
+ body)))
(def: .public (set_scope body!)
(-> (Statement Any) (Statement Any))
@@ -101,10 +101,10 @@
foreigns
[(_.def @loop foreigns
- ($_ _.then
- actual_loop
- (_.return @loop)
- ))
+ (all _.then
+ actual_loop
+ (_.return @loop)
+ ))
(_.apply/* foreigns @loop)]))]
_ (/////generation.execute! directive)
_ (/////generation.save! loop_artifact {.#None} directive)]
@@ -120,7 +120,7 @@
list.enumeration
(list#each (function (_ [idx _])
(_.item (_.int (.int idx)) @temp))))]]
- (in ($_ _.then
- (_.set (list @temp) (_.list argsO+))
- (..setup offset re_binds
- _.continue)))))
+ (in (all _.then
+ (_.set (list @temp) (_.list argsO+))
+ (..setup offset re_binds
+ _.continue)))))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/runtime.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/runtime.lux
index 525b2a108..1dd017309 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/runtime.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/runtime.lux
@@ -165,75 +165,75 @@
(runtime: (lux::program_args program_args)
(with_vars [inputs value]
- ($_ _.then
- (_.set (list inputs) ..none)
- (<| (_.for_in value (_.apply/* (list program_args) (_.var "reversed")))
- (_.set (list inputs)
- (..some (_.list (list value inputs)))))
- (_.return inputs))))
+ (all _.then
+ (_.set (list inputs) ..none)
+ (<| (_.for_in value (_.apply/* (list program_args) (_.var "reversed")))
+ (_.set (list inputs)
+ (..some (_.list (list value inputs)))))
+ (_.return inputs))))
(runtime: (lux::exec code globals)
- ($_ _.then
- (_.exec {.#Some globals} code)
- (_.return ..unit)))
+ (all _.then
+ (_.exec {.#Some globals} code)
+ (_.return ..unit)))
(def: runtime::lux
(Statement Any)
- ($_ _.then
- @lux::try
- @lux::program_args
- @lux::exec
- ))
+ (all _.then
+ @lux::try
+ @lux::program_args
+ @lux::exec
+ ))
(runtime: (io::log! message)
- ($_ _.then
- (_.print message)
- (|> (_.__import__/1 (_.unicode "sys"))
- (_.the "stdout")
- (_.do "flush" (list))
- _.statement)
- (_.return ..unit)))
+ (all _.then
+ (_.print message)
+ (|> (_.__import__/1 (_.unicode "sys"))
+ (_.the "stdout")
+ (_.do "flush" (list))
+ _.statement)
+ (_.return ..unit)))
(runtime: (io::throw! message)
(_.raise (_.Exception/1 message)))
(def: runtime::io
(Statement Any)
- ($_ _.then
- @io::log!
- @io::throw!
- ))
+ (all _.then
+ @io::log!
+ @io::throw!
+ ))
(def: last_index
(|>> _.len/1 (_.- (_.int +1))))
-(with_expansions [<recur> (these ($_ _.then
- (_.set (list lefts) (_.- last_index_right lefts))
- (_.set (list tuple) (_.item last_index_right tuple))))]
+(with_expansions [<recur> (these (all _.then
+ (_.set (list lefts) (_.- last_index_right lefts))
+ (_.set (list tuple) (_.item last_index_right tuple))))]
(runtime: (tuple::left lefts tuple)
(with_vars [last_index_right]
(_.while (_.bool true)
- ($_ _.then
- (_.set (list last_index_right) (..last_index tuple))
- (_.if (_.> lefts last_index_right)
- ... No need for recursion
- (_.return (_.item lefts tuple))
- ... Needs recursion
- <recur>))
+ (all _.then
+ (_.set (list last_index_right) (..last_index tuple))
+ (_.if (_.> lefts last_index_right)
+ ... No need for recursion
+ (_.return (_.item lefts tuple))
+ ... Needs recursion
+ <recur>))
{.#None})))
(runtime: (tuple::right lefts tuple)
(with_vars [last_index_right right_index]
(_.while (_.bool true)
- ($_ _.then
- (_.set (list last_index_right) (..last_index tuple))
- (_.set (list right_index) (_.+ (_.int +1) lefts))
- (<| (_.if (_.= last_index_right right_index)
- (_.return (_.item right_index tuple)))
- (_.if (_.> last_index_right right_index)
- ... Needs recursion.
- <recur>)
- (_.return (_.slice_from right_index tuple))))
+ (all _.then
+ (_.set (list last_index_right) (..last_index tuple))
+ (_.set (list right_index) (_.+ (_.int +1) lefts))
+ (<| (_.if (_.= last_index_right right_index)
+ (_.return (_.item right_index tuple)))
+ (_.if (_.> last_index_right right_index)
+ ... Needs recursion.
+ <recur>)
+ (_.return (_.slice_from right_index tuple))))
{.#None}))))
(runtime: (sum::get sum expected##right? expected##lefts)
@@ -241,11 +241,11 @@
actual##lefts (_.item (_.int +0) sum)
actual##right? (_.item (_.int +1) sum)
actual##value (_.item (_.int +2) sum)
- recur! ($_ _.then
- (_.set (list expected##lefts) (|> expected##lefts
- (_.- actual##lefts)
- (_.- (_.int +1))))
- (_.set (list sum) actual##value))]
+ recur! (all _.then
+ (_.set (list expected##lefts) (|> expected##lefts
+ (_.- actual##lefts)
+ (_.- (_.int +1))))
+ (_.set (list sum) actual##value))]
(_.while (_.bool true)
(<| (_.if (_.= expected##lefts actual##lefts)
(_.if (_.= expected##right? actual##right?)
@@ -266,11 +266,11 @@
(def: runtime::adt
(Statement Any)
- ($_ _.then
- @tuple::left
- @tuple::right
- @sum::get
- ))
+ (all _.then
+ @tuple::left
+ @tuple::right
+ @sum::get
+ ))
(def: i64::+limit (_.manual "+0x7FFFFFFFFFFFFFFF"))
(def: i64::-limit (_.manual "-0x8000000000000000"))
@@ -283,11 +283,11 @@
(with_vars [temp]
(`` (<| (~~ (template [<scenario> <iteration> <cap> <entrance>]
[(_.if (|> input <scenario>)
- ($_ _.then
- (_.set (list temp) (_.% <iteration> input))
- (_.return (_.? (|> temp <scenario>)
- (|> temp (_.- <cap>) (_.+ <entrance>))
- temp))))]
+ (all _.then
+ (_.set (list temp) (_.% <iteration> input))
+ (_.return (_.? (|> temp <scenario>)
+ (|> temp (_.- <cap>) (_.+ <entrance>))
+ temp))))]
[(_.> ..i64::+limit) ..i64::+iteration ..i64::+cap ..i64::-limit]
[(_.< ..i64::-limit) ..i64::-iteration ..i64::-cap ..i64::+limit]
@@ -305,30 +305,30 @@
..i64::64)))
(runtime: (i64::right_shifted param subject)
- ($_ _.then
- (_.set (list param) (_.% (_.int +64) param))
- (_.return (_.? (_.= (_.int +0) param)
- subject
- (|> subject
- ..as_nat
- (_.bit_shr param))))))
+ (all _.then
+ (_.set (list param) (_.% (_.int +64) param))
+ (_.return (_.? (_.= (_.int +0) param)
+ subject
+ (|> subject
+ ..as_nat
+ (_.bit_shr param))))))
(runtime: (i64#/ param subject)
(with_vars [floored]
- ($_ _.then
- (_.set (list floored) (_.// param subject))
- (_.return (let [potentially_floored? (_.< (_.int +0) floored)
- inexact? (|> subject
- (_.% param)
- (_.= (_.int +0))
- _.not)]
- (<| (_.? (_.and potentially_floored?
- inexact?)
- (_.+ (_.int +1) floored))
- (_.? (_.= (_.manual "+9223372036854775808")
- floored)
- (_.manual "-9223372036854775808"))
- floored))))))
+ (all _.then
+ (_.set (list floored) (_.// param subject))
+ (_.return (let [potentially_floored? (_.< (_.int +0) floored)
+ inexact? (|> subject
+ (_.% param)
+ (_.= (_.int +0))
+ _.not)]
+ (<| (_.? (_.and potentially_floored?
+ inexact?)
+ (_.+ (_.int +1) floored))
+ (_.? (_.= (_.manual "+9223372036854775808")
+ floored)
+ (_.manual "-9223372036854775808"))
+ floored))))))
(runtime: (i64::remainder param subject)
(_.return (_.- (|> subject (..i64#/ param) (_.* param))
@@ -356,17 +356,17 @@
(def: runtime::i64
(Statement Any)
- ($_ _.then
- @i64::64
- @i64::left_shifted
- @i64::right_shifted
- @i64#/
- @i64::remainder
- @i64::and
- @i64::or
- @i64::xor
- @i64::char
- ))
+ (all _.then
+ @i64::64
+ @i64::left_shifted
+ @i64::right_shifted
+ @i64#/
+ @i64::remainder
+ @i64::and
+ @i64::or
+ @i64::xor
+ @i64::char
+ ))
(runtime: (f64::/ parameter subject)
(_.return (_.? (_.= (_.float +0.0) parameter)
@@ -385,18 +385,18 @@
(def: runtime::f64
(Statement Any)
- ($_ _.then
- @f64::/
- @f64::decode
- ))
+ (all _.then
+ @f64::/
+ @f64::decode
+ ))
(runtime: (text::index start param subject)
(with_vars [idx]
- ($_ _.then
- (_.set (list idx) (|> subject (_.do "find" (list param start))))
- (_.return (_.? (_.= (_.int -1) idx)
- ..none
- (..some (..i64::64 idx)))))))
+ (all _.then
+ (_.set (list idx) (|> subject (_.do "find" (list param start))))
+ (_.return (_.? (_.= (_.int -1) idx)
+ ..none
+ (..some (..i64::64 idx)))))))
(def: ++
(|>> (_.+ (_.int +1))))
@@ -416,34 +416,34 @@
(def: runtime::text
(Statement Any)
- ($_ _.then
- @text::index
- @text::clip
- @text::char
- ))
+ (all _.then
+ @text::index
+ @text::clip
+ @text::char
+ ))
(runtime: (array::write idx value array)
- ($_ _.then
- (_.set (list (_.item idx array)) value)
- (_.return array)))
+ (all _.then
+ (_.set (list (_.item idx array)) value)
+ (_.return array)))
(def: runtime::array
(Statement Any)
- ($_ _.then
- @array::write
- ))
+ (all _.then
+ @array::write
+ ))
(def: runtime
(Statement Any)
- ($_ _.then
- runtime::lux
- runtime::io
- runtime::adt
- runtime::i64
- runtime::f64
- runtime::text
- runtime::array
- ))
+ (all _.then
+ runtime::lux
+ runtime::io
+ runtime::adt
+ runtime::i64
+ runtime::f64
+ runtime::text
+ runtime::array
+ ))
(def: module_id
0)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/case.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/case.lux
index d75170250..21e45438d 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/case.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/case.lux
@@ -51,9 +51,9 @@
[valueO (expression archive valueS)
bodyO (expression archive bodyS)]
(in (_.block
- ($_ _.then
- (_.set! (..register register) valueO)
- bodyO)))))
+ (all _.then
+ (_.set! (..register register) valueO)
+ bodyO)))))
(def: .public (if expression archive [testS thenS elseS])
(Generator [Synthesis Synthesis Synthesis])
@@ -182,11 +182,11 @@
(^.template [<pm> <flag> <prep>]
[(pattern (<pm> idx))
- (///////phase#in ($_ _.then
- (_.set! $temp (|> idx <prep> .int _.int (//runtime.sum::get ..peek (//runtime.flag <flag>))))
- (_.if (_.= _.null $temp)
- ..fail!
- (..push_cursor! $temp))))])
+ (///////phase#in (all _.then
+ (_.set! $temp (|> idx <prep> .int _.int (//runtime.sum::get ..peek (//runtime.flag <flag>))))
+ (_.if (_.= _.null $temp)
+ ..fail!
+ (..push_cursor! $temp))))])
([/////synthesis.side/left false (<|)]
[/////synthesis.side/right true ++])
@@ -203,21 +203,21 @@
(do ///////phase.monad
[leftO (again leftP)
rightO (again rightP)]
- (in ($_ _.then
- leftO
- rightO)))
+ (in (all _.then
+ leftO
+ rightO)))
(pattern (/////synthesis.path/alt leftP rightP))
(do [! ///////phase.monad]
[leftO (again leftP)
rightO (again rightP)]
- (in (_.try ($_ _.then
- ..save_cursor!
- leftO)
+ (in (_.try (all _.then
+ ..save_cursor!
+ leftO)
{.#None}
- {.#Some (..catch ($_ _.then
- ..restore_cursor!
- rightO))}
+ {.#Some (..catch (all _.then
+ ..restore_cursor!
+ rightO))}
{.#None})))
)))
@@ -234,8 +234,8 @@
(Generator [Synthesis Path])
(do [! ///////phase.monad]
[valueO (expression archive valueS)]
- (<| (# ! each (|>> ($_ _.then
- (_.set! $cursor (_.list (list valueO)))
- (_.set! $savepoint (_.list (list))))
+ (<| (# ! each (|>> (all _.then
+ (_.set! $cursor (_.list (list valueO)))
+ (_.set! $savepoint (_.list (list))))
_.block))
(pattern_matching expression archive pathP))))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/function.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/function.lux
index 37818bd6f..11a7de8ab 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/function.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/function.lux
@@ -1,36 +1,36 @@
(.using
- [library
- [lux {"-" function}
- [abstract
- ["[0]" monad {"+" do}]]
- [control
- pipe]
- [data
- ["[0]" product]
- ["[0]" text
- ["%" format {"+" format}]]
- [collection
- ["[0]" list ("[1]#[0]" functor mix)]]]
- [target
- ["_" r {"+" Expression SVar}]]]]
- ["[0]" // "_"
- ["[1][0]" runtime {"+" Operation Phase Generator}]
+ [library
+ [lux {"-" function}
+ [abstract
+ ["[0]" monad {"+" do}]]
+ [control
+ pipe]
+ [data
+ ["[0]" product]
+ ["[0]" text
+ ["%" format {"+" format}]]
+ [collection
+ ["[0]" list ("[1]#[0]" functor mix)]]]
+ [target
+ ["_" r {"+" Expression SVar}]]]]
+ ["[0]" // "_"
+ ["[1][0]" runtime {"+" Operation Phase Generator}]
+ ["[1][0]" reference]
+ ["[1][0]" case]
+ ["/[1]" // "_"
["[1][0]" reference]
- ["[1][0]" case]
- ["/[1]" // "_"
- ["[1][0]" reference]
+ ["//[1]" /// "_"
+ [analysis {"+" Variant Tuple Abstraction Application Analysis}]
+ [synthesis {"+" Synthesis}]
+ ["[1][0]" generation {"+" Context}]
["//[1]" /// "_"
- [analysis {"+" Variant Tuple Abstraction Application Analysis}]
- [synthesis {"+" Synthesis}]
- ["[1][0]" generation {"+" Context}]
- ["//[1]" /// "_"
- [arity {"+" Arity}]
- ["[1][0]" phase ("[1]#[0]" monad)]
- [reference
- [variable {"+" Register Variable}]]
- [meta
- [archive
- ["[0]" artifact]]]]]]])
+ [arity {"+" Arity}]
+ ["[1][0]" phase ("[1]#[0]" monad)]
+ [reference
+ [variable {"+" Register Variable}]]
+ [meta
+ [archive
+ ["[0]" artifact]]]]]]])
(def: .public (apply expression archive [functionS argsS+])
(Generator (Application Synthesis))
@@ -56,9 +56,9 @@
list.size
list.indices
(list#each //case.capture))
- ($_ _.then
- function_definition
- $function)))]
+ (all _.then
+ function_definition
+ $function)))]
_ (/////generation.execute! closure_definition)
_ (/////generation.save! (%.nat function_id) closure_definition)]
(in (_.apply inits $function)))))
@@ -88,30 +88,30 @@
(_.apply (list func args) (_.var "do.call")))]]
(with_closure function_artifact $self closureO+
(_.set! $self (_.function (list _.var_args)
- ($_ _.then
- (_.set! $curried (_.list (list _.var_args)))
- (_.set! $num_args (_.length $curried))
- (_.cond (list [(|> $num_args (_.= arityO))
- ($_ _.then
- (_.set! (//case.register 0) $self)
- (|> arity
- list.indices
- (list#each input_declaration)
- (list#mix _.then bodyO)))]
- [(|> $num_args (_.> arityO))
- (let [arity_args (_.slice (_.int +1) arityO $curried)
- output_func_args (_.slice (|> arityO (_.+ (_.int +1)))
- $num_args
- $curried)]
- (|> $self
- (apply_poly arity_args)
- (apply_poly output_func_args)))])
- ... (|> $num_args (_.< arityO))
- (let [$missing (_.var "missing")]
- (_.function (list _.var_args)
- ($_ _.then
- (_.set! $missing (_.list (list _.var_args)))
- (|> $self
- (apply_poly (_.apply (list $curried $missing)
- (_.var "append"))))))))))))
+ (all _.then
+ (_.set! $curried (_.list (list _.var_args)))
+ (_.set! $num_args (_.length $curried))
+ (_.cond (list [(|> $num_args (_.= arityO))
+ (all _.then
+ (_.set! (//case.register 0) $self)
+ (|> arity
+ list.indices
+ (list#each input_declaration)
+ (list#mix _.then bodyO)))]
+ [(|> $num_args (_.> arityO))
+ (let [arity_args (_.slice (_.int +1) arityO $curried)
+ output_func_args (_.slice (|> arityO (_.+ (_.int +1)))
+ $num_args
+ $curried)]
+ (|> $self
+ (apply_poly arity_args)
+ (apply_poly output_func_args)))])
+ ... (|> $num_args (_.< arityO))
+ (let [$missing (_.var "missing")]
+ (_.function (list _.var_args)
+ (all _.then
+ (_.set! $missing (_.list (list _.var_args)))
+ (|> $self
+ (apply_poly (_.apply (list $curried $missing)
+ (_.var "append"))))))))))))
))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/loop.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/loop.lux
index 860d68839..192386b79 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/loop.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/loop.lux
@@ -1,37 +1,37 @@
(.using
- [library
- [lux {"-" Scope}
- [abstract
- ["[0]" monad {"+" do}]]
- [data
- ["[0]" product]
- ["[0]" text
- ["%" format {"+" format}]]
- [collection
- ["[0]" list ("[1]#[0]" functor)]
- ["[0]" set {"+" Set}]]]
- [math
- [number
- ["n" nat]]]
- [target
- ["_" r]]]]
- ["[0]" // "_"
- [runtime {"+" Operation Phase Generator}]
- ["[1][0]" case]
+ [library
+ [lux {"-" Scope}
+ [abstract
+ ["[0]" monad {"+" do}]]
+ [data
+ ["[0]" product]
+ ["[0]" text
+ ["%" format {"+" format}]]
+ [collection
+ ["[0]" list ("[1]#[0]" functor)]
+ ["[0]" set {"+" Set}]]]
+ [math
+ [number
+ ["n" nat]]]
+ [target
+ ["_" r]]]]
+ ["[0]" // "_"
+ [runtime {"+" Operation Phase Generator}]
+ ["[1][0]" case]
+ ["/[1]" // "_"
+ ["[1][0]" reference]
["/[1]" // "_"
- ["[1][0]" reference]
+ [synthesis
+ ["[0]" case]]
["/[1]" // "_"
- [synthesis
- ["[0]" case]]
- ["/[1]" // "_"
- ["[0]"synthesis {"+" Scope Synthesis}]
- ["[1][0]" generation]
- ["//[1]" /// "_"
- ["[1][0]" phase]
- [meta
- [archive {"+" Archive}]]
- [reference
- [variable {"+" Register}]]]]]]])
+ ["[0]"synthesis {"+" Scope Synthesis}]
+ ["[1][0]" generation]
+ ["//[1]" /// "_"
+ ["[1][0]" phase]
+ [meta
+ [archive {"+" Archive}]]
+ [reference
+ [variable {"+" Register}]]]]]]])
(def: .public (scope expression archive [offset initsS+ bodyS])
(Generator (Scope Synthesis))
@@ -48,14 +48,14 @@
bodyO (/////generation.with_anchor $scope
(expression archive bodyS))]
(in (_.block
- ($_ _.then
- (_.set! $scope
- (_.function (|> initsS+
- list.size
- list.indices
- (list#each (|>> (n.+ offset) //case.register)))
- bodyO))
- (_.apply initsO+ $scope)))))))
+ (all _.then
+ (_.set! $scope
+ (_.function (|> initsS+
+ list.size
+ list.indices
+ (list#each (|>> (n.+ offset) //case.register)))
+ bodyO))
+ (_.apply initsO+ $scope)))))))
(def: .public (again expression archive argsS+)
(Generator (List Synthesis))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/procedure/common.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/procedure/common.lux
index ecde6abbd..9993054a4 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/procedure/common.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/procedure/common.lux
@@ -125,7 +125,7 @@
(-> Text Proc)
(function (_ proc_name)
(function (_ translate inputsS)
- (case (s.result inputsS ($_ p.and s.nat (s.tuple (p.many s.any)) s.any))
+ (case (s.result inputsS (all p.and s.nat (s.tuple (p.many s.any)) s.any))
{e.#Success [offset initsS+ bodyS]}
(loopT.translate_loop translate offset initsS+ bodyS)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/runtime.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/runtime.lux
index c6ff7f292..acb12a286 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/runtime.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/runtime.lux
@@ -179,11 +179,11 @@
(runtime: (i64::unsigned_low input)
(with_vars [low]
- ($_ _.then
- (_.set! low (_.item (_.string ..i64_low_field) input))
- (_.if (_.< (_.int +0) low)
- (_.+ f2^32 low)
- low))))
+ (all _.then
+ (_.set! low (_.item (_.string ..i64_low_field) input))
+ (_.if (_.< (_.int +0) low)
+ (_.+ f2^32 low)
+ low))))
(runtime: (i64::float input)
(let [high (|> input
@@ -237,34 +237,34 @@
(runtime: (i64::+ param subject)
(with_vars [sH sL pH pL
x00 x16 x32 x48]
- ($_ _.then
- (_.set! sH (|> subject i64_high))
- (_.set! sL (|> subject i64_low))
- (_.set! pH (|> param i64_high))
- (_.set! pL (|> param i64_low))
- (let [bits16 (_.manual "0xFFFF")
- move_top_16 (_.bit_shl (_.int +16))
- top_16 (_.bit_ushr (_.int +16))
- bottom_16 (_.bit_and bits16)
- split_16 (function (_ source)
- [(|> source top_16)
- (|> source bottom_16)])
- split_int (function (_ high low)
- [(split_16 high)
- (split_16 low)])
-
- [[s48 s32] [s16 s00]] (split_int sH sL)
- [[p48 p32] [p16 p00]] (split_int pH pL)
- new_half (function (_ top bottom)
- (|> top bottom_16 move_top_16
- (_.bit_or (bottom_16 bottom))))]
- ($_ _.then
- (_.set! x00 (|> s00 (_.+ p00)))
- (_.set! x16 (|> x00 top_16 (_.+ s16) (_.+ p16)))
- (_.set! x32 (|> x16 top_16 (_.+ s32) (_.+ p32)))
- (_.set! x48 (|> x32 top_16 (_.+ s48) (_.+ p48)))
- (i64::new (new_half x48 x32)
- (new_half x16 x00)))))))
+ (all _.then
+ (_.set! sH (|> subject i64_high))
+ (_.set! sL (|> subject i64_low))
+ (_.set! pH (|> param i64_high))
+ (_.set! pL (|> param i64_low))
+ (let [bits16 (_.manual "0xFFFF")
+ move_top_16 (_.bit_shl (_.int +16))
+ top_16 (_.bit_ushr (_.int +16))
+ bottom_16 (_.bit_and bits16)
+ split_16 (function (_ source)
+ [(|> source top_16)
+ (|> source bottom_16)])
+ split_int (function (_ high low)
+ [(split_16 high)
+ (split_16 low)])
+
+ [[s48 s32] [s16 s00]] (split_int sH sL)
+ [[p48 p32] [p16 p00]] (split_int pH pL)
+ new_half (function (_ top bottom)
+ (|> top bottom_16 move_top_16
+ (_.bit_or (bottom_16 bottom))))]
+ (all _.then
+ (_.set! x00 (|> s00 (_.+ p00)))
+ (_.set! x16 (|> x00 top_16 (_.+ s16) (_.+ p16)))
+ (_.set! x32 (|> x16 top_16 (_.+ s32) (_.+ p32)))
+ (_.set! x48 (|> x32 top_16 (_.+ s48) (_.+ p48)))
+ (i64::new (new_half x48 x32)
+ (new_half x16 x00)))))))
(runtime: (i64::= reference sample)
(let [n/a? (function (_ value)
@@ -293,15 +293,15 @@
(runtime: (i64::< reference sample)
(with_vars [r_? s_?]
- ($_ _.then
- (_.set! s_? (|> sample ..i64_high (_.< (_.int +0))))
- (_.set! r_? (|> reference ..i64_high (_.< (_.int +0))))
- (|> (|> s_? (_.and (_.not r_?)))
- (_.or (|> (_.not s_?) (_.and r_?) _.not))
- (_.or (|> sample
- (i64::- reference)
- ..i64_high
- (_.< (_.int +0))))))))
+ (all _.then
+ (_.set! s_? (|> sample ..i64_high (_.< (_.int +0))))
+ (_.set! r_? (|> reference ..i64_high (_.< (_.int +0))))
+ (|> (|> s_? (_.and (_.not r_?)))
+ (_.or (|> (_.not s_?) (_.and r_?) _.not))
+ (_.or (|> sample
+ (i64::- reference)
+ ..i64_high
+ (_.< (_.int +0))))))))
(runtime: (i64::of_float input)
(_.cond (list [(_.apply (list input) (_.var "is.nan"))
@@ -318,65 +318,65 @@
(runtime: (i64::* param subject)
(with_vars [sH sL pH pL
x00 x16 x32 x48]
- ($_ _.then
- (_.set! sH (|> subject i64_high))
- (_.set! pH (|> param i64_high))
- (let [negative_subject? (|> sH (_.< (_.int +0)))
- negative_param? (|> pH (_.< (_.int +0)))]
- (_.cond (list [negative_subject?
- (_.if negative_param?
- (i64::* (i64::opposite param)
- (i64::opposite subject))
- (i64::opposite (i64::* param
- (i64::opposite subject))))]
-
- [negative_param?
- (i64::opposite (i64::* (i64::opposite param)
- subject))])
- ($_ _.then
- (_.set! sL (|> subject i64_low))
- (_.set! pL (|> param i64_low))
- (let [bits16 (_.manual "0xFFFF")
- move_top_16 (_.bit_shl (_.int +16))
- top_16 (_.bit_ushr (_.int +16))
- bottom_16 (_.bit_and bits16)
- split_16 (function (_ source)
- [(|> source top_16)
- (|> source bottom_16)])
- split_int (function (_ high low)
- [(split_16 high)
- (split_16 low)])
- new_half (function (_ top bottom)
- (|> top bottom_16 move_top_16
- (_.bit_or (bottom_16 bottom))))
- x16_top (|> x16 top_16)
- x32_top (|> x32 top_16)]
- (with_vars [s48 s32 s16 s00
- p48 p32 p16 p00]
- (let [[[_s48 _s32] [_s16 _s00]] (split_int sH sL)
- [[_p48 _p32] [_p16 _p00]] (split_int pH pL)
- set_subject_chunks! ($_ _.then (_.set! s48 _s48) (_.set! s32 _s32) (_.set! s16 _s16) (_.set! s00 _s00))
- set_param_chunks! ($_ _.then (_.set! p48 _p48) (_.set! p32 _p32) (_.set! p16 _p16) (_.set! p00 _p00))]
- ($_ _.then
- set_subject_chunks!
- set_param_chunks!
- (_.set! x00 (|> s00 (_.* p00)))
- (_.set! x16 (|> x00 top_16 (_.+ (|> s16 (_.* p00)))))
- (_.set! x32 x16_top)
- (_.set! x16 (|> x16 bottom_16 (_.+ (|> s00 (_.* p16)))))
- (_.set! x32 (|> x32 (_.+ x16_top) (_.+ (|> s32 (_.* p00)))))
- (_.set! x48 x32_top)
- (_.set! x32 (|> x32 bottom_16 (_.+ (|> s16 (_.* p16)))))
- (_.set! x48 (|> x48 (_.+ x32_top)))
- (_.set! x32 (|> x32 bottom_16 (_.+ (|> s00 (_.* p32)))))
- (_.set! x48 (|> x48 (_.+ x32_top)
- (_.+ (|> s48 (_.* p00)))
- (_.+ (|> s32 (_.* p16)))
- (_.+ (|> s16 (_.* p32)))
- (_.+ (|> s00 (_.* p48)))))
- (i64::new (new_half x48 x32)
- (new_half x16 x00)))))
- )))))))
+ (all _.then
+ (_.set! sH (|> subject i64_high))
+ (_.set! pH (|> param i64_high))
+ (let [negative_subject? (|> sH (_.< (_.int +0)))
+ negative_param? (|> pH (_.< (_.int +0)))]
+ (_.cond (list [negative_subject?
+ (_.if negative_param?
+ (i64::* (i64::opposite param)
+ (i64::opposite subject))
+ (i64::opposite (i64::* param
+ (i64::opposite subject))))]
+
+ [negative_param?
+ (i64::opposite (i64::* (i64::opposite param)
+ subject))])
+ (all _.then
+ (_.set! sL (|> subject i64_low))
+ (_.set! pL (|> param i64_low))
+ (let [bits16 (_.manual "0xFFFF")
+ move_top_16 (_.bit_shl (_.int +16))
+ top_16 (_.bit_ushr (_.int +16))
+ bottom_16 (_.bit_and bits16)
+ split_16 (function (_ source)
+ [(|> source top_16)
+ (|> source bottom_16)])
+ split_int (function (_ high low)
+ [(split_16 high)
+ (split_16 low)])
+ new_half (function (_ top bottom)
+ (|> top bottom_16 move_top_16
+ (_.bit_or (bottom_16 bottom))))
+ x16_top (|> x16 top_16)
+ x32_top (|> x32 top_16)]
+ (with_vars [s48 s32 s16 s00
+ p48 p32 p16 p00]
+ (let [[[_s48 _s32] [_s16 _s00]] (split_int sH sL)
+ [[_p48 _p32] [_p16 _p00]] (split_int pH pL)
+ set_subject_chunks! (all _.then (_.set! s48 _s48) (_.set! s32 _s32) (_.set! s16 _s16) (_.set! s00 _s00))
+ set_param_chunks! (all _.then (_.set! p48 _p48) (_.set! p32 _p32) (_.set! p16 _p16) (_.set! p00 _p00))]
+ (all _.then
+ set_subject_chunks!
+ set_param_chunks!
+ (_.set! x00 (|> s00 (_.* p00)))
+ (_.set! x16 (|> x00 top_16 (_.+ (|> s16 (_.* p00)))))
+ (_.set! x32 x16_top)
+ (_.set! x16 (|> x16 bottom_16 (_.+ (|> s00 (_.* p16)))))
+ (_.set! x32 (|> x32 (_.+ x16_top) (_.+ (|> s32 (_.* p00)))))
+ (_.set! x48 x32_top)
+ (_.set! x32 (|> x32 bottom_16 (_.+ (|> s16 (_.* p16)))))
+ (_.set! x48 (|> x48 (_.+ x32_top)))
+ (_.set! x32 (|> x32 bottom_16 (_.+ (|> s00 (_.* p32)))))
+ (_.set! x48 (|> x48 (_.+ x32_top)
+ (_.+ (|> s48 (_.* p00)))
+ (_.+ (|> s32 (_.* p16)))
+ (_.+ (|> s16 (_.* p32)))
+ (_.+ (|> s00 (_.* p48)))))
+ (i64::new (new_half x48 x32)
+ (new_half x16 x00)))))
+ )))))))
(def: (limit_shift! shift)
(-> SVar Expression)
@@ -388,20 +388,20 @@
input])
(runtime: (i64::left_shifted shift input)
- ($_ _.then
- (limit_shift! shift)
- (_.cond (list (no_shift_clause shift input)
- [(|> shift (_.< (_.int +32)))
- (let [mid (|> (i64_low input) (_.bit_ushr (|> (_.int +32) (_.- shift))))
- high (|> (i64_high input)
- (_.bit_shl shift)
- (_.bit_or mid))
- low (|> (i64_low input)
- (_.bit_shl shift))]
- (i64::new high low))])
- (let [high (|> (i64_high input)
- (_.bit_shl (|> shift (_.- (_.int +32)))))]
- (i64::new high (_.int +0))))))
+ (all _.then
+ (limit_shift! shift)
+ (_.cond (list (no_shift_clause shift input)
+ [(|> shift (_.< (_.int +32)))
+ (let [mid (|> (i64_low input) (_.bit_ushr (|> (_.int +32) (_.- shift))))
+ high (|> (i64_high input)
+ (_.bit_shl shift)
+ (_.bit_or mid))
+ low (|> (i64_low input)
+ (_.bit_shl shift))]
+ (i64::new high low))])
+ (let [high (|> (i64_high input)
+ (_.bit_shl (|> shift (_.- (_.int +32)))))]
+ (i64::new high (_.int +0))))))
(runtime: (i64::arithmetic_right_shifted_32 shift input)
(let [top_bit (|> input (_.bit_and (_.as::integer (_.int (hex "+80000000")))))]
@@ -410,24 +410,24 @@
(_.bit_or top_bit))))
(runtime: (i64::arithmetic_right_shifted shift input)
- ($_ _.then
- (limit_shift! shift)
- (_.cond (list (no_shift_clause shift input)
- [(|> shift (_.< (_.int +32)))
- (let [mid (|> (i64_high input) (_.bit_shl (|> (_.int +32) (_.- shift))))
- high (|> (i64_high input)
- (i64::arithmetic_right_shifted_32 shift))
- low (|> (i64_low input)
- (_.bit_ushr shift)
- (_.bit_or mid))]
- (i64::new high low))])
- (let [low (|> (i64_high input)
- (i64::arithmetic_right_shifted_32 (|> shift (_.- (_.int +32)))))
- high (_.if (_.< (_.int +0)
- (i64_high input))
- (_.int -1)
- (_.int +0))]
- (i64::new high low)))))
+ (all _.then
+ (limit_shift! shift)
+ (_.cond (list (no_shift_clause shift input)
+ [(|> shift (_.< (_.int +32)))
+ (let [mid (|> (i64_high input) (_.bit_shl (|> (_.int +32) (_.- shift))))
+ high (|> (i64_high input)
+ (i64::arithmetic_right_shifted_32 shift))
+ low (|> (i64_low input)
+ (_.bit_ushr shift)
+ (_.bit_or mid))]
+ (i64::new high low))])
+ (let [low (|> (i64_high input)
+ (i64::arithmetic_right_shifted_32 (|> shift (_.- (_.int +32)))))
+ high (_.if (_.< (_.int +0)
+ (i64_high input))
+ (_.int -1)
+ (_.int +0))]
+ (i64::new high low)))))
(runtime: (i64::/ param subject)
(let [negative? (|>> (i64::< i64::zero))
@@ -445,21 +445,21 @@
[(|> param (i64::= i64::min))
i64::one])
(with_vars [approximation]
- ($_ _.then
- (_.set! approximation
- (|> subject
- (i64::arithmetic_right_shifted (_.int +1))
- (i64::/ param)
- (i64::left_shifted (_.int +1))))
- (_.if (|> approximation (i64::= i64::zero))
- (_.if (negative? param)
- i64::one
- i64::-one)
- (let [remainder (i64::- (i64::* param approximation)
- subject)]
- (|> remainder
- (i64::/ param)
- (i64::+ approximation)))))))]
+ (all _.then
+ (_.set! approximation
+ (|> subject
+ (i64::arithmetic_right_shifted (_.int +1))
+ (i64::/ param)
+ (i64::left_shifted (_.int +1))))
+ (_.if (|> approximation (i64::= i64::zero))
+ (_.if (negative? param)
+ i64::one
+ i64::-one)
+ (let [remainder (i64::- (i64::* param approximation)
+ subject)]
+ (|> remainder
+ (i64::/ param)
+ (i64::+ approximation)))))))]
[(|> param (i64::= i64::min))
i64::zero]
@@ -477,41 +477,41 @@
(i64::/ subject)
i64::opposite)])
(with_vars [result remainder approximate approximate_result log2 approximate_remainder]
- ($_ _.then
- (_.set! result i64::zero)
- (_.set! remainder subject)
- (_.while (|> (|> remainder (i64::< param))
- (_.or (|> remainder (i64::= param))))
- (let [calc_rough_estimate (_.apply (list (|> (i64::float remainder) (_./ (i64::float param))))
- (_.var "floor"))
- calc_approximate_result (i64::of_float approximate)
- calc_approximate_remainder (|> approximate_result (i64::* param))
- delta (_.if (_.> log2 (_.float +48.0))
- (_.** (|> log2 (_.- (_.float +48.0)))
- (_.float +2.0))
- (_.float +1.0))]
- ($_ _.then
- (_.set! approximate (_.apply (list (_.float +1.0) calc_rough_estimate)
- (_.var "max")))
- (_.set! log2 (let [log (function (_ input)
- (_.apply (list input) (_.var "log")))]
- (_.apply (list (|> (log (_.int +2))
- (_./ (log approximate))))
- (_.var "ceil"))))
- (_.set! approximate_result calc_approximate_result)
- (_.set! approximate_remainder calc_approximate_remainder)
- (_.while (|> (negative? approximate_remainder)
- (_.or (|> approximate_remainder (i64::< remainder))))
- ($_ _.then
- (_.set! approximate (|> delta (_.- approximate)))
- (_.set! approximate_result calc_approximate_result)
- (_.set! approximate_remainder calc_approximate_remainder)))
- (_.set! result (|> (_.if (|> approximate_result (i64::= i64::zero))
- i64::one
- approximate_result)
- (i64::+ result)))
- (_.set! remainder (|> remainder (i64::- approximate_remainder))))))
- result))
+ (all _.then
+ (_.set! result i64::zero)
+ (_.set! remainder subject)
+ (_.while (|> (|> remainder (i64::< param))
+ (_.or (|> remainder (i64::= param))))
+ (let [calc_rough_estimate (_.apply (list (|> (i64::float remainder) (_./ (i64::float param))))
+ (_.var "floor"))
+ calc_approximate_result (i64::of_float approximate)
+ calc_approximate_remainder (|> approximate_result (i64::* param))
+ delta (_.if (_.> log2 (_.float +48.0))
+ (_.** (|> log2 (_.- (_.float +48.0)))
+ (_.float +2.0))
+ (_.float +1.0))]
+ (all _.then
+ (_.set! approximate (_.apply (list (_.float +1.0) calc_rough_estimate)
+ (_.var "max")))
+ (_.set! log2 (let [log (function (_ input)
+ (_.apply (list input) (_.var "log")))]
+ (_.apply (list (|> (log (_.int +2))
+ (_./ (log approximate))))
+ (_.var "ceil"))))
+ (_.set! approximate_result calc_approximate_result)
+ (_.set! approximate_remainder calc_approximate_remainder)
+ (_.while (|> (negative? approximate_remainder)
+ (_.or (|> approximate_remainder (i64::< remainder))))
+ (all _.then
+ (_.set! approximate (|> delta (_.- approximate)))
+ (_.set! approximate_result calc_approximate_result)
+ (_.set! approximate_remainder calc_approximate_remainder)))
+ (_.set! result (|> (_.if (|> approximate_result (i64::= i64::zero))
+ i64::one
+ approximate_result)
+ (i64::+ result)))
+ (_.set! remainder (|> remainder (i64::- approximate_remainder))))))
+ result))
)))
(runtime: (i64::% param subject)
@@ -520,9 +520,9 @@
(runtime: (lux::try op)
(with_vars [error value]
- (_.try ($_ _.then
- (_.set! value (_.apply (list ..unit) op))
- (..right value))
+ (_.try (all _.then
+ (_.set! value (_.apply (list ..unit) op))
+ (..right value))
{.#None}
{.#Some (_.function (list error)
(..left (_.item (_.string "message")
@@ -531,18 +531,18 @@
(runtime: (lux::program_args program_args)
(with_vars [inputs value]
- ($_ _.then
- (_.set! inputs ..none)
- (<| (_.for_in value program_args)
- (_.set! inputs (..some (_.list (list value inputs)))))
- inputs)))
+ (all _.then
+ (_.set! inputs ..none)
+ (<| (_.for_in value program_args)
+ (_.set! inputs (..some (_.list (list value inputs)))))
+ inputs)))
(def: runtime::lux
Expression
- ($_ _.then
- @lux::try
- @lux::program_args
- ))
+ (all _.then
+ @lux::try
+ @lux::program_args
+ ))
(def: current_time_float
Expression
@@ -556,9 +556,9 @@
(def: runtime::io
Expression
- ($_ _.then
- @io::current_time!
- ))
+ (all _.then
+ @io::current_time!
+ ))
(def: minimum_index_length
(-> SVar Expression)
@@ -578,28 +578,28 @@
(runtime: (tuple::left index product)
(let [$index_min_length (_.var "index_min_length")]
- ($_ _.then
- (_.set! $index_min_length (minimum_index_length index))
- (_.if (|> (_.length product) (_.> $index_min_length))
- ... No need for recursion
- (product_element product index)
- ... Needs recursion
- (tuple::left (updated_index $index_min_length product)
- (product_tail product))))))
+ (all _.then
+ (_.set! $index_min_length (minimum_index_length index))
+ (_.if (|> (_.length product) (_.> $index_min_length))
+ ... No need for recursion
+ (product_element product index)
+ ... Needs recursion
+ (tuple::left (updated_index $index_min_length product)
+ (product_tail product))))))
(runtime: (tuple::right index product)
(let [$index_min_length (_.var "index_min_length")]
- ($_ _.then
- (_.set! $index_min_length (minimum_index_length index))
- (_.cond (list [... Last element.
- (|> (_.length product) (_.= $index_min_length))
- (product_element product index)]
- [... Needs recursion
- (|> (_.length product) (_.< $index_min_length))
- (tuple::right (updated_index $index_min_length product)
- (product_tail product))])
- ... Must slice
- (|> product (_.slice_from index))))))
+ (all _.then
+ (_.set! $index_min_length (minimum_index_length index))
+ (_.cond (list [... Last element.
+ (|> (_.length product) (_.= $index_min_length))
+ (product_element product index)]
+ [... Needs recursion
+ (|> (_.length product) (_.< $index_min_length))
+ (tuple::right (updated_index $index_min_length product)
+ (product_tail product))])
+ ... Must slice
+ (|> product (_.slice_from index))))))
(runtime: (sum::get sum wants_last? wanted_tag)
(let [no_match _.null
@@ -629,12 +629,12 @@
(def: runtime::adt
Expression
- ($_ _.then
- @tuple::left
- @tuple::right
- @sum::get
- @adt::variant
- ))
+ (all _.then
+ @tuple::left
+ @tuple::right
+ @sum::get
+ @adt::variant
+ ))
(template [<name> <op>]
[(runtime: (<name> mask input)
@@ -649,75 +649,75 @@
)
(runtime: (i64::right_shifted shift input)
- ($_ _.then
- (limit_shift! shift)
- (_.cond (list (no_shift_clause shift input)
- [(|> shift (_.< (_.int +32)))
- (with_vars [$mid]
- (let [mid (|> (i64_high input) (_.bit_shl (|> (_.int +32) (_.- shift))))
- high (|> (i64_high input) (_.bit_ushr shift))
- low (|> (i64_low input)
- (_.bit_ushr shift)
- (_.bit_or (_.if (_.apply (list $mid) (_.var "is.na"))
- (_.as::integer (_.int +0))
- $mid)))]
- ($_ _.then
- (_.set! $mid mid)
- (i64::new high low))))]
- [(|> shift (_.= (_.int +32)))
- (let [high (i64_high input)]
- (i64::new (_.int +0) high))])
- (let [low (|> (i64_high input) (_.bit_ushr (|> shift (_.- (_.int +32)))))]
- (i64::new (_.int +0) low)))))
+ (all _.then
+ (limit_shift! shift)
+ (_.cond (list (no_shift_clause shift input)
+ [(|> shift (_.< (_.int +32)))
+ (with_vars [$mid]
+ (let [mid (|> (i64_high input) (_.bit_shl (|> (_.int +32) (_.- shift))))
+ high (|> (i64_high input) (_.bit_ushr shift))
+ low (|> (i64_low input)
+ (_.bit_ushr shift)
+ (_.bit_or (_.if (_.apply (list $mid) (_.var "is.na"))
+ (_.as::integer (_.int +0))
+ $mid)))]
+ (all _.then
+ (_.set! $mid mid)
+ (i64::new high low))))]
+ [(|> shift (_.= (_.int +32)))
+ (let [high (i64_high input)]
+ (i64::new (_.int +0) high))])
+ (let [low (|> (i64_high input) (_.bit_ushr (|> shift (_.- (_.int +32)))))]
+ (i64::new (_.int +0) low)))))
(def: runtime::i64
Expression
- ($_ _.then
- @f2^32
- @f2^63
-
- @i64::new
- @i64::of_float
-
- @i64::and
- @i64::or
- @i64::xor
- @i64::not
- @i64::left_shifted
- @i64::arithmetic_right_shifted_32
- @i64::arithmetic_right_shifted
- @i64::right_shifted
-
- @i64::zero
- @i64::one
- @i64::min
- @i64::max
- @i64::=
- @i64::<
- @i64::+
- @i64::-
- @i64::opposite
- @i64::-one
- @i64::unsigned_low
- @i64::float
- @i64::*
- @i64::/
- @i64::%
- ))
+ (all _.then
+ @f2^32
+ @f2^63
+
+ @i64::new
+ @i64::of_float
+
+ @i64::and
+ @i64::or
+ @i64::xor
+ @i64::not
+ @i64::left_shifted
+ @i64::arithmetic_right_shifted_32
+ @i64::arithmetic_right_shifted
+ @i64::right_shifted
+
+ @i64::zero
+ @i64::one
+ @i64::min
+ @i64::max
+ @i64::=
+ @i64::<
+ @i64::+
+ @i64::-
+ @i64::opposite
+ @i64::-one
+ @i64::unsigned_low
+ @i64::float
+ @i64::*
+ @i64::/
+ @i64::%
+ ))
(runtime: (frac::decode input)
(with_vars [output]
- ($_ _.then
- (_.set! output (_.apply (list input) (_.var "as.numeric")))
- (_.if (|> output (_.= _.n/a))
- ..none
- (..some output)))))
+ (all _.then
+ (_.set! output (_.apply (list input) (_.var "as.numeric")))
+ (_.if (|> output (_.= _.n/a))
+ ..none
+ (..some output)))))
(def: runtime::frac
Expression
- ($_ _.then
- @frac::decode
- ))
+ (all _.then
+ @frac::decode
+ ))
(def: ++
(-> Expression Expression)
@@ -734,32 +734,32 @@
(runtime: (text::index subject param start)
(with_vars [idx startF subjectL]
- ($_ _.then
- (_.set! startF (i64::float start))
- (_.set! subjectL (text_length subject))
- (_.if (_.< subjectL startF)
- ($_ _.then
- (_.set! idx (|> (_.apply_kw (list param (_.if (|> startF (_.= (_.int +0)))
- subject
- (text_clip (++ startF)
- (++ subjectL)
- subject)))
- (list ["fixed" (_.bool #1)])
- (_.var "regexpr"))
- (_.item (_.int +1))))
- (_.if (|> idx (_.= (_.int -1)))
- ..none
- (..some (i64::of_float (|> idx (_.+ startF))))))
- ..none))))
+ (all _.then
+ (_.set! startF (i64::float start))
+ (_.set! subjectL (text_length subject))
+ (_.if (_.< subjectL startF)
+ (all _.then
+ (_.set! idx (|> (_.apply_kw (list param (_.if (|> startF (_.= (_.int +0)))
+ subject
+ (text_clip (++ startF)
+ (++ subjectL)
+ subject)))
+ (list ["fixed" (_.bool #1)])
+ (_.var "regexpr"))
+ (_.item (_.int +1))))
+ (_.if (|> idx (_.= (_.int -1)))
+ ..none
+ (..some (i64::of_float (|> idx (_.+ startF))))))
+ ..none))))
(runtime: (text::clip text minimum additional)
(with_vars [length]
- ($_ _.then
- (_.set! length (_.length text))
- (_.set! to (_.+ additional minimum))
- (_.if (_.< length to)
- (..some (text_clip (++ minimum) (++ to) text))
- ..none))))
+ (all _.then
+ (_.set! length (_.length text))
+ (_.set! to (_.+ additional minimum))
+ (_.if (_.< length to)
+ (..some (text_clip (++ minimum) (++ to) text))
+ ..none))))
(def: (char_at idx text)
(-> Expression Expression Expression)
@@ -768,18 +768,18 @@
(runtime: (text::char text idx)
(_.if (_.< (_.length text) idx)
- ($_ _.then
- (_.set! idx (++ idx))
- (..some (i64::of_float (char_at idx text))))
+ (all _.then
+ (_.set! idx (++ idx))
+ (..some (i64::of_float (char_at idx text))))
..none))
(def: runtime::text
Expression
- ($_ _.then
- @text::index
- @text::clip
- @text::char
- ))
+ (all _.then
+ @text::index
+ @text::clip
+ @text::char
+ ))
(def: (check_index_out_of_bounds array idx body)
(-> Expression Expression Expression Expression)
@@ -789,47 +789,47 @@
(runtime: (array::new size)
(with_vars [output]
- ($_ _.then
- (_.set! output (_.list (list)))
- (_.set_item! (|> size (_.+ (_.int +1)))
- _.null
- output)
- output)))
+ (all _.then
+ (_.set! output (_.list (list)))
+ (_.set_item! (|> size (_.+ (_.int +1)))
+ _.null
+ output)
+ output)))
(runtime: (array::get array idx)
(with_vars [temp]
(<| (check_index_out_of_bounds array idx)
- ($_ _.then
- (_.set! temp (|> array (_.item (_.+ (_.int +1) idx))))
- (_.if (|> temp (_.= _.null))
- ..none
- (..some temp))))))
+ (all _.then
+ (_.set! temp (|> array (_.item (_.+ (_.int +1) idx))))
+ (_.if (|> temp (_.= _.null))
+ ..none
+ (..some temp))))))
(runtime: (array::put array idx value)
(<| (check_index_out_of_bounds array idx)
- ($_ _.then
- (_.set_item! (_.+ (_.int +1) idx) value array)
- array)))
+ (all _.then
+ (_.set_item! (_.+ (_.int +1) idx) value array)
+ array)))
(def: runtime::array
Expression
- ($_ _.then
- @array::new
- @array::get
- @array::put
- ))
+ (all _.then
+ @array::new
+ @array::get
+ @array::put
+ ))
(def: runtime
Expression
- ($_ _.then
- runtime::lux
- runtime::i64
- runtime::adt
- runtime::frac
- runtime::text
- runtime::array
- runtime::io
- ))
+ (all _.then
+ runtime::lux
+ runtime::i64
+ runtime::adt
+ runtime::frac
+ runtime::text
+ runtime::array
+ runtime::io
+ ))
(def: .public generate
(Operation [Registry Output])
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/case.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/case.lux
index 284fa79c6..677f622b1 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/case.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/case.lux
@@ -65,10 +65,10 @@
(do ///////phase.monad
[this (expression archive this)
that (statement expression archive that)]
- (in ($_ _.then
- (_.statement this)
- that
- ))))
+ (in (all _.then
+ (_.statement this)
+ that
+ ))))
(def: .public (let expression archive [valueS register bodyS])
(Generator [Synthesis Register Synthesis])
@@ -86,9 +86,9 @@
(do ///////phase.monad
[valueO (expression archive valueS)
bodyO (statement expression archive bodyS)]
- (in ($_ _.then
- (_.set (list (..register register)) valueO)
- bodyO))))
+ (in (all _.then
+ (_.set (list (..register register)) valueO)
+ bodyO))))
(def: .public (if expression archive [testS thenS elseS])
(Generator [Synthesis Synthesis Synthesis])
@@ -162,15 +162,15 @@
(template [<name> <flag>]
[(def: (<name> simple? idx)
(-> Bit Nat Statement)
- ($_ _.then
- (_.set (list @temp) (//runtime.sum//get ..peek <flag>
- (|> idx .int _.int)))
- (.if simple?
- (_.when (_.= _.nil @temp)
- fail!)
- (_.if (_.= _.nil @temp)
- fail!
- (..push! @temp)))))]
+ (all _.then
+ (_.set (list @temp) (//runtime.sum//get ..peek <flag>
+ (|> idx .int _.int)))
+ (.if simple?
+ (_.when (_.= _.nil @temp)
+ fail!)
+ (_.if (_.= _.nil @temp)
+ fail!
+ (..push! @temp)))))]
[left_choice _.nil]
[right_choice //runtime.unit]
@@ -179,32 +179,32 @@
(def: (with_looping in_closure? g!once g!continue? body!)
(-> Bit LVar LVar Statement Statement)
(.if in_closure?
- ($_ _.then
- (_.while (_.bool true)
- body!))
- ($_ _.then
- (_.set (list g!once) (_.bool true))
- (_.set (list g!continue?) (_.bool false))
- (<| (_.while (_.bool true))
- (_.if g!once
- ($_ _.then
- (_.set (list g!once) (_.bool false))
- body!)
- ($_ _.then
- (_.set (list g!continue?) (_.bool true))
- _.break)))
- (_.when g!continue?
- _.next))))
+ (all _.then
+ (_.while (_.bool true)
+ body!))
+ (all _.then
+ (_.set (list g!once) (_.bool true))
+ (_.set (list g!continue?) (_.bool false))
+ (<| (_.while (_.bool true))
+ (_.if g!once
+ (all _.then
+ (_.set (list g!once) (_.bool false))
+ body!)
+ (all _.then
+ (_.set (list g!continue?) (_.bool true))
+ _.break)))
+ (_.when g!continue?
+ _.next))))
(def: (alternation in_closure? g!once g!continue? pre! post!)
(-> Bit LVar LVar Statement Statement Statement)
- ($_ _.then
- (with_looping in_closure? g!once g!continue?
- ($_ _.then
- ..save!
- pre!))
- ..restore!
- post!))
+ (all _.then
+ (with_looping in_closure? g!once g!continue?
+ (all _.then
+ ..save!
+ pre!))
+ ..restore!
+ post!))
(def: (primitive_pattern_matching again pathP)
(-> (-> Path (Operation Statement))
@@ -324,25 +324,25 @@
(pattern (/////synthesis.!bind_top register thenP))
(do ///////phase.monad
[then! (again thenP)]
- (///////phase#in ($_ _.then
- (_.set (list (..register register)) ..peek_and_pop)
- then!)))
+ (///////phase#in (all _.then
+ (_.set (list (..register register)) ..peek_and_pop)
+ then!)))
(pattern (/////synthesis.!multi_pop nextP))
(.let [[extra_pops nextP'] (case.count_pops nextP)]
(do ///////phase.monad
[next! (again nextP')]
- (///////phase#in ($_ _.then
- (..multi_pop! (n.+ 2 extra_pops))
- next!))))
+ (///////phase#in (all _.then
+ (..multi_pop! (n.+ 2 extra_pops))
+ next!))))
(pattern (/////synthesis.path/seq preP postP))
(do ///////phase.monad
[pre! (again preP)
post! (again postP)]
- (in ($_ _.then
- pre!
- post!)))
+ (in (all _.then
+ pre!
+ post!)))
(pattern (/////synthesis.path/alt preP postP))
(do ///////phase.monad
@@ -358,21 +358,21 @@
[pattern_matching! (pattern_matching' in_closure? statement expression archive pathP)
g!once (..symbol "once")
g!continue? (..symbol "continue")]
- (in ($_ _.then
- (..with_looping in_closure? g!once g!continue?
- pattern_matching!)
- (_.statement (_.raise (_.string case.pattern_matching_error)))))))
+ (in (all _.then
+ (..with_looping in_closure? g!once g!continue?
+ pattern_matching!)
+ (_.statement (_.raise (_.string case.pattern_matching_error)))))))
(def: .public (case! in_closure? statement expression archive [valueS pathP])
(-> Bit (Generator! [Synthesis Path]))
(do ///////phase.monad
[stack_init (expression archive valueS)
pattern_matching! (pattern_matching in_closure? statement expression archive pathP)]
- (in ($_ _.then
- (_.set (list @cursor) (_.array (list stack_init)))
- (_.set (list @savepoint) (_.array (list)))
- pattern_matching!
- ))))
+ (in (all _.then
+ (_.set (list @cursor) (_.array (list stack_init)))
+ (_.set (list @savepoint) (_.array (list)))
+ pattern_matching!
+ ))))
(def: .public (case statement expression archive case)
(-> Phase! (Generator [Synthesis Path]))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/function.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/function.lux
index f6b20a5d6..45e8363c3 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/function.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/function.lux
@@ -56,9 +56,9 @@
[(|> (list.enumeration inits)
(list#each (|>> product.left ..capture)))
(let [@self (_.local self)]
- ($_ _.then
- (_.set (list @self) function_definition)
- (_.return @self)))]))
+ (all _.then
+ (_.set (list @self) function_definition)
+ (_.return @self)))]))
(_.apply_lambda/* inits @self)])))
(def: input
@@ -86,37 +86,37 @@
(_.local function_name)))
initialize_self! (_.set (list (//case.register 0)) @self)
initialize! (list#mix (.function (_ post pre!)
- ($_ _.then
- pre!
- (_.set (list (..input post)) (_.item (|> post .int _.int) @curried))))
+ (all _.then
+ pre!
+ (_.set (list (..input post)) (_.item (|> post .int _.int) @curried))))
initialize_self!
(list.indices arity))
[declaration instatiation] (with_closure closureO+ function_name
(_.lambda {.#None}
[(list (_.variadic @curried))
- ($_ _.then
- (_.set (list @num_args) (_.the "length" @curried))
- (<| (_.if (|> @num_args (_.= arityO))
- (<| (_.then initialize!)
- //loop.with_scope
- body!))
- (_.if (|> @num_args (_.> arityO))
- (let [slice (.function (_ from to)
- (_.array_range from to @curried))
- arity_args (_.splat (slice (_.int +0) limitO))
- output_func_args (_.splat (slice arityO @num_args))]
- (_.return (|> @self
- (_.apply_lambda/* (list arity_args))
- (_.apply_lambda/* (list output_func_args))))))
- ... (|> @num_args (_.< arityO))
- (let [@missing (_.local "missing")]
- (_.return (_.lambda {.#None}
- [(list (_.variadic @missing))
- (_.return (|> @self
- (_.apply_lambda/* (list (_.splat (|> (_.array (list))
- (_.do "concat" (list @curried) {.#None})
- (_.do "concat" (list @missing) {.#None})))))))]))))
- )]))]
+ (all _.then
+ (_.set (list @num_args) (_.the "length" @curried))
+ (<| (_.if (|> @num_args (_.= arityO))
+ (<| (_.then initialize!)
+ //loop.with_scope
+ body!))
+ (_.if (|> @num_args (_.> arityO))
+ (let [slice (.function (_ from to)
+ (_.array_range from to @curried))
+ arity_args (_.splat (slice (_.int +0) limitO))
+ output_func_args (_.splat (slice arityO @num_args))]
+ (_.return (|> @self
+ (_.apply_lambda/* (list arity_args))
+ (_.apply_lambda/* (list output_func_args))))))
+ ... (|> @num_args (_.< arityO))
+ (let [@missing (_.local "missing")]
+ (_.return (_.lambda {.#None}
+ [(list (_.variadic @missing))
+ (_.return (|> @self
+ (_.apply_lambda/* (list (_.splat (|> (_.array (list))
+ (_.do "concat" (list @curried) {.#None})
+ (_.do "concat" (list @missing) {.#None})))))))]))))
+ )]))]
_ (/////generation.execute! declaration)
_ (/////generation.save! function_artifact {.#None} declaration)]
(in instatiation)))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/loop.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/loop.lux
index b69ce6b57..08ebeaf0e 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/loop.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/loop.lux
@@ -1,44 +1,44 @@
(.using
- [library
- [lux {"-" Scope symbol}
- [abstract
- ["[0]" monad {"+" do}]]
- [data
- ["[0]" product]
- ["[0]" text
- ["%" format {"+" format}]]
- [collection
- ["[0]" list ("[1]#[0]" functor mix)]
- ["[0]" set]]]
- [math
- [number
- ["n" nat]]]
- [target
- ["_" ruby {"+" Expression LVar Statement}]]]]
- ["[0]" // "_"
- [runtime {"+" Operation Phase Generator Phase! Generator!}]
- ["[1][0]" case]
+ [library
+ [lux {"-" Scope symbol}
+ [abstract
+ ["[0]" monad {"+" do}]]
+ [data
+ ["[0]" product]
+ ["[0]" text
+ ["%" format {"+" format}]]
+ [collection
+ ["[0]" list ("[1]#[0]" functor mix)]
+ ["[0]" set]]]
+ [math
+ [number
+ ["n" nat]]]
+ [target
+ ["_" ruby {"+" Expression LVar Statement}]]]]
+ ["[0]" // "_"
+ [runtime {"+" Operation Phase Generator Phase! Generator!}]
+ ["[1][0]" case]
+ ["/[1]" // "_"
+ ["[1][0]" reference]
["/[1]" // "_"
- ["[1][0]" reference]
+ [synthesis
+ ["[0]" case]]
["/[1]" // "_"
- [synthesis
- ["[0]" case]]
- ["/[1]" // "_"
- ["[0]" synthesis {"+" Scope Synthesis}]
- ["[1][0]" generation]
- ["//[1]" /// "_"
- ["[1][0]" phase]
- [reference
- ["[1][0]" variable {"+" Register}]]]]]]])
+ ["[0]" synthesis {"+" Scope Synthesis}]
+ ["[1][0]" generation]
+ ["//[1]" /// "_"
+ ["[1][0]" phase]
+ [reference
+ ["[1][0]" variable {"+" Register}]]]]]]])
(def: (setup offset bindings body)
(-> Register (List Expression) Statement Statement)
(let [variables (|> bindings
list.enumeration
(list#each (|>> product.left (n.+ offset) //case.register)))]
- ($_ _.then
- (_.set variables (_.multi bindings))
- body)))
+ (all _.then
+ (_.set variables (_.multi bindings))
+ body)))
(def: symbol
(_.symbol "lux_continue"))
@@ -89,7 +89,7 @@
list.enumeration
(list#each (function (_ [idx _])
(_.item (_.int (.int idx)) @temp))))]]
- (in ($_ _.then
- (_.set (list @temp) (_.array argsO+))
- (..setup offset re_binds
- _.next)))))
+ (in (all _.then
+ (_.set (list @temp) (_.array argsO+))
+ (..setup offset re_binds
+ _.next)))))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/runtime.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/runtime.lux
index ed673e53a..576f8f24c 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/runtime.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/runtime.lux
@@ -157,33 +157,33 @@
(def: last_index
(|>> ..tuple_size (_.- (_.int +1))))
-(with_expansions [<recur> (these ($_ _.then
- (_.set (list lefts) (_.- last_index_right lefts))
- (_.set (list tuple) (_.item last_index_right tuple))))]
+(with_expansions [<recur> (these (all _.then
+ (_.set (list lefts) (_.- last_index_right lefts))
+ (_.set (list tuple) (_.item last_index_right tuple))))]
(runtime: (tuple//left lefts tuple)
(with_vars [last_index_right]
(<| (_.while (_.bool true))
- ($_ _.then
- (_.set (list last_index_right) (..last_index tuple))
- (_.if (_.> lefts last_index_right)
- ... No need for recursion
- (_.return (_.item lefts tuple))
- ... Needs recursion
- <recur>)))))
+ (all _.then
+ (_.set (list last_index_right) (..last_index tuple))
+ (_.if (_.> lefts last_index_right)
+ ... No need for recursion
+ (_.return (_.item lefts tuple))
+ ... Needs recursion
+ <recur>)))))
(runtime: (tuple//right lefts tuple)
(with_vars [last_index_right right_index]
(<| (_.while (_.bool true))
- ($_ _.then
- (_.set (list last_index_right) (..last_index tuple))
- (_.set (list right_index) (_.+ (_.int +1) lefts))
- (<| (_.if (_.= last_index_right right_index)
- (_.return (_.item right_index tuple)))
- (_.if (_.> last_index_right right_index)
- ... Needs recursion.
- <recur>)
- (_.return (_.array_range right_index (..tuple_size tuple) tuple)))
- )))))
+ (all _.then
+ (_.set (list last_index_right) (..last_index tuple))
+ (_.set (list right_index) (_.+ (_.int +1) lefts))
+ (<| (_.if (_.= last_index_right right_index)
+ (_.return (_.item right_index tuple)))
+ (_.if (_.> last_index_right right_index)
+ ... Needs recursion.
+ <recur>)
+ (_.return (_.array_range right_index (..tuple_size tuple) tuple)))
+ )))))
(def: .public variant_tag_field "_lux_tag")
(def: .public variant_flag_field "_lux_flag")
@@ -219,11 +219,11 @@
actual##lefts (_.item (_.string ..variant_tag_field) sum)
actual##right? (_.item (_.string ..variant_flag_field) sum)
actual##value (_.item (_.string ..variant_value_field) sum)
- recur! ($_ _.then
- (_.set (list expected##lefts) (|> expected##lefts
- (_.- actual##lefts)
- (_.- (_.int +1))))
- (_.set (list sum) actual##value))]
+ recur! (all _.then
+ (_.set (list expected##lefts) (|> expected##lefts
+ (_.- actual##lefts)
+ (_.- (_.int +1))))
+ (_.set (list sum) actual##value))]
(<| (_.while (_.bool true))
(_.if (_.= expected##lefts actual##lefts)
(_.if (_.= expected##right? actual##right?)
@@ -243,35 +243,35 @@
(def: runtime//adt
Statement
- ($_ _.then
- @tuple//left
- @tuple//right
- @sum//make
- @sum//get
- ))
+ (all _.then
+ @tuple//left
+ @tuple//right
+ @sum//make
+ @sum//get
+ ))
(runtime: (lux//try risky)
(with_vars [error value]
- (_.begin ($_ _.then
- (_.set (list value) (_.apply_lambda/* (list ..unit) risky))
- (_.return (..right value)))
+ (_.begin (all _.then
+ (_.set (list value) (_.apply_lambda/* (list ..unit) risky))
+ (_.return (..right value)))
(list [(list) error
(_.return (..left (_.the "message" error)))]))))
(runtime: (lux//program_args raw)
(with_vars [tail head]
- ($_ _.then
- (_.set (list tail) ..none)
- (<| (_.for_in head raw)
- (_.set (list tail) (..some (_.array (list head tail)))))
- (_.return tail))))
+ (all _.then
+ (_.set (list tail) ..none)
+ (<| (_.for_in head raw)
+ (_.set (list tail) (..some (_.array (list head tail)))))
+ (_.return tail))))
(def: runtime//lux
Statement
- ($_ _.then
- @lux//try
- @lux//program_args
- ))
+ (all _.then
+ @lux//try
+ @lux//program_args
+ ))
(def: i64##+limit (_.manual "+0x7FFFFFFFFFFFFFFF"))
(def: i64##-limit (_.manual "-0x8000000000000000"))
@@ -286,11 +286,11 @@
(with_vars [temp]
(`` (<| (~~ (template [<scenario> <iteration> <cap> <entrance>]
[(_.if (|> input <scenario>)
- ($_ _.then
- (_.set (list temp) (_.% <iteration> input))
- (_.return (_.? (|> temp <scenario>)
- (|> temp (_.- <cap>) (_.+ <entrance>))
- temp))))]
+ (all _.then
+ (_.set (list temp) (_.% <iteration> input))
+ (_.return (_.? (|> temp <scenario>)
+ (|> temp (_.- <cap>) (_.+ <entrance>))
+ temp))))]
[(_.> ..i64##+limit) ..i64##+iteration ..i64##+cap ..i64##-limit]
[(_.< ..i64##-limit) ..i64##-iteration ..i64##-cap ..i64##+limit]
@@ -327,10 +327,10 @@
[(runtime: (<runtime> left right)
[..normal_ruby? (_.return (..i64##i64 (<host> (..as_nat left) (..as_nat right))))]
(with_vars [high low]
- ($_ _.then
- (_.set (list high) (<host> (i32##high left) (..i32##high right)))
- (_.set (list low) (<host> (i32##low left) (..i32##low right)))
- (_.return (..i64 high low)))))]
+ (all _.then
+ (_.set (list high) (<host> (i32##high left) (..i32##high right)))
+ (_.set (list low) (<host> (i32##low left) (..i32##low right)))
+ (_.return (..i64 high low)))))]
[i64##and _.bit_and]
[i64##or _.bit_or]
@@ -355,43 +355,43 @@
(_.bit_shl (_.% (_.int +64) shift))
..i64##i64))]
(with_vars [high low]
- ($_ _.then
- (..cap_shift! shift)
- (<| (..handle_no_shift! shift input)
- (_.if (..small_shift? shift)
- ($_ _.then
- (_.set (list high) (_.bit_or (|> input i32##high (_.bit_shl shift))
- (|> input i32##low (_.bit_shr (_.- shift (_.int +32))))))
- (_.set (list low) (|> input i32##low (_.bit_shl shift)))
+ (all _.then
+ (..cap_shift! shift)
+ (<| (..handle_no_shift! shift input)
+ (_.if (..small_shift? shift)
+ (all _.then
+ (_.set (list high) (_.bit_or (|> input i32##high (_.bit_shl shift))
+ (|> input i32##low (_.bit_shr (_.- shift (_.int +32))))))
+ (_.set (list low) (|> input i32##low (_.bit_shl shift)))
+ (_.return (..i64 (i32##low high)
+ (i32##low low)))))
+ (all _.then
+ (_.set (list high) (|> input i32##low (_.bit_shl (_.- (_.int +32) shift))))
(_.return (..i64 (i32##low high)
- (i32##low low)))))
- ($_ _.then
- (_.set (list high) (|> input i32##low (_.bit_shl (_.- (_.int +32) shift))))
- (_.return (..i64 (i32##low high)
- (_.int +0)))))
- )))
+ (_.int +0)))))
+ )))
(runtime: (i64##right_shifted shift input)
- [..normal_ruby? ($_ _.then
- (_.set (list shift) (_.% (_.int +64) shift))
- (_.return (_.? (_.= (_.int +0) shift)
- input
- (|> input
- ..as_nat
- (_.bit_shr shift)))))]
+ [..normal_ruby? (all _.then
+ (_.set (list shift) (_.% (_.int +64) shift))
+ (_.return (_.? (_.= (_.int +0) shift)
+ input
+ (|> input
+ ..as_nat
+ (_.bit_shr shift)))))]
(with_vars [high low]
- ($_ _.then
- (..cap_shift! shift)
- (<| (..handle_no_shift! shift input)
- (_.if (..small_shift? shift)
- ($_ _.then
- (_.set (list high) (|> input i32##high (_.bit_shr shift)))
- (_.set (list low) (|> input i32##low (_.bit_shr shift)
- (_.bit_or (|> input i32##high (_.bit_shl (_.- shift (_.int +32)))))))
- (_.return (..i64 high low))))
- (_.return (_.? (|> shift (_.= (_.int +32)))
- (i32##high input)
- (|> input i32##high (_.bit_shr (_.- (_.int +32) shift)))))))))
+ (all _.then
+ (..cap_shift! shift)
+ (<| (..handle_no_shift! shift input)
+ (_.if (..small_shift? shift)
+ (all _.then
+ (_.set (list high) (|> input i32##high (_.bit_shr shift)))
+ (_.set (list low) (|> input i32##low (_.bit_shr shift)
+ (_.bit_or (|> input i32##high (_.bit_shl (_.- shift (_.int +32)))))))
+ (_.return (..i64 high low))))
+ (_.return (_.? (|> shift (_.= (_.int +32)))
+ (i32##high input)
+ (|> input i32##high (_.bit_shr (_.- (_.int +32) shift)))))))))
(runtime: (i64##/ parameter subject)
(_.return (_.? (_.and (_.= (_.int -1) parameter)
@@ -405,16 +405,16 @@
(runtime: (i64##+ parameter subject)
[..normal_ruby? (_.return (i64##i64 (_.+ parameter subject)))]
(with_vars [high low]
- ($_ _.then
- (_.set (list low) (_.+ (i32##low subject)
- (i32##low parameter)))
- (_.set (list high) (|> (i32##high low)
- (_.+ (i32##high subject))
- (_.+ (i32##high parameter))
- i32##low))
+ (all _.then
+ (_.set (list low) (_.+ (i32##low subject)
+ (i32##low parameter)))
+ (_.set (list high) (|> (i32##high low)
+ (_.+ (i32##high subject))
+ (_.+ (i32##high parameter))
+ i32##low))
- (_.return (..i64 high (i32##low low)))
- )))
+ (_.return (..i64 high (i32##low low)))
+ )))
(def: i64##min
(_.manual "-0x8000000000000000"))
@@ -447,44 +447,44 @@
r48 r32 r16 r00
x48 x32 x16 x00
high low]
- ($_ _.then
- (_.set (list l48) (hh subject))
- (_.set (list l32) (hl subject))
- (_.set (list l16) (lh subject))
- (_.set (list l00) (ll subject))
-
- (_.set (list r48) (hh parameter))
- (_.set (list r32) (hl parameter))
- (_.set (list r16) (lh parameter))
- (_.set (list r00) (ll parameter))
-
- (_.set (list x00) (_.* l00 r00))
- (_.set (list x16) (i16##high x00))
- (_.set (list x00) (i16##low x00))
-
- (_.set (list x16) (|> x16 (_.+ (_.* l16 r00))))
- (_.set (list x32) (i16##high x16)) (_.set (list x16) (i16##low x16))
- (_.set (list x16) (|> x16 (_.+ (_.* l00 r16))))
- (_.set (list x32) (|> x32 (_.+ (i16##high x16)))) (_.set (list x16) (i16##low x16))
-
- (_.set (list x32) (|> x32 (_.+ (_.* l32 r00))))
- (_.set (list x48) (i16##high x32)) (_.set (list x32) (i16##low x32))
- (_.set (list x32) (|> x32 (_.+ (_.* l16 r16))))
- (_.set (list x48) (|> x48 (_.+ (i16##high x32)))) (_.set (list x32) (i16##low x32))
- (_.set (list x32) (|> x32 (_.+ (_.* l00 r32))))
- (_.set (list x48) (|> x48 (_.+ (i16##high x32)))) (_.set (list x32) (i16##low x32))
-
- (_.set (list x48) (|> x48
- (_.+ (_.* l48 r00))
- (_.+ (_.* l32 r16))
- (_.+ (_.* l16 r32))
- (_.+ (_.* l00 r48))
- i16##low))
-
- (_.set (list high) (_.bit_or (i16##up x48) x32))
- (_.set (list low) (_.bit_or (i16##up x16) x00))
- (_.return (..i64 high low))
- )))
+ (all _.then
+ (_.set (list l48) (hh subject))
+ (_.set (list l32) (hl subject))
+ (_.set (list l16) (lh subject))
+ (_.set (list l00) (ll subject))
+
+ (_.set (list r48) (hh parameter))
+ (_.set (list r32) (hl parameter))
+ (_.set (list r16) (lh parameter))
+ (_.set (list r00) (ll parameter))
+
+ (_.set (list x00) (_.* l00 r00))
+ (_.set (list x16) (i16##high x00))
+ (_.set (list x00) (i16##low x00))
+
+ (_.set (list x16) (|> x16 (_.+ (_.* l16 r00))))
+ (_.set (list x32) (i16##high x16)) (_.set (list x16) (i16##low x16))
+ (_.set (list x16) (|> x16 (_.+ (_.* l00 r16))))
+ (_.set (list x32) (|> x32 (_.+ (i16##high x16)))) (_.set (list x16) (i16##low x16))
+
+ (_.set (list x32) (|> x32 (_.+ (_.* l32 r00))))
+ (_.set (list x48) (i16##high x32)) (_.set (list x32) (i16##low x32))
+ (_.set (list x32) (|> x32 (_.+ (_.* l16 r16))))
+ (_.set (list x48) (|> x48 (_.+ (i16##high x32)))) (_.set (list x32) (i16##low x32))
+ (_.set (list x32) (|> x32 (_.+ (_.* l00 r32))))
+ (_.set (list x48) (|> x48 (_.+ (i16##high x32)))) (_.set (list x32) (i16##low x32))
+
+ (_.set (list x48) (|> x48
+ (_.+ (_.* l48 r00))
+ (_.+ (_.* l32 r16))
+ (_.+ (_.* l16 r32))
+ (_.+ (_.* l00 r48))
+ i16##low))
+
+ (_.set (list high) (_.bit_or (i16##up x48) x32))
+ (_.set (list low) (_.bit_or (i16##up x16) x00))
+ (_.return (..i64 high low))
+ )))
)
(runtime: (i64##char subject)
@@ -493,48 +493,48 @@
(def: runtime//i64
Statement
- ($_ _.then
- @i64##+iteration
- @i64##-iteration
- @i64##i64
- @i64##left_shifted
- @i64##right_shifted
- @i64##and
- @i64##or
- @i64##xor
- @i64##+
- @i64##-
- @i64##*
- @i64##/
- @i64##char
- ))
+ (all _.then
+ @i64##+iteration
+ @i64##-iteration
+ @i64##i64
+ @i64##left_shifted
+ @i64##right_shifted
+ @i64##and
+ @i64##or
+ @i64##xor
+ @i64##+
+ @i64##-
+ @i64##*
+ @i64##/
+ @i64##char
+ ))
(runtime: (f64//decode inputG)
(with_vars [@input @temp]
- ($_ _.then
- (_.set (list @input) inputG)
- (_.set (list @temp) (_.do "to_f" (list) {.#None} @input))
- (_.if ($_ _.or
- (_.not (_.= (_.float +0.0) @temp))
- (_.= (_.string "0") @input)
- (_.= (_.string ".0") @input)
- (_.= (_.string "0.0") @input))
- (_.return (..some @temp))
- (_.return ..none)))))
+ (all _.then
+ (_.set (list @input) inputG)
+ (_.set (list @temp) (_.do "to_f" (list) {.#None} @input))
+ (_.if (all _.or
+ (_.not (_.= (_.float +0.0) @temp))
+ (_.= (_.string "0") @input)
+ (_.= (_.string ".0") @input)
+ (_.= (_.string "0.0") @input))
+ (_.return (..some @temp))
+ (_.return ..none)))))
(def: runtime//f64
Statement
- ($_ _.then
- @f64//decode
- ))
+ (all _.then
+ @f64//decode
+ ))
(runtime: (text//index subject param start)
(with_vars [idx]
- ($_ _.then
- (_.set (list idx) (|> subject (_.do "index" (list param start) {.#None})))
- (_.if (_.= _.nil idx)
- (_.return ..none)
- (_.return (..some idx))))))
+ (all _.then
+ (_.set (list idx) (|> subject (_.do "index" (list param start) {.#None})))
+ (_.if (_.= _.nil idx)
+ (_.return ..none)
+ (_.return (..some idx))))))
(def: (within? top value)
(-> Expression Expression Computation)
@@ -553,41 +553,41 @@
(def: runtime//text
Statement
- ($_ _.then
- @text//index
- @text//clip
- @text//char
- ))
+ (all _.then
+ @text//index
+ @text//clip
+ @text//char
+ ))
(runtime: (array//write idx value array)
- ($_ _.then
- (_.set (list (_.item idx array)) value)
- (_.return array)))
+ (all _.then
+ (_.set (list (_.item idx array)) value)
+ (_.return array)))
(def: runtime//array
Statement
- ($_ _.then
- @array//write
- ))
+ (all _.then
+ @array//write
+ ))
(def: runtime
Statement
- ($_ _.then
- (_.when ..mruby?
- ... We're in DragonRuby territory.
- (_.statement
- (_.do "class_eval" (list) {.#Some [(list (_.local "_"))
- (_.statement
- (_.alias_method/2 (_.string "remainder")
- (_.string "remainder_of_divide")))]}
- $Numeric)))
- runtime//adt
- runtime//lux
- runtime//i64
- runtime//f64
- runtime//text
- runtime//array
- ))
+ (all _.then
+ (_.when ..mruby?
+ ... We're in DragonRuby territory.
+ (_.statement
+ (_.do "class_eval" (list) {.#Some [(list (_.local "_"))
+ (_.statement
+ (_.alias_method/2 (_.string "remainder")
+ (_.string "remainder_of_divide")))]}
+ $Numeric)))
+ runtime//adt
+ runtime//lux
+ runtime//i64
+ runtime//f64
+ runtime//text
+ runtime//array
+ ))
(def: .public generate
(Operation [Registry Output])
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/runtime.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/runtime.lux
index f40915ce9..143ff325f 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/runtime.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/runtime.lux
@@ -139,10 +139,10 @@
(def: (variant' tag last? value)
(-> Expression Expression Expression Computation)
- ($_ _.cons/2
- tag
- last?
- value))
+ (all _.cons/2
+ tag
+ last?
+ value))
(runtime: (sum//make tag last? value)
(variant' tag last? value))
@@ -341,9 +341,9 @@
(def: runtime//array
Computation
- ($_ _.then
- @array//write
- ))
+ (all _.then
+ @array//write
+ ))
(def: runtime
Computation
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/syntax.lux b/stdlib/source/library/lux/tool/compiler/language/lux/syntax.lux
index 3f5b73842..93ba961d0 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/syntax.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/syntax.lux
@@ -29,7 +29,7 @@
[lux "*"
["@" target]
[abstract
- monad]
+ [monad {"+" do}]]
[control
["[0]" maybe]
["[0]" exception {"+" exception:}]
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/synthesis.lux b/stdlib/source/library/lux/tool/compiler/language/lux/synthesis.lux
index 9ecea955a..888ad1793 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/synthesis.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/synthesis.lux
@@ -469,10 +469,10 @@
(n.* 5 (# n.hash hash register))
{#Bit_Fork when then else}
- ($_ n.* 7
- (# bit.hash hash when)
- (hash then)
- (# (maybe.hash (path'_hash super)) hash else))
+ (all n.* 7
+ (# bit.hash hash when)
+ (hash then)
+ (# (maybe.hash (path'_hash super)) hash else))
(^.template [<factor> <tag> <hash>]
[{<tag> item}
@@ -535,31 +535,31 @@
(def: (hash value)
(case value
{#Exec this that}
- ($_ n.* 2
- (# super hash this)
- (# super hash that))
+ (all n.* 2
+ (# super hash this)
+ (# super hash that))
{#Let [input register body]}
- ($_ n.* 3
- (# super hash input)
- (# n.hash hash register)
- (# super hash body))
+ (all n.* 3
+ (# super hash input)
+ (# n.hash hash register)
+ (# super hash body))
{#If [test then else]}
- ($_ n.* 5
- (# super hash test)
- (# super hash then)
- (# super hash else))
+ (all n.* 5
+ (# super hash test)
+ (# super hash then)
+ (# super hash else))
{#Get [path record]}
- ($_ n.* 7
- (# (list.hash /member.hash) hash path)
- (# super hash record))
+ (all n.* 7
+ (# (list.hash /member.hash) hash path)
+ (# super hash record))
{#Case [input path]}
- ($_ n.* 11
- (# super hash input)
- (# (..path'_hash super) hash path))
+ (all n.* 11
+ (# super hash input)
+ (# (..path'_hash super) hash path))
)))
(implementation: (loop_equivalence (open "/#[0]"))
@@ -588,14 +588,14 @@
(def: (hash value)
(case value
{#Scope [start inits iteration]}
- ($_ n.* 2
- (# n.hash hash start)
- (# (list.hash super) hash inits)
- (# super hash iteration))
+ (all n.* 2
+ (# n.hash hash start)
+ (# (list.hash super) hash inits)
+ (# super hash iteration))
{#Again resets}
- ($_ n.* 3
- (# (list.hash super) hash resets))
+ (all n.* 3
+ (# (list.hash super) hash resets))
)))
(implementation: (function_equivalence (open "#[0]"))
@@ -626,15 +626,15 @@
(def: (hash value)
(case value
{#Abstraction [environment arity body]}
- ($_ n.* 2
- (# (list.hash super) hash environment)
- (# n.hash hash arity)
- (# super hash body))
+ (all n.* 2
+ (# (list.hash super) hash environment)
+ (# n.hash hash arity)
+ (# super hash body))
{#Apply [abstraction arguments]}
- ($_ n.* 3
- (# super hash abstraction)
- (# (list.hash super) hash arguments))
+ (all n.* 3
+ (# super hash abstraction)
+ (# (list.hash super) hash arguments))
)))
(implementation: (control_equivalence (open "#[0]"))
@@ -707,16 +707,16 @@
[#Extension (extension.hash again_hash)])))))
(template: .public (!bind_top register thenP)
- [($_ ..path/seq
- {..#Bind register}
- {..#Pop}
- thenP)])
+ [(all ..path/seq
+ {..#Bind register}
+ {..#Pop}
+ thenP)])
(template: .public (!multi_pop nextP)
- [($_ ..path/seq
- {..#Pop}
- {..#Pop}
- nextP)])
+ [(all ..path/seq
+ {..#Pop}
+ {..#Pop}
+ nextP)])
... TODO: There are sister patterns to the simple side checks for tuples.
... These correspond to the situation where tuple members are accessed
@@ -727,10 +727,10 @@
... and thus will result in useless code being generated.
(template [<name> <side>]
[(template: .public (<name> idx nextP)
- [($_ ..path/seq
- (<side> idx)
- {..#Pop}
- nextP)])]
+ [(all ..path/seq
+ (<side> idx)
+ {..#Pop}
+ nextP)])]
[simple_left_side ..side/left]
[simple_right_side ..side/right]
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/synthesis/access.lux b/stdlib/source/library/lux/tool/compiler/language/lux/synthesis/access.lux
index bdc53c382..236b46980 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/synthesis/access.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/synthesis/access.lux
@@ -28,10 +28,10 @@
(def: .public hash
(Hash Access)
- ($_ sum.hash
- /side.hash
- /member.hash
- ))
+ (all sum.hash
+ /side.hash
+ /member.hash
+ ))
(def: .public equivalence
(Equivalence Access)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/synthesis/access/member.lux b/stdlib/source/library/lux/tool/compiler/language/lux/synthesis/access/member.lux
index 128f12c26..a01e89668 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/synthesis/access/member.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/synthesis/access/member.lux
@@ -24,10 +24,10 @@
(def: .public hash
(Hash Member)
- ($_ product.hash
- nat.hash
- bit.hash
- ))
+ (all product.hash
+ nat.hash
+ bit.hash
+ ))
(def: .public equivalence
(Equivalence Member)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/synthesis/access/side.lux b/stdlib/source/library/lux/tool/compiler/language/lux/synthesis/access/side.lux
index a694b7c45..c0be1fea6 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/synthesis/access/side.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/synthesis/access/side.lux
@@ -24,10 +24,10 @@
(def: .public hash
(Hash Side)
- ($_ product.hash
- nat.hash
- bit.hash
- ))
+ (all product.hash
+ nat.hash
+ bit.hash
+ ))
(def: .public equivalence
(Equivalence Side)
diff --git a/stdlib/source/library/lux/tool/compiler/meta/archive.lux b/stdlib/source/library/lux/tool/compiler/meta/archive.lux
index a2fa63404..5089188ce 100644
--- a/stdlib/source/library/lux/tool/compiler/meta/archive.lux
+++ b/stdlib/source/library/lux/tool/compiler/meta/archive.lux
@@ -222,17 +222,17 @@
(def: reader
(Parser ..Frozen)
- ($_ <>.and
- <binary>.nat
- <binary>.nat
- (<binary>.list (<>.and <binary>.text <binary>.nat))))
+ (all <>.and
+ <binary>.nat
+ <binary>.nat
+ (<binary>.list (<>.and <binary>.text <binary>.nat))))
(def: writer
(Writer ..Frozen)
- ($_ binary.and
- binary.nat
- binary.nat
- (binary.list (binary.and binary.text binary.nat))))
+ (all binary.and
+ binary.nat
+ binary.nat
+ (binary.list (binary.and binary.text binary.nat))))
(def: .public (export version archive)
(-> Version Archive Binary)
diff --git a/stdlib/source/library/lux/tool/compiler/meta/archive/artifact.lux b/stdlib/source/library/lux/tool/compiler/meta/archive/artifact.lux
index bfe4e8fa3..2aa066db1 100644
--- a/stdlib/source/library/lux/tool/compiler/meta/archive/artifact.lux
+++ b/stdlib/source/library/lux/tool/compiler/meta/archive/artifact.lux
@@ -25,8 +25,8 @@
(def: .public equivalence
(Equivalence Artifact)
- ($_ product.equivalence
- nat.equivalence
- /category.equivalence
- bit.equivalence
- ))
+ (all product.equivalence
+ nat.equivalence
+ /category.equivalence
+ bit.equivalence
+ ))
diff --git a/stdlib/source/library/lux/tool/compiler/meta/archive/artifact/category.lux b/stdlib/source/library/lux/tool/compiler/meta/archive/artifact/category.lux
index 3f1bf2256..39bc31a5f 100644
--- a/stdlib/source/library/lux/tool/compiler/meta/archive/artifact/category.lux
+++ b/stdlib/source/library/lux/tool/compiler/meta/archive/artifact/category.lux
@@ -21,14 +21,14 @@
(def: .public definition_equivalence
(Equivalence Definition)
- ($_ product.equivalence
- text.equivalence
- (maybe.equivalence ($_ product.equivalence
- nat.equivalence
- nat.equivalence
- nat.equivalence
- ))
- ))
+ (all product.equivalence
+ text.equivalence
+ (maybe.equivalence (all product.equivalence
+ nat.equivalence
+ nat.equivalence
+ nat.equivalence
+ ))
+ ))
(type: .public Category
(Variant
diff --git a/stdlib/source/library/lux/tool/compiler/meta/archive/module/descriptor.lux b/stdlib/source/library/lux/tool/compiler/meta/archive/module/descriptor.lux
index e798429e1..a03795255 100644
--- a/stdlib/source/library/lux/tool/compiler/meta/archive/module/descriptor.lux
+++ b/stdlib/source/library/lux/tool/compiler/meta/archive/module/descriptor.lux
@@ -53,30 +53,30 @@
(def: .public equivalence
(Equivalence Descriptor)
- ($_ product.equivalence
- text.equivalence
- text.equivalence
- nat.equivalence
- ..module_state_equivalence
- set.equivalence
- ))
+ (all product.equivalence
+ text.equivalence
+ text.equivalence
+ nat.equivalence
+ ..module_state_equivalence
+ set.equivalence
+ ))
(def: .public writer
(Writer Descriptor)
- ($_ format.and
- format.text
- format.text
- format.nat
- format.any
- (format.set format.text)
- ))
+ (all format.and
+ format.text
+ format.text
+ format.nat
+ format.any
+ (format.set format.text)
+ ))
(def: .public parser
(Parser Descriptor)
- ($_ <>.and
- <binary>.text
- <binary>.text
- <binary>.nat
- (# <>.monad in {.#Cached})
- (<binary>.set text.hash <binary>.text)
- ))
+ (all <>.and
+ <binary>.text
+ <binary>.text
+ <binary>.nat
+ (# <>.monad in {.#Cached})
+ (<binary>.set text.hash <binary>.text)
+ ))
diff --git a/stdlib/source/library/lux/tool/compiler/meta/archive/module/document.lux b/stdlib/source/library/lux/tool/compiler/meta/archive/module/document.lux
index 73214b2ab..4f87f705c 100644
--- a/stdlib/source/library/lux/tool/compiler/meta/archive/module/document.lux
+++ b/stdlib/source/library/lux/tool/compiler/meta/archive/module/document.lux
@@ -62,9 +62,9 @@
(def: .public (writer content)
(All (_ d) (-> (Writer d) (Writer (Document d))))
- (let [writer ($_ binary.and
- signature.writer
- content)]
+ (let [writer (all binary.and
+ signature.writer
+ content)]
(|>> representation writer)))
(def: .public (parser key it)
diff --git a/stdlib/source/library/lux/tool/compiler/meta/archive/registry.lux b/stdlib/source/library/lux/tool/compiler/meta/archive/registry.lux
index 26ee6ba8e..ea5245ea7 100644
--- a/stdlib/source/library/lux/tool/compiler/meta/archive/registry.lux
+++ b/stdlib/source/library/lux/tool/compiler/meta/archive/registry.lux
@@ -107,15 +107,15 @@
(def: .public writer
(Writer Registry)
(let [definition (is (Writer //category.Definition)
- ($_ binary.and
- binary.text
- (binary.maybe
- ($_ binary.and
- binary.nat
- binary.nat
- binary.nat
- ))
- ))
+ (all binary.and
+ binary.text
+ (binary.maybe
+ (all binary.and
+ binary.nat
+ binary.nat
+ binary.nat
+ ))
+ ))
category (is (Writer Category)
(function (_ value)
(case value
@@ -135,7 +135,7 @@
dependencies (is (Writer (Set unit.ID))
(binary.set dependency))
artifacts (is (Writer (Sequence [Category Bit (Set unit.ID)]))
- (binary.sequence_64 ($_ binary.and category mandatory? dependencies)))]
+ (binary.sequence_64 (all binary.and category mandatory? dependencies)))]
(|>> representation
(the #artifacts)
(sequence#each (function (_ [it dependencies])
@@ -151,15 +151,15 @@
(def: .public parser
(Parser Registry)
(let [definition (is (Parser //category.Definition)
- ($_ <>.and
- <binary>.text
- (<binary>.maybe
- ($_ <>.and
- <binary>.nat
- <binary>.nat
- <binary>.nat
- ))
- ))
+ (all <>.and
+ <binary>.text
+ (<binary>.maybe
+ (all <>.and
+ <binary>.nat
+ <binary>.nat
+ <binary>.nat
+ ))
+ ))
category (is (Parser Category)
(do [! <>.monad]
[tag <binary>.nat]
@@ -181,7 +181,7 @@
(<>.and <binary>.nat <binary>.nat))
dependencies (is (Parser (Set unit.ID))
(<binary>.set unit.hash dependency))]
- (|> (<binary>.sequence_64 ($_ <>.and category mandatory? dependencies))
+ (|> (<binary>.sequence_64 (all <>.and category mandatory? dependencies))
(# <>.monad each (sequence#mix (function (_ [category mandatory? dependencies] registry)
(product.right
(case category
diff --git a/stdlib/source/library/lux/tool/compiler/meta/archive/signature.lux b/stdlib/source/library/lux/tool/compiler/meta/archive/signature.lux
index 235913727..a9ade8ed9 100644
--- a/stdlib/source/library/lux/tool/compiler/meta/archive/signature.lux
+++ b/stdlib/source/library/lux/tool/compiler/meta/archive/signature.lux
@@ -27,9 +27,9 @@
(def: .public equivalence
(Equivalence Signature)
- ($_ product.equivalence
- symbol.equivalence
- nat.equivalence))
+ (all product.equivalence
+ symbol.equivalence
+ nat.equivalence))
(def: .public (description signature)
(-> Signature Text)
@@ -37,12 +37,12 @@
(def: .public writer
(Writer Signature)
- ($_ binary.and
- (binary.and binary.text binary.text)
- binary.nat))
+ (all binary.and
+ (binary.and binary.text binary.text)
+ binary.nat))
(def: .public parser
(Parser Signature)
- ($_ <>.and
- (<>.and <binary>.text <binary>.text)
- <binary>.nat))
+ (all <>.and
+ (<>.and <binary>.text <binary>.text)
+ <binary>.nat))
diff --git a/stdlib/source/library/lux/tool/compiler/meta/archive/unit.lux b/stdlib/source/library/lux/tool/compiler/meta/archive/unit.lux
index 460757c42..63221895e 100644
--- a/stdlib/source/library/lux/tool/compiler/meta/archive/unit.lux
+++ b/stdlib/source/library/lux/tool/compiler/meta/archive/unit.lux
@@ -24,9 +24,9 @@
(def: .public hash
(Hash ID)
- ($_ product.hash
- nat.hash
- nat.hash))
+ (all product.hash
+ nat.hash
+ nat.hash))
(def: .public equivalence
(Equivalence ID)
diff --git a/stdlib/source/library/lux/tool/compiler/meta/cache/dependency/artifact.lux b/stdlib/source/library/lux/tool/compiler/meta/cache/dependency/artifact.lux
index 90bee909d..84b644f47 100644
--- a/stdlib/source/library/lux/tool/compiler/meta/cache/dependency/artifact.lux
+++ b/stdlib/source/library/lux/tool/compiler/meta/cache/dependency/artifact.lux
@@ -47,18 +47,18 @@
(^.template [<tag>]
[{<tag> left right}
- ($_ list#composite
- (again left)
- (again right))])
+ (all list#composite
+ (again left)
+ (again right))])
([synthesis.#Alt]
[synthesis.#Seq])
{synthesis.#Bit_Fork when then else}
(case else
{.#Some else}
- ($_ list#composite
- (again then)
- (again else))
+ (all list#composite
+ (again then)
+ (again else))
{.#None}
(again then))
@@ -106,28 +106,28 @@
{synthesis.#Branch value}
(case value
{synthesis.#Exec this that}
- ($_ list#composite
- (references this)
- (references that))
+ (all list#composite
+ (references this)
+ (references that))
{synthesis.#Let input _ body}
- ($_ list#composite
- (references input)
- (references body))
+ (all list#composite
+ (references input)
+ (references body))
{synthesis.#If test then else}
- ($_ list#composite
- (references test)
- (references then)
- (references else))
+ (all list#composite
+ (references test)
+ (references then)
+ (references else))
{synthesis.#Get _ record}
(references record)
{synthesis.#Case input path}
- ($_ list#composite
- (references input)
- (path_references references path)))
+ (all list#composite
+ (references input)
+ (path_references references path)))
{synthesis.#Loop value}
(case value
diff --git a/stdlib/source/library/lux/tool/compiler/meta/cli.lux b/stdlib/source/library/lux/tool/compiler/meta/cli.lux
index 99f7da67a..776ed07be 100644
--- a/stdlib/source/library/lux/tool/compiler/meta/cli.lux
+++ b/stdlib/source/library/lux/tool/compiler/meta/cli.lux
@@ -87,24 +87,24 @@
(def: .public service
(Parser Service)
(let [compilation (is (Parser Compilation)
- ($_ <>.and
- (<>.some ..host_dependency_parser)
- (<>.some ..library_parser)
- (<>.some ..compiler_parser)
- (<>.some ..source_parser)
- ..target_parser
- ..module_parser
- (<>.else configuration.empty ..configuration_parser)))]
- ($_ <>.or
- (<>.after (<cli>.this "build")
- compilation)
- (<>.after (<cli>.this "repl")
- compilation)
- (<>.after (<cli>.this "export")
- ($_ <>.and
- (<>.some ..source_parser)
- ..target_parser))
- )))
+ (all <>.and
+ (<>.some ..host_dependency_parser)
+ (<>.some ..library_parser)
+ (<>.some ..compiler_parser)
+ (<>.some ..source_parser)
+ ..target_parser
+ ..module_parser
+ (<>.else configuration.empty ..configuration_parser)))]
+ (all <>.or
+ (<>.after (<cli>.this "build")
+ compilation)
+ (<>.after (<cli>.this "repl")
+ compilation)
+ (<>.after (<cli>.this "export")
+ (all <>.and
+ (<>.some ..source_parser)
+ ..target_parser))
+ )))
(def: .public target
(-> Service Target)
diff --git a/stdlib/source/library/lux/tool/compiler/meta/cli/compiler.lux b/stdlib/source/library/lux/tool/compiler/meta/cli/compiler.lux
index 898e4c5c3..ad3d3f124 100644
--- a/stdlib/source/library/lux/tool/compiler/meta/cli/compiler.lux
+++ b/stdlib/source/library/lux/tool/compiler/meta/cli/compiler.lux
@@ -25,10 +25,10 @@
(def: .public equivalence
(Equivalence Compiler)
- ($_ product.equivalence
- symbol.equivalence
- (list.equivalence text.equivalence)
- ))
+ (all product.equivalence
+ symbol.equivalence
+ (list.equivalence text.equivalence)
+ ))
(template [<ascii> <name>]
[(def: <name>
diff --git a/stdlib/source/library/lux/tool/compiler/meta/export.lux b/stdlib/source/library/lux/tool/compiler/meta/export.lux
index 4fdc63159..3d1361d10 100644
--- a/stdlib/source/library/lux/tool/compiler/meta/export.lux
+++ b/stdlib/source/library/lux/tool/compiler/meta/export.lux
@@ -31,10 +31,10 @@
"library.tar")
(def: .public mode
- ($_ tar.and
- tar.read_by_owner tar.write_by_owner
- tar.read_by_group tar.write_by_group
- tar.read_by_other))
+ (all tar.and
+ tar.read_by_owner tar.write_by_owner
+ tar.read_by_group tar.write_by_group
+ tar.read_by_other))
(def: .public ownership
tar.Ownership
diff --git a/stdlib/source/library/lux/tool/compiler/meta/io/archive.lux b/stdlib/source/library/lux/tool/compiler/meta/io/archive.lux
index 8b0d5e6f7..37f464b01 100644
--- a/stdlib/source/library/lux/tool/compiler/meta/io/archive.lux
+++ b/stdlib/source/library/lux/tool/compiler/meta/io/archive.lux
@@ -59,17 +59,17 @@
(def: (module_parser key parser)
(All (_ document)
(-> (Key document) (Parser document) (Parser (module.Module document))))
- ($_ <>.and
- <binary>.nat
- descriptor.parser
- (document.parser key parser)))
+ (all <>.and
+ <binary>.nat
+ descriptor.parser
+ (document.parser key parser)))
(def: (parser key parser)
(All (_ document)
(-> (Key document) (Parser document) (Parser [(module.Module document) Registry])))
- ($_ <>.and
- (..module_parser key parser)
- registry.parser))
+ (all <>.and
+ (..module_parser key parser)
+ registry.parser))
(def: (fresh_analysis_state host configuration)
(-> Target Configuration .Lux)
@@ -276,10 +276,10 @@
(..parser $.key $.parser)
{.#Item [custom_state custom_key custom_format custom_parser custom_compiler] tail}
- ($_ <>.either
- (..parser custom_key custom_parser)
- (cache_parser tail)
- )))
+ (all <>.either
+ (..parser custom_key custom_parser)
+ (cache_parser tail)
+ )))
(def: (valid_cache customs fs context import contexts [module_name @module])
(-> (List Custom) (file.System Async) Context Import (List //.Context)
diff --git a/stdlib/source/library/lux/tool/compiler/meta/packager/scheme.lux b/stdlib/source/library/lux/tool/compiler/meta/packager/scheme.lux
index c7548669a..5c6b6176b 100644
--- a/stdlib/source/library/lux/tool/compiler/meta/packager/scheme.lux
+++ b/stdlib/source/library/lux/tool/compiler/meta/packager/scheme.lux
@@ -78,13 +78,13 @@
(def: mode
tar.Mode
- ($_ tar.and
- tar.read_by_group
- tar.read_by_owner
-
- tar.write_by_other
- tar.write_by_group
- tar.write_by_owner))
+ (all tar.and
+ tar.read_by_group
+ tar.read_by_owner
+
+ tar.write_by_other
+ tar.write_by_group
+ tar.write_by_owner))
(def: owner
tar.Owner