aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/library')
-rw-r--r--stdlib/source/library/lux/abstract/comonad.lux2
-rw-r--r--stdlib/source/library/lux/abstract/monad.lux2
-rw-r--r--stdlib/source/library/lux/control/concatenative.lux2
-rw-r--r--stdlib/source/library/lux/control/concurrency/actor.lux10
-rw-r--r--stdlib/source/library/lux/control/concurrency/async.lux4
-rw-r--r--stdlib/source/library/lux/control/concurrency/frp.lux12
-rw-r--r--stdlib/source/library/lux/control/concurrency/semaphore.lux2
-rw-r--r--stdlib/source/library/lux/control/concurrency/stm.lux8
-rw-r--r--stdlib/source/library/lux/control/concurrency/thread.lux4
-rw-r--r--stdlib/source/library/lux/control/function/memo.lux2
-rw-r--r--stdlib/source/library/lux/control/function/mutual.lux4
-rw-r--r--stdlib/source/library/lux/control/parser.lux10
-rw-r--r--stdlib/source/library/lux/control/parser/binary.lux2
-rw-r--r--stdlib/source/library/lux/control/parser/type.lux6
-rw-r--r--stdlib/source/library/lux/control/region.lux2
-rw-r--r--stdlib/source/library/lux/control/security/capability.lux2
-rw-r--r--stdlib/source/library/lux/control/state.lux2
-rw-r--r--stdlib/source/library/lux/data/collection/list.lux2
-rw-r--r--stdlib/source/library/lux/data/format/json.lux6
-rw-r--r--stdlib/source/library/lux/data/format/tar.lux8
-rw-r--r--stdlib/source/library/lux/data/text/regex.lux4
-rw-r--r--stdlib/source/library/lux/debug.lux2
-rw-r--r--stdlib/source/library/lux/ffi.jvm.lux4
-rw-r--r--stdlib/source/library/lux/ffi.old.lux6
-rw-r--r--stdlib/source/library/lux/macro.lux4
-rw-r--r--stdlib/source/library/lux/macro/local.lux2
-rw-r--r--stdlib/source/library/lux/macro/syntax.lux2
-rw-r--r--stdlib/source/library/lux/macro/syntax/definition.lux2
-rw-r--r--stdlib/source/library/lux/macro/template.lux2
-rw-r--r--stdlib/source/library/lux/math/number/frac.lux2
-rw-r--r--stdlib/source/library/lux/math/random.lux8
-rw-r--r--stdlib/source/library/lux/meta.lux2
-rw-r--r--stdlib/source/library/lux/target/jvm/bytecode.lux12
-rw-r--r--stdlib/source/library/lux/target/jvm/bytecode/instruction.lux8
-rw-r--r--stdlib/source/library/lux/target/jvm/class.lux2
-rw-r--r--stdlib/source/library/lux/target/jvm/constant/pool.lux2
-rw-r--r--stdlib/source/library/lux/target/jvm/loader.lux2
-rw-r--r--stdlib/source/library/lux/target/jvm/method.lux2
-rw-r--r--stdlib/source/library/lux/target/jvm/reflection.lux4
-rw-r--r--stdlib/source/library/lux/target/jvm/type/lux.lux2
-rw-r--r--stdlib/source/library/lux/test.lux4
-rw-r--r--stdlib/source/library/lux/time.lux2
-rw-r--r--stdlib/source/library/lux/time/instant.lux2
-rw-r--r--stdlib/source/library/lux/time/year.lux2
-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
-rw-r--r--stdlib/source/library/lux/type/check.lux6
-rw-r--r--stdlib/source/library/lux/type/implicit.lux14
-rw-r--r--stdlib/source/library/lux/type/poly.lux2
-rw-r--r--stdlib/source/library/lux/type/resource.lux6
-rw-r--r--stdlib/source/library/lux/world/console.lux6
-rw-r--r--stdlib/source/library/lux/world/file.lux32
-rw-r--r--stdlib/source/library/lux/world/file/watch.lux18
-rw-r--r--stdlib/source/library/lux/world/net/http/client.lux8
-rw-r--r--stdlib/source/library/lux/world/net/http/query.lux4
-rw-r--r--stdlib/source/library/lux/world/program.lux4
-rw-r--r--stdlib/source/library/lux/world/shell.lux10
149 files changed, 382 insertions, 382 deletions
diff --git a/stdlib/source/library/lux/abstract/comonad.lux b/stdlib/source/library/lux/abstract/comonad.lux
index 98d8649e8..b9175ecf1 100644
--- a/stdlib/source/library/lux/abstract/comonad.lux
+++ b/stdlib/source/library/lux/abstract/comonad.lux
@@ -26,7 +26,7 @@
(macro: .public (be tokens state)
(case (: (Maybe [(Maybe Text) Code (List Code) Code])
(case tokens
- (^ (list [_ (#.Record (list [[_ (#.Identifier ["" name])] comonad]))] [_ (#.Tuple bindings)] body))
+ (^ (list [_ (#.Tuple (list [_ (#.Identifier ["" name])] comonad))] [_ (#.Tuple bindings)] body))
(#.Some [(#.Some name) comonad bindings body])
(^ (list comonad [_ (#.Tuple bindings)] body))
diff --git a/stdlib/source/library/lux/abstract/monad.lux b/stdlib/source/library/lux/abstract/monad.lux
index d7a9aaf1b..cc2aadad1 100644
--- a/stdlib/source/library/lux/abstract/monad.lux
+++ b/stdlib/source/library/lux/abstract/monad.lux
@@ -57,7 +57,7 @@
(macro: .public (do tokens state)
(case (: (Maybe [(Maybe Text) Code (List Code) Code])
(case tokens
- (^ (list [_ (#.Record (list [[_ (#.Identifier ["" name])] monad]))] [_ (#.Tuple bindings)] body))
+ (^ (list [_ (#.Tuple (list [_ (#.Identifier ["" name])] monad))] [_ (#.Tuple bindings)] body))
(#.Some [(#.Some name) monad bindings body])
(^ (list monad [_ (#.Tuple bindings)] body))
diff --git a/stdlib/source/library/lux/control/concatenative.lux b/stdlib/source/library/lux/control/concatenative.lux
index 801e9b186..9d9e419f7 100644
--- a/stdlib/source/library/lux/control/concatenative.lux
+++ b/stdlib/source/library/lux/control/concatenative.lux
@@ -135,7 +135,7 @@
(syntax: .public (apply [arity (<>.only (n.> 0) <code>.nat)])
(with_identifiers [g!_ g!func g!stack g!output]
- (monad.do {! meta.monad}
+ (monad.do [! meta.monad]
[g!inputs (|> (macro.identifier "input") (list.repeated arity) (monad.all !))]
(in (list (` (: (All ((~ g!_) (~+ g!inputs) (~ g!output))
(-> (-> (~+ g!inputs) (~ g!output))
diff --git a/stdlib/source/library/lux/control/concurrency/actor.lux b/stdlib/source/library/lux/control/concurrency/actor.lux
index 569a20bd2..9958c7e0b 100644
--- a/stdlib/source/library/lux/control/concurrency/actor.lux
+++ b/stdlib/source/library/lux/control/concurrency/actor.lux
@@ -52,7 +52,7 @@
[(Async [a Mailbox])
(Resolver [a Mailbox])])
(IO (List a))))
- (do {! io.monad}
+ (do [! io.monad]
[current (async.value read)]
(case current
(#.Some [head tail])
@@ -93,7 +93,7 @@
#mailbox (atom (async.async []))]))
process (loop [state (on_init init)
[|mailbox| _] (io.run! (atom.read! (value@ #mailbox (:representation self))))]
- (do {! async.monad}
+ (do [! async.monad]
[[head tail] |mailbox|
?state' (on_mail head state self)]
(case ?state'
@@ -134,7 +134,7 @@
(def: .public (mail! mail actor)
(All (_ s) (-> (Mail s) (Actor s) (IO (Try Any))))
- (do {! io.monad}
+ (do [! io.monad]
[alive? (..alive? actor)]
(if alive?
(let [entry [mail (async.async [])]]
@@ -171,7 +171,7 @@
(async.async []))]
[async
(function (_ state self)
- (do {! async.monad}
+ (do [! async.monad]
[outcome (message state self)]
(case outcome
(#try.Success [state' return])
@@ -363,7 +363,7 @@
stop (: Stop
(atom.write! ..stop! signal))]
(frp.subscribe! (function (_ event)
- (do {! io.monad}
+ (do [! io.monad]
[continue? (atom.read! signal)]
(if continue?
(|> actor
diff --git a/stdlib/source/library/lux/control/concurrency/async.lux b/stdlib/source/library/lux/control/concurrency/async.lux
index 6da6384cb..b959ef3b7 100644
--- a/stdlib/source/library/lux/control/concurrency/async.lux
+++ b/stdlib/source/library/lux/control/concurrency/async.lux
@@ -30,7 +30,7 @@
(All (_ a) (-> (Async a) (Resolver a)))
(function (resolve value)
(let [async (:representation async)]
- (do {! io.monad}
+ (do [! io.monad]
[(^@ old [_value _observers]) (atom.read! async)]
(case _value
(#.Some _)
@@ -64,7 +64,7 @@
(def: .public (upon! f async)
(All (_ a) (-> (-> a (IO Any)) (Async a) (IO Any)))
- (do {! io.monad}
+ (do [! io.monad]
[.let [async (:representation async)]
(^@ old [_value _observers]) (atom.read! async)]
(case _value
diff --git a/stdlib/source/library/lux/control/concurrency/frp.lux b/stdlib/source/library/lux/control/concurrency/frp.lux
index e318bbcd9..eab415358 100644
--- a/stdlib/source/library/lux/control/concurrency/frp.lux
+++ b/stdlib/source/library/lux/control/concurrency/frp.lux
@@ -37,7 +37,7 @@
(implementation
(def: close
(loop [_ []]
- (do {! io.monad}
+ (do [! io.monad]
[current (atom.read! sink)
stopped? (current #.None)]
(if stopped?
@@ -54,7 +54,7 @@
(def: (feed value)
(loop [_ []]
- (do {! io.monad}
+ (do [! io.monad]
[current (atom.read! sink)
.let [[next resolve_next] (:sharing [a]
(async.Resolver (Maybe [a (Channel a)]))
@@ -125,7 +125,7 @@
(exec
(: (Async Any)
(loop [mma mma]
- (do {! async.monad}
+ (do [! async.monad]
[?mma mma]
(case ?mma
(#.Some [ma mma'])
@@ -194,7 +194,7 @@
(All (_ a b)
(-> (-> b a (Async a)) a (Channel b)
(Async a)))
- (do {! async.monad}
+ (do [! async.monad]
[item channel]
(case item
#.None
@@ -209,7 +209,7 @@
(All (_ a b)
(-> (-> b a (Async a)) a (Channel b)
(Channel a)))
- (do {! async.monad}
+ (do [! async.monad]
[item channel]
(case item
#.None
@@ -273,7 +273,7 @@
(def: .public (list channel)
(All (_ a) (-> (Channel a) (Async (List a))))
- (do {! async.monad}
+ (do [! async.monad]
[item channel]
(case item
(#.Some [head tail])
diff --git a/stdlib/source/library/lux/control/concurrency/semaphore.lux b/stdlib/source/library/lux/control/concurrency/semaphore.lux
index 806305f0a..8256f221b 100644
--- a/stdlib/source/library/lux/control/concurrency/semaphore.lux
+++ b/stdlib/source/library/lux/control/concurrency/semaphore.lux
@@ -75,7 +75,7 @@
(Ex (_ k) (-> Semaphore (Async (Try Int))))
(let [semaphore (:representation semaphore)]
(async.future
- (do {! io.monad}
+ (do [! io.monad]
[[pre post] (atom.update! (function (_ state)
(if (i.= (.int (value@ #max_positions state))
(value@ #open_positions state))
diff --git a/stdlib/source/library/lux/control/concurrency/stm.lux b/stdlib/source/library/lux/control/concurrency/stm.lux
index db8b266c8..36508615e 100644
--- a/stdlib/source/library/lux/control/concurrency/stm.lux
+++ b/stdlib/source/library/lux/control/concurrency/stm.lux
@@ -46,7 +46,7 @@
(def: (write! new_value var)
(All (_ a) (-> a (Var a) (IO Any)))
- (do {! io.monad}
+ (do [! io.monad]
[.let [var' (:representation var)]
(^@ old [old_value observers]) (atom.read! var')
succeeded? (atom.compare_and_swap! old [new_value observers] var')]
@@ -212,7 +212,7 @@
(def: (issue_commit! commit)
(All (_ a) (-> (Commit a) (IO Any)))
(let [entry [commit (async.async [])]]
- (do {! io.monad}
+ (do [! io.monad]
[|commits|&resolve (atom.read! pending_commits)]
(loop [[|commits| resolve] |commits|&resolve]
(do !
@@ -233,14 +233,14 @@
(let [[stm_proc output resolve] commit
[finished_tx value] (stm_proc fresh_tx)]
(if (can_commit? finished_tx)
- (do {! io.monad}
+ (do [! io.monad]
[_ (monad.each ! ..commit_var! finished_tx)]
(resolve value))
(..issue_commit! commit))))
(def: start_commit_processor!
(IO Any)
- (do {! io.monad}
+ (do [! io.monad]
[flag (atom.read! commit_processor_flag)]
(if flag
(in [])
diff --git a/stdlib/source/library/lux/control/concurrency/thread.lux b/stdlib/source/library/lux/control/concurrency/thread.lux
index 40c3d1029..5ad9c4265 100644
--- a/stdlib/source/library/lux/control/concurrency/thread.lux
+++ b/stdlib/source/library/lux/control/concurrency/thread.lux
@@ -127,7 +127,7 @@
(in []))}
... Default
- (do {! io.monad}
+ (do [! io.monad]
[now (\ ! each (|>> instant.millis .nat) instant.now)
_ (atom.update! (|>> (#.Item [#creation now
#delay milli_seconds
@@ -148,7 +148,7 @@
(def: .public run!
(IO Any)
(loop [_ []]
- (do {! io.monad}
+ (do [! io.monad]
[threads (atom.read! ..runner)]
(case threads
... And... we're done!
diff --git a/stdlib/source/library/lux/control/function/memo.lux b/stdlib/source/library/lux/control/function/memo.lux
index 40b9dbc7e..6ed8b6576 100644
--- a/stdlib/source/library/lux/control/function/memo.lux
+++ b/stdlib/source/library/lux/control/function/memo.lux
@@ -20,7 +20,7 @@
(Mixin i (State (Dictionary i o) o)))
(function (_ delegate recur)
(function (_ input)
- (do {! state.monad}
+ (do [! state.monad]
[memory state.get]
(case (dictionary.value input memory)
(#.Some output)
diff --git a/stdlib/source/library/lux/control/function/mutual.lux b/stdlib/source/library/lux/control/function/mutual.lux
index 11c2ca416..7781fd3e5 100644
--- a/stdlib/source/library/lux/control/function/mutual.lux
+++ b/stdlib/source/library/lux/control/function/mutual.lux
@@ -67,7 +67,7 @@
_
(macro.with_identifiers [g!context g!output]
- (do {! meta.monad}
+ (do [! meta.monad]
[here_name meta.current_module_name
hidden_names (monad.each ! (//.constant (macro.identifier "mutual_function#"))
functions)
@@ -119,7 +119,7 @@
_
(macro.with_identifiers [g!context g!output]
- (do {! meta.monad}
+ (do [! meta.monad]
[here_name meta.current_module_name
hidden_names (monad.each ! (//.constant (macro.identifier "mutual_function#"))
functions)
diff --git a/stdlib/source/library/lux/control/parser.lux b/stdlib/source/library/lux/control/parser.lux
index 0bb2b1782..34a00fa6a 100644
--- a/stdlib/source/library/lux/control/parser.lux
+++ b/stdlib/source/library/lux/control/parser.lux
@@ -94,7 +94,7 @@
(def: .public (and first second)
(All (_ s a b)
(-> (Parser s a) (Parser s b) (Parser s [a b])))
- (do {! ..monad}
+ (do [! ..monad]
[head first]
(\ ! each (|>> [head]) second)))
@@ -149,7 +149,7 @@
(All (_ s a) (-> Nat (Parser s a) (Parser s (List a))))
(case amount
0 (\ ..monad in (list))
- _ (do {! ..monad}
+ _ (do [! ..monad]
[x parser]
(|> parser
(exactly (-- amount))
@@ -157,7 +157,7 @@
(def: .public (at_least amount parser)
(All (_ s a) (-> Nat (Parser s a) (Parser s (List a))))
- (do {! ..monad}
+ (do [! ..monad]
[minimum (..exactly amount parser)]
(\ ! each (list\composite minimum) (..some parser))))
@@ -177,7 +177,7 @@
(def: .public (between minimum additional parser)
(All (_ s a) (-> Nat Nat (Parser s a) (Parser s (List a))))
- (do {! ..monad}
+ (do [! ..monad]
[minimum (..exactly minimum parser)]
(case additional
0 (in minimum)
@@ -186,7 +186,7 @@
(def: .public (separated_by separator parser)
(All (_ s a b) (-> (Parser s b) (Parser s a) (Parser s (List a))))
- (do {! ..monad}
+ (do [! ..monad]
[?x (..maybe parser)]
(case ?x
#.None
diff --git a/stdlib/source/library/lux/control/parser/binary.lux b/stdlib/source/library/lux/control/parser/binary.lux
index d55ac46ff..1491e0cea 100644
--- a/stdlib/source/library/lux/control/parser/binary.lux
+++ b/stdlib/source/library/lux/control/parser/binary.lux
@@ -107,7 +107,7 @@
["Tag value" (%.nat byte)]))
(template: (!variant <case>+)
- [(do {! //.monad}
+ [(do [! //.monad]
[flag (: (Parser Nat)
..bits/8)]
(with_expansions [<case>+' (template.spliced <case>+)]
diff --git a/stdlib/source/library/lux/control/parser/type.lux b/stdlib/source/library/lux/control/parser/type.lux
index a28ce4c58..5724fc98a 100644
--- a/stdlib/source/library/lux/control/parser/type.lux
+++ b/stdlib/source/library/lux/control/parser/type.lux
@@ -176,7 +176,7 @@
(def: .public (polymorphic poly)
(All (_ a) (-> (Parser a) (Parser [Code (List Code) a])))
- (do {! //.monad}
+ (do [! //.monad]
[headT any
funcI (\ ! each dictionary.size ..env)
[num_args non_poly] (local (list headT) ..polymorphic')
@@ -306,7 +306,7 @@
(def: .public (recursive poly)
(All (_ a) (-> (Parser a) (Parser [Code a])))
- (do {! //.monad}
+ (do [! //.monad]
[headT any]
(case (type.anonymous headT)
(^ (#.Apply (|recursion_dummy|) (#.UnivQ _ headT')))
@@ -336,7 +336,7 @@
(def: .public recursive_call
(Parser Code)
- (do {! //.monad}
+ (do [! //.monad]
[env ..env
[funcT argsT] (..applied (//.and any (//.many any)))
_ (local (list funcT) (..parameter! 0))
diff --git a/stdlib/source/library/lux/control/region.lux b/stdlib/source/library/lux/control/region.lux
index 536b34391..79bf84c90 100644
--- a/stdlib/source/library/lux/control/region.lux
+++ b/stdlib/source/library/lux/control/region.lux
@@ -55,7 +55,7 @@
(All (_ ! a)
(-> (Monad !) (All (_ r) (Region r ! a))
(! (Try a))))
- (do {! monad}
+ (do [! monad]
[[cleaners output] (computation [[] (list)])]
(|> cleaners
(monad.each ! (function (_ cleaner) (cleaner [])))
diff --git a/stdlib/source/library/lux/control/security/capability.lux b/stdlib/source/library/lux/control/security/capability.lux
index 9c41e5899..7a05d848e 100644
--- a/stdlib/source/library/lux/control/security/capability.lux
+++ b/stdlib/source/library/lux/control/security/capability.lux
@@ -49,7 +49,7 @@
(<>.maybe |annotations|.parser)
(<c>.form ($_ <>.and <c>.local_identifier <c>.any <c>.any))))])
(macro.with_identifiers [g!_]
- (do {! meta.monad}
+ (do [! meta.monad]
[this_module meta.current_module_name
.let [[name vars] declaration]
g!brand (\ ! each (|>> %.code code.text)
diff --git a/stdlib/source/library/lux/control/state.lux b/stdlib/source/library/lux/control/state.lux
index b8430ce91..c9a6566bb 100644
--- a/stdlib/source/library/lux/control/state.lux
+++ b/stdlib/source/library/lux/control/state.lux
@@ -74,7 +74,7 @@
(def: .public (while condition body)
(All (_ s) (-> (State s Bit) (State s Any) (State s Any)))
- (do {! ..monad}
+ (do [! ..monad]
[execute? condition]
(if execute?
(do !
diff --git a/stdlib/source/library/lux/data/collection/list.lux b/stdlib/source/library/lux/data/collection/list.lux
index ce9b246bd..b4aa38cf7 100644
--- a/stdlib/source/library/lux/data/collection/list.lux
+++ b/stdlib/source/library/lux/data/collection/list.lux
@@ -569,7 +569,7 @@
(|>> (\ ..monad in) (\ monad in)))
(def: (conjoint MlMla)
- (do {! monad}
+ (do [! monad]
[lMla MlMla
... TODO: Remove this version ASAP and use one below.
lla (for {@.old
diff --git a/stdlib/source/library/lux/data/format/json.lux b/stdlib/source/library/lux/data/format/json.lux
index 5c27a69af..5a261ecde 100644
--- a/stdlib/source/library/lux/data/format/json.lux
+++ b/stdlib/source/library/lux/data/format/json.lux
@@ -85,7 +85,7 @@
(in (list (` (: JSON (#..Array ((~! row) (~+ (list\each wrapper members))))))))
[_ (#.Record pairs)]
- (do {! ..monad}
+ (do [! ..monad]
[pairs' (monad.each !
(function (_ [slot value])
(case slot
@@ -316,7 +316,7 @@
(def: number_parser
(Parser Number)
- (do {! <>.monad}
+ (do [! <>.monad]
[signed? (<>.parses? (<text>.this "-"))
digits (<text>.many <text>.decimal)
decimals (<>.else "0"
@@ -358,7 +358,7 @@
(Parser String)
(<| (<text>.enclosed [text.double_quote text.double_quote])
(loop [_ []])
- (do {! <>.monad}
+ (do [! <>.monad]
[chars (<text>.some (<text>.none_of (text\composite "\" text.double_quote)))
stop <text>.next])
(if (text\= "\" stop)
diff --git a/stdlib/source/library/lux/data/format/tar.lux b/stdlib/source/library/lux/data/format/tar.lux
index e8335ce9d..cbe8c38ea 100644
--- a/stdlib/source/library/lux/data/format/tar.lux
+++ b/stdlib/source/library/lux/data/format/tar.lux
@@ -137,7 +137,7 @@
digits (<>.lifted (\ utf8.codec decoded digits))
_ ..small_suffix]
(<>.lifted
- (do {! try.monad}
+ (do [! try.monad]
[value (\ n.octal decoded digits)]
(..small value)))))
@@ -151,7 +151,7 @@
(<>.assertion (exception.error ..wrong_character [expected end])
(n.= expected end)))]
(<>.lifted
- (do {! try.monad}
+ (do [! try.monad]
[value (\ n.octal decoded digits)]
(..big value)))))
@@ -291,7 +291,7 @@
_ (<>.assertion (exception.error ..wrong_character [expected end])
(n.= expected end))]
(<>.lifted
- (do {! try.monad}
+ (do [! try.monad]
[ascii (..un_padded string)
text (\ utf8.codec decoded ascii)]
(<in> text)))))
@@ -520,7 +520,7 @@
(def: mode_parser
(Parser Mode)
- (do {! <>.monad}
+ (do [! <>.monad]
[value (\ ! each ..from_small ..small_parser)]
(if (n.> (:representation ..maximum_mode)
value)
diff --git a/stdlib/source/library/lux/data/text/regex.lux b/stdlib/source/library/lux/data/text/regex.lux
index 4b4339ebc..5fa4e399d 100644
--- a/stdlib/source/library/lux/data/text/regex.lux
+++ b/stdlib/source/library/lux/data/text/regex.lux
@@ -84,7 +84,7 @@
(def: re_range^
(Parser Code)
- (do {! <>.monad}
+ (do [! <>.monad]
[from (|> regex_char^ (\ ! each (|>> (//.char 0) maybe.trusted)))
_ (<text>.this "-")
to (|> regex_char^ (\ ! each (|>> (//.char 0) maybe.trusted)))]
@@ -236,7 +236,7 @@
(def: (re_counted_quantified^ current_module)
(-> Text (Parser Code))
- (do {! <>.monad}
+ (do [! <>.monad]
[base (re_simple^ current_module)]
(<| (<text>.enclosed ["{" "}"])
($_ <>.either
diff --git a/stdlib/source/library/lux/debug.lux b/stdlib/source/library/lux/debug.lux
index 5ed2bbaaa..ef3bcdf57 100644
--- a/stdlib/source/library/lux/debug.lux
+++ b/stdlib/source/library/lux/debug.lux
@@ -559,7 +559,7 @@
(|> ..target
<>.some
(<>.else (list))))])
- (do {! meta.monad}
+ (do [! meta.monad]
[location meta.location
locals meta.locals
.let [environment (|> locals
diff --git a/stdlib/source/library/lux/ffi.jvm.lux b/stdlib/source/library/lux/ffi.jvm.lux
index df421ffc3..e31607e0b 100644
--- a/stdlib/source/library/lux/ffi.jvm.lux
+++ b/stdlib/source/library/lux/ffi.jvm.lux
@@ -1340,7 +1340,7 @@
(case member
(^or (#ConstructorDecl [commons _]) (#MethodDecl [commons _]))
(let [(^slots [#import_member_tvars #import_member_args]) commons]
- (do {! meta.monad}
+ (do [! meta.monad]
[arg_inputs (monad.each !
(: (-> [Bit (Type Value)] (Meta [Bit Code]))
(function (_ [maybe? _])
@@ -1673,7 +1673,7 @@
(syntax: .public (import: [declaration ..declaration^
.let [[class_name class_type_vars] (parser.declaration declaration)]
bundles (<>.some (..bundle class_type_vars))])
- (do {! meta.monad}
+ (do [! meta.monad]
[kind (class_kind declaration)
=members (|> bundles
(list\each (function (_ [import_format members])
diff --git a/stdlib/source/library/lux/ffi.old.lux b/stdlib/source/library/lux/ffi.old.lux
index 6bab5e94f..04078189d 100644
--- a/stdlib/source/library/lux/ffi.old.lux
+++ b/stdlib/source/library/lux/ffi.old.lux
@@ -1323,7 +1323,7 @@
(case member
(^or (#ConstructorDecl [commons _]) (#MethodDecl [commons _]))
(let [(^slots [#import_member_tvars #import_member_args]) commons]
- (do {! meta.monad}
+ (do [! meta.monad]
[arg_inputs (monad.each !
(: (-> [Bit GenericType] (Meta [Bit Code]))
(function (_ [maybe? _])
@@ -1444,7 +1444,7 @@
(case member
(#EnumDecl enum_members)
(macro.with_identifiers [g!_]
- (do {! meta.monad}
+ (do [! meta.monad]
[.let [enum_type (: Code
(case class_tvars
#.End
@@ -1599,7 +1599,7 @@
(syntax: .public (import: [class_decl ..class_decl^
bundles (<>.some (..bundle (product.right class_decl)))])
- (do {! meta.monad}
+ (do [! meta.monad]
[kind (class_kind class_decl)
=members (|> bundles
(list\each (function (_ [import_format members])
diff --git a/stdlib/source/library/lux/macro.lux b/stdlib/source/library/lux/macro.lux
index 98f7da1a7..bbbe8765b 100644
--- a/stdlib/source/library/lux/macro.lux
+++ b/stdlib/source/library/lux/macro.lux
@@ -42,7 +42,7 @@
[?macro (//.macro name)]
(case ?macro
(#.Some macro)
- (do {! //.monad}
+ (do [! //.monad]
[top_level_expansion ((:as Macro' macro) args)]
(|> top_level_expansion
(monad.each //.monad expansion)
@@ -128,7 +128,7 @@
(macro: .public (with_identifiers tokens)
(case tokens
(^ (list [_ (#.Tuple identifiers)] body))
- (do {! //.monad}
+ (do [! //.monad]
[identifier_names (monad.each ! ..local_identifier identifiers)
.let [identifier_defs (list\conjoint (list\each (: (-> Text (List Code))
(function (_ name) (list (code.identifier ["" name]) (` (..identifier (~ (code.text name)))))))
diff --git a/stdlib/source/library/lux/macro/local.lux b/stdlib/source/library/lux/macro/local.lux
index 381dfc360..c4e134336 100644
--- a/stdlib/source/library/lux/macro/local.lux
+++ b/stdlib/source/library/lux/macro/local.lux
@@ -84,7 +84,7 @@
(-> (List Name) Name Macro)
("lux macro"
(function (_ _)
- (do {! meta.monad}
+ (do [! meta.monad]
[_ (monad.each ! ..pop_one macros)
_ (..pop_one self)
compiler meta.compiler_state]
diff --git a/stdlib/source/library/lux/macro/syntax.lux b/stdlib/source/library/lux/macro/syntax.lux
index 29ab5f49e..ca06801ea 100644
--- a/stdlib/source/library/lux/macro/syntax.lux
+++ b/stdlib/source/library/lux/macro/syntax.lux
@@ -69,7 +69,7 @@
(case ?parts
(#.Some [export_policy name args meta body])
(with_identifiers [g!tokens g!body g!error]
- (do {! meta.monad}
+ (do [! meta.monad]
[_ (if (|> args list.size nat.even?)
(in [])
(meta.failure "Syntax pattern expects pairs of bindings and code-parsers."))
diff --git a/stdlib/source/library/lux/macro/syntax/definition.lux b/stdlib/source/library/lux/macro/syntax/definition.lux
index c342fd1fc..2fcef6e2b 100644
--- a/stdlib/source/library/lux/macro/syntax/definition.lux
+++ b/stdlib/source/library/lux/macro/syntax/definition.lux
@@ -102,7 +102,7 @@
(def: .public (parser compiler)
(-> Lux (Parser Definition))
- (do {! <>.monad}
+ (do [! <>.monad]
[raw <code>.any
me_raw (|> raw
macro.full_expansion
diff --git a/stdlib/source/library/lux/macro/template.lux b/stdlib/source/library/lux/macro/template.lux
index d731c2810..2c51b4963 100644
--- a/stdlib/source/library/lux/macro/template.lux
+++ b/stdlib/source/library/lux/macro/template.lux
@@ -34,7 +34,7 @@
(syntax: .public (with_locals [locals (<code>.tuple (<>.some <code>.local_identifier))
body <code>.any])
- (do {! meta.monad}
+ (do [! meta.monad]
[g!locals (|> locals
(list\each //.identifier)
(monad.all !))]
diff --git a/stdlib/source/library/lux/math/number/frac.lux b/stdlib/source/library/lux/math/number/frac.lux
index 4cc1857f1..0809a0c7a 100644
--- a/stdlib/source/library/lux/math/number/frac.lux
+++ b/stdlib/source/library/lux/math/number/frac.lux
@@ -385,7 +385,7 @@
(let [negative? (text.starts_with? "-" representation)
positive? (text.starts_with? "+" representation)]
(if (or negative? positive?)
- (do {! try.monad}
+ (do [! try.monad]
[[mantissa exponent] (..representation_exponent <nat> representation)
[whole decimal] (case ("lux text index" 0 "." mantissa)
(#.Some split_index)
diff --git a/stdlib/source/library/lux/math/random.lux b/stdlib/source/library/lux/math/random.lux
index 4e62e6158..d370085ff 100644
--- a/stdlib/source/library/lux/math/random.lux
+++ b/stdlib/source/library/lux/math/random.lux
@@ -202,7 +202,7 @@
(def: .public (or left right)
(All (_ a b) (-> (Random a) (Random b) (Random (Or a b))))
- (do {! ..monad}
+ (do [! ..monad]
[? bit]
(if ?
(do !
@@ -228,7 +228,7 @@
(def: .public (maybe value_gen)
(All (_ a) (-> (Random a) (Random (Maybe a))))
- (do {! ..monad}
+ (do [! ..monad]
[some? bit]
(if some?
(do !
@@ -265,7 +265,7 @@
(def: .public (set hash size value_gen)
(All (_ a) (-> (Hash a) Nat (Random a) (Random (Set a))))
(if (n.> 0 size)
- (do {! ..monad}
+ (do [! ..monad]
[xs (set hash (-- size) value_gen)]
(loop [_ []]
(do !
@@ -279,7 +279,7 @@
(def: .public (dictionary hash size key_gen value_gen)
(All (_ k v) (-> (Hash k) Nat (Random k) (Random v) (Random (Dictionary k v))))
(if (n.> 0 size)
- (do {! ..monad}
+ (do [! ..monad]
[kv (dictionary hash (-- size) key_gen value_gen)]
(loop [_ []]
(do !
diff --git a/stdlib/source/library/lux/meta.lux b/stdlib/source/library/lux/meta.lux
index ac26a08a4..658d17af4 100644
--- a/stdlib/source/library/lux/meta.lux
+++ b/stdlib/source/library/lux/meta.lux
@@ -649,7 +649,7 @@
(def: .public (eval type code)
(-> Type Code (Meta Any))
- (do {! ..monad}
+ (do [! ..monad]
[eval (\ ! each (value@ #.eval)
..compiler_state)]
(eval type code)))
diff --git a/stdlib/source/library/lux/target/jvm/bytecode.lux b/stdlib/source/library/lux/target/jvm/bytecode.lux
index bb0c14d64..e906aaa0d 100644
--- a/stdlib/source/library/lux/target/jvm/bytecode.lux
+++ b/stdlib/source/library/lux/target/jvm/bytecode.lux
@@ -188,7 +188,7 @@
(def: (bytecode consumption production registry [estimator bytecode] input)
(All (_ a) (-> U2 U2 Registry [Estimator (-> [a] Instruction)] [a] (Bytecode Any)))
(function (_ [pool environment tracker])
- (do {! try.monad}
+ (do [! try.monad]
[environment' (|> environment
(/environment.consumes consumption)
(monad.then ! (/environment.produces production))
@@ -696,7 +696,7 @@
(def: (jump @from @to)
(-> Address Address (Try Any_Jump))
- (do {! try.monad}
+ (do [! try.monad]
[jump (\ ! each //signed.value
(/address.jump @from @to))]
(let [big? (n.> (//unsigned.value //unsigned.maximum/2)
@@ -858,7 +858,7 @@
(let [get (: (-> Label (Maybe [Stack (Maybe Address)]))
(function (_ label)
(dictionary.value label resolver)))]
- (case (do {! maybe.monad}
+ (case (do [! maybe.monad]
[@default (|> default get (monad.then ! product.right))
@at_minimum (|> at_minimum get (monad.then ! product.right))
@afterwards (|> afterwards
@@ -866,7 +866,7 @@
(monad.then ! (monad.each ! product.right)))]
(in [@default @at_minimum @afterwards]))
(#.Some [@default @at_minimum @afterwards])
- (do {! try.monad}
+ (do [! try.monad]
[>default (\ ! each ..big_jump (..jump @from @default))
>at_minimum (\ ! each ..big_jump (..jump @from @at_minimum))
>afterwards (monad.each ! (|>> (..jump @from) (\ ! each ..big_jump))
@@ -901,14 +901,14 @@
(let [get (: (-> Label (Maybe [Stack (Maybe Address)]))
(function (_ label)
(dictionary.value label resolver)))]
- (case (do {! maybe.monad}
+ (case (do [! maybe.monad]
[@default (|> default get (monad.then ! product.right))
@cases (|> cases
(monad.each ! (|>> product.right get))
(monad.then ! (monad.each ! product.right)))]
(in [@default @cases]))
(#.Some [@default @cases])
- (do {! try.monad}
+ (do [! try.monad]
[>default (\ ! each ..big_jump (..jump @from @default))
>cases (|> @cases
(monad.each ! (|>> (..jump @from) (\ ! each ..big_jump)))
diff --git a/stdlib/source/library/lux/target/jvm/bytecode/instruction.lux b/stdlib/source/library/lux/target/jvm/bytecode/instruction.lux
index effbdda4a..dce6ef723 100644
--- a/stdlib/source/library/lux/target/jvm/bytecode/instruction.lux
+++ b/stdlib/source/library/lux/target/jvm/bytecode/instruction.lux
@@ -608,7 +608,7 @@
(function (_ [size mutation])
(let [padding (switch_padding size)
tableswitch_size (try.trusted
- (do {! try.monad}
+ (do [! try.monad]
[size (///unsigned.u2 size)]
(\ ! each (|>> estimator ///unsigned.value)
(//address.move size //address.start))))
@@ -616,7 +616,7 @@
(function (_ [offset binary])
[(n.+ tableswitch_size offset)
(try.trusted
- (do {! try.monad}
+ (do [! try.monad]
[amount_of_afterwards (|> amount_of_afterwards .int ///signed.s4)
maximum (///signed.+/4 minimum amount_of_afterwards)
_ (binary.write/8! offset (hex "AA") binary)
@@ -672,7 +672,7 @@
(function (_ [size mutation])
(let [padding (switch_padding size)
lookupswitch_size (try.trusted
- (do {! try.monad}
+ (do [! try.monad]
[size (///unsigned.u2 size)]
(\ ! each (|>> estimator ///unsigned.value)
(//address.move size //address.start))))
@@ -680,7 +680,7 @@
(function (_ [offset binary])
[(n.+ lookupswitch_size offset)
(try.trusted
- (do {! try.monad}
+ (do [! try.monad]
[_ (binary.write/8! offset (hex "AB") binary)
.let [offset (n.+ (///unsigned.value ..opcode_size) offset)]
_ (case padding
diff --git a/stdlib/source/library/lux/target/jvm/class.lux b/stdlib/source/library/lux/target/jvm/class.lux
index 72bdce14e..c8e23ad0e 100644
--- a/stdlib/source/library/lux/target/jvm/class.lux
+++ b/stdlib/source/library/lux/target/jvm/class.lux
@@ -71,7 +71,7 @@
(def: (install_classes this super interfaces)
(-> Internal Internal (List Internal)
(Resource [(Index //constant.Class) (Index //constant.Class) (Row (Index //constant.Class))]))
- (do {! //constant/pool.monad}
+ (do [! //constant/pool.monad]
[@this (//constant/pool.class this)
@super (//constant/pool.class super)
@interfaces (: (Resource (Row (Index //constant.Class)))
diff --git a/stdlib/source/library/lux/target/jvm/constant/pool.lux b/stdlib/source/library/lux/target/jvm/constant/pool.lux
index 7bdb7d977..e79cd40d6 100644
--- a/stdlib/source/library/lux/target/jvm/constant/pool.lux
+++ b/stdlib/source/library/lux/target/jvm/constant/pool.lux
@@ -70,7 +70,7 @@
(#try.Failure _)
(let [new (<tag> <value>')]
- (do {! try.monad}
+ (do [! try.monad]
[@new (//unsigned.u2 (//.size new))
next (: (Try Index)
(|> current
diff --git a/stdlib/source/library/lux/target/jvm/loader.lux b/stdlib/source/library/lux/target/jvm/loader.lux
index 511dd9c39..6d01eb532 100644
--- a/stdlib/source/library/lux/target/jvm/loader.lux
+++ b/stdlib/source/library/lux/target/jvm/loader.lux
@@ -128,7 +128,7 @@
(def: .public (store name bytecode library)
(-> Text Binary Library (IO (Try Any)))
- (do {! io.monad}
+ (do [! io.monad]
[library' (atom.read! library)]
(if (dictionary.key? library' name)
(in (exception.except ..already_stored name))
diff --git a/stdlib/source/library/lux/target/jvm/method.lux b/stdlib/source/library/lux/target/jvm/method.lux
index b3a4a811c..d53c7d847 100644
--- a/stdlib/source/library/lux/target/jvm/method.lux
+++ b/stdlib/source/library/lux/target/jvm/method.lux
@@ -52,7 +52,7 @@
(def: .public (method modifier name type attributes code)
(-> (Modifier Method) UTF8 (Type //type/category.Method) (List (Resource Attribute)) (Maybe (Bytecode Any))
(Resource Method))
- (do {! //constant/pool.monad}
+ (do [! //constant/pool.monad]
[@name (//constant/pool.utf8 name)
@descriptor (//constant/pool.descriptor (//type.descriptor type))
attributes (|> attributes
diff --git a/stdlib/source/library/lux/target/jvm/reflection.lux b/stdlib/source/library/lux/target/jvm/reflection.lux
index d6b899aab..28ef3ca54 100644
--- a/stdlib/source/library/lux/target/jvm/reflection.lux
+++ b/stdlib/source/library/lux/target/jvm/reflection.lux
@@ -171,7 +171,7 @@
(let [raw (java/lang/reflect/ParameterizedType::getRawType reflection)]
(case (ffi.check java/lang/Class raw)
(#.Some raw)
- (do {! try.monad}
+ (do [! try.monad]
[paramsT (|> reflection
java/lang/reflect/ParameterizedType::getActualTypeArguments
(array.list #.None)
@@ -368,7 +368,7 @@
(template [<name> <exception> <then?> <else?>]
[(def: .public (<name> field class)
(-> Text (java/lang/Class java/lang/Object) (Try [Bit Bit (/.Type Value)]))
- (do {! try.monad}
+ (do [! try.monad]
[fieldJ (..field field class)
.let [modifiers (java/lang/reflect/Field::getModifiers fieldJ)]]
(case (java/lang/reflect/Modifier::isStatic modifiers)
diff --git a/stdlib/source/library/lux/target/jvm/type/lux.lux b/stdlib/source/library/lux/target/jvm/type/lux.lux
index eacb25024..f1609e495 100644
--- a/stdlib/source/library/lux/target/jvm/type/lux.lux
+++ b/stdlib/source/library/lux/target/jvm/type/lux.lux
@@ -134,7 +134,7 @@
(<>.after (<text>.this //signature.parameters_start))
(<>.before (<text>.this //signature.parameters_end))
(<>.else (list)))]
- (in (do {! check.monad}
+ (in (do [! check.monad]
[parameters (monad.all ! parameters)]
(in (#.Primitive name parameters)))))
(<>.after (<text>.this //descriptor.class_prefix))
diff --git a/stdlib/source/library/lux/test.lux b/stdlib/source/library/lux/test.lux
index 4467d12c6..61af7a127 100644
--- a/stdlib/source/library/lux/test.lux
+++ b/stdlib/source/library/lux/test.lux
@@ -97,7 +97,7 @@
(def: .public (and left right)
(-> Test Test Test)
- (do {! random.monad}
+ (do [! random.monad]
[left left]
(\ ! each (..and' left) right)))
@@ -171,7 +171,7 @@
[seed random.nat]
(function (recur prng)
(let [[prng' instance] (random.result (random.pcg_32 [..pcg_32_magic_inc seed]) test)]
- [prng' (do {! async.monad}
+ [prng' (do [! async.monad]
[[tally documentation] instance]
(if (..failed? tally)
(in [tally (times_failure seed documentation)])
diff --git a/stdlib/source/library/lux/time.lux b/stdlib/source/library/lux/time.lux
index b179416ea..9bf79a46f 100644
--- a/stdlib/source/library/lux/time.lux
+++ b/stdlib/source/library/lux/time.lux
@@ -132,7 +132,7 @@
minute (millis duration.minute)
second (millis duration.second)
millis (millis duration.milli_second)]
- (do {! <>.monad}
+ (do [! <>.monad]
[utc_hour ..hour_parser
_ (<text>.this ..separator)
utc_minute ..minute_parser
diff --git a/stdlib/source/library/lux/time/instant.lux b/stdlib/source/library/lux/time/instant.lux
index 9ef644274..96856d9b8 100644
--- a/stdlib/source/library/lux/time/instant.lux
+++ b/stdlib/source/library/lux/time/instant.lux
@@ -133,7 +133,7 @@
(def: parser
(Parser Instant)
- (do {! <>.monad}
+ (do [! <>.monad]
[days (\ ! each date.days date.parser)
_ (<text>.this ..date_suffix)
time (\ ! each //.millis //.parser)
diff --git a/stdlib/source/library/lux/time/year.lux b/stdlib/source/library/lux/time/year.lux
index cf1aa6945..630e514c3 100644
--- a/stdlib/source/library/lux/time/year.lux
+++ b/stdlib/source/library/lux/time/year.lux
@@ -115,7 +115,7 @@
(def: .public parser
(Parser Year)
- (do {! <>.monad}
+ (do [! <>.monad]
[sign (<>.or (<text>.this "-") (in []))
digits (<text>.many <text>.decimal)
raw_year (<>.codec i.decimal (in (text\composite "+" digits)))]
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
diff --git a/stdlib/source/library/lux/type/check.lux b/stdlib/source/library/lux/type/check.lux
index 2cac17f57..df52d36eb 100644
--- a/stdlib/source/library/lux/type/check.lux
+++ b/stdlib/source/library/lux/type/check.lux
@@ -363,7 +363,7 @@
(do ..monad
[_ (..bind type id)]
then)
- (do {! ..monad}
+ (do [! ..monad]
[ring (..ring id)
_ (..assertion "" (n.> 1 (set.size ring)))
_ (monad.each ! (re_bind type) (set.list ring))]
@@ -391,7 +391,7 @@
(-> (Checker Type) (Checker Var))
(if (!n\= idE idA)
(check\in assumptions)
- (do {! ..monad}
+ (do [! ..monad]
[ebound (attempt (..bound idE))
abound (attempt (..bound idA))]
(case [ebound abound]
@@ -709,7 +709,7 @@
(^template [<tag>]
[(<tag> envT+ unquantifiedT)
- (do {! ..monad}
+ (do [! ..monad]
[envT+' (monad.each ! clean envT+)]
(in (<tag> envT+' unquantifiedT)))])
([#.UnivQ] [#.ExQ])
diff --git a/stdlib/source/library/lux/type/implicit.lux b/stdlib/source/library/lux/type/implicit.lux
index 6c3d91881..8546ffe51 100644
--- a/stdlib/source/library/lux/type/implicit.lux
+++ b/stdlib/source/library/lux/type/implicit.lux
@@ -90,7 +90,7 @@
[member (meta.normal member)
_ (meta.slot member)]
(in member))
- (do {! meta.monad}
+ (do [! meta.monad]
[this_module_name meta.current_module_name
imp_mods (meta.imported_modules this_module_name)
tag_lists (monad.each ! meta.tag_lists imp_mods)
@@ -143,14 +143,14 @@
(def: local_structs
(Meta (List [Name Type]))
- (do {! meta.monad}
+ (do [! meta.monad]
[this_module_name meta.current_module_name
definitions (meta.definitions this_module_name)]
(in (available_definitions this_module_name this_module_name definitions #.End))))
(def: imported_structs
(Meta (List [Name Type]))
- (do {! meta.monad}
+ (do [! meta.monad]
[this_module_name meta.current_module_name
imported_modules (meta.imported_modules this_module_name)
accessible_definitions (monad.each ! meta.definitions imported_modules)]
@@ -215,7 +215,7 @@
(case (|> alts
(list\each (function (_ [alt_name alt_type])
(case (check.result context
- (do {! check.monad}
+ (do [! check.monad]
[[tvars alt_type] (concrete_type alt_type)
.let [[deps alt_type] (type.flat_function alt_type)]
_ (check.check dep alt_type)
@@ -264,7 +264,7 @@
(case (|> alts
(list\each (function (_ [alt_name alt_type])
(case (<| (check.result context)
- (do {! check.monad}
+ (do [! check.monad]
[[tvars alt_type] (concrete_type alt_type)
.let [[deps alt_type] (type.flat_function alt_type)]
_ (check.check alt_type sig_type)
@@ -320,7 +320,7 @@
(<>.and (<>.some <code>.any) <code>.end!))])
(case args
(#.Left [args _])
- (do {! meta.monad}
+ (do [! meta.monad]
[[member_idx sig_type] (..implicit_member member)
input_types (monad.each ! ..implicit_type args)
output_type meta.expected_type
@@ -342,7 +342,7 @@
" --- for type: " (%.type sig_type)))))
(#.Right [args _])
- (do {! meta.monad}
+ (do [! meta.monad]
[labels (|> (macro.identifier "") (list.repeated (list.size args)) (monad.all !))]
(in (list (` (let [(~+ (|> args (list.zipped/2 labels) (list\each ..pair_list) list\conjoint))]
(..\\ (~ (code.identifier member)) (~+ labels)))))))
diff --git a/stdlib/source/library/lux/type/poly.lux b/stdlib/source/library/lux/type/poly.lux
index 108cca485..7c98bf699 100644
--- a/stdlib/source/library/lux/type/poly.lux
+++ b/stdlib/source/library/lux/type/poly.lux
@@ -58,7 +58,7 @@
(<>.and (<>\in (` .private)) private))))
(syntax: .public (derived: [[export_policy name [poly_func poly_args] ?custom_impl] ..derivedP])
- (do {! meta.monad}
+ (do [! meta.monad]
[poly_args (monad.each ! meta.normal poly_args)
.let [impl (case ?custom_impl
(#.Some custom_impl)
diff --git a/stdlib/source/library/lux/type/resource.lux b/stdlib/source/library/lux/type/resource.lux
index 27eb7ce86..ba56544aa 100644
--- a/stdlib/source/library/lux/type/resource.lux
+++ b/stdlib/source/library/lux/type/resource.lux
@@ -114,7 +114,7 @@
(def: indices
(Parser (List Nat))
(<code>.tuple (loop [seen (set.empty n.hash)]
- (do {! <>.monad}
+ (do [! <>.monad]
[done? <code>.end?]
(if done?
(in (list))
@@ -137,7 +137,7 @@
(in (list (` (~! no_op))))
(#.Item head tail)
- (do {! meta.monad}
+ (do [! meta.monad]
[.let [max_idx (list\mix n.max head tail)]
g!inputs (<| (monad.all !) (list.repeated (++ max_idx)) (macro.identifier "input"))
.let [g!outputs (|> (monad.mix maybe.monad
@@ -171,7 +171,7 @@
(template [<name> <from> <to>]
[(syntax: .public (<name> [amount ..amount])
(macro.with_identifiers [g!_ g!context g!!]
- (do {! meta.monad}
+ (do [! meta.monad]
[g!keys (|> (macro.identifier "keys")
(list.repeated amount)
(monad.all !))]
diff --git a/stdlib/source/library/lux/world/console.lux b/stdlib/source/library/lux/world/console.lux
index 98f960519..2c8a07f38 100644
--- a/stdlib/source/library/lux/world/console.lux
+++ b/stdlib/source/library/lux/world/console.lux
@@ -120,7 +120,7 @@
(`` (implementation
(~~ (template [<method> <mock>]
[(def: (<method> _)
- (do {! io.monad}
+ (do [! io.monad]
[|state| (atom.read! state)]
(case (\ mock <mock> |state|)
(#try.Success [|state| output])
@@ -136,7 +136,7 @@
))
(def: (write input)
- (do {! io.monad}
+ (do [! io.monad]
[|state| (atom.read! state)]
(case (\ mock on_write input |state|)
(#try.Success |state|)
@@ -148,7 +148,7 @@
(in (#try.Failure error)))))
(def: (close _)
- (do {! io.monad}
+ (do [! io.monad]
[|state| (atom.read! state)]
(case (\ mock on_close |state|)
(#try.Success |state|)
diff --git a/stdlib/source/library/lux/world/file.lux b/stdlib/source/library/lux/world/file.lux
index 8589e5f90..047e1eaca 100644
--- a/stdlib/source/library/lux/world/file.lux
+++ b/stdlib/source/library/lux/world/file.lux
@@ -226,7 +226,7 @@
(~~ (template [<name> <method>]
[(def: (<name> path)
- (do {! (try.with io.monad)}
+ (do [! (try.with io.monad)]
[?children (java/io/File::listFiles (java/io/File::new path))]
(case ?children
(#.Some children)
@@ -445,7 +445,7 @@
(~~ (template [<name> <method>]
[(def: (<name> path)
- (do {! (try.with async.monad)}
+ (do [! (try.with async.monad)]
[.let [node_fs (..node_fs [])]
subs (with_async write! (Try (Array ffi.String))
(Fs::readdir [path (..value_callback write!)] node_fs))]
@@ -720,7 +720,7 @@
(~~ (template [<name> <test>]
[(def: (<name> path)
- (do {! (try.with io.monad)}
+ (do [! (try.with io.monad)]
[self (RubyDir::open [path])
children (RubyDir::children [] self)
output (loop [input (|> children
@@ -786,7 +786,7 @@
(~~ (template [<mode> <name>]
[(def: (<name> data path)
- (do {! (try.with io.monad)}
+ (do [! (try.with io.monad)]
[file (RubyFile::open [path <mode>])
data (RubyFile::write [data] file)
_ (RubyFile::flush [] file)
@@ -849,7 +849,7 @@
... (~~ (template [<name> <mode>]
... [(def: (<name> data)
- ... (do {! (try.with io.monad)}
+ ... (do [! (try.with io.monad)]
... [outcome (..file_put_contents [path ("php pack" ..byte_array_format data) <mode>])]
... (if (bit\= false (:as Bit outcome))
... (\ io.monad in (exception.except ..cannot_write_to_file [path]))
@@ -860,7 +860,7 @@
... ))
... (def: (content _)
- ... (do {! (try.with io.monad)}
+ ... (do [! (try.with io.monad)]
... [data (..file_get_contents [path])]
... (if (bit\= false (:as Bit data))
... (\ io.monad in (exception.except ..cannot_find_file [path]))
@@ -871,7 +871,7 @@
... (~~ (template [<name> <ffi> <pipeline>]
... [(def: (<name> _)
- ... (do {! (try.with io.monad)}
+ ... (do [! (try.with io.monad)]
... [value (<ffi> [path])]
... (if (bit\= false (:as Bit value))
... (\ io.monad in (exception.except ..cannot_find_file [path]))
@@ -885,14 +885,14 @@
... (..is_executable [path]))
... (def: (modify moment)
- ... (do {! (try.with io.monad)}
+ ... (do [! (try.with io.monad)]
... [verdict (..touch [path (|> moment instant.relative duration.millis (i./ +1,000))])]
... (if (bit\= false (:as Bit verdict))
... (\ io.monad in (exception.except ..cannot_find_file [path]))
... (in []))))
... (def: (move destination)
- ... (do {! (try.with io.monad)}
+ ... (do [! (try.with io.monad)]
... [verdict (..rename [path destination])]
... (if (bit\= false (:as Bit verdict))
... (\ io.monad in (exception.except ..cannot_find_file [path]))
@@ -914,7 +914,7 @@
... (~~ (template [<name> <test> <constructor> <capability>]
... [(def: (<name> _)
- ... (do {! (try.with io.monad)}
+ ... (do [! (try.with io.monad)]
... [children (..scandir [path])]
... (loop [input (|> children
... (array.list #.None)
@@ -951,7 +951,7 @@
... (~~ (template [<name> <test> <constructor> <exception>]
... [(def: (<name> path)
- ... (do {! (try.with io.monad)}
+ ... (do [! (try.with io.monad)]
... [verdict (<test> path)]
... (\ io.monad in
... (if verdict
@@ -963,7 +963,7 @@
... ))
... (def: (make_file path)
- ... (do {! (try.with io.monad)}
+ ... (do [! (try.with io.monad)]
... [verdict (..touch [path (|> instant.now io.run! instant.relative duration.millis (i./ +1,000))])]
... (\ io.monad in
... (if verdict
@@ -971,7 +971,7 @@
... (exception.except ..cannot_make_file [path])))))
... (def: (make_directory path)
- ... (do {! (try.with io.monad)}
+ ... (do [! (try.with io.monad)]
... [verdict (..mkdir path)]
... (\ io.monad in
... (if verdict
@@ -1107,7 +1107,7 @@
(def: (attempt! transform var)
(All (_ a) (-> (-> a (Try a)) (Var a) (STM (Try Any))))
- (do {! stm.monad}
+ (do [! stm.monad]
[|var| (stm.read var)]
(case (transform |var|)
(#try.Success |var|)
@@ -1194,7 +1194,7 @@
(def: (make_directory path)
(stm.commit!
- (do {! stm.monad}
+ (do [! stm.monad]
[|store| (stm.read store)]
(case (..make_mock_directory! separator path |store|)
(#try.Success |store|)
@@ -1297,7 +1297,7 @@
(def: (move destination origin)
(stm.commit!
- (do {! stm.monad}
+ (do [! stm.monad]
[|store| (stm.read store)]
(case (do try.monad
[[name file] (..retrieve_mock_file! separator origin |store|)
diff --git a/stdlib/source/library/lux/world/file/watch.lux b/stdlib/source/library/lux/world/file/watch.lux
index 0bbc4643c..6950e0df9 100644
--- a/stdlib/source/library/lux/world/file/watch.lux
+++ b/stdlib/source/library/lux/world/file/watch.lux
@@ -111,7 +111,7 @@
(def: (update_watch! new_concern path tracker)
(-> Concern //.Path (Var Directory_Tracker) (STM Bit))
- (do {! stm.monad}
+ (do [! stm.monad]
[@tracker (stm.read tracker)]
(case (dictionary.value path @tracker)
(#.Some [old_concern last_modified])
@@ -124,7 +124,7 @@
(def: (file_tracker fs directory)
(-> (//.System Async) //.Path (Async (Try File_Tracker)))
- (do {! (try.with async.monad)}
+ (do [! (try.with async.monad)]
[files (\ fs directory_files directory)]
(monad.mix !
(function (_ file tracker)
@@ -137,7 +137,7 @@
(def: (available_files fs directory)
(-> (//.System Async) //.Path (Async (Try (List [//.Path Instant]))))
- (do {! (try.with async.monad)}
+ (do [! (try.with async.monad)]
[files (\ fs directory_files directory)]
(monad.each ! (function (_ file)
(|> file
@@ -151,7 +151,7 @@
[(List [//.Path Instant])
(List [//.Path Instant Instant])
(List //.Path)]])))
- (do {! (try.with async.monad)}
+ (do [! (try.with async.monad)]
[current_files (..available_files fs directory)
.let [creations (if (..creation? concern)
(list.only (|>> product.left (dictionary.key? file_tracker) not)
@@ -192,7 +192,7 @@
(stm.var (dictionary.empty text.hash)))]
(implementation
(def: (start new_concern path)
- (do {! async.monad}
+ (do [! async.monad]
[exists? (\ fs directory? path)]
(if exists?
(do !
@@ -217,7 +217,7 @@
(exception.except ..not_being_watched [path]))))))
(def: (stop path)
(stm.commit!
- (do {! stm.monad}
+ (do [! stm.monad]
[@tracker (stm.read tracker)]
(case (dictionary.value path @tracker)
(#.Some [concern file_tracker])
@@ -230,7 +230,7 @@
(def: (poll _)
(do async.monad
[@tracker (stm.commit! (stm.read tracker))]
- (do {! (try.with async.monad)}
+ (do [! (try.with async.monad)]
[changes (|> @tracker
dictionary.entries
(monad.each ! (..available_directory_changes fs)))
@@ -378,7 +378,7 @@
[?key (java/nio/file/WatchService::poll watcher)]
(case ?key
(#.Some key)
- (do {! io.monad}
+ (do [! io.monad]
[valid? (java/nio/file/WatchKey::reset key)]
(if valid?
(do !
@@ -419,7 +419,7 @@
stop (: (-> //.Path (Async (Try Concern)))
(function (_ path)
- (do {! async.monad}
+ (do [! async.monad]
[@tracker (stm.commit! (stm.read tracker))]
(case (dictionary.value path @tracker)
(#.Some [concern key])
diff --git a/stdlib/source/library/lux/world/net/http/client.lux b/stdlib/source/library/lux/world/net/http/client.lux
index bee4a6466..793486d5b 100644
--- a/stdlib/source/library/lux/world/net/http/client.lux
+++ b/stdlib/source/library/lux/world/net/http/client.lux
@@ -131,7 +131,7 @@
(let [buffer (binary.empty buffer_size)]
(if partial?
(loop [so_far +0]
- (do {! (try.with io.monad)}
+ (do [! (try.with io.monad)]
[.let [remaining (i.- so_far (.int buffer_size))]
bytes_read (java/io/BufferedInputStream::read buffer so_far remaining input)]
(case bytes_read
@@ -144,7 +144,7 @@
(recur (i.+ bytes_read so_far))))))
(loop [so_far +0
output (\ binary.monoid identity)]
- (do {! (try.with io.monad)}
+ (do [! (try.with io.monad)]
[.let [remaining (i.- so_far (.int buffer_size))]
bytes_read (java/io/BufferedInputStream::read buffer so_far remaining input)]
(case bytes_read
@@ -169,7 +169,7 @@
(-> java/net/HttpURLConnection (IO (Try //.Headers)))
(loop [index +0
headers //.empty]
- (do {! (try.with io.monad)}
+ (do [! (try.with io.monad)]
[?name (java/net/URLConnection::getHeaderFieldKey index connection)]
(case ?name
(#.Some name)
@@ -186,7 +186,7 @@
(def: (request method url headers data)
(: (IO (Try (//.Response IO)))
- (do {! (try.with io.monad)}
+ (do [! (try.with io.monad)]
[connection (|> url java/net/URL::new java/net/URL::openConnection)
.let [connection (:as java/net/HttpURLConnection connection)]
_ (java/net/HttpURLConnection::setRequestMethod (..jvm_method method) connection)
diff --git a/stdlib/source/library/lux/world/net/http/query.lux b/stdlib/source/library/lux/world/net/http/query.lux
index e6a719c3b..ccfb68d2b 100644
--- a/stdlib/source/library/lux/world/net/http/query.lux
+++ b/stdlib/source/library/lux/world/net/http/query.lux
@@ -21,7 +21,7 @@
(Parser Text)
(p.rec
(function (_ component)
- (do {! p.monad}
+ (do [! p.monad]
[head (l.some (l.none_of "+%&;"))]
($_ p.either
(p.after (p.either l.end
@@ -45,7 +45,7 @@
(do p.monad
[_ l.end]
(in context))
- (do {! p.monad}
+ (do [! p.monad]
[key (l.some (l.none_of "=&;"))
key (l.local key ..component)]
(p.either (do !
diff --git a/stdlib/source/library/lux/world/program.lux b/stdlib/source/library/lux/world/program.lux
index 52a579f79..ac93b9667 100644
--- a/stdlib/source/library/lux/world/program.lux
+++ b/stdlib/source/library/lux/world/program.lux
@@ -54,7 +54,7 @@
(def: .public (environment monad program)
(All (_ !) (-> (Monad !) (Program !) (! Environment)))
- (do {! monad}
+ (do [! monad]
[variables (\ program available_variables [])
entries (monad.each ! (function (_ name)
(\ ! each (|>> [name]) (\ program variable name)))
@@ -244,7 +244,7 @@
(def: (run_command default command)
(-> Text Text (IO Text))
- (do {! io.monad}
+ (do [! io.monad]
[outcome (io/popen [command])]
(case outcome
(#try.Success outcome)
diff --git a/stdlib/source/library/lux/world/shell.lux b/stdlib/source/library/lux/world/shell.lux
index 186d241d4..927412def 100644
--- a/stdlib/source/library/lux/world/shell.lux
+++ b/stdlib/source/library/lux/world/shell.lux
@@ -232,7 +232,7 @@
(def: (default_process process)
(-> java/lang/Process (IO (Try (Process IO))))
- (do {! (try.with io.monad)}
+ (do [! (try.with io.monad)]
[jvm_input (java/lang/Process::getInputStream process)
jvm_error (java/lang/Process::getErrorStream process)
jvm_output (java/lang/Process::getOutputStream process)
@@ -294,7 +294,7 @@
(Shell IO)
(def: (execute [environment working_directory command arguments])
- (do {! (try.with io.monad)}
+ (do [! (try.with io.monad)]
[.let [builder (|> (list& command arguments)
..jvm::arguments_array
java/lang/ProcessBuilder::new
@@ -328,7 +328,7 @@
(~~ (template [<name> <mock>]
[(def: (<name> _)
- (do {! io.monad}
+ (do [! io.monad]
[|state| (atom.read! state)]
(case (\ mock <mock> |state|)
(#try.Success [|state| output])
@@ -344,7 +344,7 @@
[await on_await]
))
(def: (write message)
- (do {! io.monad}
+ (do [! io.monad]
[|state| (atom.read! state)]
(case (\ mock on_write message |state|)
(#try.Success |state|)
@@ -355,7 +355,7 @@
(#try.Failure error)
(in (#try.Failure error)))))
(def: (destroy _)
- (do {! io.monad}
+ (do [! io.monad]
[|state| (atom.read! state)]
(case (\ mock on_destroy |state|)
(#try.Success |state|)