aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/tool
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/library/lux/tool')
-rw-r--r--stdlib/source/library/lux/tool/compiler/default/init.lux6
-rw-r--r--stdlib/source/library/lux/tool/compiler/default/platform.lux12
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/generation.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/case.lux6
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/case/coverage.lux4
-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/inference.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/module.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/reference.lux6
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/structure.lux14
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/directive.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/js.lux6
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/jvm.lux38
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/lua.lux8
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux12
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/php.lux8
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/python.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/ruby.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/scheme.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/jvm.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/lux.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/common_lisp/common.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/js/common.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/js/host.lux8
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/jvm/common.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/jvm/host.lux10
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/lua/common.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/lua/host.lux12
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/php/common.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/php/host.lux8
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/python/common.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/python/host.lux8
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/r/common.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/ruby/common.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/ruby/host.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/scheme/common.lux2
-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.lux10
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/function.lux6
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/loop.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/runtime.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/extension.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/case.lux6
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/function.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/loop.lux6
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/runtime.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/structure.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/method/new.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/host.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/loop.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/reference.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/structure.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/case.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/function.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/loop.lux6
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/runtime.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/case.lux6
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/function.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/loop.lux6
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/runtime.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/case.lux6
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/function.lux6
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/loop.lux6
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/runtime.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/case.lux8
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/function.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/loop.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/procedure/common.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/procedure/host.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/runtime.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/case.lux8
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/function.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/loop.lux6
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/runtime.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/case.lux8
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/extension/common.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/function.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/loop.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/runtime.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/case.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/function.lux14
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/loop.lux12
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/variable.lux6
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/program.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/meta/archive/artifact.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/meta/cache/dependency.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/meta/io/archive.lux12
-rw-r--r--stdlib/source/library/lux/tool/compiler/meta/io/context.lux8
-rw-r--r--stdlib/source/library/lux/tool/compiler/meta/packager/jvm.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/meta/packager/scheme.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/meta/packager/script.lux2
-rw-r--r--stdlib/source/library/lux/tool/interpreter.lux4
94 files changed, 239 insertions, 239 deletions
diff --git a/stdlib/source/library/lux/tool/compiler/default/init.lux b/stdlib/source/library/lux/tool/compiler/default/init.lux
index d704b8c44..2635b73ee 100644
--- a/stdlib/source/library/lux/tool/compiler/default/init.lux
+++ b/stdlib/source/library/lux/tool/compiler/default/init.lux
@@ -128,7 +128,7 @@
[.let [module (value@ #///.module input)]
_ (///directive.set_current_module module)]
(///directive.lifted_analysis
- (do {! ///phase.monad}
+ (do [! ///phase.monad]
[_ (module.create hash module)
_ (monad.each ! module.import dependencies)
.let [source (///analysis.source (value@ #///.module input) (value@ #///.code input))]
@@ -237,7 +237,7 @@
(let [dependencies (default_dependencies prelude input)]
[#///.dependencies dependencies
#///.process (function (_ state archive)
- (do {! try.monad}
+ (do [! try.monad]
[.let [hash (text\hash (value@ #///.code input))]
[state [source buffer]] (<| (///phase.result' state)
(..begin dependencies hash input))
@@ -271,7 +271,7 @@
(list\each product.left))
#///.process (function (_ state archive)
(recur (<| (///phase.result' state)
- (do {! ///phase.monad}
+ (do [! ///phase.monad]
[analysis_module (<| (: (Operation .Module))
///directive.lifted_analysis
extension.lifted
diff --git a/stdlib/source/library/lux/tool/compiler/default/platform.lux b/stdlib/source/library/lux/tool/compiler/default/platform.lux
index 8ee88204a..8d169ff97 100644
--- a/stdlib/source/library/lux/tool/compiler/default/platform.lux
+++ b/stdlib/source/library/lux/tool/compiler/default/platform.lux
@@ -99,7 +99,7 @@
write_artifact! (: (-> [artifact.ID (Maybe Text) Binary] (Action Any))
(function (_ [artifact_id custom content])
(ioW.write system static module_id artifact_id content)))]
- (do {! ..monad}
+ (do [! ..monad]
[_ (ioW.prepare system static module_id)
_ (for {@.python (|> output
row.list
@@ -233,7 +233,7 @@
[Type Type Type] (-> ///phase.Wrapper Extender)
Import (List Context)
(Async (Try [<State+> Archive ///phase.Wrapper]))))
- (do {! (try.with async.monad)}
+ (do [! (try.with async.monad)]
[.let [state (//init.state (value@ #static.host static)
module
expander
@@ -406,7 +406,7 @@
(stm.var ..independence))]
(function (_ compile)
(function (import! importer module)
- (do {! async.monad}
+ (do [! async.monad]
[[return signal] (:sharing [<type_vars>]
<Context>
initial
@@ -416,7 +416,7 @@
<Signal>])])
(:expected
(stm.commit!
- (do {! stm.monad}
+ (do [! stm.monad]
[dependence (if (text\= archive.runtime_module importer)
(stm.read dependence)
(do !
@@ -490,7 +490,7 @@
(def: (updated_state archive state)
(All (_ <type_vars>)
(-> Archive <State+> (Try <State+>)))
- (do {! try.monad}
+ (do [! try.monad]
[modules (monad.each ! (function (_ module)
(do !
[[descriptor document output] (archive.find module archive)
@@ -538,7 +538,7 @@
compiler (..parallel
context
(function (_ importer import! module_id [archive state] module)
- (do {! (try.with async.monad)}
+ (do [! (try.with async.monad)]
[.let [state (..set_current_module module state)]
input (context.read (value@ #&file_system platform)
importer
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/generation.lux b/stdlib/source/library/lux/tool/compiler/language/lux/generation.lux
index 22e3708ec..3646a0e9f 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/generation.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/generation.lux
@@ -226,7 +226,7 @@
(def: .public (save! artifact_id custom code)
(All (_ anchor expression directive)
(-> artifact.ID (Maybe Text) directive (Operation anchor expression directive Any)))
- (do {! phase.monad}
+ (do [! phase.monad]
[?buffer (extension.read (value@ #buffer))]
(case ?buffer
(#.Some buffer)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis.lux
index ff4db62e6..b52a4de35 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis.lux
@@ -95,7 +95,7 @@
(/function.function compile function_name arg_name archive body)
(^ (#.Form (list& functionC argsC+)))
- (do {! //.monad}
+ (do [! //.monad]
[[functionT functionA] (/type.with_inference
(compile archive functionC))]
(case functionA
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/case.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/case.lux
index 0d029264e..c624c2549 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/case.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/case.lux
@@ -188,7 +188,7 @@
(analyse_pattern #.None inputT singleton next)
[location (#.Tuple sub_patterns)]
- (do {! ///.monad}
+ (do [! ///.monad]
[record (//structure.normal sub_patterns)
record_size,members,recordT (: (Operation (Maybe [Nat (List Code) Type]))
(.case record
@@ -211,7 +211,7 @@
#.None
(/.with_location location
- (do {! ///.monad}
+ (do [! ///.monad]
[inputT' (simplify_case inputT)]
(.case inputT'
(#.Product _)
@@ -318,7 +318,7 @@
(-> Phase (List [Code Code]) Phase)
(.case branches
(#.Item [patternH bodyH] branchesT)
- (do {! ///.monad}
+ (do [! ///.monad]
[[inputT inputA] (//type.with_inference
(analyse archive inputC))
outputH (analyse_pattern #.None inputT patternH (analyse archive bodyH))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/case/coverage.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/case/coverage.lux
index e1ac7bdf4..eff243340 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/case/coverage.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/case/coverage.lux
@@ -244,7 +244,7 @@
(exception.except ..redundant_pattern [so_far addition])
... else
- (do {! try.monad}
+ (do [! try.monad]
[casesM (monad.mix !
(function (_ [tagA coverageA] casesSF')
(case (dictionary.value tagA casesSF')
@@ -325,7 +325,7 @@
... This process must be repeated until no further productive
... merges can be done.
[_ (#Alt leftS rightS)]
- (do {! try.monad}
+ (do [! try.monad]
[.let [fuse_once (: (-> Coverage (List Coverage)
(Try [(Maybe Coverage)
(List Coverage)]))
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 c1341eaf7..42eb48102 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
@@ -44,7 +44,7 @@
(def: .public (function analyse function_name arg_name archive body)
(-> Phase Text Text Phase)
- (do {! ///.monad}
+ (do [! ///.monad]
[functionT (///extension.lifted meta.expected_type)]
(loop [expectedT functionT]
(/.with_stack ..cannot_analyse [expectedT function_name arg_name body]
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/inference.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/inference.lux
index 4972f71dc..fd49fe528 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/inference.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/inference.lux
@@ -126,7 +126,7 @@
(general archive analyse (maybe.trusted (type.applied (list varT) inferT)) args))
(#.ExQ _)
- (do {! ///.monad}
+ (do [! ///.monad]
[[var_id varT] (//type.with_env check.var)
output (general archive analyse
(maybe.trusted (type.applied (list varT) inferT))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/module.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/module.lux
index 3304e0331..1657f2b84 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/module.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/module.lux
@@ -226,7 +226,7 @@
(def: .public (declare_tags record? tags exported? type)
(-> Bit (List Tag) Bit Type (Operation Any))
- (do {! ///.monad}
+ (do [! ///.monad]
[self_name (///extension.lifted meta.current_module_name)
[type_module type_name] (case type
(#.Named type_name _)
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 dcb211af4..490b7d24a 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
@@ -36,7 +36,7 @@
(def: (definition def_name)
(-> Name (Operation Analysis))
(with_expansions [<return> (in (|> def_name ///reference.constant #/.Reference))]
- (do {! ///.monad}
+ (do [! ///.monad]
[constant (///extension.lifted (meta.definition def_name))]
(case constant
(#.Alias real_def_name)
@@ -80,7 +80,7 @@
(def: (variable var_name)
(-> Text (Operation (Maybe Analysis)))
- (do {! ///.monad}
+ (do [! ///.monad]
[?var (//scope.find var_name)]
(case ?var
(#.Some [actualT ref])
@@ -95,7 +95,7 @@
(-> Name (Operation Analysis))
(case reference
["" simple_name]
- (do {! ///.monad}
+ (do [! ///.monad]
[?var (variable simple_name)]
(case ?var
(#.Some varA)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/structure.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/structure.lux
index 4dbaa2a4a..7d544b4e6 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/structure.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/structure.lux
@@ -97,7 +97,7 @@
(-> Phase Nat Bit Phase)
(let [tag (/.tag lefts right?)]
(function (recur valueC)
- (do {! ///.monad}
+ (do [! ///.monad]
[expectedT (///extension.lifted meta.expected_type)
expectedT' (//type.with_env
(check.clean expectedT))]
@@ -171,7 +171,7 @@
(def: (typed_product archive analyse members)
(-> Archive Phase (List Code) (Operation Analysis))
- (do {! ///.monad}
+ (do [! ///.monad]
[expectedT (///extension.lifted meta.expected_type)
membersA+ (: (Operation (List Analysis))
(loop [membersT+ (type.flat_tuple expectedT)
@@ -204,7 +204,7 @@
(def: .public (product archive analyse membersC)
(-> Archive Phase (List Code) (Operation Analysis))
- (do {! ///.monad}
+ (do [! ///.monad]
[expectedT (///extension.lifted meta.expected_type)]
(/.with_stack ..cannot_analyse_tuple [expectedT membersC]
(case expectedT
@@ -272,7 +272,7 @@
(def: .public (tagged_sum analyse tag archive valueC)
(-> Phase Name Phase)
- (do {! ///.monad}
+ (do [! ///.monad]
[tag (///extension.lifted (meta.normal tag))
[idx group variantT] (///extension.lifted (meta.tag tag))
.let [case_size (list.size group)
@@ -320,7 +320,7 @@
(\ ///.monad in (#.Some [0 (list) Any]))
(#.Item [head_k head_v] _)
- (do {! ///.monad}
+ (do [! ///.monad]
[slotH' (///extension.lifted
(do meta.monad
[head_k (meta.normal head_k)]
@@ -369,7 +369,7 @@
(analyse archive singletonC)
(^ (list [_ (#.Tag pseudo_slot)] singletonC))
- (do {! ///.monad}
+ (do [! ///.monad]
[head_k (///extension.lifted (meta.normal pseudo_slot))
slot (///extension.lifted (meta.try (meta.slot head_k)))]
(case slot
@@ -382,7 +382,7 @@
(..product archive analyse members)))
_
- (do {! ///.monad}
+ (do [! ///.monad]
[?members (normal members)]
(case ?members
#.None
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/directive.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/directive.lux
index 256725c5c..652330748 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/directive.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/directive.lux
@@ -59,7 +59,7 @@
(-> //.Wrapper Expander Phase)
(let [analysis (//analysis.phase expander)]
(function (recur archive code)
- (do {! //.monad}
+ (do [! //.monad]
[state //.get_state
.let [compiler_eval (meta_eval archive
(value@ [#//extension.state #/.analysis #/.state #//extension.bundle] state)
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 3d18a03b4..d0e1c2fa4 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
@@ -112,7 +112,7 @@
(custom
[($_ <>.and <c>.any (<c>.tuple (<>.some <c>.any)))
(function (_ extension phase archive [constructorC inputsC])
- (do {! phase.monad}
+ (do [! phase.monad]
[constructorA (analysis/type.with_type Any
(phase archive constructorC))
inputsA (monad.each ! (|>> (phase archive) (analysis/type.with_type Any)) inputsC)
@@ -136,7 +136,7 @@
(custom
[($_ <>.and <c>.text <c>.any (<c>.tuple (<>.some <c>.any)))
(function (_ extension phase archive [methodC objectC inputsC])
- (do {! phase.monad}
+ (do [! phase.monad]
[objectA (analysis/type.with_type Any
(phase archive objectC))
inputsA (monad.each ! (|>> (phase archive) (analysis/type.with_type Any)) inputsC)
@@ -172,7 +172,7 @@
(custom
[($_ <>.and <c>.any (<>.some <c>.any))
(function (_ extension phase archive [abstractionC inputsC])
- (do {! phase.monad}
+ (do [! phase.monad]
[abstractionA (analysis/type.with_type Any
(phase archive abstractionC))
inputsA (monad.each ! (|>> (phase archive) (analysis/type.with_type Any)) inputsC)
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 953a9aaa4..fc78d4fdb 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
@@ -375,7 +375,7 @@
(/////analysis.except ..primitives_cannot_have_type_parameters class))
#.None
- (do {! phase.monad}
+ (do [! phase.monad]
[parametersJT (: (Operation (List (Type Parameter)))
(monad.each !
(function (_ parameterT)
@@ -572,7 +572,7 @@
(phase\each jvm.array))
(#.Primitive name parameters)
- (do {! phase.monad}
+ (do [! phase.monad]
[parameters (monad.each ! check_parameter parameters)]
(phase\in (jvm.class name parameters)))
@@ -598,7 +598,7 @@
(def: (check_object objectT)
(-> .Type (Operation External))
- (do {! phase.monad}
+ (do [! phase.monad]
[name (\ ! each ..reflection (check_jvm objectT))]
(if (dictionary.key? ..boxes name)
(/////analysis.except ..primitives_are_not_objects [name])
@@ -863,7 +863,7 @@
(def: (class_candidate_parents class_loader source_name fromT target_name target_class)
(-> java/lang/ClassLoader External .Type External (java/lang/Class java/lang/Object) (Operation (List [[Text .Type] Bit])))
- (do {! phase.monad}
+ (do [! phase.monad]
[source_class (phase.lifted (reflection!.load class_loader source_name))
mapping (phase.lifted (reflection!.correspond source_class fromT))]
(monad.each !
@@ -890,7 +890,7 @@
(^ (#.Primitive _ (list& self_classT super_classT super_interfacesT+)))
(monad.each phase.monad
(function (_ superT)
- (do {! phase.monad}
+ (do [! phase.monad]
[super_name (\ ! each ..reflection (check_jvm superT))
super_class (phase.lifted (reflection!.load class_loader super_name))]
(in [[super_name superT]
@@ -905,7 +905,7 @@
(function (_ extension_name analyse archive args)
(case args
(^ (list fromC))
- (do {! phase.monad}
+ (do [! phase.monad]
[toT (///.lifted meta.expected_type)
target_name (\ ! each ..reflection (check_jvm toT))
[fromT fromA] (typeA.with_inference
@@ -1189,7 +1189,7 @@
(array.list #.None)
(list\each (|>> java/lang/reflect/TypeVariable::getName)))
[owner_tvarsT mapping] (jvm_type_var_mapping owner_tvars method_tvars)]
- (do {! phase.monad}
+ (do [! phase.monad]
[inputsT (|> (java/lang/reflect/Method::getGenericParameterTypes method)
(array.list #.None)
(monad.each ! (|>> reflection!.type phase.lifted))
@@ -1229,7 +1229,7 @@
(array.list #.None)
(list\each (|>> java/lang/reflect/TypeVariable::getName)))
[owner_tvarsT mapping] (jvm_type_var_mapping owner_tvars method_tvars)]
- (do {! phase.monad}
+ (do [! phase.monad]
[inputsT (|> (java/lang/reflect/Constructor::getGenericParameterTypes constructor)
(array.list #.None)
(monad.each ! (|>> reflection!.type phase.lifted))
@@ -1286,7 +1286,7 @@
(def: (method_candidate class_loader actual_class_tvars class_name actual_method_tvars method_name method_style inputsJT)
(-> java/lang/ClassLoader (List (Type Var)) External (List (Type Var)) Text Method_Style (List (Type Value)) (Operation Method_Signature))
- (do {! phase.monad}
+ (do [! phase.monad]
[class (phase.lifted (reflection!.load class_loader class_name))
.let [expected_class_tvars (class_type_variables class)]
candidates (|> class
@@ -1319,7 +1319,7 @@
(def: (constructor_candidate class_loader actual_class_tvars class_name actual_method_tvars inputsJT)
(-> java/lang/ClassLoader (List (Type Var)) External (List (Type Var)) (List (Type Value)) (Operation Method_Signature))
- (do {! phase.monad}
+ (do [! phase.monad]
[class (phase.lifted (reflection!.load class_loader class_name))
.let [expected_class_tvars (class_type_variables class)]
candidates (|> class
@@ -1553,7 +1553,7 @@
<only>
(monad.each try.monad
(function (_ method)
- (do {! try.monad}
+ (do [! try.monad]
[.let [type_variables (|> (java/lang/reflect/Method::getTypeParameters method)
(array.list #.None)
(list\each (|>> java/lang/reflect/TypeVariable::getName
@@ -1664,7 +1664,7 @@
(let [[visibility strict_fp?
annotations vars exceptions
self_name arguments super_arguments body] method]
- (do {! phase.monad}
+ (do [! phase.monad]
[annotationsA (monad.each ! (function (_ [name parameters])
(do !
[parametersA (monad.each ! (function (_ [name value])
@@ -1746,7 +1746,7 @@
final? strict_fp? annotations vars
self_name arguments return exceptions
body] method]
- (do {! phase.monad}
+ (do [! phase.monad]
[annotationsA (monad.each ! (function (_ [name parameters])
(do !
[parametersA (monad.each ! (function (_ [name value])
@@ -1820,7 +1820,7 @@
strict_fp? annotations vars exceptions
arguments return
body] method]
- (do {! phase.monad}
+ (do [! phase.monad]
[annotationsA (monad.each ! (function (_ [name parameters])
(do !
[parametersA (monad.each ! (function (_ [name value])
@@ -1913,7 +1913,7 @@
(let [expected_count (list.size parent_parameters)
actual_count (list.size super_parameters)]
(if (n.= expected_count actual_count)
- (do {! phase.monad}
+ (do [! phase.monad]
[parent_parameters (|> parent_parameters
(monad.each maybe.monad jvm_parser.var?)
try.of_maybe
@@ -1928,7 +1928,7 @@
(def: .public (with_fresh_type_vars vars mapping)
(-> (List (Type Var)) Mapping (Operation Mapping))
- (do {! phase.monad}
+ (do [! phase.monad]
[pairings (monad.each ! (function (_ var)
(do !
[[_ exT] (typeA.with_env
@@ -1984,7 +1984,7 @@
strict_fp? annotations vars
self_name arguments return exceptions
body] method]
- (do {! phase.monad}
+ (do [! phase.monad]
[mapping (..with_override_mapping supers parent_type mapping)
mapping (..with_fresh_type_vars vars mapping)
annotationsA (monad.each ! (function (_ [name parameters])
@@ -2089,7 +2089,7 @@
(def: .public (require_complete_method_concretion class_loader supers methods)
(-> java/lang/ClassLoader (List (Type Class)) (List (Overriden_Method Code)) (Operation Any))
- (do {! phase.monad}
+ (do [! phase.monad]
[required_abstract_methods (phase.lifted (all_abstract_methods class_loader supers))
available_methods (phase.lifted (all_methods class_loader supers))
overriden_methods (monad.each ! (function (_ [parent_type method_name
@@ -2126,7 +2126,7 @@
super_interfaces
constructor_args
methods])
- (do {! phase.monad}
+ (do [! phase.monad]
[_ (..ensure_fresh_class! class_loader (..reflection super_class))
_ (monad.each ! (|>> ..reflection (..ensure_fresh_class! class_loader)) super_interfaces)
parameters (typeA.with_env
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 fcdd55439..83aad6970 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
@@ -136,7 +136,7 @@
(custom
[($_ <>.and <code>.text <code>.any (<>.some <code>.any))
(function (_ extension phase archive [methodC objectC inputsC])
- (do {! phase.monad}
+ (do [! phase.monad]
[objectA (analysis/type.with_type ..Object
(phase archive objectC))
inputsA (monad.each ! (|>> (phase archive) (analysis/type.with_type Any)) inputsC)
@@ -161,7 +161,7 @@
(custom
[<code>.any
(function (_ extension phase archive inputC)
- (do {! phase.monad}
+ (do [! phase.monad]
[inputA (analysis/type.with_type (type <fromT>)
(phase archive inputC))
_ (analysis/type.infer (type <toT>))]
@@ -193,7 +193,7 @@
(custom
[($_ <>.and <code>.any (<>.some <code>.any))
(function (_ extension phase archive [abstractionC inputsC])
- (do {! phase.monad}
+ (do [! phase.monad]
[abstractionA (analysis/type.with_type ..Function
(phase archive abstractionC))
inputsA (monad.each ! (|>> (phase archive) (analysis/type.with_type Any)) inputsC)
@@ -205,7 +205,7 @@
(custom
[($_ <>.and <code>.any <code>.any)
(function (_ extension phase archive [powerC baseC])
- (do {! phase.monad}
+ (do [! phase.monad]
[powerA (analysis/type.with_type Frac
(phase archive powerC))
baseA (analysis/type.with_type Frac
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 cc3f13b0a..f83870333 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
@@ -53,7 +53,7 @@
(function (_ extension_name analyse archive args)
(let [num_actual (list.size args)]
(if (n.= num_expected num_actual)
- (do {! ////.monad}
+ (do [! ////.monad]
[_ (typeA.infer outputT)
argsA (monad.each !
(function (_ [argT argC])
@@ -101,7 +101,7 @@
<code>.any)))
<code>.any)
(function (_ extension_name phase archive [input conditionals else])
- (do {! ////.monad}
+ (do [! ////.monad]
[input (typeA.with_type text.Char
(phase archive input))
expectedT (///.lifted meta.expected_type)
@@ -163,7 +163,7 @@
(function (_ extension_name analyse archive args)
(case args
(^ (list typeC valueC))
- (do {! ////.monad}
+ (do [! ////.monad]
[actualT (\ ! each (|>> (:as Type))
(eval archive Type typeC))
_ (typeA.infer actualT)]
@@ -178,7 +178,7 @@
(function (_ extension_name analyse archive args)
(case args
(^ (list typeC valueC))
- (do {! ////.monad}
+ (do [! ////.monad]
[actualT (\ ! each (|>> (:as Type))
(eval archive Type typeC))
_ (typeA.infer actualT)
@@ -194,7 +194,7 @@
(..custom
[<code>.any
(function (_ extension_name phase archive valueC)
- (do {! ////.monad}
+ (do [! ////.monad]
[_ (typeA.infer output)]
(typeA.with_type input
(phase archive valueC))))]))
@@ -208,7 +208,7 @@
(..custom
[<code>.any
(function (_ extension_name phase archive valueC)
- (do {! ////.monad}
+ (do [! ////.monad]
[_ (typeA.infer .Macro)
input_type (loop [input_name (name_of .Macro')]
(do !
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 5edc50baa..631e22949 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
@@ -124,7 +124,7 @@
(custom
[($_ <>.and <c>.text (<>.some <c>.any))
(function (_ extension phase archive [constructor inputsC])
- (do {! phase.monad}
+ (do [! phase.monad]
[inputsA (monad.each ! (|>> (phase archive) (analysis/type.with_type Any)) inputsC)
_ (analysis/type.infer .Any)]
(in (#analysis.Extension extension (list& (analysis.text constructor) inputsA)))))]))
@@ -146,7 +146,7 @@
(custom
[($_ <>.and <c>.text <c>.any (<>.some <c>.any))
(function (_ extension phase archive [methodC objectC inputsC])
- (do {! phase.monad}
+ (do [! phase.monad]
[objectA (analysis/type.with_type ..Object
(phase archive objectC))
inputsA (monad.each ! (|>> (phase archive) (analysis/type.with_type Any)) inputsC)
@@ -180,7 +180,7 @@
(custom
[($_ <>.and <c>.any (<>.some <c>.any))
(function (_ extension phase archive [abstractionC inputsC])
- (do {! phase.monad}
+ (do [! phase.monad]
[abstractionA (analysis/type.with_type ..Function
(phase archive abstractionC))
inputsA (monad.each ! (|>> (phase archive) (analysis/type.with_type Any)) inputsC)
@@ -192,7 +192,7 @@
(custom
[($_ <>.and <c>.any <c>.any)
(function (_ extension phase archive [formatC dataC])
- (do {! phase.monad}
+ (do [! phase.monad]
[formatA (analysis/type.with_type Text
(phase archive formatC))
dataA (analysis/type.with_type (type (Array (I64 Any)))
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 5bbaa5947..6b43a1179 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
@@ -141,7 +141,7 @@
(custom
[($_ <>.and <code>.text <code>.any (<>.some <code>.any))
(function (_ extension phase archive [methodC objectC inputsC])
- (do {! phase.monad}
+ (do [! phase.monad]
[objectA (analysis/type.with_type ..Object
(phase archive objectC))
inputsA (monad.each ! (|>> (phase archive) (analysis/type.with_type Any)) inputsC)
@@ -183,7 +183,7 @@
(custom
[($_ <>.and <code>.any (<>.some <code>.any))
(function (_ extension phase archive [abstractionC inputsC])
- (do {! phase.monad}
+ (do [! phase.monad]
[abstractionA (analysis/type.with_type ..Function
(phase archive abstractionC))
inputsA (monad.each ! (|>> (phase archive) (analysis/type.with_type Any)) inputsC)
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 e5e7c98a5..bcb639c95 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
@@ -136,7 +136,7 @@
(custom
[($_ <>.and <c>.text <c>.any (<>.some <c>.any))
(function (_ extension phase archive [methodC objectC inputsC])
- (do {! phase.monad}
+ (do [! phase.monad]
[objectA (analysis/type.with_type ..Object
(phase archive objectC))
inputsA (monad.each ! (|>> (phase archive) (analysis/type.with_type Any)) inputsC)
@@ -169,7 +169,7 @@
(custom
[($_ <>.and <c>.any (<>.some <c>.any))
(function (_ extension phase archive [abstractionC inputsC])
- (do {! phase.monad}
+ (do [! phase.monad]
[abstractionA (analysis/type.with_type ..Function
(phase archive abstractionC))
inputsA (monad.each ! (|>> (phase archive) (analysis/type.with_type Any)) inputsC)
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 179af70bc..0e149963c 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
@@ -138,7 +138,7 @@
(custom
[($_ <>.and <c>.any (<>.some <c>.any))
(function (_ extension phase archive [abstractionC inputsC])
- (do {! phase.monad}
+ (do [! phase.monad]
[abstractionA (analysis/type.with_type ..Function
(phase archive abstractionC))
inputsA (monad.each ! (|>> (phase archive) (analysis/type.with_type Any)) inputsC)
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 b07a693e4..8f98a4a0c 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
@@ -259,7 +259,7 @@
annotations
fields
methods])
- (do {! phase.monad}
+ (do [! phase.monad]
[parameters (directive.lifted_analysis
(typeA.with_env
(jvm.parameter_types parameters)))
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 72b5692ed..c1c0ee476 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
@@ -121,7 +121,7 @@
(All (_ anchor expression directive)
(-> Archive Name (Maybe Type) Code
(Operation anchor expression directive [Type expression Any])))
- (do {! phase.monad}
+ (do [! phase.monad]
[state (///.lifted phase.get_state)
.let [analyse (value@ [#/////directive.analysis #/////directive.phase] state)
synthesize (value@ [#/////directive.synthesis #/////directive.phase] state)
@@ -296,7 +296,7 @@
(..custom
[($_ <>.and <code>.any ..imports)
(function (_ extension_name phase archive [annotationsC imports])
- (do {! phase.monad}
+ (do [! phase.monad]
[[_ _ annotationsV] (evaluate! archive Code annotationsC)
.let [annotationsV (:as Code annotationsV)]
_ (/////directive.lifted_analysis
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 713343997..e10996079 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
@@ -63,7 +63,7 @@
... (<s>.tuple (<>.many <s>.i64))
... <s>.any))))
... (function (_ extension_name phase archive [input else conditionals])
-... (do {! /////.monad}
+... (do [! /////.monad]
... [@input (\ ! each _.var (generation.identifier "input"))
... inputG (phase archive input)
... elseG (phase archive else)
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 c86f34dc9..6e910d32c 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
@@ -148,7 +148,7 @@
(<s>.tuple (<>.many <s>.i64))
<s>.any))))
(function (_ extension_name phase archive [input else conditionals])
- (do {! /////.monad}
+ (do [! /////.monad]
[inputG (phase archive input)
else! (..statement phase archive else)
conditionals! (: (Operation (List [(List Literal)
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 e37c2abf3..a78bfe796 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
@@ -66,7 +66,7 @@
(custom
[($_ <>.and <s>.any (<>.some <s>.any))
(function (_ extension phase archive [constructorS inputsS])
- (do {! ////////phase.monad}
+ (do [! ////////phase.monad]
[constructorG (phase archive constructorS)
inputsG (monad.each ! (phase archive) inputsS)]
(in (_.new constructorG inputsG))))]))
@@ -85,7 +85,7 @@
(custom
[($_ <>.and <s>.text <s>.any (<>.some <s>.any))
(function (_ extension phase archive [methodS objectS inputsS])
- (do {! ////////phase.monad}
+ (do [! ////////phase.monad]
[objectG (phase archive objectS)
inputsG (monad.each ! (phase archive) inputsS)]
(in (_.do methodS inputsG objectG))))]))
@@ -121,7 +121,7 @@
(custom
[($_ <>.and <s>.any (<>.some <s>.any))
(function (_ extension phase archive [abstractionS inputsS])
- (do {! ////////phase.monad}
+ (do [! ////////phase.monad]
[abstractionG (phase archive abstractionS)
inputsG (monad.each ! (phase archive) inputsS)]
(in (_.apply/* abstractionG inputsG))))]))
@@ -130,7 +130,7 @@
(custom
[($_ <>.and <s>.i64 <s>.any)
(function (_ extension phase archive [arity abstractionS])
- (do {! ////////phase.monad}
+ (do [! ////////phase.monad]
[abstractionG (phase archive abstractionS)
.let [variable (: (-> Text (Operation Var))
(|>> generation.identifier
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 ce8ecb7fb..56daa1075 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
@@ -105,7 +105,7 @@
(<s>.tuple (<>.many <s>.i64))
<s>.any))))
(function (_ extension_name phase archive [inputS elseS conditionalsS])
- (do {! /////.monad}
+ (do [! /////.monad]
[@end ///runtime.forge_label
inputG (phase archive inputS)
elseG (phase archive elseS)
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 b112ee9a3..847609d5d 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
@@ -751,7 +751,7 @@
(..custom
[($_ <>.and ..class <s>.text ..return (<>.some ..input))
(function (_ extension_name generate archive [class method outputT inputsTS])
- (do {! //////.monad}
+ (do [! //////.monad]
[inputsTG (monad.each ! (generate_input generate archive) inputsTS)]
(in ($_ _.composite
(monad.each _.monad product.right inputsTG)
@@ -764,7 +764,7 @@
(..custom
[($_ <>.and ..class <s>.text ..return <s>.any (<>.some ..input))
(function (_ extension_name generate archive [class method outputT objectS inputsTS])
- (do {! //////.monad}
+ (do [! //////.monad]
[objectG (generate archive objectS)
inputsTG (monad.each ! (generate_input generate archive) inputsTS)]
(in ($_ _.composite
@@ -784,7 +784,7 @@
(..custom
[($_ <>.and ..class (<>.some ..input))
(function (_ extension_name generate archive [class inputsTS])
- (do {! //////.monad}
+ (do [! //////.monad]
[inputsTG (monad.each ! (generate_input generate archive) inputsTS)]
(in ($_ _.composite
(_.new class)
@@ -961,7 +961,7 @@
(def: (anonymous_instance generate archive class env)
(-> Phase Archive (Type category.Class) (Environment Synthesis) (Operation (Bytecode Any)))
- (do {! //////.monad}
+ (do [! //////.monad]
[captureG+ (monad.each ! (generate archive) env)]
(in ($_ _.composite
(_.new class)
@@ -1010,7 +1010,7 @@
(function (_ extension_name generate archive [super_class super_interfaces
inputsTS
overriden_methods])
- (do {! //////.monad}
+ (do [! //////.monad]
[[context _] (//////generation.with_new_context archive (in []))
.let [[module_id artifact_id] context
anonymous_class_name (///runtime.class_name context)
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 c6401872e..f40334ae1 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
@@ -110,7 +110,7 @@
(<s>.tuple (<>.many <s>.i64))
<s>.any))))
(function (_ extension_name phase archive [input else conditionals])
- (do {! /////.monad}
+ (do [! /////.monad]
[inputG (phase archive input)
else! (..statement phase archive else)
@input (\ ! each _.var (generation.identifier "input"))
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 1a041a49e..336736dac 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
@@ -78,7 +78,7 @@
(custom
[($_ <>.and <s>.text <s>.any (<>.some <s>.any))
(function (_ extension phase archive [methodS objectS inputsS])
- (do {! ////////phase.monad}
+ (do [! ////////phase.monad]
[objectG (phase archive objectS)
inputsG (monad.each ! (phase archive) inputsS)]
(in (_.do methodS inputsG objectG))))]))
@@ -107,7 +107,7 @@
(custom
[<s>.any
(function (_ extension phase archive inputS)
- (do {! ////////phase.monad}
+ (do [! ////////phase.monad]
[inputG (phase archive inputS)]
(in (_.apply/1 (<| (_.closure (list $input))
(_.return (|> (_.var "string.byte")
@@ -119,7 +119,7 @@
(custom
[<s>.any
(function (_ extension phase archive inputS)
- (do {! ////////phase.monad}
+ (do [! ////////phase.monad]
[inputG (phase archive inputS)]
(in (|> inputG
(_.apply/1 (_.var "table.unpack"))
@@ -143,7 +143,7 @@
(custom
[($_ <>.and <s>.any (<>.some <s>.any))
(function (_ extension phase archive [abstractionS inputsS])
- (do {! ////////phase.monad}
+ (do [! ////////phase.monad]
[abstractionG (phase archive abstractionS)
inputsG (monad.each ! (phase archive) inputsS)]
(in (_.apply/* inputsG abstractionG))))]))
@@ -152,7 +152,7 @@
(custom
[($_ <>.and <s>.any <s>.any)
(function (_ extension phase archive [powerS baseS])
- (do {! ////////phase.monad}
+ (do [! ////////phase.monad]
[powerG (phase archive powerS)
baseG (phase archive baseS)]
(in (_.^ powerG baseG))))]))
@@ -168,7 +168,7 @@
(custom
[($_ <>.and <s>.i64 <s>.any)
(function (_ extension phase archive [arity abstractionS])
- (do {! ////////phase.monad}
+ (do [! ////////phase.monad]
[abstractionG (phase archive abstractionS)
.let [variable (: (-> Text (Operation Var))
(|>> generation.identifier
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 b176ca30d..9c58243d3 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
@@ -63,7 +63,7 @@
(<s>.tuple (<>.many <s>.i64))
<s>.any))))
(function (_ extension_name phase archive [input else conditionals])
- (do {! /////.monad}
+ (do [! /////.monad]
[inputG (phase archive input)
[[context_module context_artifact] elseG] (generation.with_new_context archive
(phase archive else))
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 c577f36c1..aaff32f29 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
@@ -64,7 +64,7 @@
(custom
[($_ <>.and <s>.text (<>.some <s>.any))
(function (_ extension phase archive [constructor inputsS])
- (do {! ////////phase.monad}
+ (do [! ////////phase.monad]
[inputsG (monad.each ! (phase archive) inputsS)]
(in (_.new (_.constant constructor) inputsG))))]))
@@ -82,7 +82,7 @@
(custom
[($_ <>.and <s>.text <s>.any (<>.some <s>.any))
(function (_ extension phase archive [methodS objectS inputsS])
- (do {! ////////phase.monad}
+ (do [! ////////phase.monad]
[objectG (phase archive objectS)
inputsG (monad.each ! (phase archive) inputsS)]
(in (_.do methodS inputsG objectG))))]))
@@ -115,7 +115,7 @@
(custom
[($_ <>.and <s>.any (<>.some <s>.any))
(function (_ extension phase archive [abstractionS inputsS])
- (do {! ////////phase.monad}
+ (do [! ////////phase.monad]
[abstractionG (phase archive abstractionS)
inputsG (monad.each ! (phase archive) inputsS)]
(in (_.apply/* inputsG abstractionG))))]))
@@ -124,7 +124,7 @@
(custom
[($_ <>.and <s>.any <s>.any)
(function (_ extension phase archive [formatS dataS])
- (do {! ////////phase.monad}
+ (do [! ////////phase.monad]
[formatG (phase archive formatS)
dataG (phase archive dataS)]
(in (_.pack/2 [formatG (_.splat dataG)]))))]))
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 7f4cf2e80..b6345fac4 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,7 +103,7 @@
(<synthesis>.tuple (<>.many <synthesis>.i64))
<synthesis>.any))))
(function (_ extension_name phase archive [input else conditionals])
- (do {! /////.monad}
+ (do [! /////.monad]
[inputG (phase archive input)
else! (..statement phase archive else)
@input (\ ! each _.var (generation.identifier "input"))
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 276edc180..e802fcfe8 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
@@ -77,7 +77,7 @@
(custom
[($_ <>.and <s>.text <s>.any (<>.some <s>.any))
(function (_ extension phase archive [methodS objectS inputsS])
- (do {! ////////phase.monad}
+ (do [! ////////phase.monad]
[objectG (phase archive objectS)
inputsG (monad.each ! (phase archive) inputsS)]
(in (_.do methodS inputsG objectG))))]))
@@ -119,7 +119,7 @@
(custom
[($_ <>.and <s>.any (<>.some <s>.any))
(function (_ extension phase archive [abstractionS inputsS])
- (do {! ////////phase.monad}
+ (do [! ////////phase.monad]
[abstractionG (phase archive abstractionS)
inputsG (monad.each ! (phase archive) inputsS)]
(in (_.apply/* abstractionG inputsG))))]))
@@ -128,7 +128,7 @@
(custom
[($_ <>.and <s>.i64 <s>.any)
(function (_ extension phase archive [arity abstractionS])
- (do {! ////////phase.monad}
+ (do [! ////////phase.monad]
[abstractionG (phase archive abstractionS)
.let [variable (: (-> Text (Operation SVar))
(|>> generation.identifier
@@ -145,7 +145,7 @@
(custom
[($_ <>.and <s>.any <s>.any)
(function (_ extension phase archive [codeS globalsS])
- (do {! ////////phase.monad}
+ (do [! ////////phase.monad]
[codeG (phase archive codeS)
globalsG (phase archive globalsS)]
(in (//runtime.lux::exec codeG globalsG))))]))
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 4a736b151..8515f321b 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
@@ -63,7 +63,7 @@
... ... (<s>.tuple (<>.many <s>.i64))
... ... <s>.any))))
... ... (function (_ extension_name phase archive [input else conditionals])
-... ... (do {! /////.monad}
+... ... (do [! /////.monad]
... ... [@input (\ ! each _.var (generation.identifier "input"))
... ... inputG (phase archive input)
... ... elseG (phase archive else)
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 1fe6627fa..b570e2bf9 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,7 +102,7 @@
(<s>.tuple (<>.many <s>.i64))
<s>.any))))
(function (_ extension_name phase archive [input else conditionals])
- (do {! /////.monad}
+ (do [! /////.monad]
[inputG (phase archive input)
else! (statement phase archive else)
@input (\ ! each _.local (generation.identifier "input"))
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 db6864e97..1a0c27c4d 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
@@ -78,7 +78,7 @@
(custom
[($_ <>.and <s>.text <s>.any (<>.some <s>.any))
(function (_ extension phase archive [methodS objectS inputsS])
- (do {! ////////phase.monad}
+ (do [! ////////phase.monad]
[objectG (phase archive objectS)
inputsG (monad.each ! (phase archive) inputsS)]
(in (_.do methodS inputsG objectG))))]))
@@ -110,7 +110,7 @@
(custom
[($_ <>.and <s>.any (<>.some <s>.any))
(function (_ extension phase archive [abstractionS inputsS])
- (do {! ////////phase.monad}
+ (do [! ////////phase.monad]
[abstractionG (phase archive abstractionS)
inputsG (monad.each ! (phase archive) inputsS)]
(in (_.apply/* inputsG abstractionG))))]))
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 228c6e4f1..62edb14aa 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
@@ -63,7 +63,7 @@
(<s>.tuple (<>.many <s>.i64))
<s>.any))))
(function (_ extension_name phase archive [input else conditionals])
- (do {! /////.monad}
+ (do [! /////.monad]
[@input (\ ! each _.var (generation.identifier "input"))
inputG (phase archive input)
elseG (phase archive else)
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 dc7215b53..10992b491 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
@@ -91,7 +91,7 @@
(custom
[($_ <>.and <s>.any (<>.some <s>.any))
(function (_ extension phase archive [abstractionS inputsS])
- (do {! ////////phase.monad}
+ (do [! ////////phase.monad]
[abstractionG (phase archive abstractionS)
inputsG (monad.each ! (phase archive) inputsS)]
(in (_.apply/* inputsG abstractionG))))]))
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 67b9060ad..34208d7f3 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
@@ -154,7 +154,7 @@
(///////phase\in (_.setq (..register register) ..peek))
(#/////synthesis.Bit_Fork when thenP elseP)
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[then! (recur [$output @done @fail thenP])
else! (.case elseP
(#.Some elseP)
@@ -172,7 +172,7 @@
(^template [<tag> <format> <=>]
[(<tag> item)
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[clauses (monad.each ! (function (_ [match then])
(do !
[then! (recur [$output @done @fail then])]
@@ -216,7 +216,7 @@
next!)))))
(^ (/////synthesis.path/alt preP postP))
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[@otherwise (\ ! each (|>> %.nat (format "lux_case_otherwise") _.tag) /////generation.next)
pre! (recur [$output @done @otherwise preP])
post! (recur [$output @done @fail postP])]
@@ -230,7 +230,7 @@
(def: (pattern_matching $output expression archive pathP)
(-> Var/1 (Generator Path))
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[@done (\ ! each (|>> %.nat (format "lux_case_done") _.tag) /////generation.next)
@fail (\ ! each (|>> %.nat (format "lux_case_fail") _.tag) /////generation.next)
pattern_matching! (pattern_matching' expression archive [$output @done @fail pathP])]
@@ -242,7 +242,7 @@
(def: .public (case expression archive [valueS pathP])
(Generator [Synthesis Path])
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[initG (expression archive valueS)
$output (\ ! each (|>> %.nat (format "lux_case_output") _.var) /////generation.next)
pattern_matching! (pattern_matching $output expression archive pathP)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/function.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/function.lux
index b1be4e914..27d017a8a 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/function.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/function.lux
@@ -31,7 +31,7 @@
(def: .public (apply expression archive [functionS argsS+])
(Generator (Application Synthesis))
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[functionG (expression archive functionS)
argsG+ (monad.each ! (expression archive) argsS+)]
(in (_.funcall/+ [functionG argsG+]))))
@@ -47,7 +47,7 @@
(\ ///////phase.monad in function_definition)
_
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[@closure (\ ! each _.var (/////generation.identifier "closure"))]
(in (_.labels (list [@closure [(|> (list.enumeration inits)
(list\each (|>> product.left ..capture))
@@ -60,7 +60,7 @@
(def: .public (function expression archive [environment arity bodyS])
(Generator (Abstraction Synthesis))
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[@scope (\ ! each (|>> %.nat (format "function_scope") _.tag) /////generation.next)
@output (\ ! each (|>> %.nat (format "loop_output") _.var) /////generation.next)
[function_name bodyG] (/////generation.with_new_context archive
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/loop.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/loop.lux
index 9d1a27f7a..670fb1b12 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/loop.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/loop.lux
@@ -41,7 +41,7 @@
... true loop
_
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[@scope (\ ! each (|>> %.nat (format "loop_scope") _.tag) /////generation.next)
@output (\ ! each (|>> %.nat (format "loop_output") _.var) /////generation.next)
initsG+ (monad.each ! (expression archive) initsS+)
@@ -59,7 +59,7 @@
(def: .public (recur expression archive argsS+)
(Generator (List Synthesis))
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[[tag offset] /////generation.anchor
argsO+ (monad.each ! (expression archive) argsS+)
.let [bindings (|> argsO+
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 c891ba166..0ee7c1e55 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
@@ -89,7 +89,7 @@
(syntax: .public (with_vars [vars (<code>.tuple (<>.some <code>.local_identifier))
body <code>.any])
- (do {! meta.monad}
+ (do [! meta.monad]
[ids (monad.all ! (list.repeated (list.size vars) meta.seed))]
(in (list (` (let [(~+ (|> vars
(list.zipped/2 ids)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/extension.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/extension.lux
index 434c0836a..afb6af8a5 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/extension.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/extension.lux
@@ -35,7 +35,7 @@
name <code>.local_identifier
type <code>.any])
(with_identifiers [g!_ g!extension g!name g!phase g!archive g!inputs g!of g!anchor g!expression g!directive]
- (do {! meta.monad}
+ (do [! meta.monad]
[g!input+ (monad.all ! (list.repeated arity (macro.identifier "input")))]
(in (list (` (def: .public ((~ (code.local_identifier name)) (~ g!extension))
(All ((~ g!_) (~ g!anchor) (~ g!expression) (~ g!directive))
@@ -64,6 +64,6 @@
(-> (Variadic expression) (generation.Handler anchor expression directive)))
(function (_ extension_name)
(function (_ phase archive inputsS)
- (do {! ///.monad}
+ (do [! ///.monad]
[inputsI (monad.each ! (phase archive) inputsS)]
(in (extension inputsI))))))
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 7194bb0e6..2ed5094bc 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
@@ -236,7 +236,7 @@
(///////phase\in (_.define (..register register) ..peek_cursor))
(#/////synthesis.Bit_Fork when thenP elseP)
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[then! (recur thenP)
else! (.case elseP
(#.Some elseP)
@@ -253,7 +253,7 @@
then!))))
(#/////synthesis.I64_Fork item)
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[clauses (monad.each ! (function (_ [match then])
(do !
[then! (recur then)]
@@ -265,7 +265,7 @@
(^template [<tag> <format>]
[(<tag> item)
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[cases (monad.each ! (function (_ [match then])
(\ ! each (|>> [(list (<format> match))]) (recur then)))
(#.Item item))]
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/function.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/function.lux
index 819cb2769..44001087c 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
@@ -29,7 +29,7 @@
(def: .public (apply expression archive [functionS argsS+])
(Generator (Application Synthesis))
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[functionO (expression archive functionS)
argsO+ (monad.each ! (expression archive) argsS+)]
(in (_.apply/* functionO argsO+))))
@@ -67,7 +67,7 @@
(def: .public (function statement expression archive [environment arity bodyS])
(-> Phase! (Generator (Abstraction Synthesis)))
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[[function_name body!] (/////generation.with_new_context archive
(do !
[scope (\ ! each ..@scope
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 2e2e21522..461e565b0 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
@@ -50,7 +50,7 @@
... true loop
_
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[@scope (\ ! each ..@scope /////generation.next)
initsO+ (monad.each ! (expression archive) initsS+)
body! (/////generation.with_anchor [start @scope]
@@ -69,7 +69,7 @@
... true loop
_
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[loop! (scope! statement expression archive [start initsS+ bodyS])]
(in (_.apply/* (_.closure (list) loop!) (list))))))
@@ -78,7 +78,7 @@
(def: .public (recur! statement expression archive argsS+)
(Generator! (List Synthesis))
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[[offset @scope] /////generation.anchor
argsO+ (monad.each ! (expression archive) argsS+)]
(in ($_ _.then
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 0263cb579..08160d998 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
@@ -87,7 +87,7 @@
(syntax: .public (with_vars [vars (<code>.tuple (<>.some <code>.local_identifier))
body <code>.any])
- (do {! meta.monad}
+ (do [! meta.monad]
[ids (monad.all ! (list.repeated (list.size vars) meta.seed))]
(in (list (` (let [(~+ (|> vars
(list.zipped/2 ids)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/structure.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/structure.lux
index c92df3024..84af08804 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/structure.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/structure.lux
@@ -24,7 +24,7 @@
(generate archive singletonS)
_
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[elemsT+ (monad.each ! (generate archive) elemsS+)]
(in (_.array elemsT+)))))
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 961291c53..d8adc4f60 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
@@ -118,7 +118,7 @@
(def: .public (apply generate archive [abstractionS inputsS])
(Generator Apply)
- (do {! phase.monad}
+ (do [! phase.monad]
[abstractionG (generate archive abstractionS)
inputsG (monad.each ! (generate archive) inputsS)]
(in ($_ _.composite
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 6a80f7b93..85e19d830 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
@@ -53,7 +53,7 @@
(def: .public (instance generate archive class environment arity)
(-> Phase Archive (Type Class) (Environment Synthesis) Arity (Operation (Bytecode Any)))
- (do {! phase.monad}
+ (do [! phase.monad]
[foreign* (monad.each ! (generate archive) environment)]
(in (instance' foreign* class environment arity))))
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 d61b6ae17..0a65489d9 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
@@ -113,7 +113,7 @@
(_.putstatic (type.class bytecode_name (list)) ..value::field ..value::type)
_.return))))
(row.row))]
- (io.run! (do {! (try.with io.monad)}
+ (io.run! (do [! (try.with io.monad)]
[bytecode (\ ! each (format.result class.writer)
(io.io bytecode))
_ (loader.store eval_class bytecode library)
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 38dbca9f1..d42c88f53 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
@@ -39,7 +39,7 @@
(def: .public (recur translate archive updatesS)
(Generator (List Synthesis))
- (do {! phase.monad}
+ (do [! phase.monad]
[[@begin offset] generation.anchor
updatesG (|> updatesS
list.enumeration
@@ -73,7 +73,7 @@
(def: .public (scope translate archive [offset initsS+ iterationS])
(Generator [Nat (List Synthesis) Synthesis])
- (do {! phase.monad}
+ (do [! phase.monad]
[@begin //runtime.forge_label
initsI+ (monad.each ! (translate archive) initsS+)
iterationG (generation.with_anchor [@begin offset]
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 77717033d..85fec6709 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
@@ -41,7 +41,7 @@
(def: (foreign archive variable)
(-> Archive Register (Operation (Bytecode Any)))
- (do {! ////.monad}
+ (do [! ////.monad]
[bytecode_name (\ ! each //runtime.class_name
(generation.context archive))]
(in ($_ _.composite
@@ -61,7 +61,7 @@
(def: .public (constant archive name)
(-> Archive Name (Operation (Bytecode Any)))
- (do {! ////.monad}
+ (do [! ////.monad]
[bytecode_name (\ ! each //runtime.class_name
(generation.remember archive name))]
(in (_.getstatic (type.class bytecode_name (list)) //value.field //type.value))))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/structure.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/structure.lux
index 537ba2a42..c243107b7 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/structure.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/structure.lux
@@ -36,7 +36,7 @@
(generate archive singletonS)
_
- (do {! phase.monad}
+ (do [! phase.monad]
[membersI (|> membersS
list.enumeration
(monad.each ! (function (_ [idx member])
@@ -47,7 +47,7 @@
_ (_.int (.i64 idx))
_ memberI]
_.aastore))))))]
- (in (do {! _.monad}
+ (in (do [! _.monad]
[_ (_.int (.i64 (list.size membersS)))
_ (_.anewarray $Object)]
(monad.all ! membersI))))))
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 200873e3e..63ea61d7b 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
@@ -173,7 +173,7 @@
(///////phase\in (_.local/1 (..register register) ..peek))
(#/////synthesis.Bit_Fork when thenP elseP)
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[then! (recur thenP)
else! (.case elseP
(#.Some elseP)
@@ -191,7 +191,7 @@
(^template [<tag> <format>]
[(<tag> item)
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[clauses (monad.each ! (function (_ [match then])
(do !
[then! (recur then)]
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 b5680c0bc..4f40af927 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
@@ -31,7 +31,7 @@
(def: .public (apply expression archive [functionS argsS+])
(Generator (Application Synthesis))
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[functionO (expression archive functionS)
argsO+ (monad.each ! (expression archive) argsS+)]
(in (_.apply/* argsO+ functionO))))
@@ -65,7 +65,7 @@
(def: .public (function statement expression archive [environment arity bodyS])
(-> Phase! (Generator (Abstraction Synthesis)))
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[[function_name body!] (/////generation.with_new_context archive
(do !
[@scope (\ ! each ..@scope
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 c80077e2a..83cd08060 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
@@ -60,7 +60,7 @@
... true loop
_
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[@scope (\ ! each ..@scope /////generation.next)
initsO+ (monad.each ! (expression archive) initsS+)
body! (/////generation.with_anchor [start @scope]
@@ -80,7 +80,7 @@
... true loop
_
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[[[artifact_module artifact_id] [initsO+ scope!]] (/////generation.with_new_context archive
(scope! statement expression archive true [start initsS+ bodyS]))
.let [@loop (_.var (///reference.artifact [artifact_module artifact_id]))
@@ -113,7 +113,7 @@
(def: .public (recur! statement expression archive argsS+)
(Generator! (List Synthesis))
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[[offset @scope] /////generation.anchor
argsO+ (monad.each ! (expression archive) argsS+)]
(in (..setup false offset argsO+ false (_.go_to @scope)))))
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 fcfc383a2..af7eba43a 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
@@ -104,7 +104,7 @@
(syntax: .public (with_vars [vars (<code>.tuple (<>.some <code>.local_identifier))
body <code>.any])
- (do {! meta.monad}
+ (do [! meta.monad]
[ids (monad.all ! (list.repeated (list.size vars) meta.seed))]
(in (list (` (let [(~+ (|> vars
(list.zipped/2 ids)
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 fb3cfed2e..b3db682aa 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
@@ -173,7 +173,7 @@
(///////phase\in (_.set! (..register register) ..peek))
(#/////synthesis.Bit_Fork when thenP elseP)
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[then! (recur thenP)
else! (.case elseP
(#.Some elseP)
@@ -191,7 +191,7 @@
(^template [<tag> <format>]
[(<tag> item)
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[clauses (monad.each ! (function (_ [match then])
(do !
[then! (recur then)]
@@ -282,7 +282,7 @@
(def: .public (case statement expression archive [valueS pathP])
(-> Phase! (Generator [Synthesis Path]))
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[[[case_module case_artifact] case!] (/////generation.with_new_context archive
(case! statement expression archive [valueS pathP]))
.let [@case (_.constant (///reference.artifact [case_module case_artifact]))
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 273cc581b..c5febd5c4 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
@@ -31,7 +31,7 @@
(def: .public (apply expression archive [functionS argsS+])
(Generator (Application Synthesis))
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[functionG (expression archive functionS)
argsG+ (monad.each ! (expression archive) argsS+)]
(in (_.apply/*' argsG+ functionG))))
@@ -69,7 +69,7 @@
(def: .public (function statement expression archive [environment arity bodyS])
(-> Phase! (Generator (Abstraction Synthesis)))
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[[function_name body!] (/////generation.with_new_context archive
(do !
[@scope (\ ! each ..@scope
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 a9b0731eb..307bb9718 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
@@ -56,7 +56,7 @@
... true loop
_
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[@scope (\ ! each ..@scope /////generation.next)
initsO+ (monad.each ! (expression archive) initsS+)
body! (/////generation.with_anchor [start @scope]
@@ -75,7 +75,7 @@
... true loop
_
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[[[loop_module loop_artifact] scope!] (/////generation.with_new_context archive
(..scope! statement expression archive [start initsS+ bodyS]))
.let [locals (|> initsS+
@@ -109,7 +109,7 @@
(def: .public (recur! statement expression archive argsS+)
(Generator! (List Synthesis))
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[[offset @scope] /////generation.anchor
argsO+ (monad.each ! (expression archive) argsS+)]
(in ($_ _.then
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 56ea8b098..e91f6a919 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
@@ -72,7 +72,7 @@
(syntax: .public (with_vars [vars (<code>.tuple (<>.some <code>.local_identifier))
body <code>.any])
- (do {! meta.monad}
+ (do [! meta.monad]
[ids (monad.all ! (list.repeated (list.size vars) meta.seed))]
(in (list (` (let [(~+ (|> vars
(list.zipped/2 ids)
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 a8c983bc3..b9b2b1eba 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
@@ -180,7 +180,7 @@
(-> Path (Operation (Maybe (Statement Any)))))
(.case pathP
(#/////synthesis.Bit_Fork when thenP elseP)
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[then! (recur thenP)
else! (.case elseP
(#.Some elseP)
@@ -198,7 +198,7 @@
(^template [<tag> <format>]
[(<tag> item)
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[clauses (monad.each ! (function (_ [match then])
(\ ! each
(|>> [(_.= (|> match <format>)
@@ -217,7 +217,7 @@
(def: (pattern_matching' in_closure? statement expression archive)
(-> Bit Phase! Phase Archive Path (Operation (Statement Any)))
(function (recur pathP)
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[?output (primitive_pattern_matching recur pathP)]
(.case ?output
(#.Some output)
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 bfa8a26cf..7e7197047 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
@@ -33,7 +33,7 @@
(def: .public (apply expression archive [functionS argsS+])
(Generator (Application Synthesis))
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[functionO (expression archive functionS)
argsO+ (monad.each ! (expression archive) argsS+)]
(in (_.apply/* functionO argsO+))))
@@ -52,7 +52,7 @@
(in @function))
_
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[.let [directive (_.def @function
(|> (list.enumeration inits)
(list\each (|>> product.left ..capture)))
@@ -68,7 +68,7 @@
(def: .public (function statement expression archive [environment arity bodyS])
(-> Phase! (Generator (Abstraction Synthesis)))
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[[[function_module function_artifact] body!] (/////generation.with_new_context archive
(/////generation.with_anchor 1
(statement expression archive bodyS)))
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 6597c2271..8f3496364 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
@@ -56,7 +56,7 @@
... true loop
_
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[initsO+ (monad.each ! (expression archive) initsS+)
body! (/////generation.with_anchor start
(statement expression archive bodyS))]
@@ -73,7 +73,7 @@
... true loop
_
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[initsO+ (monad.each ! (expression archive) initsS+)
[[loop_module loop_artifact] body!] (/////generation.with_new_context archive
(/////generation.with_anchor start
@@ -108,7 +108,7 @@
(def: .public (recur! statement expression archive argsS+)
(Generator! (List Synthesis))
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[offset /////generation.anchor
@temp (//case.identifier "lux_recur_values")
argsO+ (monad.each ! (expression archive) argsS+)
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 3f5cdf8d6..e71d26058 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
@@ -111,7 +111,7 @@
(syntax: .public (with_vars [vars (<code>.tuple (<>.some <code>.local_identifier))
body <code>.any])
- (do {! meta.monad}
+ (do [! meta.monad]
[ids (monad.all ! (list.repeated (list.size vars) meta.seed))]
(in (list (` (let [(~+ (|> vars
(list.zipped/2 ids)
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 b374c2fa2..298daa8f7 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
@@ -145,7 +145,7 @@
(///////phase\in (_.set! (..register register) ..peek))
(#/////synthesis.Bit_Fork when thenP elseP)
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[then! (recur thenP)
else! (.case elseP
(#.Some elseP)
@@ -163,7 +163,7 @@
(^template [<tag> <format> <=>]
[(<tag> item)
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[clauses (monad.each ! (function (_ [match then])
(do !
[then! (recur then)]
@@ -207,7 +207,7 @@
rightO)))
(^ (/////synthesis.path/alt leftP rightP))
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[leftO (recur leftP)
rightO (recur rightP)]
(in (_.try ($_ _.then
@@ -231,7 +231,7 @@
(def: .public (case expression archive [valueS pathP])
(Generator [Synthesis Path])
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[valueO (expression archive valueS)]
(<| (\ ! each (|>> ($_ _.then
(_.set! $cursor (_.list (list valueO)))
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 3a8fe9ec4..c14be2795 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
@@ -34,7 +34,7 @@
(def: .public (apply expression archive [functionS argsS+])
(Generator (Application Synthesis))
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[functionO (expression archive functionS)
argsO+ (monad.each ! (expression archive) argsS+)]
(in (_.apply argsO+ functionO))))
@@ -73,7 +73,7 @@
(def: .public (function expression archive [environment arity bodyS])
(Generator (Abstraction Synthesis))
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[[[function_module function_artifact] bodyO] (/////generation.with_new_context archive
(do !
[$self (\ ! each (|>> ///reference.artifact _.var)
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 f19c655e2..ce3face36 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
@@ -42,7 +42,7 @@
... true loop
_
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[$scope (\ ! each _.var (/////generation.identifier "loop_scope"))
initsO+ (monad.each ! (expression archive) initsS+)
bodyO (/////generation.with_anchor $scope
@@ -59,7 +59,7 @@
(def: .public (recur expression archive argsS+)
(Generator (List Synthesis))
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[$scope /////generation.anchor
argsO+ (monad.each ! (expression archive) argsS+)]
(in (_.apply argsO+ $scope))))
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 c1ebe76b6..94f19f5a0 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
@@ -66,7 +66,7 @@
(syntax: (arity: [name s.local_identifier
arity s.nat])
(with_identifiers [g!_ g!proc g!name g!translate g!inputs]
- (do {@ macro.monad}
+ (do [@ macro.monad]
[g!input+ (monad.all @ (list.repeated arity (macro.identifier "input")))]
(in (list (` (def: .public ((~ (code.local_identifier name)) (~ g!proc))
(-> (-> (..Vector (~ (code.nat arity)) Expression) Expression)
@@ -94,7 +94,7 @@
(-> Variadic (-> Text Proc))
(function (_ proc_name)
(function (_ translate inputsS)
- (do {@ macro.Monad<Meta>}
+ (do [@ macro.Monad<Meta>]
[inputsI (monad.each @ translate inputsS)]
(in (proc inputsI))))))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/procedure/host.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/procedure/host.lux
index 770e542de..416560b36 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/procedure/host.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/procedure/host.lux
@@ -37,7 +37,7 @@
... (-> Text @.Proc)
... (case inputs
... (^ (list& functionS argsS+))
-... (do {@ macro.Monad<Meta>}
+... (do [@ macro.Monad<Meta>]
... [functionO (translate functionS)
... argsO+ (monad.each @ translate argsS+)]
... (in (lua.apply functionO argsO+)))
@@ -57,7 +57,7 @@
... (-> Text @.Proc)
... (case inputs
... (^ (list& tableS [_ (#.Text field)] argsS+))
-... (do {@ macro.Monad<Meta>}
+... (do [@ macro.Monad<Meta>]
... [tableO (translate tableS)
... argsO+ (monad.each @ translate argsS+)]
... (in (lua.method field tableO argsO+)))
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 c6529aa11..361552285 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
@@ -78,7 +78,7 @@
(syntax: .public (with_vars [vars (<code>.tuple (<>.some <code>.local_identifier))
body <code>.any])
- (do {! meta.monad}
+ (do [! meta.monad]
[ids (monad.all ! (list.repeated (list.size vars) meta.seed))]
(in (list (` (let [(~+ (|> vars
(list.zipped/2 ids)
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 62de42847..1954b88e9 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
@@ -189,7 +189,7 @@
(-> Path (Operation (Maybe Statement))))
(.case pathP
(#/////synthesis.Bit_Fork when thenP elseP)
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[then! (recur thenP)
else! (.case elseP
(#.Some elseP)
@@ -207,7 +207,7 @@
(^template [<tag> <format>]
[(<tag> item)
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[clauses (monad.each ! (function (_ [match then])
(\ ! each
(|>> [(_.= (|> match <format>)
@@ -244,7 +244,7 @@
(///////phase\in (_.set (list (..register register)) ..peek))
(#/////synthesis.Bit_Fork when thenP elseP)
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[then! (recur thenP)
else! (.case elseP
(#.Some elseP)
@@ -262,7 +262,7 @@
(^template [<tag> <format>]
[(<tag> item)
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[clauses (monad.each ! (function (_ [match then])
(\ ! each
(|>> [(_.= (|> match <format>)
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 ab980ecb7..022b449f0 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
@@ -33,7 +33,7 @@
(def: .public (apply expression archive [functionS argsS+])
(Generator (Application Synthesis))
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[functionO (expression archive functionS)
argsO+ (monad.each ! (expression archive) argsS+)]
(in (_.apply_lambda/* argsO+ functionO))))
@@ -65,7 +65,7 @@
(def: .public (function statement expression archive [environment arity bodyS])
(-> Phase! (Generator (Abstraction Synthesis)))
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[[[function_module function_artifact] body!] (/////generation.with_new_context archive
(/////generation.with_anchor 1
(statement expression archive bodyS)))
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 dcfac3da2..b28c4683e 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
@@ -57,7 +57,7 @@
... true loop
_
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[initsO+ (monad.each ! (expression archive) initsS+)
body! (/////generation.with_anchor start
(statement expression archive bodyS))]
@@ -74,7 +74,7 @@
... true loop
_
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[body! (scope! statement expression archive [start initsS+ bodyS])]
(in (|> body!
(_.lambda #.None (list))
@@ -82,7 +82,7 @@
(def: .public (recur! statement expression archive argsS+)
(Generator! (List Synthesis))
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[offset /////generation.anchor
@temp (//case.identifier "lux_recur_values")
argsO+ (monad.each ! (expression archive) argsS+)
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 5168467ef..b683c967f 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
@@ -73,7 +73,7 @@
(syntax: .public (with_vars [vars (<code>.tuple (<>.some <code>.local_identifier))
body <code>.any])
- (do {! meta.monad}
+ (do [! meta.monad]
[ids (monad.all ! (list.repeated (list.size vars) meta.seed))]
(in (list (` (let [(~+ (|> vars
(list.zipped/2 ids)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/case.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/case.lux
index aa81c3c04..887614298 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/case.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/case.lux
@@ -139,7 +139,7 @@
(///////phase\in (_.define_constant (..register register) ..peek))
(#/////synthesis.Bit_Fork when thenP elseP)
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[then! (recur thenP)
else! (.case elseP
(#.Some elseP)
@@ -157,7 +157,7 @@
(^template [<tag> <format> <=>]
[(<tag> item)
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[clauses (monad.each ! (function (_ [match then])
(do !
[then! (recur then)]
@@ -199,7 +199,7 @@
rightO))))
(^ (/////synthesis.path/alt leftP rightP))
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[leftO (recur leftP)
rightO (recur rightP)]
(in (try_pm (_.begin (list restore_cursor!
@@ -216,7 +216,7 @@
(def: .public (case expression archive [valueS pathP])
(Generator [Synthesis Path])
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[valueO (expression archive valueS)]
(<| (\ ! each (_.let (list [@cursor (_.list/* (list valueO))]
[@savepoint (_.list/* (list))])))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/extension/common.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/extension/common.lux
index 15e75a8e4..380b59265 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/extension/common.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/extension/common.lux
@@ -41,7 +41,7 @@
(syntax: (arity: [name <code>.local_identifier
arity <code>.nat])
(with_identifiers [g!_ g!extension g!name g!phase g!inputs]
- (do {! macro.monad}
+ (do [! macro.monad]
[g!input+ (monad.all ! (list.repeated arity (macro.identifier "input")))]
(in (list (` (def: .public ((~ (code.local_identifier name)) (~ g!extension))
(-> (-> (..Vector (~ (code.nat arity)) Expression) Computation)
@@ -68,7 +68,7 @@
(-> Variadic Handler)
(function (_ extension_name)
(function (_ phase inputsS)
- (do {! /////.monad}
+ (do [! /////.monad]
[inputsI (monad.each ! phase inputsS)]
(in (extension inputsI))))))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/function.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/function.lux
index 7a8d428b1..1985f5101 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/function.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/function.lux
@@ -31,7 +31,7 @@
(def: .public (apply expression archive [functionS argsS+])
(Generator (Application Synthesis))
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[functionO (expression archive functionS)
argsO+ (monad.each ! (expression archive) argsS+)]
(in (_.apply/* argsO+ functionO))))
@@ -62,7 +62,7 @@
(def: .public (function expression archive [environment arity bodyS])
(Generator (Abstraction Synthesis))
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[[function_name bodyO] (/////generation.with_new_context archive
(do !
[@self (\ ! each (|>> ///reference.artifact _.var)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/loop.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/loop.lux
index 62bfc3d69..301679a58 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/loop.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/loop.lux
@@ -45,7 +45,7 @@
... true loop
_
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[initsO+ (monad.each ! (expression archive) initsS+)
bodyO (/////generation.with_anchor @scope
(expression archive bodyS))]
@@ -58,7 +58,7 @@
(def: .public (recur expression archive argsS+)
(Generator (List Synthesis))
- (do {! ///////phase.monad}
+ (do [! ///////phase.monad]
[@scope /////generation.anchor
argsO+ (monad.each ! (expression archive) argsS+)]
(in (_.apply/* argsO+ @scope))))
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 316607dc7..9da1f2a8f 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
@@ -60,7 +60,7 @@
(syntax: .public (with_vars [vars (<code>.tuple (<>.some <code>.local_identifier))
body <code>.any])
- (do {! meta.monad}
+ (do [! meta.monad]
[ids (monad.all ! (list.repeated (list.size vars) meta.seed))]
(in (list (` (let [(~+ (|> vars
(list.zipped/2 ids)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/case.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/case.lux
index a6271e4cc..b92c07953 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/case.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/case.lux
@@ -225,7 +225,7 @@
(def: .public (synthesize_case synthesize archive input [[headP headA] tailPA+])
(-> Phase Archive Synthesis Match (Operation Synthesis))
- (do {! ///.monad}
+ (do [! ///.monad]
[headSP (path archive synthesize headP headA)
tailSP+ (monad.each ! (product.uncurried (path archive synthesize)) tailPA+)]
(in (/.branch/case [input (list\mix weave headSP tailSP+)]))))
@@ -276,7 +276,7 @@
(def: .public (synthesize synthesize^ [headB tailB+] archive inputA)
(-> Phase Match Phase)
- (do {! ///.monad}
+ (do [! ///.monad]
[inputS (synthesize^ archive inputA)]
(case [headB tailB+]
(^ (!masking @variable @output))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/function.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/function.lux
index d34765656..ca9a467de 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/function.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/function.lux
@@ -49,7 +49,7 @@
(-> Phase Phase)
(function (_ archive exprA)
(let [[funcA argsA] (////analysis.application exprA)]
- (do {! phase.monad}
+ (do [! phase.monad]
[funcS (phase archive funcA)
argsS (monad.each ! (phase archive) argsA)]
(with_expansions [<apply> (as_is (/.function/apply [funcS argsS]))]
@@ -105,7 +105,7 @@
([#/.Alt] [#/.Seq])
(#/.Bit_Fork when then else)
- (do {! phase.monad}
+ (do [! phase.monad]
[then (grow_path grow then)
else (case else
(#.Some else)
@@ -117,7 +117,7 @@
(^template [<tag>]
[(<tag> [[test then] elses])
- (do {! phase.monad}
+ (do [! phase.monad]
[then (grow_path grow then)
elses (monad.each ! (function (_ [else_test else_then])
(do !
@@ -199,7 +199,7 @@
(#/.Loop loop)
(case loop
(#/.Scope [start initsS+ iterationS])
- (do {! phase.monad}
+ (do [! phase.monad]
[initsS+' (monad.each ! (grow environment) initsS+)
iterationS' (grow environment iterationS)]
(in (/.loop/scope [(++ start) initsS+' iterationS'])))
@@ -212,7 +212,7 @@
(#/.Function function)
(case function
(#/.Abstraction [_env _arity _body])
- (do {! phase.monad}
+ (do [! phase.monad]
[_env' (monad.each !
(|>> (case> (#/.Reference (#////reference.Variable (#////reference/variable.Foreign register)))
(..find_foreign environment register)
@@ -223,7 +223,7 @@
(in (/.function/abstraction [_env' _arity _body])))
(#/.Apply funcS argsS+)
- (do {! phase.monad}
+ (do [! phase.monad]
[funcS (grow environment funcS)
argsS+ (monad.each ! (grow environment) argsS+)]
(in (/.function/apply (case funcS
@@ -245,7 +245,7 @@
(def: .public (abstraction phase environment archive bodyA)
(-> Phase (Environment Analysis) Phase)
- (do {! phase.monad}
+ (do [! phase.monad]
[currying? /.currying?
environment (monad.each ! (phase archive) environment)
bodyS (/.with_currying? true
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/loop.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/loop.lux
index 8250d9ea9..614a0e998 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/loop.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/loop.lux
@@ -42,7 +42,7 @@
([#/.Alt] [#/.Seq])
(#/.Bit_Fork when then else)
- (do {! maybe.monad}
+ (do [! maybe.monad]
[then (recur then)
else (case else
(#.Some else)
@@ -54,7 +54,7 @@
(^template [<tag>]
[(<tag> [[test then] elses])
- (do {! maybe.monad}
+ (do [! maybe.monad]
[then (recur then)
elses (monad.each ! (function (_ [else_test else_then])
(do !
@@ -139,7 +139,7 @@
(in (/.branch/get [path record])))
(^ (/.loop/scope scope))
- (do {! maybe.monad}
+ (do [! maybe.monad]
[inits' (|> scope
(value@ #/.inits)
(monad.each ! (recur false)))
@@ -154,12 +154,12 @@
(maybe\each (|>> /.loop/recur)))
(^ (/.function/abstraction [environment arity body]))
- (do {! maybe.monad}
+ (do [! maybe.monad]
[environment' (monad.each ! (recur false) environment)]
(in (/.function/abstraction [environment' arity body])))
(^ (/.function/apply [abstraction arguments]))
- (do {! maybe.monad}
+ (do [! maybe.monad]
[arguments' (monad.each ! (recur false) arguments)]
(with_expansions [<application> (as_is (do !
[abstraction' (recur false abstraction)]
@@ -179,7 +179,7 @@
... TODO: Stop relying on this custom code.
(^ (#/.Extension ["lux syntax char case!" (list& input else matches)]))
(if return?
- (do {! maybe.monad}
+ (do [! maybe.monad]
[input (recur false input)
matches (monad.each !
(function (_ match)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/variable.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/variable.lux
index 4c6deb529..225cf2ad5 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/variable.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/variable.lux
@@ -253,7 +253,7 @@
path])
(#/.Bit_Fork when then else)
- (do {! try.monad}
+ (do [! try.monad]
[[redundancy then] (recur [redundancy then])
[redundancy else] (case else
(#.Some else)
@@ -268,7 +268,7 @@
(^template [<tag> <type>]
[(<tag> [[test then] elses])
- (do {! try.monad}
+ (do [! try.monad]
[[redundancy then] (recur [redundancy then])
[redundancy elses] (..list_optimization (: (Optimization [<type> Path])
(function (_ [redundancy [else_test else_then]])
@@ -417,7 +417,7 @@
(#/.Function function)
(case function
(#/.Abstraction [environment arity body])
- (do {! try.monad}
+ (do [! try.monad]
[[redundancy environment] (..list_optimization optimization' [redundancy environment])
[_ body] (optimization' [(..default arity) body])]
(in [redundancy
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/program.lux b/stdlib/source/library/lux/tool/compiler/language/lux/program.lux
index 76bf6d43e..297721289 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/program.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/program.lux
@@ -34,7 +34,7 @@
(def: .public (context archive)
(-> Archive (Try Context))
- (do {! try.monad}
+ (do [! try.monad]
[registries (|> archive
archive.archived
(monad.each !
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 65211607f..37a3109c0 100644
--- a/stdlib/source/library/lux/tool/compiler/meta/archive/artifact.lux
+++ b/stdlib/source/library/lux/tool/compiler/meta/archive/artifact.lux
@@ -133,7 +133,7 @@
(def: .public parser
(Parser Registry)
(let [category (: (Parser Category)
- (do {! <>.monad}
+ (do [! <>.monad]
[tag <binary>.nat]
(case tag
(^template [<nat> <tag> <parser>]
diff --git a/stdlib/source/library/lux/tool/compiler/meta/cache/dependency.lux b/stdlib/source/library/lux/tool/compiler/meta/cache/dependency.lux
index c0e638425..fa4e2af3d 100644
--- a/stdlib/source/library/lux/tool/compiler/meta/cache/dependency.lux
+++ b/stdlib/source/library/lux/tool/compiler/meta/cache/dependency.lux
@@ -55,7 +55,7 @@
(-> Archive Graph)
(let [memo (: (Memo Module Ancestry)
(function (_ recur module)
- (do {! state.monad}
+ (do [! state.monad]
[.let [parents (case (archive.find module archive)
(#try.Success [descriptor document])
(value@ #descriptor.references descriptor)
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 6e4fd6d12..41710dfb8 100644
--- a/stdlib/source/library/lux/tool/compiler/meta/io/archive.lux
+++ b/stdlib/source/library/lux/tool/compiler/meta/io/archive.lux
@@ -100,7 +100,7 @@
(def: .public (prepare fs static module_id)
(-> (file.System Async) Static archive.ID (Async (Try Any)))
- (do {! async.monad}
+ (do [! async.monad]
[.let [module (..module fs static module_id)]
module_exists? (\ fs directory? module)]
(if module_exists?
@@ -166,7 +166,7 @@
(def: (analysis_state host archive)
(-> Target Archive (Try .Lux))
- (do {! try.monad}
+ (do [! try.monad]
[modules (: (Try (List [Module .Module]))
(monad.each ! (function (_ module)
(do !
@@ -214,7 +214,7 @@
(All (_ expression directive)
(-> Text (generation.Host expression directive) archive.ID (Row Artifact) (Dictionary Text Binary) (Document .Module)
(Try [(Document .Module) Bundles Output])))
- (do {! try.monad}
+ (do [! try.monad]
[[definitions bundles] (: (Try [Definitions Bundles Output])
(loop [input (row.list expected)
definitions (: Definitions
@@ -362,7 +362,7 @@
(def: (purge! fs static [module_name module_id])
(-> (file.System Async) Static [Module archive.ID] (Async (Try Any)))
- (do {! (try.with async.monad)}
+ (do [! (try.with async.monad)]
[.let [cache (..module fs static module_id)]
_ (|> cache
(\ fs directory_files)
@@ -417,7 +417,7 @@
(All (_ expression directive)
(-> (generation.Host expression directive) (file.System Async) Static Import (List Context) Archive
(Async (Try [Archive .Lux Bundles]))))
- (do {! (try.with async.monad)}
+ (do [! (try.with async.monad)]
[pre_loaded_caches (|> archive
archive.reservations
(monad.each ! (function (_ [module_name module_id])
@@ -452,7 +452,7 @@
(in [[module_name descriptor,document,output]
bundles])))))]
(async\in
- (do {! try.monad}
+ (do [! try.monad]
[archive (monad.mix !
(function (_ [[module descriptor,document,output] _bundle] archive)
(archive.has module descriptor,document,output archive))
diff --git a/stdlib/source/library/lux/tool/compiler/meta/io/context.lux b/stdlib/source/library/lux/tool/compiler/meta/io/context.lux
index 161700dd4..5331608b7 100644
--- a/stdlib/source/library/lux/tool/compiler/meta/io/context.lux
+++ b/stdlib/source/library/lux/tool/compiler/meta/io/context.lux
@@ -77,7 +77,7 @@
(Async (Try [file.Path Binary])))
... Preference is explicitly being given to Lux files that have a host extension.
... Normal Lux files (i.e. without a host extension) are then picked as fallback files.
- (do {! async.monad}
+ (do [! async.monad]
[outcome (..find_source_file fs importer contexts module (..full_host_extension partial_host_extension))]
(case outcome
(#try.Success path)
@@ -86,7 +86,7 @@
(\ (try.with !) each (|>> [path])))
(#try.Failure _)
- (do {! (try.with !)}
+ (do [! (try.with !)]
[path (..find_source_file fs importer contexts module ..lux_extension)]
(|> path
(\ fs read)
@@ -113,7 +113,7 @@
(Async (Try [file.Path Binary])))
... Preference is explicitly being given to Lux files that have a host extension.
... Normal Lux files (i.e. without a host extension) are then picked as fallback files.
- (do {! async.monad}
+ (do [! async.monad]
[outcome (find_local_source_file fs importer import contexts partial_host_extension module)]
(case outcome
(#try.Success [path data])
@@ -142,7 +142,7 @@
(def: (context_listing fs context directory enumeration)
(-> (file.System Async) Context file.Path Enumeration (Async (Try Enumeration)))
- (do {! (try.with async.monad)}
+ (do [! (try.with async.monad)]
[enumeration (|> directory
(\ fs directory_files)
(\ ! each (monad.mix ! (function (_ file enumeration)
diff --git a/stdlib/source/library/lux/tool/compiler/meta/packager/jvm.lux b/stdlib/source/library/lux/tool/compiler/meta/packager/jvm.lux
index c82916769..1bd4e94a9 100644
--- a/stdlib/source/library/lux/tool/compiler/meta/packager/jvm.lux
+++ b/stdlib/source/library/lux/tool/compiler/meta/packager/jvm.lux
@@ -245,7 +245,7 @@
(def: .public (package static)
(-> Static Packager)
(function (_ host_dependencies archive program)
- (do {! try.monad}
+ (do [! try.monad]
[order (dependency.load_order $.key archive)
.let [buffer (java/io/ByteArrayOutputStream::new (.int ..mebi_byte))]
sink (|> order
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 d1f8d6349..21e2bc7b4 100644
--- a/stdlib/source/library/lux/tool/compiler/meta/packager/scheme.lux
+++ b/stdlib/source/library/lux/tool/compiler/meta/packager/scheme.lux
@@ -99,7 +99,7 @@
(-> Instant (Dictionary Module archive.ID)
[Module [archive.ID [Descriptor (Document .Module) Output]]]
(Try tar.Entry))
- (do {! try.monad}
+ (do [! try.monad]
[bundle (: (Try _.Expression)
(..bundle_module output))
entry_content (: (Try tar.Content)
@@ -119,7 +119,7 @@
(def: .public (package now)
(-> Instant Packager)
(function (package host_dependencies archive program)
- (do {! try.monad}
+ (do [! try.monad]
[order (dependency.load_order $.key archive)
.let [mapping (|> order
(list\each (function (_ [module [module_id [descriptor document output]]])
diff --git a/stdlib/source/library/lux/tool/compiler/meta/packager/script.lux b/stdlib/source/library/lux/tool/compiler/meta/packager/script.lux
index 6ed4f3f71..43ba5c04a 100644
--- a/stdlib/source/library/lux/tool/compiler/meta/packager/script.lux
+++ b/stdlib/source/library/lux/tool/compiler/meta/packager/script.lux
@@ -62,7 +62,7 @@
(-> directive directive)
Packager))
(function (package host_dependencies archive program)
- (do {! try.monad}
+ (do [! try.monad]
[order (dependency.load_order $.key archive)]
(|> order
(list\each (function (_ [module [module_id [descriptor document output]]])
diff --git a/stdlib/source/library/lux/tool/interpreter.lux b/stdlib/source/library/lux/tool/interpreter.lux
index 3a91862f8..b101a278a 100644
--- a/stdlib/source/library/lux/tool/interpreter.lux
+++ b/stdlib/source/library/lux/tool/interpreter.lux
@@ -100,7 +100,7 @@
(def: (interpret_expression code)
(All (_ anchor expression directive)
(-> Code <Interpretation>))
- (do {! phase.monad}
+ (do [! phase.monad]
[state (extension.lifted phase.get_state)
.let [analyse (value@ [#directive.analysis #directive.phase] state)
synthesize (value@ [#directive.synthesis #directive.phase] state)
@@ -199,7 +199,7 @@
Configuration
(generation.Bundle anchor expression directive)
(! Any)))
- (do {! Monad<!>}
+ (do [! Monad<!>]
[state (initialize Monad<!> Console<!> platform configuration)]
(loop [context [#configuration configuration
#state state