aboutsummaryrefslogtreecommitdiff
path: root/stdlib
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib')
-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
-rw-r--r--stdlib/source/poly/lux/abstract/equivalence.lux2
-rw-r--r--stdlib/source/poly/lux/abstract/functor.lux2
-rw-r--r--stdlib/source/poly/lux/data/format/json.lux4
-rw-r--r--stdlib/source/program/aedifex.lux2
-rw-r--r--stdlib/source/program/aedifex/command/auto.lux4
-rw-r--r--stdlib/source/program/aedifex/command/clean.lux2
-rw-r--r--stdlib/source/program/aedifex/command/deploy.lux2
-rw-r--r--stdlib/source/program/aedifex/command/test.lux2
-rw-r--r--stdlib/source/program/aedifex/dependency/deployment.lux4
-rw-r--r--stdlib/source/program/aedifex/dependency/resolution.lux6
-rw-r--r--stdlib/source/program/aedifex/input.lux2
-rw-r--r--stdlib/source/program/aedifex/metadata/snapshot.lux2
-rw-r--r--stdlib/source/program/aedifex/parser.lux10
-rw-r--r--stdlib/source/program/aedifex/pom.lux6
-rw-r--r--stdlib/source/program/aedifex/project.lux2
-rw-r--r--stdlib/source/program/aedifex/repository.lux4
-rw-r--r--stdlib/source/program/aedifex/repository/local.lux2
-rw-r--r--stdlib/source/program/aedifex/repository/remote.lux2
-rw-r--r--stdlib/source/program/compositor.lux6
-rw-r--r--stdlib/source/program/compositor/export.lux2
-rw-r--r--stdlib/source/program/scriptum.lux4
-rw-r--r--stdlib/source/specification/compositor/generation/case.lux4
-rw-r--r--stdlib/source/specification/compositor/generation/common.lux2
-rw-r--r--stdlib/source/specification/compositor/generation/function.lux2
-rw-r--r--stdlib/source/specification/compositor/generation/reference.lux2
-rw-r--r--stdlib/source/specification/compositor/generation/structure.lux4
-rw-r--r--stdlib/source/specification/lux/abstract/apply.lux8
-rw-r--r--stdlib/source/specification/lux/abstract/comonad.lux4
-rw-r--r--stdlib/source/specification/lux/abstract/functor.lux6
-rw-r--r--stdlib/source/specification/lux/abstract/monad.lux4
-rw-r--r--stdlib/source/specification/lux/world/file.lux24
-rw-r--r--stdlib/source/specification/lux/world/program.lux2
-rw-r--r--stdlib/source/specification/lux/world/shell.lux4
-rw-r--r--stdlib/source/test/aedifex/cache.lux10
-rw-r--r--stdlib/source/test/aedifex/command/auto.lux6
-rw-r--r--stdlib/source/test/aedifex/command/build.lux4
-rw-r--r--stdlib/source/test/aedifex/command/clean.lux10
-rw-r--r--stdlib/source/test/aedifex/command/deploy.lux6
-rw-r--r--stdlib/source/test/aedifex/command/install.lux8
-rw-r--r--stdlib/source/test/aedifex/command/pom.lux2
-rw-r--r--stdlib/source/test/aedifex/command/test.lux2
-rw-r--r--stdlib/source/test/aedifex/dependency/deployment.lux6
-rw-r--r--stdlib/source/test/aedifex/dependency/resolution.lux8
-rw-r--r--stdlib/source/test/aedifex/hash.lux2
-rw-r--r--stdlib/source/test/aedifex/input.lux2
-rw-r--r--stdlib/source/test/aedifex/local.lux2
-rw-r--r--stdlib/source/test/aedifex/metadata/artifact.lux2
-rw-r--r--stdlib/source/test/aedifex/metadata/snapshot.lux2
-rw-r--r--stdlib/source/test/aedifex/package.lux4
-rw-r--r--stdlib/source/test/aedifex/parser.lux2
-rw-r--r--stdlib/source/test/aedifex/profile.lux2
-rw-r--r--stdlib/source/test/aedifex/repository/local.lux2
-rw-r--r--stdlib/source/test/aedifex/repository/remote.lux2
-rw-r--r--stdlib/source/test/lux.lux6
-rw-r--r--stdlib/source/test/lux/abstract/interval.lux8
-rw-r--r--stdlib/source/test/lux/abstract/predicate.lux2
-rw-r--r--stdlib/source/test/lux/control/concurrency/actor.lux6
-rw-r--r--stdlib/source/test/lux/control/concurrency/async.lux2
-rw-r--r--stdlib/source/test/lux/control/concurrency/frp.lux12
-rw-r--r--stdlib/source/test/lux/control/concurrency/semaphore.lux22
-rw-r--r--stdlib/source/test/lux/control/concurrency/stm.lux4
-rw-r--r--stdlib/source/test/lux/control/concurrency/thread.lux2
-rw-r--r--stdlib/source/test/lux/control/continuation.lux4
-rw-r--r--stdlib/source/test/lux/control/exception.lux2
-rw-r--r--stdlib/source/test/lux/control/function.lux2
-rw-r--r--stdlib/source/test/lux/control/function/contract.lux2
-rw-r--r--stdlib/source/test/lux/control/function/memo.lux2
-rw-r--r--stdlib/source/test/lux/control/function/mixin.lux2
-rw-r--r--stdlib/source/test/lux/control/function/mutual.lux4
-rw-r--r--stdlib/source/test/lux/control/parser.lux4
-rw-r--r--stdlib/source/test/lux/control/parser/analysis.lux18
-rw-r--r--stdlib/source/test/lux/control/parser/binary.lux40
-rw-r--r--stdlib/source/test/lux/control/parser/cli.lux2
-rw-r--r--stdlib/source/test/lux/control/parser/code.lux18
-rw-r--r--stdlib/source/test/lux/control/parser/json.lux18
-rw-r--r--stdlib/source/test/lux/control/parser/synthesis.lux20
-rw-r--r--stdlib/source/test/lux/control/parser/text.lux60
-rw-r--r--stdlib/source/test/lux/control/parser/tree.lux8
-rw-r--r--stdlib/source/test/lux/control/parser/type.lux20
-rw-r--r--stdlib/source/test/lux/control/parser/xml.lux14
-rw-r--r--stdlib/source/test/lux/control/pipe.lux2
-rw-r--r--stdlib/source/test/lux/control/region.lux20
-rw-r--r--stdlib/source/test/lux/control/state.lux2
-rw-r--r--stdlib/source/test/lux/data/binary.lux2
-rw-r--r--stdlib/source/test/lux/data/collection/array.lux6
-rw-r--r--stdlib/source/test/lux/data/collection/bits.lux6
-rw-r--r--stdlib/source/test/lux/data/collection/dictionary.lux2
-rw-r--r--stdlib/source/test/lux/data/collection/dictionary/ordered.lux2
-rw-r--r--stdlib/source/test/lux/data/collection/dictionary/plist.lux2
-rw-r--r--stdlib/source/test/lux/data/collection/list.lux18
-rw-r--r--stdlib/source/test/lux/data/collection/queue.lux2
-rw-r--r--stdlib/source/test/lux/data/collection/queue/priority.lux4
-rw-r--r--stdlib/source/test/lux/data/collection/row.lux8
-rw-r--r--stdlib/source/test/lux/data/collection/sequence.lux2
-rw-r--r--stdlib/source/test/lux/data/collection/set.lux2
-rw-r--r--stdlib/source/test/lux/data/collection/set/multi.lux8
-rw-r--r--stdlib/source/test/lux/data/collection/set/ordered.lux2
-rw-r--r--stdlib/source/test/lux/data/collection/tree.lux4
-rw-r--r--stdlib/source/test/lux/data/collection/tree/finger.lux2
-rw-r--r--stdlib/source/test/lux/data/collection/tree/zipper.lux2
-rw-r--r--stdlib/source/test/lux/data/color.lux4
-rw-r--r--stdlib/source/test/lux/data/format/json.lux2
-rw-r--r--stdlib/source/test/lux/data/format/tar.lux16
-rw-r--r--stdlib/source/test/lux/data/format/xml.lux4
-rw-r--r--stdlib/source/test/lux/data/name.lux2
-rw-r--r--stdlib/source/test/lux/data/sum.lux2
-rw-r--r--stdlib/source/test/lux/data/text.lux12
-rw-r--r--stdlib/source/test/lux/data/text/buffer.lux2
-rw-r--r--stdlib/source/test/lux/data/text/encoding.lux2
-rw-r--r--stdlib/source/test/lux/data/text/escape.lux6
-rw-r--r--stdlib/source/test/lux/data/text/format.lux2
-rw-r--r--stdlib/source/test/lux/data/text/unicode/block.lux4
-rw-r--r--stdlib/source/test/lux/data/text/unicode/set.lux4
-rw-r--r--stdlib/source/test/lux/ffi.js.lux2
-rw-r--r--stdlib/source/test/lux/ffi.jvm.lux8
-rw-r--r--stdlib/source/test/lux/ffi.lua.lux2
-rw-r--r--stdlib/source/test/lux/ffi.old.lux4
-rw-r--r--stdlib/source/test/lux/ffi.php.lux2
-rw-r--r--stdlib/source/test/lux/ffi.py.lux2
-rw-r--r--stdlib/source/test/lux/ffi.rb.lux2
-rw-r--r--stdlib/source/test/lux/ffi.scm.lux2
-rw-r--r--stdlib/source/test/lux/locale.lux2
-rw-r--r--stdlib/source/test/lux/locale/language.lux2
-rw-r--r--stdlib/source/test/lux/locale/territory.lux2
-rw-r--r--stdlib/source/test/lux/macro.lux6
-rw-r--r--stdlib/source/test/lux/macro/code.lux16
-rw-r--r--stdlib/source/test/lux/macro/local.lux2
-rw-r--r--stdlib/source/test/lux/macro/syntax/annotations.lux2
-rw-r--r--stdlib/source/test/lux/macro/syntax/declaration.lux2
-rw-r--r--stdlib/source/test/lux/macro/template.lux2
-rw-r--r--stdlib/source/test/lux/math.lux14
-rw-r--r--stdlib/source/test/lux/math/logic/fuzzy.lux6
-rw-r--r--stdlib/source/test/lux/math/number/complex.lux8
-rw-r--r--stdlib/source/test/lux/math/number/frac.lux8
-rw-r--r--stdlib/source/test/lux/math/number/i16.lux2
-rw-r--r--stdlib/source/test/lux/math/number/i32.lux2
-rw-r--r--stdlib/source/test/lux/math/number/i64.lux12
-rw-r--r--stdlib/source/test/lux/math/number/i8.lux2
-rw-r--r--stdlib/source/test/lux/math/number/int.lux8
-rw-r--r--stdlib/source/test/lux/math/number/nat.lux6
-rw-r--r--stdlib/source/test/lux/math/number/rev.lux8
-rw-r--r--stdlib/source/test/lux/meta.lux12
-rw-r--r--stdlib/source/test/lux/meta/annotation.lux12
-rw-r--r--stdlib/source/test/lux/target/jvm.lux20
-rw-r--r--stdlib/source/test/lux/test.lux14
-rw-r--r--stdlib/source/test/lux/time.lux6
-rw-r--r--stdlib/source/test/lux/time/date.lux2
-rw-r--r--stdlib/source/test/lux/time/duration.lux2
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/case.lux14
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/function.lux2
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/reference.lux2
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/structure.lux8
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux10
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/case.lux18
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/function.lux32
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/loop.lux28
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/structure.lux4
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/variable.lux30
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/syntax.lux4
-rw-r--r--stdlib/source/test/lux/type.lux12
-rw-r--r--stdlib/source/test/lux/type/check.lux12
-rw-r--r--stdlib/source/test/lux/type/implicit.lux2
-rw-r--r--stdlib/source/test/lux/type/poly/equivalence.lux2
-rw-r--r--stdlib/source/test/lux/type/poly/json.lux2
-rw-r--r--stdlib/source/test/lux/type/refinement.lux2
-rw-r--r--stdlib/source/test/lux/type/resource.lux6
-rw-r--r--stdlib/source/test/lux/type/unit.lux2
-rw-r--r--stdlib/source/test/lux/world/file.lux2
-rw-r--r--stdlib/source/test/lux/world/file/watch.lux8
-rw-r--r--stdlib/source/test/lux/world/input/keyboard.lux2
-rw-r--r--stdlib/source/test/lux/world/net/http/client.lux2
-rw-r--r--stdlib/source/test/lux/world/output/video/resolution.lux2
-rw-r--r--stdlib/source/test/lux/world/program.lux2
-rw-r--r--stdlib/source/test/lux/world/shell.lux2
323 files changed, 933 insertions, 933 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|)
diff --git a/stdlib/source/poly/lux/abstract/equivalence.lux b/stdlib/source/poly/lux/abstract/equivalence.lux
index 6273ef67f..73249fe27 100644
--- a/stdlib/source/poly/lux/abstract/equivalence.lux
+++ b/stdlib/source/poly/lux/abstract/equivalence.lux
@@ -42,7 +42,7 @@
["." /]])
(poly: .public equivalence
- (`` (do {! <>.monad}
+ (`` (do [! <>.monad]
[.let [g!_ (code.local_identifier "_____________")]
*env* <type>.env
inputT <type>.next
diff --git a/stdlib/source/poly/lux/abstract/functor.lux b/stdlib/source/poly/lux/abstract/functor.lux
index b6f841560..151ea600c 100644
--- a/stdlib/source/poly/lux/abstract/functor.lux
+++ b/stdlib/source/poly/lux/abstract/functor.lux
@@ -25,7 +25,7 @@
["." /]])
(poly: .public functor
- (do {! p.monad}
+ (do [! p.monad]
[.let [g!_ (code.local_identifier "____________")
type_funcC (code.local_identifier "____________type_funcC")
funcC (code.local_identifier "____________funcC")
diff --git a/stdlib/source/poly/lux/data/format/json.lux b/stdlib/source/poly/lux/data/format/json.lux
index 2412f65e4..a1c82c509 100644
--- a/stdlib/source/poly/lux/data/format/json.lux
+++ b/stdlib/source/poly/lux/data/format/json.lux
@@ -123,7 +123,7 @@
[date.Date date.codec]
[day.Day day.codec]
[month.Month month.codec])]
- (do {! <>.monad}
+ (do [! <>.monad]
[*env* <type>.env
.let [g!_ (code.local_identifier "_______")
@JSON\encoded (: (-> Type Code)
@@ -247,7 +247,7 @@
[date.Date date.codec]
[day.Day day.codec]
[month.Month month.codec])]
- (do {! <>.monad}
+ (do [! <>.monad]
[*env* <type>.env
.let [g!_ (code.local_identifier "_______")
@JSON\decoded (: (-> Type Code)
diff --git a/stdlib/source/program/aedifex.lux b/stdlib/source/program/aedifex.lux
index b89317b0d..93a188f95 100644
--- a/stdlib/source/program/aedifex.lux
+++ b/stdlib/source/program/aedifex.lux
@@ -125,7 +125,7 @@
(\ io.monad in [])))
(program: [[profiles operation] /cli.command]
- (do {! io.monad}
+ (do [! io.monad]
[?console console.default]
(case (try\each console.async ?console)
(#try.Failure error)
diff --git a/stdlib/source/program/aedifex/command/auto.lux b/stdlib/source/program/aedifex/command/auto.lux
index 4e2fd064c..5e3b425fe 100644
--- a/stdlib/source/program/aedifex/command/auto.lux
+++ b/stdlib/source/program/aedifex/command/auto.lux
@@ -51,13 +51,13 @@
(function (_ console program fs shell resolution)
(function (_ profile)
(with_expansions [<call> ((command console program fs shell resolution) profile)]
- (do {! async.monad}
+ (do [! async.monad]
[targets (|> profile
(value@ #///.sources)
set.list
(monad.each ! (..targets fs))
(\ ! each list.together))]
- (do {! ///action.monad}
+ (do [! ///action.monad]
[_ (monad.each ! (\ watcher start watch.modification) targets)
_ <call>]
(loop [_ []]
diff --git a/stdlib/source/program/aedifex/command/clean.lux b/stdlib/source/program/aedifex/command/clean.lux
index c5599e15e..0d8a62512 100644
--- a/stdlib/source/program/aedifex/command/clean.lux
+++ b/stdlib/source/program/aedifex/command/clean.lux
@@ -32,7 +32,7 @@
(def: .public (do! console fs profile)
(-> (Console Async) (file.System Async) (Command Any))
- (do {! async.monad}
+ (do [! async.monad]
[.let [target (value@ #///.target profile)]
? (\ fs directory? target)
_ (let [! ///action.monad]
diff --git a/stdlib/source/program/aedifex/command/deploy.lux b/stdlib/source/program/aedifex/command/deploy.lux
index 787496543..49837055c 100644
--- a/stdlib/source/program/aedifex/command/deploy.lux
+++ b/stdlib/source/program/aedifex/command/deploy.lux
@@ -58,7 +58,7 @@
(def: .public (do! console repository fs artifact profile)
(-> (Console Async) (Repository Async) (file.System Async) Artifact (Command Any))
- (do {! ///action.monad}
+ (do [! ///action.monad]
[library (|> profile
(value@ #/.sources)
set.list
diff --git a/stdlib/source/program/aedifex/command/test.lux b/stdlib/source/program/aedifex/command/test.lux
index 822cc874b..8c18e45be 100644
--- a/stdlib/source/program/aedifex/command/test.lux
+++ b/stdlib/source/program/aedifex/command/test.lux
@@ -33,7 +33,7 @@
(do async.monad
[environment (program.environment async.monad program)
.let [working_directory (\ program directory)]]
- (do {! ///action.monad}
+ (do [! ///action.monad]
[.let [home (\ program home)]
[build_exit compiler program] (//build.do! console program fs shell resolution
(with@ #///.program (value@ #///.test profile) profile))]
diff --git a/stdlib/source/program/aedifex/dependency/deployment.lux b/stdlib/source/program/aedifex/dependency/deployment.lux
index 5abc9979a..5227a8b95 100644
--- a/stdlib/source/program/aedifex/dependency/deployment.lux
+++ b/stdlib/source/program/aedifex/dependency/deployment.lux
@@ -50,7 +50,7 @@
(\ codec encoded)
(\ utf8.codec encoded)
(\ repository upload (format artifact extension)))))]
- (do {! (try.with async.monad)}
+ (do [! (try.with async.monad)]
[_ (\ repository upload artifact data)]
(case status
#///dependency/status.Unverified
@@ -117,7 +117,7 @@
(def: .public (one repository [artifact type] package)
(-> (Repository Async) Dependency Package (Async (Try Artifact)))
- (do {! async.monad}
+ (do [! async.monad]
[now (async.future instant.now)
.let [version_template (value@ #///artifact.version artifact)]]
(do (try.with !)
diff --git a/stdlib/source/program/aedifex/dependency/resolution.lux b/stdlib/source/program/aedifex/dependency/resolution.lux
index 99e8b9adf..b8aead0aa 100644
--- a/stdlib/source/program/aedifex/dependency/resolution.lux
+++ b/stdlib/source/program/aedifex/dependency/resolution.lux
@@ -84,7 +84,7 @@
[?actual (\ repository download (///repository/remote.uri version_template artifact extension))]
(case ?actual
(#try.Success actual)
- (in (do {! try.monad}
+ (in (do [! try.monad]
[output (\ ! each (for {@.old (|>> (:as java/lang/String)
java/lang/String::trim
(:as Text))
@@ -186,7 +186,7 @@
(\ async.monad in))
(#.Item repository alternatives)
- (do {! async.monad}
+ (do [! async.monad]
[_ (..announce_fetching console repository (value@ #//.artifact dependency))
outcome (..one repository dependency)]
(case outcome
@@ -223,7 +223,7 @@
failures
tail
resolution)
- _ (do {! async.monad}
+ _ (do [! async.monad]
[?package (case (dictionary.value head resolution)
(#.Some package)
(in (#try.Success package))
diff --git a/stdlib/source/program/aedifex/input.lux b/stdlib/source/program/aedifex/input.lux
index 0305e30d8..5bc33377b 100644
--- a/stdlib/source/program/aedifex/input.lux
+++ b/stdlib/source/program/aedifex/input.lux
@@ -55,7 +55,7 @@
(\ fs read)
(\ monad each
(function (_ it)
- (do {! try.monad}
+ (do [! try.monad]
[it it
it (..project_parser it)
it (monad.each ! (//project.profile it) profiles)]
diff --git a/stdlib/source/program/aedifex/metadata/snapshot.lux b/stdlib/source/program/aedifex/metadata/snapshot.lux
index 79b9d66dc..6f8ceb41c 100644
--- a/stdlib/source/program/aedifex/metadata/snapshot.lux
+++ b/stdlib/source/program/aedifex/metadata/snapshot.lux
@@ -87,7 +87,7 @@
(def: .public parser
(Parser Metadata)
(<| (<xml>.node ..<metadata>)
- (do {! <>.monad}
+ (do [! <>.monad]
[group (<xml>.somewhere (..text ..<group>))
name (<xml>.somewhere (..text ..<name>))
version (<xml>.somewhere (..text ..<version>))
diff --git a/stdlib/source/program/aedifex/parser.lux b/stdlib/source/program/aedifex/parser.lux
index 315021712..c2a4c2754 100644
--- a/stdlib/source/program/aedifex/parser.lux
+++ b/stdlib/source/program/aedifex/parser.lux
@@ -81,7 +81,7 @@
(def: license
(Parser /.License)
- (do {! <>.monad}
+ (do [! <>.monad]
[input (\ ! each
(dictionary.of_list text.hash)
(<code>.tuple (<>.some (<>.and <code>.text
@@ -96,7 +96,7 @@
(def: organization
(Parser /.Organization)
- (do {! <>.monad}
+ (do [! <>.monad]
[input (\ ! each
(dictionary.of_list text.hash)
(<code>.tuple (<>.some (<>.and <code>.text
@@ -107,7 +107,7 @@
(def: developer
(Parser /.Developer)
- (do {! <>.monad}
+ (do [! <>.monad]
[input (\ ! each
(dictionary.of_list text.hash)
(<code>.tuple (<>.some (<>.and <code>.text
@@ -124,7 +124,7 @@
(def: info
(Parser /.Info)
- (do {! <>.monad}
+ (do [! <>.monad]
[input (\ ! each
(dictionary.of_list text.hash)
(<code>.tuple (<>.some (<>.and <code>.text
@@ -180,7 +180,7 @@
(def: profile
(Parser /.Profile)
- (do {! <>.monad}
+ (do [! <>.monad]
[input (\ ! each
(dictionary.of_list text.hash)
(<code>.tuple (<>.some (<>.and <code>.text
diff --git a/stdlib/source/program/aedifex/pom.lux b/stdlib/source/program/aedifex/pom.lux
index b116e45bc..87a070f08 100644
--- a/stdlib/source/program/aedifex/pom.lux
+++ b/stdlib/source/program/aedifex/pom.lux
@@ -156,7 +156,7 @@
(def: property_parser
(Parser [Tag Text])
- (do {! <>.monad}
+ (do [! <>.monad]
[tag <xml>.tag]
(<| (<xml>.node tag)
(\ ! each (|>> [tag]))
@@ -164,7 +164,7 @@
(def: (dependency_parser own_version parent_version)
(-> Text Text (Parser Dependency))
- (do {! <>.monad}
+ (do [! <>.monad]
[properties (\ ! each (dictionary.of_list name.hash)
(<| (<xml>.node ["" ..dependency_tag])
(<>.some ..property_parser)))]
@@ -212,7 +212,7 @@
(def: .public parser
(Parser /.Profile)
- (do {! <>.monad}
+ (do [! <>.monad]
[own_version (<>.else "" (<xml>.somewhere ..own_version))
parent_version (<>.else "" (<xml>.somewhere ..parent_version))]
(<| (<xml>.node ["" ..project_tag])
diff --git a/stdlib/source/program/aedifex/project.lux b/stdlib/source/program/aedifex/project.lux
index a1c354cb9..f497b499d 100644
--- a/stdlib/source/program/aedifex/project.lux
+++ b/stdlib/source/program/aedifex/project.lux
@@ -60,7 +60,7 @@
(exception.except ..circular_dependency [ouroboros name])
#.None
- (do {! try.monad}
+ (do [! try.monad]
[parents (monad.each ! (profile' (set.has name lineage) project)
(value@ #//.parents profile))]
(in (list\mix (function (_ parent child)
diff --git a/stdlib/source/program/aedifex/repository.lux b/stdlib/source/program/aedifex/repository.lux
index 50a473b82..04eb87356 100644
--- a/stdlib/source/program/aedifex/repository.lux
+++ b/stdlib/source/program/aedifex/repository.lux
@@ -54,7 +54,7 @@
(def: (download uri)
(stm.commit!
- (do {! stm.monad}
+ (do [! stm.monad]
[|state| (stm.read state)]
(case (\ mock on_download uri |state|)
(#try.Success [|state| output])
@@ -67,7 +67,7 @@
(def: (upload uri content)
(stm.commit!
- (do {! stm.monad}
+ (do [! stm.monad]
[|state| (stm.read state)]
(case (\ mock on_upload uri content |state|)
(#try.Success |state|)
diff --git a/stdlib/source/program/aedifex/repository/local.lux b/stdlib/source/program/aedifex/repository/local.lux
index d10296714..4a2837672 100644
--- a/stdlib/source/program/aedifex/repository/local.lux
+++ b/stdlib/source/program/aedifex/repository/local.lux
@@ -47,7 +47,7 @@
(\ fs read)))
(def: (upload uri content)
- (do {! async.monad}
+ (do [! async.monad]
[.let [absolute_path (..absolute_path program (\ fs separator) uri)]
? (\ fs file? absolute_path)
_ (if ?
diff --git a/stdlib/source/program/aedifex/repository/remote.lux b/stdlib/source/program/aedifex/repository/remote.lux
index 00ac66517..ea8952bef 100644
--- a/stdlib/source/program/aedifex/repository/remote.lux
+++ b/stdlib/source/program/aedifex/repository/remote.lux
@@ -60,7 +60,7 @@
(def: description
address)
(def: (download uri)
- (do {! (try.with io.monad)}
+ (do [! (try.with io.monad)]
[[status message] (: (IO (Try (@http.Response IO)))
(http.get (format address uri)
(http.headers ..base_headers)
diff --git a/stdlib/source/program/compositor.lux b/stdlib/source/program/compositor.lux
index 90e5534f9..0fbfeb6fb 100644
--- a/stdlib/source/program/compositor.lux
+++ b/stdlib/source/program/compositor.lux
@@ -95,7 +95,7 @@
(def: (load_host_dependencies fs host_dependencies)
(-> (file.System Async) (List file.Path) (Async (Try (Dictionary file.Path Binary))))
- (do {! (try.with async.monad)}
+ (do [! (try.with async.monad)]
[]
(loop [pending host_dependencies
output (: (Dictionary file.Path Binary)
@@ -128,7 +128,7 @@
Service
[Packager file.Path]
(Async Any)))
- (do {! async.monad}
+ (do [! async.monad]
[platform (async.future platform)]
(case service
(#/cli.Compilation compilation)
@@ -176,7 +176,7 @@
... TODO: Fix the interpreter...
(undefined)
... (<| (or_crash! "Interpretation failed:")
- ... (do {! async.monad}
+ ... (do [! async.monad]
... [console (|> console.default
... async.future
... (\ ! each (|>> try.trusted console.async)))]
diff --git a/stdlib/source/program/compositor/export.lux b/stdlib/source/program/compositor/export.lux
index 49169526d..e2d89879a 100644
--- a/stdlib/source/program/compositor/export.lux
+++ b/stdlib/source/program/compositor/export.lux
@@ -64,7 +64,7 @@
(def: .public (export fs [sources target])
(-> (file.System Async) Export (Async (Try Any)))
- (do {! (try.with async.monad)}
+ (do [! (try.with async.monad)]
[tar (\ ! each (binary.result tar.writer)
(..library fs sources))]
(|> ..file
diff --git a/stdlib/source/program/scriptum.lux b/stdlib/source/program/scriptum.lux
index d61e32ce0..187173782 100644
--- a/stdlib/source/program/scriptum.lux
+++ b/stdlib/source/program/scriptum.lux
@@ -383,7 +383,7 @@
(def: (document_types module types)
(-> Text (List Value) (Meta (Markdown Block)))
- (do {! meta.monad}
+ (do [! meta.monad]
[type_docs (monad.each !
(: (-> Value (Meta (Markdown Block)))
(function (_ [name def_annotations type])
@@ -503,7 +503,7 @@
... [])))))
... (macro: (gen_documentation! _)
-... (do {! meta.monad}
+... (do [! meta.monad]
... [all_modules meta.modules
... .let [lux_modules (|> all_modules
... (list.only (function.composite lux_module? product.left))
diff --git a/stdlib/source/specification/compositor/generation/case.lux b/stdlib/source/specification/compositor/generation/case.lux
index c7c221eb7..d71abc703 100644
--- a/stdlib/source/specification/compositor/generation/case.lux
+++ b/stdlib/source/specification/compositor/generation/case.lux
@@ -64,7 +64,7 @@
[r.i64 synthesis.i64 synthesis.path/i64]
[r.frac synthesis.f64 synthesis.path/f64]
[(r.unicode 5) synthesis.text synthesis.path/text]))
- (do {! r.monad}
+ (do [! r.monad]
[size ..size
idx (|> r.nat (\ ! each (n.% size)))
[subS subP] case
@@ -79,7 +79,7 @@
(synthesis.member/left idx))
subP)]]
(in [caseS caseP]))
- (do {! r.monad}
+ (do [! r.monad]
[size ..size
idx (|> r.nat (\ ! each (n.% size)))
[subS subP] case
diff --git a/stdlib/source/specification/compositor/generation/common.lux b/stdlib/source/specification/compositor/generation/common.lux
index 18d739d8e..917d830b6 100644
--- a/stdlib/source/specification/compositor/generation/common.lux
+++ b/stdlib/source/specification/compositor/generation/common.lux
@@ -174,7 +174,7 @@
(def: (text run)
(-> Runner Test)
- (do {! r.monad}
+ (do [! r.monad]
[sample_size (|> r.nat (\ ! each (|>> (n.% 10) (n.max 1))))
sample_lower (r.ascii/lower_alpha sample_size)
sample_upper (r.ascii/upper_alpha sample_size)
diff --git a/stdlib/source/specification/compositor/generation/function.lux b/stdlib/source/specification/compositor/generation/function.lux
index dc92cc224..f356bce90 100644
--- a/stdlib/source/specification/compositor/generation/function.lux
+++ b/stdlib/source/specification/compositor/generation/function.lux
@@ -49,7 +49,7 @@
(def: .public (spec run)
(-> Runner Test)
- (do {! r.monad}
+ (do [! r.monad]
[[arity local functionS] ..function
partial_arity (|> r.nat (\ ! each (|>> (n.% arity) (n.max 1))))
inputs (r.list arity r.safe_frac)
diff --git a/stdlib/source/specification/compositor/generation/reference.lux b/stdlib/source/specification/compositor/generation/reference.lux
index bcf2bb2d1..37aea49fe 100644
--- a/stdlib/source/specification/compositor/generation/reference.lux
+++ b/stdlib/source/specification/compositor/generation/reference.lux
@@ -39,7 +39,7 @@
(def: (variable run)
(-> Runner Test)
- (do {! r.monad}
+ (do [! r.monad]
[register (|> r.nat (\ ! each (n.% 100)))
expected r.safe_frac]
(_.test "Local variables."
diff --git a/stdlib/source/specification/compositor/generation/structure.lux b/stdlib/source/specification/compositor/generation/structure.lux
index 4161c650a..cd86ecab2 100644
--- a/stdlib/source/specification/compositor/generation/structure.lux
+++ b/stdlib/source/specification/compositor/generation/structure.lux
@@ -30,7 +30,7 @@
(def: (variant run)
(-> Runner Test)
- (do {! r.monad}
+ (do [! r.monad]
[num_tags (|> r.nat (\ ! each (|>> (n.% 10) (n.max 2))))
tag_in (|> r.nat (\ ! each (n.% num_tags)))
.let [last?_in (|> num_tags -- (n.= tag_in))]
@@ -65,7 +65,7 @@
(def: (tuple run)
(-> Runner Test)
- (do {! r.monad}
+ (do [! r.monad]
[size (|> r.nat (\ ! each (|>> (n.% 10) (n.max 2))))
tuple_in (r.list size r.i64)]
(_.test (%.name (name_of synthesis.tuple))
diff --git a/stdlib/source/specification/lux/abstract/apply.lux b/stdlib/source/specification/lux/abstract/apply.lux
index 594a42253..431fc8f29 100644
--- a/stdlib/source/specification/lux/abstract/apply.lux
+++ b/stdlib/source/specification/lux/abstract/apply.lux
@@ -17,7 +17,7 @@
(def: (identity injection comparison (^open "\."))
(All (_ f) (-> (Injection f) (Comparison f) (Apply f) Test))
- (do {! random.monad}
+ (do [! random.monad]
[sample (\ ! each injection random.nat)]
(_.test "Identity."
((comparison n.=)
@@ -26,7 +26,7 @@
(def: (homomorphism injection comparison (^open "\."))
(All (_ f) (-> (Injection f) (Comparison f) (Apply f) Test))
- (do {! random.monad}
+ (do [! random.monad]
[sample random.nat
increase (\ ! each n.+ random.nat)]
(_.test "Homomorphism."
@@ -36,7 +36,7 @@
(def: (interchange injection comparison (^open "\."))
(All (_ f) (-> (Injection f) (Comparison f) (Apply f) Test))
- (do {! random.monad}
+ (do [! random.monad]
[sample random.nat
increase (\ ! each n.+ random.nat)]
(_.test "Interchange."
@@ -47,7 +47,7 @@
(def: (composition injection comparison (^open "\."))
(All (_ f) (-> (Injection f) (Comparison f) (Apply f) Test))
- (do {! random.monad}
+ (do [! random.monad]
[sample random.nat
increase (\ ! each n.+ random.nat)
decrease (\ ! each n.- random.nat)]
diff --git a/stdlib/source/specification/lux/abstract/comonad.lux b/stdlib/source/specification/lux/abstract/comonad.lux
index 76235ad53..4941d31ad 100644
--- a/stdlib/source/specification/lux/abstract/comonad.lux
+++ b/stdlib/source/specification/lux/abstract/comonad.lux
@@ -15,7 +15,7 @@
(def: (left_identity injection (^open "_//."))
(All (_ f) (-> (Injection f) (CoMonad f) Test))
- (do {! random.monad}
+ (do [! random.monad]
[sample random.nat
morphism (\ ! each (function (_ diff)
(|>> _//out (n.+ diff)))
@@ -37,7 +37,7 @@
(def: (associativity injection comparison (^open "_//."))
(All (_ f) (-> (Injection f) (Comparison f) (CoMonad f) Test))
- (do {! random.monad}
+ (do [! random.monad]
[sample random.nat
increase (\ ! each (function (_ diff)
(|>> _//out (n.+ diff)))
diff --git a/stdlib/source/specification/lux/abstract/functor.lux b/stdlib/source/specification/lux/abstract/functor.lux
index 1186640fa..681f6dcd5 100644
--- a/stdlib/source/specification/lux/abstract/functor.lux
+++ b/stdlib/source/specification/lux/abstract/functor.lux
@@ -24,7 +24,7 @@
(def: (identity injection comparison (^open "@//."))
(All (_ f) (-> (Injection f) (Comparison f) (Functor f) Test))
- (do {! random.monad}
+ (do [! random.monad]
[sample (\ ! each injection random.nat)]
(_.test "Identity."
((comparison n.=)
@@ -33,7 +33,7 @@
(def: (homomorphism injection comparison (^open "@//."))
(All (_ f) (-> (Injection f) (Comparison f) (Functor f) Test))
- (do {! random.monad}
+ (do [! random.monad]
[sample random.nat
increase (\ ! each n.+ random.nat)]
(_.test "Homomorphism."
@@ -43,7 +43,7 @@
(def: (composition injection comparison (^open "@//."))
(All (_ f) (-> (Injection f) (Comparison f) (Functor f) Test))
- (do {! random.monad}
+ (do [! random.monad]
[sample (\ ! each injection random.nat)
increase (\ ! each n.+ random.nat)
decrease (\ ! each n.- random.nat)]
diff --git a/stdlib/source/specification/lux/abstract/monad.lux b/stdlib/source/specification/lux/abstract/monad.lux
index 2be8f2285..11ee011e1 100644
--- a/stdlib/source/specification/lux/abstract/monad.lux
+++ b/stdlib/source/specification/lux/abstract/monad.lux
@@ -13,7 +13,7 @@
(def: (left_identity injection comparison (^open "_//."))
(All (_ f) (-> (Injection f) (Comparison f) (/.Monad f) Test))
- (do {! random.monad}
+ (do [! random.monad]
[sample random.nat
morphism (\ ! each (function (_ diff)
(|>> (n.+ diff) _//in))
@@ -34,7 +34,7 @@
(def: (associativity injection comparison (^open "_//."))
(All (_ f) (-> (Injection f) (Comparison f) (/.Monad f) Test))
- (do {! random.monad}
+ (do [! random.monad]
[sample random.nat
increase (\ ! each (function (_ diff)
(|>> (n.+ diff) _//in))
diff --git a/stdlib/source/specification/lux/world/file.lux b/stdlib/source/specification/lux/world/file.lux
index 14cb79211..765893ba6 100644
--- a/stdlib/source/specification/lux/world/file.lux
+++ b/stdlib/source/specification/lux/world/file.lux
@@ -34,7 +34,7 @@
(def: (for_path fs)
(-> (IO (/.System Async)) Test)
(<| (_.for [/.Path])
- (do {! random.monad}
+ (do [! random.monad]
[parent (random.ascii/numeric 2)
child (random.ascii/numeric 2)])
in
@@ -89,7 +89,7 @@
post_file_size (\ fs file_size path)
post_content (\ fs read path)]
(in (<| (try.else false)
- (do {! try.monad}
+ (do [! try.monad]
[pre_file_size!
(\ ! each (n.= expected_file_size) pre_file_size)
@@ -114,7 +114,7 @@
[modified? (\ fs modify expected_time path)
last_modified (\ fs last_modified path)]
(in (<| (try.else false)
- (do {! try.monad}
+ (do [! try.monad]
[_ modified?]
(\ ! each (instant\= expected_time) last_modified))))))
@@ -141,7 +141,7 @@
(-> (/.System Async) /.Path Text Text (Async Bit))
(let [origin (/.rooted fs parent child)
destination (/.rooted fs parent alternate_child)]
- (do {! async.monad}
+ (do [! async.monad]
[moved? (\ fs move destination origin)
lost? (|> origin
(\ fs file?)
@@ -157,7 +157,7 @@
(def: (for_system fs)
(-> (IO (/.System Async)) Test)
- (<| (do {! random.monad}
+ (<| (do [! random.monad]
[parent (random.ascii/numeric 2)
child (random.ascii/numeric 2)
sub_dir (random.only (|>> (text\= child) not)
@@ -171,7 +171,7 @@
appendix ($binary.random expected_file_size)
expected_time random.instant])
in
- (do {! async.monad}
+ (do [! async.monad]
[fs (async.future fs)
.let [path (/.rooted fs parent child)]
@@ -208,12 +208,12 @@
(def: (make_directories&cannot_make_directory fs)
(-> (IO (/.System Async)) Test)
- (<| (do {! random.monad}
+ (<| (do [! random.monad]
[dir/0 (random.ascii/numeric 2)
dir/1 (random.ascii/numeric 2)
dir/2 (random.ascii/numeric 2)])
in
- (do {! async.monad}
+ (do [! async.monad]
[fs (async.future fs)
.let [dir/1 (/.rooted fs dir/0 dir/1)
dir/2 (/.rooted fs dir/1 dir/2)]
@@ -255,10 +255,10 @@
(def: (make_file&cannot_make_file fs)
(-> (IO (/.System Async)) Test)
- (<| (do {! random.monad}
+ (<| (do [! random.monad]
[file/0 (random.ascii/numeric 3)])
in
- (do {! async.monad}
+ (do [! async.monad]
[fs (async.future fs)
make_file!/0 (/.make_file ! fs (utf8\encoded file/0) file/0)
make_file!/1 (/.make_file ! fs (utf8\encoded file/0) file/0)])
@@ -285,12 +285,12 @@
(def: (exists? fs)
(-> (IO (/.System Async)) Test)
- (<| (do {! random.monad}
+ (<| (do [! random.monad]
[file (random.ascii/numeric 2)
dir (random.only (|>> (text\= file) not)
(random.ascii/numeric 2))])
in
- (do {! async.monad}
+ (do [! async.monad]
[fs (async.future fs)
pre_file/0 (\ fs file? file)
diff --git a/stdlib/source/specification/lux/world/program.lux b/stdlib/source/specification/lux/world/program.lux
index b1577364a..772aa28a4 100644
--- a/stdlib/source/specification/lux/world/program.lux
+++ b/stdlib/source/specification/lux/world/program.lux
@@ -22,7 +22,7 @@
(-> (/.Program Async) Test)
(do random.monad
[exit random.int]
- (in (do {! async.monad}
+ (in (do [! async.monad]
[environment (/.environment ! subject)]
(_.cover' [/.Program]
(and (not (dictionary.empty? environment))
diff --git a/stdlib/source/specification/lux/world/shell.lux b/stdlib/source/specification/lux/world/shell.lux
index 3ec8c6142..8f12be702 100644
--- a/stdlib/source/specification/lux/world/shell.lux
+++ b/stdlib/source/specification/lux/world/shell.lux
@@ -69,10 +69,10 @@
(def: .public (spec shell)
(-> (/.Shell Async) Test)
(<| (_.for [/.Shell /.Process])
- (do {! random.monad}
+ (do [! random.monad]
[message (random.ascii/alpha 10)
seconds (\ ! each (|>> (n.% 5) (n.+ 5)) random.nat)]
- (in (do {! async.monad}
+ (in (do [! async.monad]
[?echo (\ shell execute (..echo! message))
?sleep (\ shell execute (..sleep! seconds))]
(case [?echo ?sleep]
diff --git a/stdlib/source/test/aedifex/cache.lux b/stdlib/source/test/aedifex/cache.lux
index 748af575a..7bd36499b 100644
--- a/stdlib/source/test/aedifex/cache.lux
+++ b/stdlib/source/test/aedifex/cache.lux
@@ -63,13 +63,13 @@
(def: content
(Random Binary)
- (do {! random.monad}
+ (do [! random.monad]
[content_size (\ ! each (n.% 100) random.nat)]
(_binary.random content_size)))
(def: package
(Random [Dependency Package])
- (do {! random.monad}
+ (do [! random.monad]
[[identity profile pom] ..profile
type ..type
content ..content]
@@ -79,7 +79,7 @@
(def: resolution
(Random Resolution)
- (do {! random.monad}
+ (do [! random.monad]
[[main_dependency main_package] ..package
dependencies (|> (//package.dependencies main_package)
(\ try.monad each set.list)
@@ -100,7 +100,7 @@
(def: singular
Test
- (do {! random.monad}
+ (do [! random.monad]
[[dependency expected_package] ..package
home (random.ascii/alpha 5)
working_directory (random.ascii/alpha 5)
@@ -121,7 +121,7 @@
(def: plural
Test
- (do {! random.monad}
+ (do [! random.monad]
[expected ..resolution
home (random.ascii/alpha 5)
working_directory (random.ascii/alpha 5)
diff --git a/stdlib/source/test/aedifex/command/auto.lux b/stdlib/source/test/aedifex/command/auto.lux
index 894e647be..71608e83d 100644
--- a/stdlib/source/test/aedifex/command/auto.lux
+++ b/stdlib/source/test/aedifex/command/auto.lux
@@ -52,7 +52,7 @@
(atom.atom 0))]
[@runs
(function (_ console program fs shell resolution profile)
- (do {! async.monad}
+ (do [! async.monad]
[[_ actual_runs] (async.future (atom.update! ++ @runs))]
(if (n.= expected_runs actual_runs)
(in (#try.Failure end_signal))
@@ -66,7 +66,7 @@
(def: .public test
Test
(<| (_.covering /._)
- (do {! random.monad}
+ (do [! random.monad]
[end_signal (random.ascii/alpha 5)
.let [/ (\ file.default separator)
[fs watcher] (watch.mock /)]
@@ -101,7 +101,7 @@
_ (\ fs write (binary.empty 0) dummy_path)
.let [[@runs command] (..command expected_runs end_signal fs dummy_path)]
_ (\ watcher poll [])]
- (do {! async.monad}
+ (do [! async.monad]
[no_dangling_process! (|> profile
(with@ #///.compiler compiler)
((/.do! 1 watcher command)
diff --git a/stdlib/source/test/aedifex/command/build.lux b/stdlib/source/test/aedifex/command/build.lux
index 3009e5011..cbdfdc929 100644
--- a/stdlib/source/test/aedifex/command/build.lux
+++ b/stdlib/source/test/aedifex/command/build.lux
@@ -139,7 +139,7 @@
(def: .public test
Test
(<| (_.covering /._)
- (do {! random.monad}
+ (do [! random.monad]
[last_read (random.ascii/alpha 5)
last_error (random.ascii/alpha 5)
.let [fs (file.mock (\ file.default separator))
@@ -224,7 +224,7 @@
shell (|> (list expected/0 expected/1 expected/2)
(..reader_shell <error?>)
shell.async)]
- (in (do {! async.monad}
+ (in (do [! async.monad]
[verdict (do ///action.monad
[process (shell [environment.empty working_directory "" (list "")])
_ (<log!> console process)
diff --git a/stdlib/source/test/aedifex/command/clean.lux b/stdlib/source/test/aedifex/command/clean.lux
index 7d7e613fe..c59b75719 100644
--- a/stdlib/source/test/aedifex/command/clean.lux
+++ b/stdlib/source/test/aedifex/command/clean.lux
@@ -42,7 +42,7 @@
(def: (files prefix)
(-> Path (Random (List [Path Binary])))
- (do {! random.monad}
+ (do [! random.monad]
[count (\ ! each (n.% 10) random.nat)
names (random.set text.hash count ..node_name)
contents (random.list count ($binary.random 100))]
@@ -55,7 +55,7 @@
(def: (create_directory! fs path files)
(-> (file.System Async) Path (List [Path Binary]) (Async (Try Any)))
- (do {! (try.with async.monad)}
+ (do [! (try.with async.monad)]
[_ (: (Async (Try Any))
(file.make_directories async.monad fs path))
_ (monad.each ! (..create_file! fs) files)]
@@ -71,7 +71,7 @@
(def: (assets_exist? fs directory_path files)
(-> (file.System Async) Path (List [Path Binary]) (Async (Try Bit)))
- (do {! (try.with async.monad)}
+ (do [! (try.with async.monad)]
[directory_exists? (..directory_exists? fs directory_path)
files_exist? (: (Action (List Bit))
(|> files
@@ -83,7 +83,7 @@
(def: .public test
Test
(<| (_.covering /._)
- (do {! random.monad}
+ (do [! random.monad]
[context ..node_name
target ..node_name
sub ..node_name
@@ -97,7 +97,7 @@
dummy @profile.random]
(in (do async.monad
[.let [console (@version.echo "")]
- verdict (do {! (try.with async.monad)}
+ verdict (do [! (try.with async.monad)]
[_ (..create_directory! fs target_path direct_files)
_ (..create_directory! fs sub_path sub_files)
context_exists!/pre (..directory_exists? fs context)
diff --git a/stdlib/source/test/aedifex/command/deploy.lux b/stdlib/source/test/aedifex/command/deploy.lux
index 77af48126..93bf3de79 100644
--- a/stdlib/source/test/aedifex/command/deploy.lux
+++ b/stdlib/source/test/aedifex/command/deploy.lux
@@ -62,7 +62,7 @@
(def: .public test
Test
(<| (_.covering /._)
- (do {! random.monad}
+ (do [! random.monad]
[[artifact expected_pom profile]
(random.one (function (_ profile)
(do maybe.monad
@@ -77,8 +77,8 @@
$repository.empty)
fs (file.mock (\ file.default separator))
program (program.async (program.mock environment.empty home working_directory))]]
- (in (do {! async.monad}
- [verdict (do {! ///action.monad}
+ (in (do [! async.monad]
+ [verdict (do [! ///action.monad]
[logging (..execute! program repository fs artifact profile)
expected_library (|> profile
(value@ #///.sources)
diff --git a/stdlib/source/test/aedifex/command/install.lux b/stdlib/source/test/aedifex/command/install.lux
index 76f8cf768..3fe787e35 100644
--- a/stdlib/source/test/aedifex/command/install.lux
+++ b/stdlib/source/test/aedifex/command/install.lux
@@ -63,7 +63,7 @@
(def: .public test
Test
(<| (_.covering /._)
- (do {! random.monad}
+ (do [! random.monad]
[identity $artifact.random
sample (\ ! each (with@ #///.identity (#.Some identity))
$profile.random)
@@ -71,14 +71,14 @@
working_directory (random.ascii/alpha 5)
.let [/ (\ file.default separator)]]
($_ _.and
- (in (do {! async.monad}
+ (in (do [! async.monad]
[.let [fs (file.mock /)
program (program.async (program.mock environment.empty home working_directory))
artifact_path (///local.uri (value@ #///artifact.version identity) identity)
library_path (format artifact_path ///artifact/extension.lux_library)
pom_path (format artifact_path ///artifact/extension.pom)]
- verdict (do {! ///action.monad}
+ verdict (do [! ///action.monad]
[succeeded! (\ ! each (text\= /.success)
(..execute! program fs sample))
library_exists! (|> library_path
@@ -94,7 +94,7 @@
pom_exists!)))]
(_.cover' [/.do! /.success]
(try.else false verdict))))
- (in (do {! async.monad}
+ (in (do [! async.monad]
[.let [fs (file.mock /)
program (program.async (program.mock environment.empty home working_directory))]
logging (..execute! program fs (with@ #///.identity #.None sample))]
diff --git a/stdlib/source/test/aedifex/command/pom.lux b/stdlib/source/test/aedifex/command/pom.lux
index 1bac5cf69..be5c60598 100644
--- a/stdlib/source/test/aedifex/command/pom.lux
+++ b/stdlib/source/test/aedifex/command/pom.lux
@@ -36,7 +36,7 @@
(do random.monad
[sample @profile.random
.let [fs (file.mock (\ file.default separator))]]
- (in (do {! async.monad}
+ (in (do [! async.monad]
[.let [console (@version.echo "")]
outcome (/.do! console fs sample)]
(case outcome
diff --git a/stdlib/source/test/aedifex/command/test.lux b/stdlib/source/test/aedifex/command/test.lux
index 0496428a6..6f04ef653 100644
--- a/stdlib/source/test/aedifex/command/test.lux
+++ b/stdlib/source/test/aedifex/command/test.lux
@@ -42,7 +42,7 @@
(def: .public test
Test
(<| (_.covering /._)
- (do {! random.monad}
+ (do [! random.monad]
[test (random.ascii/alpha 5)
target (random.ascii/alpha 5)
home (random.ascii/alpha 5)
diff --git a/stdlib/source/test/aedifex/dependency/deployment.lux b/stdlib/source/test/aedifex/dependency/deployment.lux
index e9bcc67a4..8dfa5a853 100644
--- a/stdlib/source/test/aedifex/dependency/deployment.lux
+++ b/stdlib/source/test/aedifex/dependency/deployment.lux
@@ -146,11 +146,11 @@
(def: .public test
Test
(<| (_.covering /._)
- (do {! random.monad}
+ (do [! random.monad]
[address (\ ! each (text.suffix uri.separator)
(random.ascii/upper 10))]
($_ _.and
- (do {! random.monad}
+ (do [! random.monad]
[[dependency expected_artifact package] ..bundle
.let [cache (: Cache
(atom.atom (dictionary.empty text.hash)))
@@ -163,7 +163,7 @@
(|> ?outcome
(try\each (verify_one 1 address package cache expected_artifact))
(try.else false))))))
- (do {! random.monad}
+ (do [! random.monad]
[.let [hash (: (Hash [Dependency Artifact Package])
(\ hash.functor each (|>> product.right product.left product.left)
text.hash))]
diff --git a/stdlib/source/test/aedifex/dependency/resolution.lux b/stdlib/source/test/aedifex/dependency/resolution.lux
index 79e0bde5b..7297b99ee 100644
--- a/stdlib/source/test/aedifex/dependency/resolution.lux
+++ b/stdlib/source/test/aedifex/dependency/resolution.lux
@@ -50,7 +50,7 @@
(def: random
(Random /.Resolution)
- (do {! random.monad}
+ (do [! random.monad]
[artifact $///artifact.random
[_ package] $///package.random]
(in (dictionary.has [#///dependency.artifact artifact
@@ -246,7 +246,7 @@
(def: one
Test
- (do {! random.monad}
+ (do [! random.monad]
[expected_artifact $///artifact.random
[_ expected_package] $///package.random
[_ dummy_package] (random.only (|>> product.right
@@ -291,7 +291,7 @@
(def: any
Test
- (do {! random.monad}
+ (do [! random.monad]
[expected_artifact $///artifact.random
[_ expected_package] $///package.random
[_ dummy_package] (random.only (|>> product.right
@@ -399,7 +399,7 @@
(def: all
Test
- (do {! random.monad}
+ (do [! random.monad]
[[dependee_artifact depender_artifact ignored_artifact] ..artifacts
[[dependee depender ignored]
diff --git a/stdlib/source/test/aedifex/hash.lux b/stdlib/source/test/aedifex/hash.lux
index 45e693c07..94608cf7b 100644
--- a/stdlib/source/test/aedifex/hash.lux
+++ b/stdlib/source/test/aedifex/hash.lux
@@ -29,7 +29,7 @@
(All (_ h)
(-> (-> Binary (/.Hash h))
(Random (/.Hash h))))
- (do {! random.monad}
+ (do [! random.monad]
[size (\ ! each (n.% 100) random.nat)]
(\ ! each hash (_binary.random size))))
diff --git a/stdlib/source/test/aedifex/input.lux b/stdlib/source/test/aedifex/input.lux
index eef2673f8..b725272e9 100644
--- a/stdlib/source/test/aedifex/input.lux
+++ b/stdlib/source/test/aedifex/input.lux
@@ -44,7 +44,7 @@
(def: .public test
Test
(<| (_.covering /._)
- (do {! random.monad}
+ (do [! random.monad]
[expected (\ ! each (with@ #//.parents (list)) $profile.random)
.let [fs (: (file.System Async)
(file.mock (\ file.default separator)))]]
diff --git a/stdlib/source/test/aedifex/local.lux b/stdlib/source/test/aedifex/local.lux
index 33c27fba7..8a6de8dcd 100644
--- a/stdlib/source/test/aedifex/local.lux
+++ b/stdlib/source/test/aedifex/local.lux
@@ -18,7 +18,7 @@
(def: .public test
Test
(<| (_.covering /._)
- (do {! random.monad}
+ (do [! random.monad]
[sample @artifact.random]
($_ _.and
(_.cover [/.repository /.uri]
diff --git a/stdlib/source/test/aedifex/metadata/artifact.lux b/stdlib/source/test/aedifex/metadata/artifact.lux
index 1d6aae530..544da4d3c 100644
--- a/stdlib/source/test/aedifex/metadata/artifact.lux
+++ b/stdlib/source/test/aedifex/metadata/artifact.lux
@@ -47,7 +47,7 @@
(random.ascii/alpha 5)
(random.ascii/alpha 5)
(random.list 5 (random.ascii/alpha 5))
- (do {! random.monad}
+ (do [! random.monad]
[year (\ ! each (|>> (n.% 9,000) (n.+ 1,000) .int) random.nat)
month (\ ! each (|>> (n.% 12) (n.+ 1)) random.nat)
day_of_month (\ ! each (|>> (n.% 28) (n.+ 1)) random.nat)
diff --git a/stdlib/source/test/aedifex/metadata/snapshot.lux b/stdlib/source/test/aedifex/metadata/snapshot.lux
index a8d518aac..2c4866c2c 100644
--- a/stdlib/source/test/aedifex/metadata/snapshot.lux
+++ b/stdlib/source/test/aedifex/metadata/snapshot.lux
@@ -51,7 +51,7 @@
(def: random_instant
(Random Instant)
- (do {! random.monad}
+ (do [! random.monad]
[year (\ ! each (|>> (n.% 9,000) (n.+ 1,000) .int) random.nat)
month (\ ! each (|>> (n.% 12) (n.+ 1)) random.nat)
day_of_month (\ ! each (|>> (n.% 28) (n.+ 1)) random.nat)
diff --git a/stdlib/source/test/aedifex/package.lux b/stdlib/source/test/aedifex/package.lux
index 8bd1d6fde..a7bc7d00a 100644
--- a/stdlib/source/test/aedifex/package.lux
+++ b/stdlib/source/test/aedifex/package.lux
@@ -42,7 +42,7 @@
(def: .public random
(Random [//.Profile /.Package])
- (do {! random.monad}
+ (do [! random.monad]
[content_size (\ ! each (n.% 100) random.nat)
content ($binary.random content_size)
[profile pom] (random.one (function (_ profile)
@@ -57,7 +57,7 @@
Test
(<| (_.covering /._)
(_.for [/.Package])
- (do {! random.monad}
+ (do [! random.monad]
[[profile package] ..random]
($_ _.and
(_.for [/.equivalence]
diff --git a/stdlib/source/test/aedifex/parser.lux b/stdlib/source/test/aedifex/parser.lux
index cb72c3726..1d8c6c1b4 100644
--- a/stdlib/source/test/aedifex/parser.lux
+++ b/stdlib/source/test/aedifex/parser.lux
@@ -39,7 +39,7 @@
(def: (list_of random)
(All (_ a) (-> (Random a) (Random (List a))))
- (do {! random.monad}
+ (do [! random.monad]
[size (\ ! each (n.% 5) random.nat)]
(random.list size random)))
diff --git a/stdlib/source/test/aedifex/profile.lux b/stdlib/source/test/aedifex/profile.lux
index 48f28903e..728971bbf 100644
--- a/stdlib/source/test/aedifex/profile.lux
+++ b/stdlib/source/test/aedifex/profile.lux
@@ -73,7 +73,7 @@
(def: (list_of random)
(All (_ a) (-> (Random a) (Random (List a))))
- (do {! random.monad}
+ (do [! random.monad]
[size (\ ! each (n.% 5) random.nat)]
(random.list size random)))
diff --git a/stdlib/source/test/aedifex/repository/local.lux b/stdlib/source/test/aedifex/repository/local.lux
index eb7b9777d..135e10867 100644
--- a/stdlib/source/test/aedifex/repository/local.lux
+++ b/stdlib/source/test/aedifex/repository/local.lux
@@ -26,7 +26,7 @@
(def: .public test
Test
(<| (_.covering /._)
- (do {! random.monad}
+ (do [! random.monad]
[/ (random.ascii/upper 1)
home (random.ascii/lower 10)
working_directory (random.ascii/lower 10)
diff --git a/stdlib/source/test/aedifex/repository/remote.lux b/stdlib/source/test/aedifex/repository/remote.lux
index a38e68104..dfdbe03c5 100644
--- a/stdlib/source/test/aedifex/repository/remote.lux
+++ b/stdlib/source/test/aedifex/repository/remote.lux
@@ -83,7 +83,7 @@
(def: .public test
Test
(<| (_.covering /._)
- (do {! random.monad}
+ (do [! random.monad]
[address (random.ascii/upper 10)
uri (random.ascii/lower 10)
diff --git a/stdlib/source/test/lux.lux b/stdlib/source/test/lux.lux
index 25e19caa8..9e353a1c3 100644
--- a/stdlib/source/test/lux.lux
+++ b/stdlib/source/test/lux.lux
@@ -478,7 +478,7 @@
(def: for_type
Test
- (do {! random.monad}
+ (do [! random.monad]
[expected random.nat
expected_left random.nat
@@ -631,7 +631,7 @@
(_.cover [/.template:]
(n.= (n.+ left right)
(!n/+ left right))))
- (do {! random.monad}
+ (do [! random.monad]
[sample (\ ! each (n.% 5) random.nat)]
(_.cover [/.^template]
(case sample
@@ -912,7 +912,7 @@
(def: for_case
Test
- (do {! random.monad}
+ (do [! random.monad]
[expected_nat (\ ! each (n.% 1) random.nat)
expected_int (\ ! each (i.% +1) random.int)
expected_rev (random.either (in .5)
diff --git a/stdlib/source/test/lux/abstract/interval.lux b/stdlib/source/test/lux/abstract/interval.lux
index d38bcac05..1891be079 100644
--- a/stdlib/source/test/lux/abstract/interval.lux
+++ b/stdlib/source/test/lux/abstract/interval.lux
@@ -137,7 +137,7 @@
(def: location
Test
- (do {! random.monad}
+ (do [! random.monad]
[[l m r] (|> (random.set n.hash 3 random.nat)
(\ ! each (|>> set.list
(list.sorted n.<)
@@ -159,7 +159,7 @@
(def: touch
Test
- (do {! random.monad}
+ (do [! random.monad]
[[b t1 t2] (|> (random.set n.hash 3 random.nat)
(\ ! each (|>> set.list
(list.sorted n.<)
@@ -185,7 +185,7 @@
(def: nested
Test
- (do {! random.monad}
+ (do [! random.monad]
[some_interval ..interval
[x0 x1 x2 x3] (|> (random.set n.hash 4 random.nat)
(\ ! each (|>> set.list
@@ -218,7 +218,7 @@
(def: overlap
Test
- (do {! random.monad}
+ (do [! random.monad]
[some_interval ..interval
[x0 x1 x2 x3] (|> (random.set n.hash 4 random.nat)
(\ ! each (|>> set.list
diff --git a/stdlib/source/test/lux/abstract/predicate.lux b/stdlib/source/test/lux/abstract/predicate.lux
index 4f313cd44..55801fb84 100644
--- a/stdlib/source/test/lux/abstract/predicate.lux
+++ b/stdlib/source/test/lux/abstract/predicate.lux
@@ -31,7 +31,7 @@
(def: .public test
Test
(<| (_.covering /._)
- (do {! random.monad}
+ (do [! random.monad]
[sample random.nat
samples (random.list 10 random.nat)
.let [equivalence (: (Equivalence (/.Predicate Nat))
diff --git a/stdlib/source/test/lux/control/concurrency/actor.lux b/stdlib/source/test/lux/control/concurrency/actor.lux
index d7b0bec38..a33bc598b 100644
--- a/stdlib/source/test/lux/control/concurrency/actor.lux
+++ b/stdlib/source/test/lux/control/concurrency/actor.lux
@@ -49,7 +49,7 @@
(def: .public test
Test
- (do {! random.monad}
+ (do [! random.monad]
[initial_state random.nat
.let [as_mail (: (All (_ a) (-> (-> a a) (/.Mail a)))
(function (_ transform)
@@ -91,7 +91,7 @@
[actor (/.spawn! (: (/.Behavior Any Any)
[#/.on_init (|>>)
#/.on_mail (function (_ message state self)
- (do {! async.monad}
+ (do [! async.monad]
[outcome (message state self)]
(case outcome
(#try.Failure cause)
@@ -208,7 +208,7 @@
(atom.atom row.empty))]]
(in (do async.monad
[agent (async.future
- (do {! io.monad}
+ (do [! io.monad]
[agent (/.actor {Nat 0})
_ (/.observe! (function (_ event stop)
(function (_ events_seen self)
diff --git a/stdlib/source/test/lux/control/concurrency/async.lux b/stdlib/source/test/lux/control/concurrency/async.lux
index 5ea37b8be..ad1297161 100644
--- a/stdlib/source/test/lux/control/concurrency/async.lux
+++ b/stdlib/source/test/lux/control/concurrency/async.lux
@@ -53,7 +53,7 @@
(def: .public test
Test
(<| (_.covering /._)
- (do {! random.monad}
+ (do [! random.monad]
[waiting_time (|> random.nat (\ ! each (|>> (n.% ..delay) (n.+ ..delay))))
expected random.nat
dummy random.nat
diff --git a/stdlib/source/test/lux/control/concurrency/frp.lux b/stdlib/source/test/lux/control/concurrency/frp.lux
index 2d111453c..40c490233 100644
--- a/stdlib/source/test/lux/control/concurrency/frp.lux
+++ b/stdlib/source/test/lux/control/concurrency/frp.lux
@@ -52,7 +52,7 @@
0 (do async.monad
[_ (async.future (\ sink close))]
(in #.End))
- _ (do {! async.monad}
+ _ (do [! async.monad]
[event channel]
(case event
#.None
@@ -66,7 +66,7 @@
Test
(<| (_.covering /._)
(let [(^open "list\.") (list.equivalence n.equivalence)]
- (do {! random.monad}
+ (do [! random.monad]
[inputs (random.list 5 random.nat)
sample random.nat
distint/0 random.nat
@@ -137,13 +137,13 @@
(_.cover' [/.only]
(list\= (list.only n.even? inputs)
output))))
- (in (do {! async.monad}
+ (in (do [! async.monad]
[.let [[?signal !signal] (: [(async.Async Any) (async.Resolver Any)]
(async.async []))
sink (: (Atom (Row Nat))
(atom.atom row.empty))]
_ (async.future (/.subscribe! (function (_ value)
- (do {! io.monad}
+ (do [! io.monad]
[current (atom.read! sink)
_ (atom.update! (row.suffix value) sink)]
(if (n.< (list.size inputs)
@@ -192,7 +192,7 @@
[polling_delay (\ ! each (|>> (n.% 10) ++) random.nat)
amount_of_polls (\ ! each (|>> (n.% 10) ++) random.nat)]
($_ _.and
- (in (do {! async.monad}
+ (in (do [! async.monad]
[actual (..take_amount amount_of_polls (/.poll polling_delay (: (IO Nat) (io.io sample))))
.let [correct_values!
(list.every? (n.= sample) actual)
@@ -202,7 +202,7 @@
(_.cover' [/.poll]
(and correct_values!
enough_polls!))))
- (in (do {! async.monad}
+ (in (do [! async.monad]
[actual (..take_amount amount_of_polls (/.periodic polling_delay))]
(_.cover' [/.periodic]
(n.= amount_of_polls (list.size actual)))))))
diff --git a/stdlib/source/test/lux/control/concurrency/semaphore.lux b/stdlib/source/test/lux/control/concurrency/semaphore.lux
index 3ccf611a3..c93b51358 100644
--- a/stdlib/source/test/lux/control/concurrency/semaphore.lux
+++ b/stdlib/source/test/lux/control/concurrency/semaphore.lux
@@ -38,7 +38,7 @@
Test
(_.for [/.Semaphore]
($_ _.and
- (do {! random.monad}
+ (do [! random.monad]
[initial_open_positions (|> random.nat (\ ! each (|>> (n.% 10) (n.max 1))))
.let [semaphore (/.semaphore initial_open_positions)]]
(in (do async.monad
@@ -50,10 +50,10 @@
#.None
false)))))
- (do {! random.monad}
+ (do [! random.monad]
[initial_open_positions (|> random.nat (\ ! each (|>> (n.% 10) (n.max 1))))
.let [semaphore (/.semaphore initial_open_positions)]]
- (in (do {! async.monad}
+ (in (do [! async.monad]
[_ (monad.each ! /.wait! (list.repeated initial_open_positions semaphore))
result (async.within ..delay (/.wait! semaphore))]
(_.cover' [/.wait!]
@@ -63,10 +63,10 @@
#.None
true)))))
- (do {! random.monad}
+ (do [! random.monad]
[initial_open_positions (|> random.nat (\ ! each (|>> (n.% 10) (n.max 1))))
.let [semaphore (/.semaphore initial_open_positions)]]
- (in (do {! async.monad}
+ (in (do [! async.monad]
[_ (monad.each ! /.wait! (list.repeated initial_open_positions semaphore))
.let [block (/.wait! semaphore)]
result/0 (async.within ..delay block)
@@ -79,7 +79,7 @@
_
false)))))
- (do {! random.monad}
+ (do [! random.monad]
[initial_open_positions (|> random.nat (\ ! each (|>> (n.% 10) (n.max 1))))
.let [semaphore (/.semaphore initial_open_positions)]]
(in (do async.monad
@@ -97,7 +97,7 @@
Test
(_.for [/.Mutex]
($_ _.and
- (do {! random.monad}
+ (do [! random.monad]
[repetitions (|> random.nat (\ ! each (|>> (n.% 100) (n.max 10))))
.let [resource (atom.atom "")
expected_As (text.together (list.repeated repetitions "A"))
@@ -106,7 +106,7 @@
processA (<| (/.synchronize! mutex)
io.io
async.future
- (do {! io.monad}
+ (do [! io.monad]
[_ (<| (monad.all !)
(list.repeated repetitions)
(atom.update! (|>> (format "A")) resource))]
@@ -114,7 +114,7 @@
processB (<| (/.synchronize! mutex)
io.io
async.future
- (do {! io.monad}
+ (do [! io.monad]
[_ (<| (monad.all !)
(list.repeated repetitions)
(atom.update! (|>> (format "B")) resource))]
@@ -154,11 +154,11 @@
_
false)))
- (do {! random.monad}
+ (do [! random.monad]
[limit (\ ! each (|>> (n.% 9) ++) random.nat)
.let [barrier (/.barrier (maybe.trusted (/.limit limit)))
resource (atom.atom "")]]
- (in (do {! async.monad}
+ (in (do [! async.monad]
[.let [suffix "_"
expected_ending (|> suffix
(list.repeated limit)
diff --git a/stdlib/source/test/lux/control/concurrency/stm.lux b/stdlib/source/test/lux/control/concurrency/stm.lux
index 5dee493c0..c2251e302 100644
--- a/stdlib/source/test/lux/control/concurrency/stm.lux
+++ b/stdlib/source/test/lux/control/concurrency/stm.lux
@@ -38,7 +38,7 @@
(def: .public test
Test
(<| (_.covering /._)
- (do {! random.monad}
+ (do [! random.monad]
[dummy random.nat
expected random.nat
iterations_per_process (|> random.nat (\ ! each (n.% 100)))]
@@ -92,7 +92,7 @@
(list expected (n.* 2 expected))
changes))))
(in (let [var (/.var 0)]
- (do {! async.monad}
+ (do [! async.monad]
[_ (|> (list.repeated iterations_per_process [])
(list\each (function (_ _) (/.commit! (/.update ++ var))))
(monad.all !))
diff --git a/stdlib/source/test/lux/control/concurrency/thread.lux b/stdlib/source/test/lux/control/concurrency/thread.lux
index 7d3fa5f26..50adc9255 100644
--- a/stdlib/source/test/lux/control/concurrency/thread.lux
+++ b/stdlib/source/test/lux/control/concurrency/thread.lux
@@ -23,7 +23,7 @@
(def: .public test
Test
(<| (_.covering /._)
- (do {! random.monad}
+ (do [! random.monad]
[dummy random.nat
expected random.nat
delay (\ ! each (|>> (n.% 5) (n.+ 5))
diff --git a/stdlib/source/test/lux/control/continuation.lux b/stdlib/source/test/lux/control/continuation.lux
index 9ad0d8445..ac433a867 100644
--- a/stdlib/source/test/lux/control/continuation.lux
+++ b/stdlib/source/test/lux/control/continuation.lux
@@ -48,7 +48,7 @@
(n.= sample (/.result (_\in sample))))
(_.cover [/.with_current]
(n.= (n.* 2 sample)
- (/.result (do {! /.monad}
+ (/.result (do [! /.monad]
[value (/.with_current
(function (_ k)
(do !
@@ -76,7 +76,7 @@
(_\in #.End)
(#.Item x xs')
- (do {! /.monad}
+ (do [! /.monad]
[output (/.shift (function (_ k)
(do !
[tail (k xs')]
diff --git a/stdlib/source/test/lux/control/exception.lux b/stdlib/source/test/lux/control/exception.lux
index 6eb5052a7..234e4bf6c 100644
--- a/stdlib/source/test/lux/control/exception.lux
+++ b/stdlib/source/test/lux/control/exception.lux
@@ -25,7 +25,7 @@
(def: .public test
Test
- (do {! random.monad}
+ (do [! random.monad]
[expected random.nat
wrong (|> random.nat (random.only (|>> (n.= expected) not)))
assertion_succeeded? random.bit
diff --git a/stdlib/source/test/lux/control/function.lux b/stdlib/source/test/lux/control/function.lux
index b522b3c67..ab003daf6 100644
--- a/stdlib/source/test/lux/control/function.lux
+++ b/stdlib/source/test/lux/control/function.lux
@@ -23,7 +23,7 @@
(def: .public test
Test
- (do {! random.monad}
+ (do [! random.monad]
[expected random.nat
f0 (\ ! each n.+ random.nat)
f1 (\ ! each n.* random.nat)
diff --git a/stdlib/source/test/lux/control/function/contract.lux b/stdlib/source/test/lux/control/function/contract.lux
index c2352cb3d..c73abbcb1 100644
--- a/stdlib/source/test/lux/control/function/contract.lux
+++ b/stdlib/source/test/lux/control/function/contract.lux
@@ -19,7 +19,7 @@
(def: .public test
Test
(<| (_.covering /._)
- (do {! random.monad}
+ (do [! random.monad]
[expected random.nat])
($_ _.and
(_.cover [/.pre /.pre_condition_failed]
diff --git a/stdlib/source/test/lux/control/function/memo.lux b/stdlib/source/test/lux/control/function/memo.lux
index ed8fdf167..71d9de075 100644
--- a/stdlib/source/test/lux/control/function/memo.lux
+++ b/stdlib/source/test/lux/control/function/memo.lux
@@ -57,7 +57,7 @@
(def: .public test
Test
(<| (_.covering /._)
- (do {! random.monad}
+ (do [! random.monad]
[input (|> random.nat (\ ! each (|>> (n.% 5) (n.+ 21))))])
(_.for [/.Memo])
($_ _.and
diff --git a/stdlib/source/test/lux/control/function/mixin.lux b/stdlib/source/test/lux/control/function/mixin.lux
index 7f6d5d2ca..ec52f3d55 100644
--- a/stdlib/source/test/lux/control/function/mixin.lux
+++ b/stdlib/source/test/lux/control/function/mixin.lux
@@ -24,7 +24,7 @@
(def: .public test
Test
(<| (_.covering /._)
- (do {! random.monad}
+ (do [! random.monad]
[input (|> random.nat (\ ! each (|>> (n.% 6) (n.+ 20))))
dummy random.nat
shift (|> random.nat (random.only (|>> (n.= dummy) not)))
diff --git a/stdlib/source/test/lux/control/function/mutual.lux b/stdlib/source/test/lux/control/function/mutual.lux
index 875c7eee5..549cb46b9 100644
--- a/stdlib/source/test/lux/control/function/mutual.lux
+++ b/stdlib/source/test/lux/control/function/mutual.lux
@@ -17,7 +17,7 @@
(def: test_let
Test
- (do {! random.monad}
+ (do [! random.monad]
[sample (\ ! each (n.% 10) random.nat)
.let [expected (n.even? sample)]]
(<| (_.cover [/.let])
@@ -50,7 +50,7 @@
(def: test_def
Test
- (do {! random.monad}
+ (do [! random.monad]
[sample (\ ! each (n.% 10) random.nat)
.let [expected (n.even? sample)]]
(<| (_.cover [/.def:])
diff --git a/stdlib/source/test/lux/control/parser.lux b/stdlib/source/test/lux/control/parser.lux
index e62ad68c9..13f1e2c02 100644
--- a/stdlib/source/test/lux/control/parser.lux
+++ b/stdlib/source/test/lux/control/parser.lux
@@ -88,7 +88,7 @@
(def: combinators_0
Test
- (do {! random.monad}
+ (do [! random.monad]
[expected0 random.nat
variadic (\ ! each (|>> (n.max 1) (n.min 20)) random.nat)
expected+ (random.list variadic random.nat)
@@ -179,7 +179,7 @@
(def: combinators_1
Test
- (do {! random.monad}
+ (do [! random.monad]
[variadic (\ ! each (|>> (n.max 1) (n.min 20)) random.nat)
times (\ ! each (n.% variadic) random.nat)
expected random.nat
diff --git a/stdlib/source/test/lux/control/parser/analysis.lux b/stdlib/source/test/lux/control/parser/analysis.lux
index 2dd5dac5d..a3c722851 100644
--- a/stdlib/source/test/lux/control/parser/analysis.lux
+++ b/stdlib/source/test/lux/control/parser/analysis.lux
@@ -49,10 +49,10 @@
Test
(<| (_.covering /._)
(_.for [/.Parser])
- (do {! random.monad}
+ (do [! random.monad]
[]
(`` ($_ _.and
- (do {! random.monad}
+ (do [! random.monad]
[expected (\ ! each (|>> analysis.bit) random.bit)]
(_.cover [/.result /.any]
(|> (list expected)
@@ -63,7 +63,7 @@
(#try.Failure _)
false))))
(~~ (template [<query> <check> <random> <analysis> <=>]
- [(do {! random.monad}
+ [(do [! random.monad]
[expected <random>]
(_.cover [<query>]
(|> (list (<analysis> expected))
@@ -73,7 +73,7 @@
(#try.Failure _)
false))))
- (do {! random.monad}
+ (do [! random.monad]
[expected <random>]
(_.cover [<check>]
(|> (list (<analysis> expected))
@@ -90,7 +90,7 @@
[/.foreign /.foreign! random.nat analysis.variable/foreign n.=]
[/.constant /.constant! ..constant analysis.constant name\=]
))
- (do {! random.monad}
+ (do [! random.monad]
[expected random.bit]
(_.cover [/.tuple]
(|> (list (analysis.tuple (list (analysis.bit expected))))
@@ -100,7 +100,7 @@
(#try.Failure _)
false))))
- (do {! random.monad}
+ (do [! random.monad]
[dummy random.bit]
(_.cover [/.end?]
(and (|> (/.result /.end? (list))
@@ -111,14 +111,14 @@
(in verdict))
(list (analysis.bit dummy)))
(!expect (#try.Success #0))))))
- (do {! random.monad}
+ (do [! random.monad]
[dummy random.bit]
(_.cover [/.end!]
(and (|> (/.result /.end! (list))
(!expect (#try.Success _)))
(|> (/.result /.end! (list (analysis.bit dummy)))
(!expect (#try.Failure _))))))
- (do {! random.monad}
+ (do [! random.monad]
[expected random.bit]
(_.cover [/.cannot_parse]
(and (|> (list (analysis.bit expected))
@@ -135,7 +135,7 @@
(#try.Failure error)
(exception.match? /.cannot_parse error))))))
- (do {! random.monad}
+ (do [! random.monad]
[expected random.bit]
(_.cover [/.unconsumed_input]
(|> (list (analysis.bit expected) (analysis.bit expected))
diff --git a/stdlib/source/test/lux/control/parser/binary.lux b/stdlib/source/test/lux/control/parser/binary.lux
index 38a89eed6..965c9abad 100644
--- a/stdlib/source/test/lux/control/parser/binary.lux
+++ b/stdlib/source/test/lux/control/parser/binary.lux
@@ -91,7 +91,7 @@
(Random Code)
(random.rec
(function (_ recur)
- (let [random_sequence (do {! random.monad}
+ (let [random_sequence (do [! random.monad]
[size (\ ! each (n.% 2) random.nat)]
(random.list size recur))]
($_ random.and
@@ -108,7 +108,7 @@
..random_name
random_sequence
random_sequence
- (do {! random.monad}
+ (do [! random.monad]
[size (\ ! each (n.% 2) random.nat)]
(random.list size (random.and recur recur)))
)))))))
@@ -127,7 +127,7 @@
(<| (_.for [/.Size])
(`` ($_ _.and
(~~ (template [<size> <parser> <format>]
- [(do {! random.monad}
+ [(do [! random.monad]
[expected (\ ! each (i64.and (i64.mask <size>))
random.nat)]
(_.cover [<size> <parser> <format>]
@@ -147,7 +147,7 @@
Test
(`` ($_ _.and
(~~ (template [<parser> <format>]
- [(do {! random.monad}
+ [(do [! random.monad]
[expected (\ ! each (\ utf8.codec encoded) (random.ascii ..segment_size))]
(_.cover [<parser> <format>]
(|> (format.result <format> expected)
@@ -165,7 +165,7 @@
Test
(`` ($_ _.and
(~~ (template [<parser> <format>]
- [(do {! random.monad}
+ [(do [! random.monad]
[expected (random.ascii ..segment_size)]
(_.cover [<parser> <format>]
(|> (format.result <format> expected)
@@ -184,7 +184,7 @@
Test
(`` ($_ _.and
(~~ (template [<parser> <format>]
- [(do {! random.monad}
+ [(do [! random.monad]
[expected (random.row ..segment_size random.nat)]
(_.cover [<parser> <format>]
(|> expected
@@ -203,7 +203,7 @@
Test
(`` ($_ _.and
(~~ (template [<parser> <format> <random> <equivalence>]
- [(do {! random.monad}
+ [(do [! random.monad]
[expected <random>]
(_.cover [<parser> <format>]
(|> expected
@@ -216,7 +216,7 @@
[/.nat format.nat random.nat n.equivalence]
[/.int format.int random.int int.equivalence]
[/.rev format.rev random.rev rev.equivalence]))
- (do {! random.monad}
+ (do [! random.monad]
[expected random.frac]
(_.cover [/.frac format.frac]
(|> expected
@@ -226,7 +226,7 @@
(or (\ frac.equivalence = expected actual)
(and (frac.not_a_number? expected)
(frac.not_a_number? actual))))))))
- (do {! random.monad}
+ (do [! random.monad]
[expected (\ ! each (|>> (i64.and (i64.mask /.size/8))
(n.max 2))
random.nat)]
@@ -242,7 +242,7 @@
Test
(`` ($_ _.and
(~~ (template [<parser> <format> <random> <equivalence>]
- [(do {! random.monad}
+ [(do [! random.monad]
[expected <random>]
(_.cover [<parser> <format>]
(|> expected
@@ -256,7 +256,7 @@
[/.type format.type random_type type.equivalence]
))
(~~ (template [<parser_coverage> <parser> <coverage_format> <format> <random> <equivalence>]
- [(do {! random.monad}
+ [(do [! random.monad]
[expected <random>]
(_.cover [<parser_coverage> <coverage_format>]
(|> expected
@@ -269,7 +269,7 @@
[/.list (/.list /.nat) format.list (format.list format.nat) (random.list ..segment_size random.nat) (list.equivalence n.equivalence)]
[/.set (/.set n.hash /.nat) format.set (format.set format.nat) (random.set n.hash ..segment_size random.nat) set.equivalence]
[/.name /.name format.name format.name ..random_name name.equivalence]))
- (do {! random.monad}
+ (do [! random.monad]
[expected (\ ! each (list.repeated ..segment_size) random.nat)]
(_.cover [/.set_elements_are_not_unique]
(|> expected
@@ -277,7 +277,7 @@
(/.result (/.set n.hash /.nat))
(!expect (^multi (#try.Failure error)
(exception.match? /.set_elements_are_not_unique error))))))
- (do {! random.monad}
+ (do [! random.monad]
[expected (random.or random.bit random.nat)]
(_.cover [/.or format.or]
(|> expected
@@ -288,7 +288,7 @@
(\ (sum.equivalence bit.equivalence n.equivalence) =
expected
actual))))))
- (do {! random.monad}
+ (do [! random.monad]
[tag (\ ! each (|>> (i64.and (i64.mask /.size/8))
(n.max 2))
random.nat)
@@ -300,7 +300,7 @@
(/.or /.bit /.nat)))
(!expect (^multi (#try.Failure error)
(exception.match? /.invalid_tag error))))))
- (do {! random.monad}
+ (do [! random.monad]
[expected (random.list ..segment_size random.nat)]
(_.cover [/.rec format.rec format.and format.any]
(|> expected
@@ -328,14 +328,14 @@
(|> (format.instance format.no_op)
(/.result /.any)
(!expect (#try.Success _))))
- (do {! random.monad}
+ (do [! random.monad]
[data (\ ! each (\ utf8.codec encoded) (random.ascii ..segment_size))]
(_.cover [/.binary_was_not_fully_read]
(|> data
(/.result /.any)
(!expect (^multi (#try.Failure error)
(exception.match? /.binary_was_not_fully_read error))))))
- (do {! random.monad}
+ (do [! random.monad]
[expected (\ ! each (\ utf8.codec encoded) (random.ascii ..segment_size))]
(_.cover [/.segment format.segment format.result]
(|> expected
@@ -343,7 +343,7 @@
(/.result (/.segment ..segment_size))
(!expect (^multi (#try.Success actual)
(\ binary.equivalence = expected actual))))))
- (do {! random.monad}
+ (do [! random.monad]
[data (\ ! each (\ utf8.codec encoded) (random.ascii ..segment_size))]
(_.cover [/.end?]
(|> data
@@ -354,7 +354,7 @@
(in (and (not pre)
post))))
(!expect (#try.Success #1)))))
- (do {! random.monad}
+ (do [! random.monad]
[to_read (\ ! each (n.% (++ ..segment_size)) random.nat)
data (\ ! each (\ utf8.codec encoded) (random.ascii ..segment_size))]
(_.cover [/.Offset /.offset]
@@ -369,7 +369,7 @@
(n.= to_read offset)
(n.= ..segment_size nothing_left)))))
(!expect (#try.Success #1)))))
- (do {! random.monad}
+ (do [! random.monad]
[to_read (\ ! each (n.% (++ ..segment_size)) random.nat)
data (\ ! each (\ utf8.codec encoded) (random.ascii ..segment_size))]
(_.cover [/.remaining]
diff --git a/stdlib/source/test/lux/control/parser/cli.lux b/stdlib/source/test/lux/control/parser/cli.lux
index df24f43ed..64b0d4425 100644
--- a/stdlib/source/test/lux/control/parser/cli.lux
+++ b/stdlib/source/test/lux/control/parser/cli.lux
@@ -30,7 +30,7 @@
Test
(<| (_.covering /._)
(_.for [/.Parser])
- (do {! random.monad}
+ (do [! random.monad]
[expected (\ ! each n\encoded random.nat)
.let [random_dummy (random.only (|>> (text\= expected) not)
(random.unicode 5))]
diff --git a/stdlib/source/test/lux/control/parser/code.lux b/stdlib/source/test/lux/control/parser/code.lux
index a30535def..b40394152 100644
--- a/stdlib/source/test/lux/control/parser/code.lux
+++ b/stdlib/source/test/lux/control/parser/code.lux
@@ -44,7 +44,7 @@
(<| (_.covering /._)
(_.for [/.Parser])
(`` ($_ _.and
- (do {! random.monad}
+ (do [! random.monad]
[expected (\ ! each code.bit random.bit)]
(_.cover [/.result]
(and (|> (/.result /.any (list expected))
@@ -52,7 +52,7 @@
(|> (/.result /.any (list))
(!expect (#try.Failure _))))))
(~~ (template [<query> <check> <random> <code> <equivalence>]
- [(do {! random.monad}
+ [(do [! random.monad]
[expected <random>
dummy (|> <random> (random.only (|>> (\ <equivalence> = expected) not)))]
($_ _.and
@@ -80,7 +80,7 @@
[/.local_tag /.local_tag! (random.unicode 1) code.local_tag text.equivalence]
))
(~~ (template [<query> <code>]
- [(do {! random.monad}
+ [(do [! random.monad]
[expected_left random.nat
expected_right random.int]
(_.cover [<query>]
@@ -94,7 +94,7 @@
[/.form code.form]
[/.tuple code.tuple]
))
- (do {! random.monad}
+ (do [! random.monad]
[expected_left random.nat
expected_right random.int]
(_.cover [/.record]
@@ -104,7 +104,7 @@
(!expect (^multi (#try.Success [actual_left actual_right])
(and (\ nat.equivalence = expected_left actual_left)
(\ int.equivalence = expected_right actual_right)))))))
- (do {! random.monad}
+ (do [! random.monad]
[expected_local random.nat
expected_global random.int]
(_.cover [/.local]
@@ -114,7 +114,7 @@
(!expect (^multi (#try.Success [actual_local actual_global])
(and (\ nat.equivalence = expected_local actual_local)
(\ int.equivalence = expected_global actual_global)))))))
- (do {! random.monad}
+ (do [! random.monad]
[dummy (\ ! each code.bit random.bit)]
(_.cover [/.end?]
(|> (/.result (do <>.monad
@@ -126,14 +126,14 @@
(list dummy))
(!expect (^multi (#try.Success verdict)
verdict)))))
- (do {! random.monad}
+ (do [! random.monad]
[dummy (\ ! each code.bit random.bit)]
(_.cover [/.end!]
(and (|> (/.result /.end! (list))
(!expect (#try.Success [])))
(|> (/.result /.end! (list dummy))
(!expect (#try.Failure _))))))
- (do {! random.monad}
+ (do [! random.monad]
[expected (\ ! each code.bit random.bit)]
(_.cover [/.next]
(|> (/.result (do <>.monad
@@ -143,7 +143,7 @@
(same? pre post))))
(list expected))
(!expect (#try.Success _)))))
- (do {! random.monad}
+ (do [! random.monad]
[expected (\ ! each code.bit random.bit)]
(_.cover [/.not]
(and (|> (/.result (/.not /.nat) (list expected))
diff --git a/stdlib/source/test/lux/control/parser/json.lux b/stdlib/source/test/lux/control/parser/json.lux
index 6710713bd..a2951dc23 100644
--- a/stdlib/source/test/lux/control/parser/json.lux
+++ b/stdlib/source/test/lux/control/parser/json.lux
@@ -45,7 +45,7 @@
(<| (_.covering /._)
(_.for [/.Parser])
(`` ($_ _.and
- (do {! random.monad}
+ (do [! random.monad]
[expected (\ ! each (|>> #json.String) (random.unicode 1))]
(_.cover [/.result /.any]
(|> (/.result /.any expected)
@@ -55,7 +55,7 @@
(|> (/.result /.null #json.Null)
(!expect (#try.Success _))))
(~~ (template [<query> <test> <check> <random> <json> <equivalence>]
- [(do {! random.monad}
+ [(do [! random.monad]
[expected <random>
dummy (|> <random> (random.only (|>> (\ <equivalence> = expected) not)))]
($_ _.and
@@ -78,21 +78,21 @@
[/.number /.number? /.number! ..safe_frac #json.Number frac.equivalence]
[/.string /.string? /.string! (random.unicode 1) #json.String text.equivalence]
))
- (do {! random.monad}
+ (do [! random.monad]
[expected (random.unicode 1)
dummy random.bit]
(_.cover [/.unexpected_value]
(|> (/.result /.string (#json.Boolean dummy))
(!expect (^multi (#try.Failure error)
(exception.match? /.unexpected_value error))))))
- (do {! random.monad}
+ (do [! random.monad]
[expected (random.unicode 1)
dummy (|> (random.unicode 1) (random.only (|>> (\ text.equivalence = expected) not)))]
(_.cover [/.value_mismatch]
(|> (/.result (/.string! expected) (#json.String dummy))
(!expect (^multi (#try.Failure error)
(exception.match? /.value_mismatch error))))))
- (do {! random.monad}
+ (do [! random.monad]
[expected (random.unicode 1)]
(_.cover [/.nullable]
(and (|> (/.result (/.nullable /.string) #json.Null)
@@ -101,7 +101,7 @@
(|> (/.result (/.nullable /.string) (#json.String expected))
(!expect (^multi (#try.Success actual)
(\ (maybe.equivalence text.equivalence) = (#.Some expected) actual)))))))
- (do {! random.monad}
+ (do [! random.monad]
[size (\ ! each (n.% 10) random.nat)
expected (|> (random.unicode 1)
(random.list size)
@@ -111,7 +111,7 @@
(#json.Array (row\each (|>> #json.String) expected)))
(!expect (^multi (#try.Success actual)
(\ (row.equivalence text.equivalence) = expected (row.of_list actual)))))))
- (do {! random.monad}
+ (do [! random.monad]
[expected (\ ! each (|>> #json.String) (random.unicode 1))]
(_.cover [/.unconsumed_input]
(|> (/.result (/.array /.any) (#json.Array (row expected expected)))
@@ -121,7 +121,7 @@
(|> (/.result (/.array /.any) (#json.Array (row)))
(!expect (^multi (#try.Failure error)
(exception.match? /.empty_input error)))))
- (do {! random.monad}
+ (do [! random.monad]
[expected_boolean random.bit
expected_number ..safe_frac
expected_string (random.unicode 1)
@@ -146,7 +146,7 @@
(and (\ bit.equivalence = expected_boolean actual_boolean)
(\ frac.equivalence = expected_number actual_number)
(\ text.equivalence = expected_string actual_string)))))))
- (do {! random.monad}
+ (do [! random.monad]
[size (\ ! each (n.% 10) random.nat)
keys (random.list size (random.unicode 1))
values (random.list size (random.unicode 1))
diff --git a/stdlib/source/test/lux/control/parser/synthesis.lux b/stdlib/source/test/lux/control/parser/synthesis.lux
index e47523481..ca405d495 100644
--- a/stdlib/source/test/lux/control/parser/synthesis.lux
+++ b/stdlib/source/test/lux/control/parser/synthesis.lux
@@ -52,7 +52,7 @@
(def: random_environment
(Random (Environment Synthesis))
- (do {! random.monad}
+ (do [! random.monad]
[size (\ ! each (n.% 5) random.nat)]
(|> ..random_variable
(\ ! each (|>> synthesis.variable))
@@ -62,7 +62,7 @@
Test
(`` ($_ _.and
(~~ (template [<query> <check> <random> <synthesis> <equivalence>]
- [(do {! random.monad}
+ [(do [! random.monad]
[expected <random>
dummy (|> <random> (random.only (|>> (\ <equivalence> = expected) not)))]
($_ _.and
@@ -91,7 +91,7 @@
(def: complex
Test
($_ _.and
- (do {! random.monad}
+ (do [! random.monad]
[expected_bit random.bit
expected_i64 (\ ! each .i64 random.nat)
expected_f64 random.safe_frac
@@ -111,7 +111,7 @@
(list (synthesis.text expected_text)))
(!expect (^multi (#try.Failure error)
(exception.match? /.cannot_parse error)))))))
- (do {! random.monad}
+ (do [! random.monad]
[arity random.nat
expected_environment ..random_environment
expected_body (random.unicode 1)]
@@ -127,7 +127,7 @@
(list (synthesis.text expected_body)))
(!expect (^multi (#try.Failure error)
(exception.match? /.cannot_parse error)))))))
- (do {! random.monad}
+ (do [! random.monad]
[arity random.nat
expected_environment ..random_environment
expected_body (random.unicode 1)]
@@ -136,7 +136,7 @@
(list (synthesis.function/abstraction [expected_environment arity (synthesis.text expected_body)])))
(!expect (^multi (#try.Failure error)
(exception.match? /.wrong_arity error))))))
- (do {! random.monad}
+ (do [! random.monad]
[arity (\ ! each (|>> (n.% 10) ++) random.nat)
expected_offset random.nat
expected_inits (random.list arity random.bit)
@@ -163,7 +163,7 @@
(<| (_.covering /._)
(_.for [/.Parser])
($_ _.and
- (do {! random.monad}
+ (do [! random.monad]
[expected (\ ! each (|>> synthesis.i64) random.nat)]
(_.cover [/.result /.any]
(|> (/.result /.any (list expected))
@@ -173,13 +173,13 @@
(|> (/.result /.any (list))
(!expect (^multi (#try.Failure error)
(exception.match? /.empty_input error)))))
- (do {! random.monad}
+ (do [! random.monad]
[expected (\ ! each (|>> synthesis.i64) random.nat)]
(_.cover [/.unconsumed_input]
(|> (/.result /.any (list expected expected))
(!expect (^multi (#try.Failure error)
(exception.match? /.unconsumed_input error))))))
- (do {! random.monad}
+ (do [! random.monad]
[dummy (\ ! each (|>> synthesis.i64) random.nat)]
(_.cover [/.end! /.expected_empty_input]
(and (|> (/.result /.end! (list))
@@ -187,7 +187,7 @@
(|> (/.result /.end! (list dummy))
(!expect (^multi (#try.Failure error)
(exception.match? /.expected_empty_input error)))))))
- (do {! random.monad}
+ (do [! random.monad]
[dummy (\ ! each (|>> synthesis.i64) random.nat)]
(_.cover [/.end?]
(and (|> (/.result /.end? (list))
diff --git a/stdlib/source/test/lux/control/parser/text.lux b/stdlib/source/test/lux/control/parser/text.lux
index c3155c182..7207e4477 100644
--- a/stdlib/source/test/lux/control/parser/text.lux
+++ b/stdlib/source/test/lux/control/parser/text.lux
@@ -71,7 +71,7 @@
(def: character_classes
Test
($_ _.and
- (do {! random.monad}
+ (do [! random.monad]
[offset (\ ! each (n.% 50) random.nat)
range (\ ! each (|>> (n.% 50) (n.+ 10)) random.nat)
.let [limit (n.+ offset range)]
@@ -82,39 +82,39 @@
(_.cover [/.range]
(and (..should_pass expected (/.range offset limit))
(..should_fail out_of_range (/.range offset limit)))))
- (do {! random.monad}
+ (do [! random.monad]
[expected (random.char unicode.ascii/upper)
invalid (random.only (|>> (unicode/block.within? unicode/block.basic_latin/upper) not)
(random.char unicode.character))]
(_.cover [/.upper]
(and (..should_pass (text.of_char expected) /.upper)
(..should_fail (text.of_char invalid) /.upper))))
- (do {! random.monad}
+ (do [! random.monad]
[expected (random.char unicode.ascii/lower)
invalid (random.only (|>> (unicode/block.within? unicode/block.basic_latin/lower) not)
(random.char unicode.character))]
(_.cover [/.lower]
(and (..should_pass (text.of_char expected) /.lower)
(..should_fail (text.of_char invalid) /.lower))))
- (do {! random.monad}
+ (do [! random.monad]
[expected (\ ! each (n.% 10) random.nat)
invalid (random.char (unicode.set [unicode/block.number_forms (list)]))]
(_.cover [/.decimal]
(and (..should_pass (\ n.decimal encoded expected) /.decimal)
(..should_fail (text.of_char invalid) /.decimal))))
- (do {! random.monad}
+ (do [! random.monad]
[expected (\ ! each (n.% 8) random.nat)
invalid (random.char (unicode.set [unicode/block.number_forms (list)]))]
(_.cover [/.octal]
(and (..should_pass (\ n.octal encoded expected) /.octal)
(..should_fail (text.of_char invalid) /.octal))))
- (do {! random.monad}
+ (do [! random.monad]
[expected (\ ! each (n.% 16) random.nat)
invalid (random.char (unicode.set [unicode/block.number_forms (list)]))]
(_.cover [/.hexadecimal]
(and (..should_pass (\ n.hex encoded expected) /.hexadecimal)
(..should_fail (text.of_char invalid) /.hexadecimal))))
- (do {! random.monad}
+ (do [! random.monad]
[expected (random.char unicode.ascii/alpha)
invalid (random.only (function (_ char)
(not (or (unicode/block.within? unicode/block.basic_latin/upper char)
@@ -123,7 +123,7 @@
(_.cover [/.alpha]
(and (..should_pass (text.of_char expected) /.alpha)
(..should_fail (text.of_char invalid) /.alpha))))
- (do {! random.monad}
+ (do [! random.monad]
[expected (random.char unicode.ascii/alpha_num)
invalid (random.only (function (_ char)
(not (or (unicode/block.within? unicode/block.basic_latin/upper char)
@@ -133,7 +133,7 @@
(_.cover [/.alpha_num]
(and (..should_pass (text.of_char expected) /.alpha_num)
(..should_fail (text.of_char invalid) /.alpha_num))))
- (do {! random.monad}
+ (do [! random.monad]
[expected ($_ random.either
(in text.tab)
(in text.vertical_tab)
@@ -151,7 +151,7 @@
(_.cover [/.space]
(and (..should_pass expected /.space)
(..should_fail invalid /.space))))
- (do {! random.monad}
+ (do [! random.monad]
[.let [num_options 3]
options (|> (random.char unicode.character)
(random.set n.hash num_options)
@@ -177,7 +177,7 @@
(..should_fail' (text.of_char invalid) (/.one_of! options)
/.character_should_be)
)))
- (do {! random.monad}
+ (do [! random.monad]
[.let [num_options 3]
options (|> (random.char unicode.character)
(random.set n.hash num_options)
@@ -209,7 +209,7 @@
Test
(let [octal! (/.one_of! "01234567")]
($_ _.and
- (do {! random.monad}
+ (do [! random.monad]
[left (\ ! each (|>> (n.% 8) (\ n.octal encoded)) random.nat)
right (\ ! each (|>> (n.% 8) (\ n.octal encoded)) random.nat)
.let [expected (format left right)]
@@ -222,7 +222,7 @@
(..should_fail invalid (/.many /.octal))
(..should_pass! expected (/.many! octal!)))))
- (do {! random.monad}
+ (do [! random.monad]
[left (\ ! each (|>> (n.% 8) (\ n.octal encoded)) random.nat)
right (\ ! each (|>> (n.% 8) (\ n.octal encoded)) random.nat)
.let [expected (format left right)]
@@ -237,7 +237,7 @@
(..should_pass! expected (/.some! octal!))
(..should_pass! "" (/.some! octal!)))))
- (do {! random.monad}
+ (do [! random.monad]
[.let [octal (\ ! each (|>> (n.% 8) (\ n.octal encoded)) random.nat)]
first octal
second octal
@@ -250,7 +250,7 @@
(..should_pass! (format first second) (/.exactly! 2 octal!))
(..should_fail (format first second third) (/.exactly! 2 octal!))
(..should_fail (format first) (/.exactly! 2 octal!)))))
- (do {! random.monad}
+ (do [! random.monad]
[.let [octal (\ ! each (|>> (n.% 8) (\ n.octal encoded)) random.nat)]
first octal
second octal
@@ -263,7 +263,7 @@
(..should_pass! (format first second) (/.at_most! 2 octal!))
(..should_pass! (format first) (/.at_most! 2 octal!))
(..should_fail (format first second third) (/.at_most! 2 octal!)))))
- (do {! random.monad}
+ (do [! random.monad]
[.let [octal (\ ! each (|>> (n.% 8) (\ n.octal encoded)) random.nat)]
first octal
second octal
@@ -276,7 +276,7 @@
(..should_pass! (format first second) (/.at_least! 2 octal!))
(..should_pass! (format first second third) (/.at_least! 2 octal!))
(..should_fail (format first) (/.at_least! 2 octal!)))))
- (do {! random.monad}
+ (do [! random.monad]
[.let [octal (\ ! each (|>> (n.% 8) (\ n.octal encoded)) random.nat)]
first octal
second octal
@@ -296,7 +296,7 @@
(<| (_.covering /._)
(_.for [/.Parser])
($_ _.and
- (do {! random.monad}
+ (do [! random.monad]
[sample (random.unicode 1)]
(_.cover [/.result /.end!]
(and (|> (/.result /.end!
@@ -305,7 +305,7 @@
(|> (/.result /.end!
sample)
(!expect (#try.Failure _))))))
- (do {! random.monad}
+ (do [! random.monad]
[.let [size 10]
expected (random.unicode size)
dummy (|> (random.unicode size)
@@ -323,7 +323,7 @@
(/.result (/.slice /.any!))
(!expect (^multi (#try.Failure error)
(exception.match? /.cannot_slice error)))))
- (do {! random.monad}
+ (do [! random.monad]
[expected (random.unicode 1)]
(_.cover [/.any /.any!]
(and (..should_pass expected /.any)
@@ -331,7 +331,7 @@
(..should_pass! expected /.any!)
(..should_fail "" /.any!))))
- (do {! random.monad}
+ (do [! random.monad]
[expected (random.unicode 1)]
(_.cover [/.next /.cannot_parse]
(and (..should_pass expected (<>.before /.any /.next))
@@ -339,14 +339,14 @@
(/.result (<>.before /.any /.next))
(!expect (^multi (#try.Failure error)
(exception.match? /.cannot_parse error)))))))
- (do {! random.monad}
+ (do [! random.monad]
[dummy (random.unicode 1)]
(_.cover [/.unconsumed_input]
(|> (format dummy dummy)
(/.result /.any)
(!expect (^multi (#try.Failure error)
(exception.match? /.unconsumed_input error))))))
- (do {! random.monad}
+ (do [! random.monad]
[sample (random.unicode 1)]
(_.cover [/.Offset /.offset]
(|> sample
@@ -356,7 +356,7 @@
post /.offset]
(in [pre post])))
(!expect (#try.Success [0 1])))))
- (do {! random.monad}
+ (do [! random.monad]
[left (random.unicode 1)
right (random.unicode 1)
.let [input (format left right)]]
@@ -370,7 +370,7 @@
(in (and (text\= input pre)
(text\= right post)))))
(!expect (#try.Success #1)))))
- (do {! random.monad}
+ (do [! random.monad]
[left (random.unicode 1)
right (random.unicode 1)
expected (random.only (|>> (text\= right) not)
@@ -379,7 +379,7 @@
(|> (format left expected right)
(/.result (/.enclosed [left right] (/.this expected)))
(!expect (#try.Success _)))))
- (do {! random.monad}
+ (do [! random.monad]
[input (random.unicode 1)
output (random.unicode 1)]
(_.cover [/.local]
@@ -388,14 +388,14 @@
[_ (/.local input (/.this input))]
(/.this output)))
(!expect (#try.Success _)))))
- (do {! random.monad}
+ (do [! random.monad]
[expected (\ ! each (|>> (n.% 8) (\ n.octal encoded)) random.nat)]
(_.cover [/.then]
(|> (list (code.text expected))
(<c>.result (/.then /.octal <c>.text))
(!expect (^multi (#try.Success actual)
(text\= expected actual))))))
- (do {! random.monad}
+ (do [! random.monad]
[invalid (random.ascii/upper 1)
expected (random.only (|>> (unicode/block.within? unicode/block.basic_latin/upper)
not)
@@ -413,7 +413,7 @@
(/.result (/.not! upper!))
(!expect (^multi (#try.Failure error)
(exception.match? /.expected_to_fail error)))))))
- (do {! random.monad}
+ (do [! random.monad]
[upper (random.ascii/upper 1)
lower (random.ascii/lower 1)
invalid (random.only (function (_ char)
@@ -430,7 +430,7 @@
(..should_pass! (format upper lower) (/.and! upper! lower!))
(..should_fail (format (text.of_char invalid) lower) (/.and! upper! lower!))
(..should_fail (format upper (text.of_char invalid)) (/.and! upper! lower!)))))
- (do {! random.monad}
+ (do [! random.monad]
[expected (random.unicode 1)
invalid (random.unicode 1)]
(_.cover [/.satisfies /.character_does_not_satisfy_predicate]
diff --git a/stdlib/source/test/lux/control/parser/tree.lux b/stdlib/source/test/lux/control/parser/tree.lux
index 4c13753c8..21f048ffa 100644
--- a/stdlib/source/test/lux/control/parser/tree.lux
+++ b/stdlib/source/test/lux/control/parser/tree.lux
@@ -28,7 +28,7 @@
false)])
(template: (!cover <coverage> <parser> <sample>)
- [(do {! random.monad}
+ [(do [! random.monad]
[dummy random.nat
expected (|> random.nat (random.only (|>> (n.= dummy) not)))]
(_.cover <coverage>
@@ -38,7 +38,7 @@
(n.= expected actual))))))])
(template: (!cover/2 <coverage> <parser> <sample0> <sample1>)
- [(do {! random.monad}
+ [(do [! random.monad]
[dummy random.nat
expected (|> random.nat (random.only (|>> (n.= dummy) not)))]
(_.cover <coverage>
@@ -57,7 +57,7 @@
(!cover [/.result /.value]
/.value
(tree.leaf expected))
- (do {! random.monad}
+ (do [! random.monad]
[expected random.nat]
(_.cover [/.result']
(|> (/.result' /.value
@@ -157,7 +157,7 @@
(tree.branch expected
(list (tree.leaf dummy)
(tree.leaf dummy))))
- (do {! random.monad}
+ (do [! random.monad]
[dummy random.nat]
(_.cover [/.cannot_move_further]
(`` (and (~~ (template [<parser>]
diff --git a/stdlib/source/test/lux/control/parser/type.lux b/stdlib/source/test/lux/control/parser/type.lux
index 7d7d57b0c..af74b5851 100644
--- a/stdlib/source/test/lux/control/parser/type.lux
+++ b/stdlib/source/test/lux/control/parser/type.lux
@@ -37,7 +37,7 @@
(def: matches
Test
(<| (_.for [/.types_do_not_match])
- (do {! random.monad}
+ (do [! random.monad]
[expected ..primitive
dummy (random.only (|>> (type\= expected) not)
..primitive)])
@@ -72,7 +72,7 @@
(def: aggregate
Test
- (do {! random.monad}
+ (do [! random.monad]
[expected_left ..primitive
expected_middle ..primitive
expected_right ..primitive]
@@ -164,7 +164,7 @@
(def: polymorphic
Test
- (do {! random.monad}
+ (do [! random.monad]
[not_polymorphic ..primitive
expected_inputs (\ ! each (|>> (n.% 10) ++) random.nat)]
($_ _.and
@@ -190,13 +190,13 @@
(<| (_.covering /._)
(_.for [/.Parser])
($_ _.and
- (do {! random.monad}
+ (do [! random.monad]
[expected ..primitive]
(_.cover [/.result /.any]
(|> (/.result /.any expected)
(!expect (^multi (#try.Success actual)
(type\= expected actual))))))
- (do {! random.monad}
+ (do [! random.monad]
[expected ..primitive]
(_.cover [/.next /.unconsumed_input]
(and (|> (/.result (do //.monad
@@ -209,7 +209,7 @@
(|> (/.result /.next expected)
(!expect (^multi (#try.Failure error)
(exception.match? /.unconsumed_input error)))))))
- (do {! random.monad}
+ (do [! random.monad]
[expected ..primitive]
(_.cover [/.empty_input]
(`` (and (~~ (template [<parser>]
@@ -223,7 +223,7 @@
[/.any]
[/.next]
))))))
- (do {! random.monad}
+ (do [! random.monad]
[expected ..primitive]
(_.cover [/.Env /.env /.fresh]
(|> (/.result (do //.monad
@@ -233,7 +233,7 @@
expected)
(!expect (^multi (#try.Success environment)
(same? /.fresh environment))))))
- (do {! random.monad}
+ (do [! random.monad]
[expected ..primitive
dummy (random.only (|>> (type\= expected) not)
..primitive)]
@@ -245,14 +245,14 @@
dummy)
(!expect (^multi (#try.Success actual)
(type\= expected actual))))))
- (do {! random.monad}
+ (do [! random.monad]
[expected random.nat]
(_.cover [/.existential /.not_existential]
(|> (/.result /.existential
(#.Ex expected))
(!expect (^multi (#try.Success actual)
(n.= expected actual))))))
- (do {! random.monad}
+ (do [! random.monad]
[expected_name (random.and (random.ascii/alpha_num 1)
(random.ascii/alpha_num 1))
expected_type ..primitive]
diff --git a/stdlib/source/test/lux/control/parser/xml.lux b/stdlib/source/test/lux/control/parser/xml.lux
index 82e9a8a1b..4d357320e 100644
--- a/stdlib/source/test/lux/control/parser/xml.lux
+++ b/stdlib/source/test/lux/control/parser/xml.lux
@@ -36,7 +36,7 @@
(template: (!failure <exception> <cases>)
[(with_expansions [<<cases>> (template.spliced <cases>)]
- (do {! random.monad}
+ (do [! random.monad]
[expected (random.ascii/alpha 1)]
(_.cover [<exception>]
(`` (and (~~ (template [<parser> <input>]
@@ -59,7 +59,7 @@
(<| (_.covering /._)
(_.for [/.Parser])
($_ _.and
- (do {! random.monad}
+ (do [! random.monad]
[expected (random.ascii/alpha 1)]
(_.cover [/.result /.text]
(|> (/.result /.text (list (#xml.Text expected)))
@@ -68,13 +68,13 @@
(!failure /.unconsumed_inputs
[[(//\in expected)
(#xml.Text expected)]])
- (do {! random.monad}
+ (do [! random.monad]
[expected (\ ! each (|>> #xml.Text) (random.ascii/alpha 1))]
(_.cover [/.any]
(|> (/.result /.any (list expected))
(try\each (xml\= expected))
(try.else false))))
- (do {! random.monad}
+ (do [! random.monad]
[expected ..random_tag]
(_.cover [/.tag]
(|> (/.result (do //.monad
@@ -83,7 +83,7 @@
(in (name\= expected actual)))
(list (#xml.Node expected (dictionary.empty name.hash) (list))))
(!expect (#try.Success #1)))))
- (do {! random.monad}
+ (do [! random.monad]
[expected ..random_tag]
(_.cover [/.node]
(|> (/.result (/.node expected (//\in []))
@@ -92,7 +92,7 @@
(!failure /.wrong_tag
[[(/.node ["" expected] (//\in []))
(#xml.Node [expected ""] (dictionary.empty name.hash) (list))]])
- (do {! random.monad}
+ (do [! random.monad]
[expected_tag ..random_tag
expected_attribute ..random_attribute
expected_value (random.ascii/alpha 1)]
@@ -144,7 +144,7 @@
[(/.node [expected expected]
(/.attribute [expected expected]))
(#xml.Text expected)]])
- (do {! random.monad}
+ (do [! random.monad]
[.let [node (: (-> xml.Tag (List xml.XML) xml.XML)
(function (_ tag children)
(#xml.Node tag (dictionary.empty name.hash) children)))]
diff --git a/stdlib/source/test/lux/control/pipe.lux b/stdlib/source/test/lux/control/pipe.lux
index baa9d51c5..a61671c97 100644
--- a/stdlib/source/test/lux/control/pipe.lux
+++ b/stdlib/source/test/lux/control/pipe.lux
@@ -19,7 +19,7 @@
(def: .public test
Test
(<| (_.covering /._)
- (do {! random.monad}
+ (do [! random.monad]
[sample random.nat]
($_ _.and
(do !
diff --git a/stdlib/source/test/lux/control/region.lux b/stdlib/source/test/lux/control/region.lux
index 1a2491a56..2e6af0ef9 100644
--- a/stdlib/source/test/lux/control/region.lux
+++ b/stdlib/source/test/lux/control/region.lux
@@ -80,7 +80,7 @@
Test
(<| (_.covering /._)
(_.for [/.Region])
- (do {! random.monad}
+ (do [! random.monad]
[expected_clean_ups (|> random.nat (\ ! each (|>> (n.% 100) (n.max 1))))]
($_ _.and
(_.for [/.functor]
@@ -98,7 +98,7 @@
(_.cover [/.run!]
(thread.result
- (do {! thread.monad}
+ (do [! thread.monad]
[clean_up_counter (thread.box 0)
.let [//@ !
count_clean_up (function (_ value)
@@ -106,7 +106,7 @@
[_ (thread.update! ++ clean_up_counter)]
(in (#try.Success []))))]
outcome (/.run! !
- (do {! (/.monad !)}
+ (do [! (/.monad !)]
[_ (monad.each ! (/.acquire! //@ count_clean_up)
(enum.range n.enum 1 expected_clean_ups))]
(in [])))
@@ -116,7 +116,7 @@
actual_clean_ups))))))
(_.cover [/.failure]
(thread.result
- (do {! thread.monad}
+ (do [! thread.monad]
[clean_up_counter (thread.box 0)
.let [//@ !
count_clean_up (function (_ value)
@@ -124,7 +124,7 @@
[_ (thread.update! ++ clean_up_counter)]
(in (#try.Success []))))]
outcome (/.run! !
- (do {! (/.monad !)}
+ (do [! (/.monad !)]
[_ (monad.each ! (/.acquire! //@ count_clean_up)
(enum.range n.enum 1 expected_clean_ups))
_ (/.failure //@ (exception.error ..oops []))]
@@ -135,7 +135,7 @@
actual_clean_ups))))))
(_.cover [/.except]
(thread.result
- (do {! thread.monad}
+ (do [! thread.monad]
[clean_up_counter (thread.box 0)
.let [//@ !
count_clean_up (function (_ value)
@@ -143,7 +143,7 @@
[_ (thread.update! ++ clean_up_counter)]
(in (#try.Success []))))]
outcome (/.run! !
- (do {! (/.monad !)}
+ (do [! (/.monad !)]
[_ (monad.each ! (/.acquire! //@ count_clean_up)
(enum.range n.enum 1 expected_clean_ups))
_ (/.except //@ ..oops [])]
@@ -154,7 +154,7 @@
actual_clean_ups))))))
(_.cover [/.acquire! /.clean_up_error]
(thread.result
- (do {! thread.monad}
+ (do [! thread.monad]
[clean_up_counter (thread.box 0)
.let [//@ !
count_clean_up (function (_ value)
@@ -163,7 +163,7 @@
(in (: (Try Any)
(exception.except ..oops [])))))]
outcome (/.run! !
- (do {! (/.monad !)}
+ (do [! (/.monad !)]
[_ (monad.each ! (/.acquire! //@ count_clean_up)
(enum.range n.enum 1 expected_clean_ups))]
(in [])))
@@ -174,7 +174,7 @@
actual_clean_ups))))))
(_.cover [/.lifted]
(thread.result
- (do {! thread.monad}
+ (do [! thread.monad]
[clean_up_counter (thread.box 0)
.let [//@ !]
outcome (/.run! !
diff --git a/stdlib/source/test/lux/control/state.lux b/stdlib/source/test/lux/control/state.lux
index ecc2ee1b4..e96247575 100644
--- a/stdlib/source/test/lux/control/state.lux
+++ b/stdlib/source/test/lux/control/state.lux
@@ -81,7 +81,7 @@
(def: loops
Test
- (do {! random.monad}
+ (do [! random.monad]
[limit (|> random.nat (\ ! each (n.% 10)))
.let [condition (do /.monad
[state /.get]
diff --git a/stdlib/source/test/lux/data/binary.lux b/stdlib/source/test/lux/data/binary.lux
index cc168c8a5..a9dbaca2e 100644
--- a/stdlib/source/test/lux/data/binary.lux
+++ b/stdlib/source/test/lux/data/binary.lux
@@ -78,7 +78,7 @@
(def: .public test
Test
(<| (_.covering /._)
- (do {! random.monad}
+ (do [! random.monad]
[.let [gen_size (|> random.nat (\ ! each (|>> (n.% 100) (n.max 8))))]
size gen_size
sample (..random size)
diff --git a/stdlib/source/test/lux/data/collection/array.lux b/stdlib/source/test/lux/data/collection/array.lux
index d2d44d635..102a7a2a5 100644
--- a/stdlib/source/test/lux/data/collection/array.lux
+++ b/stdlib/source/test/lux/data/collection/array.lux
@@ -34,7 +34,7 @@
(def: structures
Test
- (do {! random.monad}
+ (do [! random.monad]
[size ..bounded_size]
($_ _.and
(_.for [/.equivalence]
@@ -49,7 +49,7 @@
(def: search
Test
- (do {! random.monad}
+ (do [! random.monad]
[size ..bounded_size
base random.nat
shift random.nat
@@ -93,7 +93,7 @@
Test
(<| (_.covering /._)
(_.for [/.Array])
- (do {! random.monad}
+ (do [! random.monad]
[size ..bounded_size
base random.nat
shift random.nat
diff --git a/stdlib/source/test/lux/data/collection/bits.lux b/stdlib/source/test/lux/data/collection/bits.lux
index d3d7d1d05..a3f877cb1 100644
--- a/stdlib/source/test/lux/data/collection/bits.lux
+++ b/stdlib/source/test/lux/data/collection/bits.lux
@@ -21,11 +21,11 @@
(def: .public random
(Random Bits)
- (do {! random.monad}
+ (do [! random.monad]
[size (\ ! each (n.% 1,000) random.nat)]
(case size
0 (in /.empty)
- _ (do {! random.monad}
+ _ (do [! random.monad]
[idx (|> random.nat (\ ! each (n.% size)))]
(in (/.one idx /.empty))))))
@@ -46,7 +46,7 @@
(_.cover [/.empty]
(/.empty? /.empty))
- (do {! random.monad}
+ (do [! random.monad]
[size (\ ! each (|>> (n.% 1,000) ++) random.nat)
idx (\ ! each (n.% size) random.nat)
sample ..random]
diff --git a/stdlib/source/test/lux/data/collection/dictionary.lux b/stdlib/source/test/lux/data/collection/dictionary.lux
index 4004b8ca9..60314ca82 100644
--- a/stdlib/source/test/lux/data/collection/dictionary.lux
+++ b/stdlib/source/test/lux/data/collection/dictionary.lux
@@ -30,7 +30,7 @@
(def: for_dictionaries
Test
- (do {! random.monad}
+ (do [! random.monad]
[.let [capped_nat (\ random.monad each (n.% 100) random.nat)]
size capped_nat
dict (random.dictionary n.hash size random.nat capped_nat)
diff --git a/stdlib/source/test/lux/data/collection/dictionary/ordered.lux b/stdlib/source/test/lux/data/collection/dictionary/ordered.lux
index 78d0afcc1..9759aa3d4 100644
--- a/stdlib/source/test/lux/data/collection/dictionary/ordered.lux
+++ b/stdlib/source/test/lux/data/collection/dictionary/ordered.lux
@@ -42,7 +42,7 @@
Test
(<| (_.covering /._)
(_.for [/.Dictionary])
- (do {! random.monad}
+ (do [! random.monad]
[size (\ ! each (n.% 100) random.nat)
keys (random.set n.hash size random.nat)
values (random.set n.hash size random.nat)
diff --git a/stdlib/source/test/lux/data/collection/dictionary/plist.lux b/stdlib/source/test/lux/data/collection/dictionary/plist.lux
index 18ca96820..56d376740 100644
--- a/stdlib/source/test/lux/data/collection/dictionary/plist.lux
+++ b/stdlib/source/test/lux/data/collection/dictionary/plist.lux
@@ -33,7 +33,7 @@
Test
(<| (_.covering /._)
(_.for [/.PList])
- (do {! random.monad}
+ (do [! random.monad]
[.let [gen_key (random.ascii/alpha 10)]
size (\ ! each (n.% 100) random.nat)
sample (..random size gen_key random.nat)
diff --git a/stdlib/source/test/lux/data/collection/list.lux b/stdlib/source/test/lux/data/collection/list.lux
index ab2809406..639e69400 100644
--- a/stdlib/source/test/lux/data/collection/list.lux
+++ b/stdlib/source/test/lux/data/collection/list.lux
@@ -39,7 +39,7 @@
(def: random
(Random (List Nat))
- (do {! random.monad}
+ (do [! random.monad]
[size ..bounded_size]
(|> random.nat
(random.set n.hash size)
@@ -65,7 +65,7 @@
(_.for [/.monad]
($monad.spec /\in /.equivalence /.monad))
- (do {! random.monad}
+ (do [! random.monad]
[parameter random.nat
subject random.nat]
(let [lifted (/.lifted io.monad)
@@ -85,7 +85,7 @@
(def: whole
Test
- (do {! random.monad}
+ (do [! random.monad]
[size ..bounded_size
.let [(^open "/\.") (/.equivalence n.equivalence)]
sample (\ ! each set.list (random.set n.hash size random.nat))]
@@ -131,7 +131,7 @@
Test
(let [(^open "/\.") (/.equivalence n.equivalence)
(^open "/\.") /.functor]
- (do {! random.monad}
+ (do [! random.monad]
[sample ..random
.let [size (/.size sample)]]
($_ _.and
@@ -180,7 +180,7 @@
Test
(let [(^open "/\.") (/.equivalence n.equivalence)
(^open "/\.") /.monoid]
- (do {! random.monad}
+ (do [! random.monad]
[sample (random.only (|>> /.size (n.> 0))
..random)
.let [size (/.size sample)]
@@ -228,7 +228,7 @@
(def: member
Test
(let [(^open "/\.") (/.equivalence n.equivalence)]
- (do {! random.monad}
+ (do [! random.monad]
[sample ..random]
(`` ($_ _.and
(_.cover [/.member?]
@@ -275,7 +275,7 @@
+/3 (: (-> Nat Nat Nat Nat)
(function (_ left mid right)
($_ n.+ left mid right)))]
- (do {! random.monad}
+ (do [! random.monad]
[sample/0 ..random
sample/1 ..random
sample/2 ..random]
@@ -357,7 +357,7 @@
(if (n.even? value)
(#.Some (\ n.decimal encoded value))
#.None)))]
- (do {! random.monad}
+ (do [! random.monad]
[sample ..random]
($_ _.and
(_.cover [/.one]
@@ -395,7 +395,7 @@
(_.for [.List])
(let [(^open "/\.") (/.equivalence n.equivalence)
(^open "/\.") /.functor]
- (do {! random.monad}
+ (do [! random.monad]
[sample ..random
separator random.nat]
($_ _.and
diff --git a/stdlib/source/test/lux/data/collection/queue.lux b/stdlib/source/test/lux/data/collection/queue.lux
index 52de12d28..7a24ad89d 100644
--- a/stdlib/source/test/lux/data/collection/queue.lux
+++ b/stdlib/source/test/lux/data/collection/queue.lux
@@ -27,7 +27,7 @@
Test
(<| (_.covering /._)
(_.for [/.Queue])
- (do {! random.monad}
+ (do [! random.monad]
[size (\ ! each (n.% 100) random.nat)
members (random.set n.hash size random.nat)
non_member (random.only (|>> (set.member? members) not)
diff --git a/stdlib/source/test/lux/data/collection/queue/priority.lux b/stdlib/source/test/lux/data/collection/queue/priority.lux
index 7b1335d77..2f61d3e57 100644
--- a/stdlib/source/test/lux/data/collection/queue/priority.lux
+++ b/stdlib/source/test/lux/data/collection/queue/priority.lux
@@ -17,7 +17,7 @@
(def: .public (random size)
(-> Nat (Random (Queue Nat)))
- (do {! random.monad}
+ (do [! random.monad]
[inputs (random.list size random.nat)]
(monad.mix ! (function (_ head tail)
(do !
@@ -30,7 +30,7 @@
Test
(<| (_.covering /._)
(_.for [/.Queue])
- (do {! random.monad}
+ (do [! random.monad]
[size (\ ! each (n.% 100) random.nat)
sample (..random size)
non_member_priority random.nat
diff --git a/stdlib/source/test/lux/data/collection/row.lux b/stdlib/source/test/lux/data/collection/row.lux
index ca06073df..af3acdb18 100644
--- a/stdlib/source/test/lux/data/collection/row.lux
+++ b/stdlib/source/test/lux/data/collection/row.lux
@@ -28,7 +28,7 @@
(def: signatures
Test
- (do {! random.monad}
+ (do [! random.monad]
[size (\ ! each (n.% 100) random.nat)]
($_ _.and
(_.for [/.equivalence]
@@ -47,7 +47,7 @@
(def: whole
Test
- (do {! random.monad}
+ (do [! random.monad]
[size (\ ! each (n.% 100) random.nat)
sample (random.set n.hash size random.nat)
.let [sample (|> sample set.list /.of_list)]
@@ -80,7 +80,7 @@
(def: index_based
Test
- (do {! random.monad}
+ (do [! random.monad]
[size (\ ! each (|>> (n.% 100) ++) random.nat)]
($_ _.and
(do !
@@ -133,7 +133,7 @@
Test
(<| (_.covering /._)
(_.for [/.Row])
- (do {! random.monad}
+ (do [! random.monad]
[size (\ ! each (|>> (n.% 100) ++) random.nat)]
($_ _.and
..signatures
diff --git a/stdlib/source/test/lux/data/collection/sequence.lux b/stdlib/source/test/lux/data/collection/sequence.lux
index f3a3f604c..cd5427b16 100644
--- a/stdlib/source/test/lux/data/collection/sequence.lux
+++ b/stdlib/source/test/lux/data/collection/sequence.lux
@@ -43,7 +43,7 @@
(<| (_.covering /._)
(_.for [/.Sequence])
(let [(^open "list\.") (list.equivalence n.equivalence)])
- (do {! random.monad}
+ (do [! random.monad]
[repeated random.nat
index (\ ! each (n.% 100) random.nat)
size (\ ! each (|>> (n.% 10) ++) random.nat)
diff --git a/stdlib/source/test/lux/data/collection/set.lux b/stdlib/source/test/lux/data/collection/set.lux
index c425492d8..ec572c03c 100644
--- a/stdlib/source/test/lux/data/collection/set.lux
+++ b/stdlib/source/test/lux/data/collection/set.lux
@@ -29,7 +29,7 @@
Test
(<| (_.covering /._)
(_.for [/.Set])
- (do {! random.monad}
+ (do [! random.monad]
[size ..gen_nat]
($_ _.and
(_.for [/.equivalence]
diff --git a/stdlib/source/test/lux/data/collection/set/multi.lux b/stdlib/source/test/lux/data/collection/set/multi.lux
index 1037b0ed6..c1a5d6fa5 100644
--- a/stdlib/source/test/lux/data/collection/set/multi.lux
+++ b/stdlib/source/test/lux/data/collection/set/multi.lux
@@ -27,7 +27,7 @@
(def: .public (random size hash count element)
(All (_ a) (-> Nat (Hash a) (Random Nat) (Random a) (Random (/.Set a))))
- (do {! random.monad}
+ (do [! random.monad]
[elements (random.set hash size element)
element_counts (random.list size ..count)]
(in (list\mix (function (_ [count element] set)
@@ -38,7 +38,7 @@
(def: signature
Test
- (do {! random.monad}
+ (do [! random.monad]
[diversity (\ ! each (n.% 10) random.nat)]
($_ _.and
(_.for [/.equivalence]
@@ -52,7 +52,7 @@
(def: composition
Test
- (do {! random.monad}
+ (do [! random.monad]
[diversity (\ ! each (n.% 10) random.nat)
sample (..random diversity n.hash ..count random.nat)
another (..random diversity n.hash ..count random.nat)]
@@ -112,7 +112,7 @@
Test
(<| (_.covering /._)
(_.for [/.Set])
- (do {! random.monad}
+ (do [! random.monad]
[diversity (\ ! each (n.% 10) random.nat)
sample (..random diversity n.hash ..count random.nat)
non_member (random.only (predicate.complement (set.member? (/.support sample)))
diff --git a/stdlib/source/test/lux/data/collection/set/ordered.lux b/stdlib/source/test/lux/data/collection/set/ordered.lux
index 2b3074039..c2133dd11 100644
--- a/stdlib/source/test/lux/data/collection/set/ordered.lux
+++ b/stdlib/source/test/lux/data/collection/set/ordered.lux
@@ -40,7 +40,7 @@
Test
(<| (_.covering /._)
(_.for [/.Set])
- (do {! random.monad}
+ (do [! random.monad]
[sizeL ..size
sizeR ..size
usetL (random.set n.hash sizeL random.nat)
diff --git a/stdlib/source/test/lux/data/collection/tree.lux b/stdlib/source/test/lux/data/collection/tree.lux
index 66607cc37..0aba27125 100644
--- a/stdlib/source/test/lux/data/collection/tree.lux
+++ b/stdlib/source/test/lux/data/collection/tree.lux
@@ -21,7 +21,7 @@
(def: .public (tree gen_value)
(All (_ a) (-> (Random a) (Random [Nat (Tree a)])))
- (do {! random.monad}
+ (do [! random.monad]
[value gen_value
num_children (\ ! each (n.% 2) random.nat)
children (random.list num_children (tree gen_value))]
@@ -56,7 +56,7 @@
(\ (list.equivalence n.equivalence) =
(list expected)
(/.flat (/.leaf expected)))))
- (do {! random.monad}
+ (do [! random.monad]
[value random.nat
num_children (\ ! each (n.% 3) random.nat)
children (random.list num_children random.nat)]
diff --git a/stdlib/source/test/lux/data/collection/tree/finger.lux b/stdlib/source/test/lux/data/collection/tree/finger.lux
index 754d1b20b..09c9af569 100644
--- a/stdlib/source/test/lux/data/collection/tree/finger.lux
+++ b/stdlib/source/test/lux/data/collection/tree/finger.lux
@@ -32,7 +32,7 @@
Test
(<| (_.covering /._)
(_.for [/.Tree])
- (do {! random.monad}
+ (do [! random.monad]
[tag_left (random.ascii/alpha_num 1)
tag_right (random.only (|>> (text\= tag_left) not)
(random.ascii/alpha_num 1))
diff --git a/stdlib/source/test/lux/data/collection/tree/zipper.lux b/stdlib/source/test/lux/data/collection/tree/zipper.lux
index 8e3d064bc..9f780415c 100644
--- a/stdlib/source/test/lux/data/collection/tree/zipper.lux
+++ b/stdlib/source/test/lux/data/collection/tree/zipper.lux
@@ -155,7 +155,7 @@
Test
(<| (_.covering /._)
(_.for [/.Zipper])
- (do {! random.monad}
+ (do [! random.monad]
[[size sample] (//.tree random.nat)
expected random.nat
dummy (random.only (|>> (n.= expected) not) random.nat)
diff --git a/stdlib/source/test/lux/data/color.lux b/stdlib/source/test/lux/data/color.lux
index 25d103c12..0628543f6 100644
--- a/stdlib/source/test/lux/data/color.lux
+++ b/stdlib/source/test/lux/data/color.lux
@@ -130,7 +130,7 @@
(def: palette
Test
(_.for [/.Spread /.Palette]
- (do {! random.monad}
+ (do [! random.monad]
[eH (\ ! each (|>> f.abs (f.% +0.9) (f.+ +0.05))
random.safe_frac)
.let [eS +0.5]
@@ -180,7 +180,7 @@
Test
(<| (_.covering /._)
(_.for [/.Color])
- (do {! random.monad}
+ (do [! random.monad]
[expected ..random]
($_ _.and
(_.for [/.equivalence]
diff --git a/stdlib/source/test/lux/data/format/json.lux b/stdlib/source/test/lux/data/format/json.lux
index 1da99c230..6f9722350 100644
--- a/stdlib/source/test/lux/data/format/json.lux
+++ b/stdlib/source/test/lux/data/format/json.lux
@@ -35,7 +35,7 @@
(Random /.JSON)
(random.rec
(function (_ recur)
- (do {! random.monad}
+ (do [! random.monad]
[size (\ ! each (n.% 2) random.nat)]
($_ random.or
(\ ! in [])
diff --git a/stdlib/source/test/lux/data/format/tar.lux b/stdlib/source/test/lux/data/format/tar.lux
index 2550c8836..5c0fe2659 100644
--- a/stdlib/source/test/lux/data/format/tar.lux
+++ b/stdlib/source/test/lux/data/format/tar.lux
@@ -39,7 +39,7 @@
(def: path
Test
(_.for [/.Path]
- (do {! random.monad}
+ (do [! random.monad]
[expected (random.ascii/lower /.path_size)
invalid (random.ascii/lower (++ /.path_size))
not_ascii (random.text (random.char (unicode.set [unicode/block.katakana (list)]))
@@ -74,7 +74,7 @@
(def: name
Test
(_.for [/.Name]
- (do {! random.monad}
+ (do [! random.monad]
[expected (random.ascii/lower /.name_size)
invalid (random.ascii/lower (++ /.name_size))
not_ascii (random.text (random.char (unicode.set [unicode/block.katakana (list)]))
@@ -107,7 +107,7 @@
(def: small
Test
(_.for [/.Small]
- (do {! random.monad}
+ (do [! random.monad]
[expected (|> random.nat (\ ! each (n.% /.small_limit)))
invalid (|> random.nat (\ ! each (n.max /.small_limit)))]
(`` ($_ _.and
@@ -131,7 +131,7 @@
(def: big
Test
(_.for [/.Big]
- (do {! random.monad}
+ (do [! random.monad]
[expected (|> random.nat (\ ! each (n.% /.big_limit)))
invalid (|> random.nat (\ ! each (n.max /.big_limit)))]
(`` ($_ _.and
@@ -156,7 +156,7 @@
(def: entry
Test
- (do {! random.monad}
+ (do [! random.monad]
[expected_path (random.ascii/lower (-- /.path_size))
expected_moment (\ ! each (|>> (n.% 1,0,00,00,00,00,000) .int instant.of_millis)
random.nat)
@@ -224,7 +224,7 @@
(def: random_mode
(Random /.Mode)
- (do {! random.monad}
+ (do [! random.monad]
[]
(random.either (random.either (random.either (in /.execute_by_other)
(in /.write_by_other))
@@ -242,7 +242,7 @@
(def: mode
Test
(_.for [/.Mode /.mode]
- (do {! random.monad}
+ (do [! random.monad]
[path (random.ascii/lower 10)
modes (random.list 4 ..random_mode)
.let [expected_mode (list\mix /.and /.none modes)]]
@@ -314,7 +314,7 @@
(def: ownership
Test
- (do {! random.monad}
+ (do [! random.monad]
[path (random.ascii/lower /.path_size)
expected (random.ascii/lower /.name_size)
invalid (random.ascii/lower (++ /.name_size))
diff --git a/stdlib/source/test/lux/data/format/xml.lux b/stdlib/source/test/lux/data/format/xml.lux
index 8ef920a57..b81ea46ff 100644
--- a/stdlib/source/test/lux/data/format/xml.lux
+++ b/stdlib/source/test/lux/data/format/xml.lux
@@ -35,7 +35,7 @@
(def: char
(Random Nat)
- (do {! random.monad}
+ (do [! random.monad]
[idx (|> random.nat (\ ! each (n.% (text.size char_range))))]
(in (maybe.trusted (text.char idx char_range)))))
@@ -76,7 +76,7 @@
(_.for [/.codec]
($codec.spec /.equivalence /.codec ..random))
- (do {! random.monad}
+ (do [! random.monad]
[(^@ identifier [namespace name]) ..identifier]
(`` ($_ _.and
(~~ (template [<type> <format>]
diff --git a/stdlib/source/test/lux/data/name.lux b/stdlib/source/test/lux/data/name.lux
index 538645e61..b772c8e5d 100644
--- a/stdlib/source/test/lux/data/name.lux
+++ b/stdlib/source/test/lux/data/name.lux
@@ -28,7 +28,7 @@
(def: .public test
Test
(<| (_.covering /._)
- (do {! random.monad}
+ (do [! random.monad]
[... First Name
sizeM1 (|> random.nat (\ ! each (n.% 100)))
sizeS1 (|> random.nat (\ ! each (|>> (n.% 100) (n.max 1))))
diff --git a/stdlib/source/test/lux/data/sum.lux b/stdlib/source/test/lux/data/sum.lux
index 8fd3fa194..d0be3fd0e 100644
--- a/stdlib/source/test/lux/data/sum.lux
+++ b/stdlib/source/test/lux/data/sum.lux
@@ -24,7 +24,7 @@
Test
(<| (_.covering /._)
(_.for [.Union .Or])
- (do {! random.monad}
+ (do [! random.monad]
[expected random.nat
shift random.nat]
($_ _.and
diff --git a/stdlib/source/test/lux/data/text.lux b/stdlib/source/test/lux/data/text.lux
index 509cb5769..b5d8b740e 100644
--- a/stdlib/source/test/lux/data/text.lux
+++ b/stdlib/source/test/lux/data/text.lux
@@ -38,7 +38,7 @@
(def: size
Test
- (do {! random.monad}
+ (do [! random.monad]
[size (\ ! each (n.% 10) random.nat)
sample (random.unicode size)]
($_ _.and
@@ -50,7 +50,7 @@
(def: affix
Test
- (do {! random.monad}
+ (do [! random.monad]
[inner (random.unicode 1)
outer (random.only (|>> (\ /.equivalence = inner) not)
(random.unicode 1))
@@ -79,7 +79,7 @@
(def: index
Test
- (do {! random.monad}
+ (do [! random.monad]
[inner (random.unicode 1)
outer (random.only (|>> (\ /.equivalence = inner) not)
(random.unicode 1))
@@ -145,7 +145,7 @@
(_.cover [/.line_feed]
(\ /.equivalence = /.new_line /.line_feed))
)))
- (do {! random.monad}
+ (do [! random.monad]
[size (\ ! each (|>> (n.% 10) ++) random.nat)
characters (random.set /.hash size (random.ascii/alpha 1))
.let [sample (|> characters set.list /.together)]
@@ -177,7 +177,7 @@
(def: manipulation
Test
- (do {! random.monad}
+ (do [! random.monad]
[size (\ ! each (|>> (n.% 10) (n.+ 2)) random.nat)
characters (random.set /.hash size (random.ascii/alpha 1))
separator (random.only (|>> (set.member? characters) not)
@@ -311,7 +311,7 @@
_
#0)))
))
- (do {! random.monad}
+ (do [! random.monad]
[sizeP bounded_size
sizeL bounded_size
.let [... The wider unicode charset includes control characters that
diff --git a/stdlib/source/test/lux/data/text/buffer.lux b/stdlib/source/test/lux/data/text/buffer.lux
index 28e82be88..ad98c2f75 100644
--- a/stdlib/source/test/lux/data/text/buffer.lux
+++ b/stdlib/source/test/lux/data/text/buffer.lux
@@ -16,7 +16,7 @@
(def: part
(Random Text)
- (do {! random.monad}
+ (do [! random.monad]
[size (\ ! each (|>> (n.% 10) ++) random.nat)]
(random.ascii/alpha size)))
diff --git a/stdlib/source/test/lux/data/text/encoding.lux b/stdlib/source/test/lux/data/text/encoding.lux
index 8ebeb97f6..927375cb3 100644
--- a/stdlib/source/test/lux/data/text/encoding.lux
+++ b/stdlib/source/test/lux/data/text/encoding.lux
@@ -213,7 +213,7 @@
(def: .public random
(Random /.Encoding)
(let [options (list.size ..all_encodings)]
- (do {! random.monad}
+ (do [! random.monad]
[choice (\ ! each (n.% options) random.nat)]
(in (maybe.trusted (list.item choice ..all_encodings))))))
diff --git a/stdlib/source/test/lux/data/text/escape.lux b/stdlib/source/test/lux/data/text/escape.lux
index 18c60e2f3..4f1b8ed75 100644
--- a/stdlib/source/test/lux/data/text/escape.lux
+++ b/stdlib/source/test/lux/data/text/escape.lux
@@ -112,7 +112,7 @@
(#try.Failure error)
false))
(text\= expected (/.escaped expected))))))
- (do {! random.monad}
+ (do [! random.monad]
[dummy (|> (random.char unicode.character)
(\ ! each text.of_char))]
(_.cover [/.dangling_escape]
@@ -122,7 +122,7 @@
(#try.Failure error)
(exception.match? /.dangling_escape error))))
- (do {! random.monad}
+ (do [! random.monad]
[dummy (|> (random.char unicode.character)
(random.only (|>> (set.member? ..valid_sigils) not))
(\ ! each text.of_char))]
@@ -133,7 +133,7 @@
(#try.Failure error)
(exception.match? /.invalid_escape error))))
- (do {! random.monad}
+ (do [! random.monad]
[too_short (|> (random.char unicode.character)
(\ ! each (n.% (hex "1000"))))
code (|> (random.unicode 4)
diff --git a/stdlib/source/test/lux/data/text/format.lux b/stdlib/source/test/lux/data/text/format.lux
index e5b6968e0..e5f13ad69 100644
--- a/stdlib/source/test/lux/data/text/format.lux
+++ b/stdlib/source/test/lux/data/text/format.lux
@@ -173,7 +173,7 @@
(#.Some value)
(text.contains? (/.nat value)
(/.maybe /.nat sample)))))
- (do {! random.monad}
+ (do [! random.monad]
[modulus (random.one (|>> modulus.modulus
try.maybe)
random.int)
diff --git a/stdlib/source/test/lux/data/text/unicode/block.lux b/stdlib/source/test/lux/data/text/unicode/block.lux
index 4f9f27295..d127651e7 100644
--- a/stdlib/source/test/lux/data/text/unicode/block.lux
+++ b/stdlib/source/test/lux/data/text/unicode/block.lux
@@ -24,7 +24,7 @@
(def: .public random
(Random /.Block)
- (do {! random.monad}
+ (do [! random.monad]
[start (\ ! each (n.% 1,000,000) random.nat)
additional (\ ! each (n.% 1,000,000) random.nat)]
(in (/.block start additional))))
@@ -169,7 +169,7 @@
Test
(<| (_.covering /._)
(_.for [/.Block])
- (do {! random.monad}
+ (do [! random.monad]
[.let [top_start (hex "AC00")
top_end (hex "D7AF")
end_range (n.- top_start top_end)]
diff --git a/stdlib/source/test/lux/data/text/unicode/set.lux b/stdlib/source/test/lux/data/text/unicode/set.lux
index db18d9b7d..ef5b66720 100644
--- a/stdlib/source/test/lux/data/text/unicode/set.lux
+++ b/stdlib/source/test/lux/data/text/unicode/set.lux
@@ -25,7 +25,7 @@
(def: .public random
(Random /.Set)
- (do {! random.monad}
+ (do [! random.monad]
[left //block.random
right //block.random]
(in (/.set [left (list right)]))))
@@ -34,7 +34,7 @@
Test
(<| (_.covering /._)
(_.for [/.Set])
- (do {! random.monad}
+ (do [! random.monad]
[block //block.random
inside (\ ! each
(|>> (n.% (block.size block))
diff --git a/stdlib/source/test/lux/ffi.js.lux b/stdlib/source/test/lux/ffi.js.lux
index d21ed1a6c..e193e6df8 100644
--- a/stdlib/source/test/lux/ffi.js.lux
+++ b/stdlib/source/test/lux/ffi.js.lux
@@ -44,7 +44,7 @@
(def: .public test
Test
- (do {! random.monad}
+ (do [! random.monad]
[boolean random.bit
number (\ ! each (|>> (nat.% 100) nat.frac) random.nat)
string (random.ascii 5)
diff --git a/stdlib/source/test/lux/ffi.jvm.lux b/stdlib/source/test/lux/ffi.jvm.lux
index 071e43a3c..5a16902a7 100644
--- a/stdlib/source/test/lux/ffi.jvm.lux
+++ b/stdlib/source/test/lux/ffi.jvm.lux
@@ -70,7 +70,7 @@
(def: for_conversions
Test
- (do {! random.monad}
+ (do [! random.monad]
[long (\ ! each (|>> (:as /.Long)) random.int)
integer (\ ! each (|>> (:as /.Long) /.long_to_int) random.int)
byte (\ ! each (|>> (:as /.Long) /.long_to_byte) random.int)
@@ -105,7 +105,7 @@
(def: for_arrays
Test
- (do {! random.monad}
+ (do [! random.monad]
[size (|> random.nat (\ ! each (|>> (n.% 100) (n.max 1))))
idx (|> random.nat (\ ! each (n.% size)))
value (\ ! each (|>> (:as java/lang/Long)) random.int)]
@@ -131,7 +131,7 @@
(def: for_miscellaneous
Test
- (`` (do {! random.monad}
+ (`` (do [! random.monad]
[sample (\ ! each (|>> (:as java/lang/Object))
(random.ascii 1))
boolean (\ ! each (|>> (:as /.Boolean)) random.bit)
@@ -488,7 +488,7 @@
(def: for_class
Test
- (do {! random.monad}
+ (do [! random.monad]
[expected random.nat
left random.int
right random.int
diff --git a/stdlib/source/test/lux/ffi.lua.lux b/stdlib/source/test/lux/ffi.lua.lux
index 88442df22..de067a372 100644
--- a/stdlib/source/test/lux/ffi.lua.lux
+++ b/stdlib/source/test/lux/ffi.lua.lux
@@ -15,7 +15,7 @@
(def: .public test
Test
- (do {! random.monad}
+ (do [! random.monad]
[boolean random.bit
integer random.int
float random.frac
diff --git a/stdlib/source/test/lux/ffi.old.lux b/stdlib/source/test/lux/ffi.old.lux
index 32c7ea085..fe1fdef65 100644
--- a/stdlib/source/test/lux/ffi.old.lux
+++ b/stdlib/source/test/lux/ffi.old.lux
@@ -87,7 +87,7 @@
(def: conversions
Test
- (do {! random.monad}
+ (do [! random.monad]
[long random.int
int (\ ! each (|>> /.long_to_int) random.int)
char (\ ! each (|>> /.long_to_int /.int_to_char) random.int)
@@ -155,7 +155,7 @@
(def: arrays
Test
- (do {! random.monad}
+ (do [! random.monad]
[size (|> random.nat (\ ! each (|>> (n.% 100) (n.max 1))))
idx (|> random.nat (\ ! each (n.% size)))
value random.int]
diff --git a/stdlib/source/test/lux/ffi.php.lux b/stdlib/source/test/lux/ffi.php.lux
index d974b7ec2..4db2d70c0 100644
--- a/stdlib/source/test/lux/ffi.php.lux
+++ b/stdlib/source/test/lux/ffi.php.lux
@@ -18,7 +18,7 @@
(def: .public test
Test
- (do {! random.monad}
+ (do [! random.monad]
[]
(<| (_.covering /._)
(_.test "TBD"
diff --git a/stdlib/source/test/lux/ffi.py.lux b/stdlib/source/test/lux/ffi.py.lux
index 2a5e7cffa..024220863 100644
--- a/stdlib/source/test/lux/ffi.py.lux
+++ b/stdlib/source/test/lux/ffi.py.lux
@@ -18,7 +18,7 @@
(def: .public test
Test
- (do {! random.monad}
+ (do [! random.monad]
[boolean random.bit
integer random.int
float random.frac
diff --git a/stdlib/source/test/lux/ffi.rb.lux b/stdlib/source/test/lux/ffi.rb.lux
index 623532196..82423fe92 100644
--- a/stdlib/source/test/lux/ffi.rb.lux
+++ b/stdlib/source/test/lux/ffi.rb.lux
@@ -15,7 +15,7 @@
(def: .public test
Test
- (do {! random.monad}
+ (do [! random.monad]
[boolean random.bit
integer random.int
float random.frac
diff --git a/stdlib/source/test/lux/ffi.scm.lux b/stdlib/source/test/lux/ffi.scm.lux
index d974b7ec2..4db2d70c0 100644
--- a/stdlib/source/test/lux/ffi.scm.lux
+++ b/stdlib/source/test/lux/ffi.scm.lux
@@ -18,7 +18,7 @@
(def: .public test
Test
- (do {! random.monad}
+ (do [! random.monad]
[]
(<| (_.covering /._)
(_.test "TBD"
diff --git a/stdlib/source/test/lux/locale.lux b/stdlib/source/test/lux/locale.lux
index 90959d401..3066230f4 100644
--- a/stdlib/source/test/lux/locale.lux
+++ b/stdlib/source/test/lux/locale.lux
@@ -53,7 +53,7 @@
(_.for [/.equivalence]
($equivalence.spec /.equivalence ..random_locale))
(_.for [/.hash]
- (do {! random.monad}
+ (do [! random.monad]
[fixed_language ..random_language
fixed_territory ..random_territory
fixed_encoding ..random_encoding]
diff --git a/stdlib/source/test/lux/locale/language.lux b/stdlib/source/test/lux/locale/language.lux
index 0b48c7330..4abf74207 100644
--- a/stdlib/source/test/lux/locale/language.lux
+++ b/stdlib/source/test/lux/locale/language.lux
@@ -281,7 +281,7 @@
(let [options (|> ..languages
(list\each (|>> (value@ #languages) set.list))
list.together)]
- (do {! random.monad}
+ (do [! random.monad]
[choice (\ ! each (n.% (list.size options))
random.nat)]
(in (maybe.trusted (list.item choice options))))))
diff --git a/stdlib/source/test/lux/locale/territory.lux b/stdlib/source/test/lux/locale/territory.lux
index 394b2f5d6..50b282e10 100644
--- a/stdlib/source/test/lux/locale/territory.lux
+++ b/stdlib/source/test/lux/locale/territory.lux
@@ -207,7 +207,7 @@
(let [options (|> ..territories
(list\each (|>> (value@ #territories) set.list))
list.together)]
- (do {! random.monad}
+ (do [! random.monad]
[choice (\ ! each (n.% (list.size options))
random.nat)]
(in (maybe.trusted (list.item choice options))))))
diff --git a/stdlib/source/test/lux/macro.lux b/stdlib/source/test/lux/macro.lux
index 93b4f40a7..96d1c2b18 100644
--- a/stdlib/source/test/lux/macro.lux
+++ b/stdlib/source/test/lux/macro.lux
@@ -58,7 +58,7 @@
(def: random_lux
(Random [Nat Text .Lux])
- (do {! random.monad}
+ (do [! random.monad]
[seed random.nat
identifier_prefix (random.ascii/upper 1)
.let [macro_module (name.module (name_of /._))
@@ -104,7 +104,7 @@
(def: expander
Test
- (do {! random.monad}
+ (do [! random.monad]
[[seed identifier_prefix lux] ..random_lux
pow/1 (\ ! each code.nat random.nat)
@@ -149,7 +149,7 @@
Test
(<| (_.covering /._)
($_ _.and
- (do {! random.monad}
+ (do [! random.monad]
[[seed identifier_prefix lux] ..random_lux]
($_ _.and
(_.cover [/.identifier]
diff --git a/stdlib/source/test/lux/macro/code.lux b/stdlib/source/test/lux/macro/code.lux
index 050a33c16..76af72b41 100644
--- a/stdlib/source/test/lux/macro/code.lux
+++ b/stdlib/source/test/lux/macro/code.lux
@@ -37,13 +37,13 @@
(def: (random_sequence random)
(All (_ a) (-> (Random a) (Random (List a))))
- (do {! random.monad}
+ (do [! random.monad]
[size (|> random.nat (\ ! each (n.% 3)))]
(random.list size random)))
(def: (random_record random)
(All (_ a) (-> (Random a) (Random (List [a a]))))
- (do {! random.monad}
+ (do [! random.monad]
[size (|> random.nat (\ ! each (n.% 3)))]
(random.list size (random.and random random))))
@@ -85,13 +85,13 @@
(function (_ replacement_simulation)
(let [for_sequence (: (-> (-> (List Code) Code) (Random [Code Code]))
(function (_ to_code)
- (do {! random.monad}
+ (do [! random.monad]
[parts (..random_sequence replacement_simulation)]
(in [(to_code (list\each product.left parts))
(to_code (list\each product.right parts))]))))]
($_ random.either
(random\in [original substitute])
- (do {! random.monad}
+ (do [! random.monad]
[sample (random.only (|>> (\ /.equivalence = original) not)
($_ random.either
(random\each /.bit random.bit)
@@ -105,7 +105,7 @@
(in [sample sample]))
(for_sequence /.form)
(for_sequence /.tuple)
- (do {! random.monad}
+ (do [! random.monad]
[parts (..random_sequence replacement_simulation)]
(in [(/.record (let [parts' (list\each product.left parts)]
(list.zipped/2 parts' parts')))
@@ -117,7 +117,7 @@
Test
(`` ($_ _.and
(~~ (template [<coverage> <random> <tag>]
- [(do {! random.monad}
+ [(do [! random.monad]
[expected <random>]
(_.cover [<coverage>]
(and (case (..read (/.format (<coverage> expected)))
@@ -144,7 +144,7 @@
[/.tuple (..random_sequence ..random) #.Tuple]
[/.record (..random_record ..random) #.Record]))
(~~ (template [<coverage> <random> <tag>]
- [(do {! random.monad}
+ [(do [! random.monad]
[expected <random>]
(_.cover [<coverage>]
(and (case (..read (/.format (<coverage> expected)))
@@ -174,7 +174,7 @@
(_.for [/.format]
..for_format)
- (do {! random.monad}
+ (do [! random.monad]
[[original substitute] (random.only (function (_ [original substitute])
(not (\ /.equivalence = original substitute)))
(random.and ..random ..random))
diff --git a/stdlib/source/test/lux/macro/local.lux b/stdlib/source/test/lux/macro/local.lux
index 726c99d81..305256e5b 100644
--- a/stdlib/source/test/lux/macro/local.lux
+++ b/stdlib/source/test/lux/macro/local.lux
@@ -67,7 +67,7 @@
(def: .public test
Test
(<| (_.covering /._)
- (do {! random.monad}
+ (do [! random.monad]
[expected random.nat]
($_ _.and
(_.cover [/.push]
diff --git a/stdlib/source/test/lux/macro/syntax/annotations.lux b/stdlib/source/test/lux/macro/syntax/annotations.lux
index b79d7dbea..34293515e 100644
--- a/stdlib/source/test/lux/macro/syntax/annotations.lux
+++ b/stdlib/source/test/lux/macro/syntax/annotations.lux
@@ -26,7 +26,7 @@
(Random /.Annotations)
(let [word (random.ascii/alpha 10)
tag (random.and word word)]
- (do {! random.monad}
+ (do [! random.monad]
[size (\ ! each (n.% 10) random.nat)]
(random.list size (random.and tag $///code.random)))))
diff --git a/stdlib/source/test/lux/macro/syntax/declaration.lux b/stdlib/source/test/lux/macro/syntax/declaration.lux
index 9e3faff22..81d2529a5 100644
--- a/stdlib/source/test/lux/macro/syntax/declaration.lux
+++ b/stdlib/source/test/lux/macro/syntax/declaration.lux
@@ -22,7 +22,7 @@
(let [word (random.ascii/alpha 10)]
($_ random.and
word
- (do {! random.monad}
+ (do [! random.monad]
[size (\ ! each (n.% 10) random.nat)]
(random.list size word))
)))
diff --git a/stdlib/source/test/lux/macro/template.lux b/stdlib/source/test/lux/macro/template.lux
index dccc983f5..e86b8a702 100644
--- a/stdlib/source/test/lux/macro/template.lux
+++ b/stdlib/source/test/lux/macro/template.lux
@@ -40,7 +40,7 @@
(def: .public test
Test
(<| (_.covering /._)
- (do {! random.monad}
+ (do [! random.monad]
[left random.nat
mid random.nat
right random.nat]
diff --git a/stdlib/source/test/lux/math.lux b/stdlib/source/test/lux/math.lux
index db7bf302d..b83d89d4e 100644
--- a/stdlib/source/test/lux/math.lux
+++ b/stdlib/source/test/lux/math.lux
@@ -35,7 +35,7 @@
Test
(<| (_.covering /._)
($_ _.and
- (do {! random.monad}
+ (do [! random.monad]
[.let [~= (f.approximately? ..margin_of_error)]
angle (|> random.safe_frac (\ ! each (f.* /.tau)))]
($_ _.and
@@ -60,7 +60,7 @@
(_.cover [/.pi]
(~= (f./ +2.0 /.tau) /.pi))
))
- (do {! random.monad}
+ (do [! random.monad]
[sample (|> random.safe_frac (\ ! each (f.* +1000.0)))]
($_ _.and
(_.cover [/.ceil]
@@ -89,7 +89,7 @@
(/.pow +3.0)
(f.approximately? ..margin_of_error sample)))
))
- (do {! random.monad}
+ (do [! random.monad]
[.let [~= (f.approximately? ..margin_of_error)]
sample (\ ! each (f.* +10.0) random.safe_frac)
power (\ ! each (|>> (n.% 10) ++ n.frac) random.nat)]
@@ -105,7 +105,7 @@
(/.log_by sample)
(~= power))))
))
- (do {! random.monad}
+ (do [! random.monad]
[.let [~= (f.approximately? ..margin_of_error)]
angle (\ ! each (f.* /.tau) random.safe_frac)
sample (\ ! each f.abs random.safe_frac)
@@ -136,14 +136,14 @@
(inverse! /.asinh /.acsch sample)
(inverse! /.atanh /.acoth big)
)))
- (do {! random.monad}
+ (do [! random.monad]
[x (\ ! each (|>> (f.* +10.0) f.abs) random.safe_frac)
y (\ ! each (|>> (f.* +10.0) f.abs) random.safe_frac)]
(_.cover [/.hypotenuse]
(let [h (/.hypotenuse x y)]
(and (f.>= x h)
(f.>= y h)))))
- (do {! random.monad}
+ (do [! random.monad]
[.let [~= (f.approximately? ..margin_of_error)
tau/4 (f./ +4.0 /.tau)]
x (\ ! each (f.* tau/4) random.safe_frac)
@@ -159,7 +159,7 @@
(~= tau/4 (/.atan/2 +0.0 (f.abs y)))
(~= (f.opposite tau/4) (/.atan/2 +0.0 (f.opposite (f.abs y))))
(f.not_a_number? (/.atan/2 +0.0 +0.0))))))
- (do {! random.monad}
+ (do [! random.monad]
[of (\ ! each (|>> (n.% 10) ++) random.nat)]
(_.cover [/.factorial]
(and (n.= 1 (/.factorial 0))
diff --git a/stdlib/source/test/lux/math/logic/fuzzy.lux b/stdlib/source/test/lux/math/logic/fuzzy.lux
index a84a3e186..1fbf47636 100644
--- a/stdlib/source/test/lux/math/logic/fuzzy.lux
+++ b/stdlib/source/test/lux/math/logic/fuzzy.lux
@@ -36,7 +36,7 @@
(def: simple
Test
- (do {! random.monad}
+ (do [! random.monad]
[sample random.rev
threshold_0 (\ ! each (r.% .5)
@@ -83,7 +83,7 @@
(def: composition
Test
- (do {! random.monad}
+ (do [! random.monad]
[sample random.rev
[bottom middle_bottom middle_top top]
@@ -167,7 +167,7 @@
Test
(<| (_.covering /._)
(_.for [/.Fuzzy])
- (do {! random.monad}
+ (do [! random.monad]
[sample random.rev
[bottom middle_bottom middle_top top]
diff --git a/stdlib/source/test/lux/math/number/complex.lux b/stdlib/source/test/lux/math/number/complex.lux
index c2b28e5ee..94a903f79 100644
--- a/stdlib/source/test/lux/math/number/complex.lux
+++ b/stdlib/source/test/lux/math/number/complex.lux
@@ -27,7 +27,7 @@
(def: dimension
(Random Frac)
- (do {! random.monad}
+ (do [! random.monad]
[factor (|> random.nat (\ ! each (|>> (n.% 1000) (n.max 1))))
measure (|> random.safe_frac (random.only (f.> +0.0)))]
(in (f.* (|> factor .int int.frac)
@@ -214,7 +214,7 @@
(def: trigonometry
Test
- (do {! random.monad}
+ (do [! random.monad]
[angle ..angle]
($_ _.and
(_.cover [/.sin /.asin]
@@ -226,7 +226,7 @@
(def: hyperbolic
Test
- (do {! random.monad}
+ (do [! random.monad]
[angle ..angle]
($_ _.and
(_.cover [/.sinh]
@@ -258,7 +258,7 @@
(def: root
Test
- (do {! random.monad}
+ (do [! random.monad]
[sample ..random
degree (|> random.nat (\ ! each (|>> (n.max 1) (n.% 5))))]
(_.cover [/.roots]
diff --git a/stdlib/source/test/lux/math/number/frac.lux b/stdlib/source/test/lux/math/number/frac.lux
index 6a6e6eb4f..baedf891a 100644
--- a/stdlib/source/test/lux/math/number/frac.lux
+++ b/stdlib/source/test/lux/math/number/frac.lux
@@ -50,7 +50,7 @@
(def: predicate
Test
- (do {! random.monad}
+ (do [! random.monad]
[sample ..random
shift (\ ! each /.abs ..random)]
($_ _.and
@@ -76,15 +76,15 @@
(def: conversion
Test
($_ _.and
- (do {! random.monad}
+ (do [! random.monad]
[expected (\ ! each (n.% 1,000,000) random.nat)]
(_.cover [/.nat]
(|> expected n.frac /.nat (n.= expected))))
- (do {! random.monad}
+ (do [! random.monad]
[expected (\ ! each (i.% +1,000,000) random.int)]
(_.cover [/.int]
(|> expected i.frac /.int (i.= expected))))
- (do {! random.monad}
+ (do [! random.monad]
[expected (\ ! each (|>> (i64.left_shifted 52) .rev)
random.nat)]
(_.cover [/.rev]
diff --git a/stdlib/source/test/lux/math/number/i16.lux b/stdlib/source/test/lux/math/number/i16.lux
index 83e09233d..6f35f015c 100644
--- a/stdlib/source/test/lux/math/number/i16.lux
+++ b/stdlib/source/test/lux/math/number/i16.lux
@@ -22,7 +22,7 @@
Test
(<| (_.covering /._)
(_.for [/.I16])
- (do {! random.monad}
+ (do [! random.monad]
[.let [limit (|> (-- /.width)
//i64.mask
.int
diff --git a/stdlib/source/test/lux/math/number/i32.lux b/stdlib/source/test/lux/math/number/i32.lux
index cfb0e3993..0548c3c86 100644
--- a/stdlib/source/test/lux/math/number/i32.lux
+++ b/stdlib/source/test/lux/math/number/i32.lux
@@ -22,7 +22,7 @@
Test
(<| (_.covering /._)
(_.for [/.I32])
- (do {! random.monad}
+ (do [! random.monad]
[.let [limit (|> (-- /.width)
//i64.mask
.int
diff --git a/stdlib/source/test/lux/math/number/i64.lux b/stdlib/source/test/lux/math/number/i64.lux
index 959cd7930..3a32cdd3b 100644
--- a/stdlib/source/test/lux/math/number/i64.lux
+++ b/stdlib/source/test/lux/math/number/i64.lux
@@ -20,7 +20,7 @@
(def: bit
Test
- (do {! random.monad}
+ (do [! random.monad]
[pattern random.nat
idx (\ ! each (n.% /.width) random.nat)]
($_ _.and
@@ -44,7 +44,7 @@
(def: shift
Test
- (do {! random.monad}
+ (do [! random.monad]
[pattern random.nat]
($_ _.and
(do !
@@ -72,7 +72,7 @@
(def: mask
Test
(<| (_.for [/.Mask])
- (do {! random.monad}
+ (do [! random.monad]
[pattern random.nat
idx (\ ! each (n.% /.width) random.nat)
signed random.int]
@@ -121,7 +121,7 @@
(def: sub
Test
(_.for [/.Sub]
- (do {! random.monad}
+ (do [! random.monad]
[size (\ ! each (n.% /.width) random.nat)]
(case (/.sub size)
#.None
@@ -129,7 +129,7 @@
(n.= 0 size))
(#.Some sub)
- (do {! random.monad}
+ (do [! random.monad]
[.let [limit (|> (-- (\ sub width))
/.mask
.int
@@ -163,7 +163,7 @@
Test
(<| (_.covering /._)
(_.for [.I64])
- (do {! random.monad}
+ (do [! random.monad]
[pattern random.nat
idx (\ ! each (n.% /.width) random.nat)]
($_ _.and
diff --git a/stdlib/source/test/lux/math/number/i8.lux b/stdlib/source/test/lux/math/number/i8.lux
index fc2562dd2..8eb7517f1 100644
--- a/stdlib/source/test/lux/math/number/i8.lux
+++ b/stdlib/source/test/lux/math/number/i8.lux
@@ -22,7 +22,7 @@
Test
(<| (_.covering /._)
(_.for [/.I8])
- (do {! random.monad}
+ (do [! random.monad]
[.let [limit (|> (-- /.width)
//i64.mask
.int
diff --git a/stdlib/source/test/lux/math/number/int.lux b/stdlib/source/test/lux/math/number/int.lux
index b2200f456..3313c5c0a 100644
--- a/stdlib/source/test/lux/math/number/int.lux
+++ b/stdlib/source/test/lux/math/number/int.lux
@@ -56,7 +56,7 @@
(def: predicate
Test
- (do {! random.monad}
+ (do [! random.monad]
[sample random.int]
($_ _.and
(_.cover [/.negative?]
@@ -134,7 +134,7 @@
(/.= (/.+ left (/.% left right))
(/.mod left right))))))
))
- (do {! random.monad}
+ (do [! random.monad]
[.let [random (|> random.int
(\ ! each (/.% +1,000))
(random.only (|>> (/.= +0) not)))]
@@ -176,13 +176,13 @@
(|> expected /.opposite /.opposite (/.= expected))]
(and subtraction!
inverse!))))
- (do {! random.monad}
+ (do [! random.monad]
[expected (\ ! each (/.% +1,000,000) random.int)
sample random.int]
(_.cover [/.frac]
(and (|> expected /.frac f.int (/.= expected))
(f.number? (/.frac sample)))))
- (do {! random.monad}
+ (do [! random.monad]
[pattern random.int
idx (\ ! each (n.% i64.width) random.nat)]
(_.cover [/.right_shifted]
diff --git a/stdlib/source/test/lux/math/number/nat.lux b/stdlib/source/test/lux/math/number/nat.lux
index 912b16bd4..2084821f7 100644
--- a/stdlib/source/test/lux/math/number/nat.lux
+++ b/stdlib/source/test/lux/math/number/nat.lux
@@ -54,7 +54,7 @@
(def: predicate
Test
- (do {! random.monad}
+ (do [! random.monad]
[sample random.nat]
($_ _.and
(_.cover [/.even? /.odd?]
@@ -103,7 +103,7 @@
(and (/.= div (/./ left right))
(/.= rem (/.% left right)))))
))
- (do {! random.monad}
+ (do [! random.monad]
[.let [random (\ ! each (|>> (/.% 1,000) ++) random.nat)]
left random
right random]
@@ -120,7 +120,7 @@
(and (/.= 0 (/.% left lcm))
(/.= 0 (/.% right lcm)))))
))
- (do {! random.monad}
+ (do [! random.monad]
[expected (\ ! each (/.% 1,000,000) random.nat)
sample random.nat]
(_.cover [/.frac]
diff --git a/stdlib/source/test/lux/math/number/rev.lux b/stdlib/source/test/lux/math/number/rev.lux
index 0398a55a2..bb379d597 100644
--- a/stdlib/source/test/lux/math/number/rev.lux
+++ b/stdlib/source/test/lux/math/number/rev.lux
@@ -82,13 +82,13 @@
(_.cover [/.-]
(and (/.= .0 (/.- sample sample))
(/.= sample (/.- .0 sample)))))
- (do {! random.monad}
+ (do [! random.monad]
[left random.rev
right random.rev]
(_.cover [/.*]
(and (/.< left (/.* left right))
(/.< right (/.* left right)))))
- (do {! random.monad}
+ (do [! random.monad]
[.let [dividend (\ ! each (i64.and (hex "FFFF"))
random.rev)
divisor (\ ! each (|>> (i64.and (hex "F"))
@@ -131,7 +131,7 @@
(/.ratio dividend)
(n.= scale)))
))
- (do {! random.monad}
+ (do [! random.monad]
[dividend random.rev
divisor (random.only (|>> (/.= .0) not)
random.rev)]
@@ -155,7 +155,7 @@
(_.cover [/.reciprocal]
(/.= (/.reciprocal sample)
(|> sample /.reciprocal .nat /.reciprocal .nat /.reciprocal))))
- (do {! random.monad}
+ (do [! random.monad]
[expected (\ ! each (|>> f.abs (f.% +1.0))
random.safe_frac)
sample random.rev]
diff --git a/stdlib/source/test/lux/meta.lux b/stdlib/source/test/lux/meta.lux
index 44cf528c9..5dac54f18 100644
--- a/stdlib/source/test/lux/meta.lux
+++ b/stdlib/source/test/lux/meta.lux
@@ -281,7 +281,7 @@
random.nat))
(def: context_related
- (do {! random.monad}
+ (do [! random.monad]
[target (random.ascii/upper 1)
version (random.ascii/upper 1)
source_code (random.ascii/upper 1)
@@ -340,7 +340,7 @@
(def: definition_related
Test
- (do {! random.monad}
+ (do [! random.monad]
[expected_current_module (random.ascii/upper 1)
expected_macro_module (random.only (|>> (text\= expected_current_module) not)
(random.ascii/upper 1))
@@ -456,7 +456,7 @@
(def: search_related
Test
- (do {! random.monad}
+ (do [! random.monad]
[expected_exported? random.bit
expected_current_module (random.ascii/upper 1)
expected_macro_module (random.only (|>> (text\= expected_current_module) not)
@@ -633,7 +633,7 @@
(def: tags_related
Test
- (do {! random.monad}
+ (do [! random.monad]
[current_module (random.ascii/upper 1)
tag_module (random.only (|>> (text\= current_module) not)
(random.ascii/upper 1))
@@ -745,7 +745,7 @@
(def: locals_related
Test
- (do {! random.monad}
+ (do [! random.monad]
[current_module (random.ascii/upper 1)
[name_0 name_1 name_2 name_3 name_4] (|> (random.ascii/upper 1)
(random.set text.hash 5)
@@ -889,7 +889,7 @@
(<| (_.covering /._)
(_.for [.Meta .Lux])
($_ _.and
- (do {! random.monad}
+ (do [! random.monad]
[target (random.ascii/upper 1)
version (random.ascii/upper 1)
source_code (random.ascii/upper 1)
diff --git a/stdlib/source/test/lux/meta/annotation.lux b/stdlib/source/test/lux/meta/annotation.lux
index 011cf788c..362fe1102 100644
--- a/stdlib/source/test/lux/meta/annotation.lux
+++ b/stdlib/source/test/lux/meta/annotation.lux
@@ -35,13 +35,13 @@
(def: (random_sequence random)
(All (_ a) (-> (Random a) (Random (List a))))
- (do {! random.monad}
+ (do [! random.monad]
[size (|> random.nat (\ ! each (nat.% 3)))]
(random.list size random)))
(def: (random_record random)
(All (_ a) (-> (Random a) (Random (List [a a]))))
- (do {! random.monad}
+ (do [! random.monad]
[size (|> random.nat (\ ! each (nat.% 3)))]
(random.list size (random.and random random))))
@@ -57,11 +57,11 @@
(def: typed_value
Test
- (do {! random.monad}
+ (do [! random.monad]
[key ..random_key]
(`` ($_ _.and
(~~ (template [<definition> <random> <constructor> <equivalence>]
- [(do {! random.monad}
+ [(do [! random.monad]
[expected <random>]
(_.cover [<definition>]
(|> expected <constructor>
@@ -86,7 +86,7 @@
(def: flag
Test
- (do {! random.monad}
+ (do [! random.monad]
[key ..random_key]
(`` ($_ _.and
(do !
@@ -117,7 +117,7 @@
Test
(<| (_.covering /._)
(_.for [/.Annotation])
- (do {! random.monad}
+ (do [! random.monad]
[key ..random_key]
($_ _.and
(do !
diff --git a/stdlib/source/test/lux/target/jvm.lux b/stdlib/source/test/lux/target/jvm.lux
index 66b20350a..82ae1e665 100644
--- a/stdlib/source/test/lux/target/jvm.lux
+++ b/stdlib/source/test/lux/target/jvm.lux
@@ -305,7 +305,7 @@
(template [<name> <bits> <type> <push> <wrap> <message> <to_long> <signed>]
[(def: <name>
Test
- (do {! random.monad}
+ (do [! random.monad]
[expected (\ ! each (i64.and (i64.mask <bits>)) random.nat)]
(<| (_.lifted <message>)
(..bytecode (for {@.old
@@ -383,7 +383,7 @@
instruction)))))
shift (: (-> (-> java/lang/Integer java/lang/Integer java/lang/Integer) (Bytecode Any) (Random Bit))
(function (_ reference instruction)
- (do {! random.monad}
+ (do [! random.monad]
[parameter (\ ! each (|>> (n.% 32) .int (:as java/lang/Long) ffi.long_to_int) random.nat)
subject ..$Integer::random]
(int (reference parameter subject)
@@ -462,7 +462,7 @@
instruction)))))
shift (: (-> (-> java/lang/Integer java/lang/Long java/lang/Long) (Bytecode Any) (Random Bit))
(function (_ reference instruction)
- (do {! random.monad}
+ (do [! random.monad]
[parameter (\ ! each (|>> (n.% 64) (:as java/lang/Long)) random.nat)
subject ..$Long::random]
(long (reference (ffi.long_to_int parameter) subject)
@@ -943,7 +943,7 @@
(-> a Any Bit)
Test))
(function (_ constructor random literal [*store *load *wrap] test)
- (do {! random.monad}
+ (do [! random.monad]
[size (\ ! each (|>> (n.% 1024) (n.max 1)) random.nat)
value random]
($_ _.and
@@ -1015,7 +1015,7 @@
(array (/.anewarray ..$String) $String::random $String::literal [/.aastore /.aaload /.nop]
(function (_ expected) (|>> (:as Text) (text\= (:as Text expected))))))
(<| (_.context "multi")
- (do {! random.monad}
+ (do [! random.monad]
[.let [size (\ ! each (|>> (n.% 5) (n.+ 1))
random.nat)]
dimensions size
@@ -1029,7 +1029,7 @@
_ (recur (-- dimensions) (/type.array type))))]]
(<| (_.lifted "MULTIANEWARRAY")
(..bytecode (|>> (:as Nat) (n.= sizesH)))
- (do {! /.monad}
+ (do [! /.monad]
[_ (monad.each ! (|>> (:as java/lang/Long) ffi.long_to_int ..$Integer::literal)
(#.Item sizesH sizesT))
_ (/.multianewarray type (|> dimensions /unsigned.u1 try.trusted))
@@ -1127,7 +1127,7 @@
(-> a (-> Any Bit))
(Random Bit)))
(function (_ random_value literal *wrap [store load] test)
- (do {! random.monad}
+ (do [! random.monad]
[expected random_value
register (\ ! each (n.% 128) random.nat)]
(<| (..bytecode (test expected))
@@ -1151,7 +1151,7 @@
(_.lifted "ISTORE/ILOAD"
(store_and_load ..$Integer::random ..$Integer::literal ..$Integer::wrap [/.istore /.iload] test))
(_.lifted "IINC"
- (do {! random.monad}
+ (do [! random.monad]
[base ..$Byte::random
increment (\ ! each (|>> (n.% 100) /unsigned.u1 try.trusted)
random.nat)
@@ -1474,7 +1474,7 @@
Test
($_ _.and
(<| (_.lifted "TABLESWITCH")
- (do {! random.monad}
+ (do [! random.monad]
[expected ..$Long::random
dummy ..$Long::random
minimum (\ ! each (|>> (n.% 100) .int /signed.s4 try.trusted)
@@ -1495,7 +1495,7 @@
_ (/.set_label @return)]
..$Long::wrap))
(<| (_.lifted "LOOKUPSWITCH")
- (do {! random.monad}
+ (do [! random.monad]
[options (\ ! each (|>> (n.% 10) (n.+ 1))
random.nat)
choice (\ ! each (n.% options) random.nat)
diff --git a/stdlib/source/test/lux/test.lux b/stdlib/source/test/lux/test.lux
index a28c37cf7..f4f9477eb 100644
--- a/stdlib/source/test/lux/test.lux
+++ b/stdlib/source/test/lux/test.lux
@@ -30,7 +30,7 @@
(def: assertion
/.Test
- (do {! random.monad}
+ (do [! random.monad]
[expected_message/0 (random.ascii/lower 5)
expected_message/1 (random.only (|>> (text\= expected_message/0) not)
(random.ascii/lower 5))]
@@ -63,7 +63,7 @@
(def: seed
/.Test
- (do {! random.monad}
+ (do [! random.monad]
[seed random.nat
.let [[read write] (: [(async.Async Nat) (async.Resolver Nat)]
(async.async []))]
@@ -90,7 +90,7 @@
(def: times
/.Test
($_ /.and
- (do {! random.monad}
+ (do [! random.monad]
[times_assertion (/.times 0 (/.test "" true))]
(in (do async.monad
[[tally error] times_assertion]
@@ -98,7 +98,7 @@
(and (text.contains? (value@ #exception.label /.must_try_test_at_least_once) error)
(n.= 0 (value@ #/.successes tally))
(n.= 1 (value@ #/.failures tally)))))))
- (do {! random.monad}
+ (do [! random.monad]
[expected (\ ! each (|>> (n.% 10) ++) random.nat)
.let [counter (: (Atom Nat)
(atom.atom 0))]
@@ -119,7 +119,7 @@
(def: in_parallel
/.Test
($_ /.and
- (do {! random.monad}
+ (do [! random.monad]
[expected (\ ! each (|>> (n.% 10) ++) random.nat)
.let [counter (: (Atom Nat)
(atom.atom 0))]
@@ -137,7 +137,7 @@
(and (n.= expected actual)
(n.= expected (value@ #/.successes tally))
(n.= 0 (value@ #/.failures tally)))))))
- (do {! random.monad}
+ (do [! random.monad]
[expected (\ ! each (|>> (n.% 10) ++) random.nat)
.let [counter (: (Atom Nat)
(atom.atom 0))]
@@ -219,7 +219,7 @@
/.Test
(<| (/.covering /._)
(/.for [/.Test])
- (do {! random.monad}
+ (do [! random.monad]
[expected_context (random.ascii/lower 5)
expected_message/0 (random.only (|>> (text\= expected_context) not)
(random.ascii/lower 5))
diff --git a/stdlib/source/test/lux/time.lux b/stdlib/source/test/lux/time.lux
index 50d0a82b8..70e3204e6 100644
--- a/stdlib/source/test/lux/time.lux
+++ b/stdlib/source/test/lux/time.lux
@@ -47,7 +47,7 @@
(def: for_clock
Test
- (do {! random.monad}
+ (do [! random.monad]
[expected random.time]
(_.cover [/.clock /.time]
(|> expected
@@ -58,7 +58,7 @@
(def: for_ranges
Test
- (do {! random.monad}
+ (do [! random.monad]
[valid_hour (\ ! each (|>> (n.% /.hours) (n.max 10)) random.nat)
valid_minute (\ ! each (|>> (n.% /.minutes) (n.max 10)) random.nat)
valid_second (\ ! each (|>> (n.% /.seconds) (n.max 10)) random.nat)
@@ -110,7 +110,7 @@
Test
(<| (_.covering /._)
(_.for [/.Time])
- (do {! random.monad}
+ (do [! random.monad]
[.let [day (.nat (duration.millis duration.day))]
expected random.time
diff --git a/stdlib/source/test/lux/time/date.lux b/stdlib/source/test/lux/time/date.lux
index 83eafabf9..3cf3750e7 100644
--- a/stdlib/source/test/lux/time/date.lux
+++ b/stdlib/source/test/lux/time/date.lux
@@ -76,7 +76,7 @@
(<text>.result /.parser)
(try\each (\ /.equivalence = expected))
(try.else false))))
- (do {! random.monad}
+ (do [! random.monad]
[year (\ ! each (|>> (n.% 10,000) ++)
random.nat)
month (\ ! each (|>> (n.% 10) (n.+ 13))
diff --git a/stdlib/source/test/lux/time/duration.lux b/stdlib/source/test/lux/time/duration.lux
index 72bf426fc..f0caba5e0 100644
--- a/stdlib/source/test/lux/time/duration.lux
+++ b/stdlib/source/test/lux/time/duration.lux
@@ -63,7 +63,7 @@
factor random.nat]
(_.cover [/.up /.down]
(|> /.milli_second (/.up factor) (/.down factor) (\= /.milli_second))))
- (do {! random.monad}
+ (do [! random.monad]
[.let [(^open "\.") /.order
positive (|> random.duration
(random.only (|>> (\= /.empty) not))
diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/case.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/case.lux
index 9f9a5f000..64aa4c58f 100644
--- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/case.lux
+++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/case.lux
@@ -62,7 +62,7 @@
(^template [<tag> <gen> <wrapper>]
[[_ (<tag> _)]
(if allow_literals?
- (do {! r.monad}
+ (do [! r.monad]
[?sample (r.maybe <gen>)]
(case ?sample
(#.Some sample)
@@ -83,7 +83,7 @@
(r\in (list (' [])))
[_ (#.Tuple members)]
- (do {! r.monad}
+ (do [! r.monad]
[member_wise_patterns (monad.each ! (exhaustive_branches allow_literals? variantTC) members)]
(in (|> member_wise_patterns
exhaustive_weaving
@@ -93,7 +93,7 @@
(r\in (list (' {})))
[_ (#.Record kvs)]
- (do {! r.monad}
+ (do [! r.monad]
[.let [ks (list\each product.left kvs)
vs (list\each product.right kvs)]
member_wise_patterns (monad.each ! (exhaustive_branches allow_literals? variantTC) vs)]
@@ -102,7 +102,7 @@
(list\each (|>> (list.zipped/2 ks) code.record)))))
(^ [_ (#.Form (list [_ (#.Tag _)] _))])
- (do {! r.monad}
+ (do [! r.monad]
[bundles (monad.each !
(function (_ [_tag _code])
(do !
@@ -122,12 +122,12 @@
(function (_ input)
($_ r.either
(r\each product.right _primitive.primitive)
- (do {! r.monad}
+ (do [! r.monad]
[choice (|> r.nat (\ ! each (n.% (list.size variant_tags))))
.let [choiceT (maybe.trusted (list.item choice variant_tags))
choiceC (maybe.trusted (list.item choice primitivesC))]]
(in (` ((~ choiceT) (~ choiceC)))))
- (do {! r.monad}
+ (do [! r.monad]
[size (|> r.nat (\ ! each (n.% 3)))
elems (r.list size input)]
(in (code.tuple elems)))
@@ -140,7 +140,7 @@
(def: .public test
(<| (_.context (name.module (name_of /._)))
- (do {! r.monad}
+ (do [! r.monad]
[module_name (r.unicode 5)
variant_name (r.unicode 5)
record_name (|> (r.unicode 5) (r.only (|>> (text\= variant_name) not)))
diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/function.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/function.lux
index 55e7925fb..229e27bee 100644
--- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/function.lux
+++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/function.lux
@@ -80,7 +80,7 @@
))))
(def: apply
- (do {! r.monad}
+ (do [! r.monad]
[full_args (|> r.nat (\ ! each (|>> (n.% 10) (n.max 2))))
partial_args (|> r.nat (\ ! each (n.% full_args)))
var_idx (|> r.nat (\ ! each (|>> (n.% full_args) (n.max 1))))
diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/reference.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/reference.lux
index 1bbec4721..d33dcef00 100644
--- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/reference.lux
+++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/reference.lux
@@ -50,7 +50,7 @@
(def: (reach_test var_name [export? def_module] [import? dependent_module] check!)
(-> Text [Bit Text] [Bit Text] Check Bit)
- (|> (do {! phase.monad}
+ (|> (do [! phase.monad]
[_ (//module.with_module 0 def_module
(//module.define var_name (#.Right [export? Any (' {}) []])))]
(//module.with_module 0 dependent_module
diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/structure.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/structure.lux
index 5f1f89442..27fc4ac73 100644
--- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/structure.lux
+++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/structure.lux
@@ -118,7 +118,7 @@
false)))
(def: sum
- (do {! r.monad}
+ (do [! r.monad]
[size (|> r.nat (\ ! each (|>> (n.% 10) (n.max 2))))
choice (|> r.nat (\ ! each (n.% size)))
primitives (r.list size _primitive.primitive)
@@ -170,7 +170,7 @@
))))
(def: product
- (do {! r.monad}
+ (do [! r.monad]
[size (|> r.nat (\ ! each (|>> (n.% 10) (n.max 2))))
primitives (r.list size _primitive.primitive)
choice (|> r.nat (\ ! each (n.% size)))
@@ -230,7 +230,7 @@
))))
(def: variant
- (do {! r.monad}
+ (do [! r.monad]
[size (|> r.nat (\ ! each (|>> (n.% 10) (n.max 2))))
tags (|> (r.set text.hash size (r.unicode 5)) (\ ! each set.list))
choice (|> r.nat (\ ! each (n.% size)))
@@ -276,7 +276,7 @@
))))
(def: record
- (do {! r.monad}
+ (do [! r.monad]
[size (|> r.nat (\ ! each (|>> (n.% 10) (n.max 2))))
tags (|> (r.set text.hash size (r.unicode 5)) (\ ! each set.list))
primitives (r.list size _primitive.primitive)
diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux
index 4a6dc9af2..7e1c56eb0 100644
--- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux
+++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux
@@ -72,7 +72,7 @@
(def: i64
Test
- (do {! r.monad}
+ (do [! r.monad]
[subjectC (|> r.nat (\ ! each code.nat))
signedC (|> r.int (\ ! each code.int))
paramC (|> r.nat (\ ! each code.nat))]
@@ -99,7 +99,7 @@
(def: int
Test
- (do {! r.monad}
+ (do [! r.monad]
[subjectC (|> r.int (\ ! each code.int))
paramC (|> r.int (\ ! each code.int))]
($_ _.and
@@ -119,7 +119,7 @@
(def: frac
Test
- (do {! r.monad}
+ (do [! r.monad]
[subjectC (|> r.safe_frac (\ ! each code.frac))
paramC (|> r.safe_frac (\ ! each code.frac))
encodedC (|> r.safe_frac (\ ! each (|>> %.frac code.text)))]
@@ -154,7 +154,7 @@
(def: text
Test
- (do {! r.monad}
+ (do [! r.monad]
[subjectC (|> (r.unicode 5) (\ ! each code.text))
paramC (|> (r.unicode 5) (\ ! each code.text))
replacementC (|> (r.unicode 5) (\ ! each code.text))
@@ -179,7 +179,7 @@
(def: io
Test
- (do {! r.monad}
+ (do [! r.monad]
[logC (|> (r.unicode 5) (\ ! each code.text))
exitC (|> r.int (\ ! each code.int))]
($_ _.and
diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/case.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/case.lux
index 382758101..7b2b5de92 100644
--- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/case.lux
+++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/case.lux
@@ -41,7 +41,7 @@
(def: masking_test
Test
- (do {! random.monad}
+ (do [! random.monad]
[maskedA //primitive.primitive
temp (|> random.nat (\ ! each (n.% 100)))
.let [maskA (analysis.control/case
@@ -109,7 +109,7 @@
(def: random_member
(Random synthesis.Member)
- (do {! random.monad}
+ (do [! random.monad]
[lefts (|> random.nat (\ ! each (n.% 10)))
right? random.bit]
(in (if right?
@@ -118,7 +118,7 @@
(def: random_path
(Random (analysis.Tuple synthesis.Member))
- (do {! random.monad}
+ (do [! random.monad]
[size_1 (|> random.nat (\ ! each (|>> (n.% 10) ++)))]
(random.list size_1 ..random_member)))
@@ -144,7 +144,7 @@
(def: get_test
Test
- (do {! random.monad}
+ (do [! random.monad]
[recordA (|> random.nat
(\ ! each (|>> analysis.nat))
(random.list 10)
@@ -167,7 +167,7 @@
(def: random_bit
(Random [Path Match])
- (do {! random.monad}
+ (do [! random.monad]
[test random.bit
then random.nat
else random.nat]
@@ -194,7 +194,7 @@
(template [<name> <hash> <random> <path> <synthesis> <pattern> <analysis>]
[(def: <name>
(Random [Path Match])
- (do {! random.monad}
+ (do [! random.monad]
[[test/0 test/1 test/2 test/3 test/4] (random_five <hash> <random>)
[body/0 body/1 body/2 body/3 body/4] (random_five <hash> <random>)]
(in [($_ #synthesis.Alt
@@ -228,7 +228,7 @@
(def: random_variant
(Random [Path Match])
- (do {! random.monad}
+ (do [! random.monad]
[[lefts/0 lefts/1 lefts/2 lefts/3 lefts/4] (random_five n.hash random.nat)
[value/0 value/1 value/2 value/3 value/4] (random_five text.hash (random.unicode 1))
last_is_right? random.bit
@@ -261,7 +261,7 @@
(def: random_tuple
(Random [Path Match])
- (do {! random.monad}
+ (do [! random.monad]
[mid_size (\ ! each (n.% 4) random.nat)
value/first (random.unicode 1)
@@ -327,7 +327,7 @@
(def: case_test
Test
- (do {! random.monad}
+ (do [! random.monad]
[expected_input (\ ! each (|>> .i64 synthesis.i64) random.nat)
[expected_path match] ..random_case]
(_.cover [/.synthesize_case]
diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/function.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/function.lux
index a975fc269..5cfa2b66e 100644
--- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/function.lux
+++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/function.lux
@@ -88,7 +88,7 @@
(template [<name> <random> <synthesis> <analysis>]
[(def: (<name> output?)
Scenario
- (do {! random.monad}
+ (do [! random.monad]
[value <random>]
(in [true
(<synthesis> value)
@@ -114,7 +114,7 @@
(def: (random_variant random_value output?)
(-> Scenario Scenario)
- (do {! random.monad}
+ (do [! random.monad]
[lefts random.nat
right? random.bit
[loop? expected_value actual_value] (random_value false)]
@@ -130,7 +130,7 @@
(def: (random_tuple random_value output?)
(-> Scenario Scenario)
- (do {! random.monad}
+ (do [! random.monad]
[[loop?_left expected_left actual_left] (random_value false)
[loop?_right expected_right actual_right] (random_value false)]
(in [(and loop?_left
@@ -146,7 +146,7 @@
(def: (random_variable arity output?)
(-> Arity Scenario)
- (do {! random.monad}
+ (do [! random.monad]
[register (\ ! each (|>> (n.% arity) ++) random.nat)]
(in [(not (n.= 0 register))
(synthesis.variable/local register)
@@ -156,7 +156,7 @@
(def: (random_constant output?)
Scenario
- (do {! random.monad}
+ (do [! random.monad]
[module (random.unicode 1)
short (random.unicode 1)]
(in [true
@@ -170,7 +170,7 @@
(def: (random_case arity random_value output?)
(-> Arity Scenario Scenario)
- (do {! random.monad}
+ (do [! random.monad]
[bit_test random.bit
i64_test random.nat
f64_test random.frac
@@ -238,7 +238,7 @@
(def: (random_let arity random_value output?)
(-> Arity Scenario Scenario)
- (do {! random.monad}
+ (do [! random.monad]
[[loop?_input expected_input actual_input] (random_value false)
[loop?_output expected_output actual_output] (random_value output?)]
(in [(and loop?_input
@@ -253,7 +253,7 @@
(def: (random_if random_value output?)
(-> Scenario Scenario)
- (do {! random.monad}
+ (do [! random.monad]
[[loop?_test expected_test actual_test] (random_value false)
[loop?_then expected_then actual_then] (random_value output?)
[loop?_else expected_else actual_else] (random_value output?)
@@ -278,7 +278,7 @@
(def: (random_get random_value output?)
(-> Scenario Scenario)
- (do {! random.monad}
+ (do [! random.monad]
[lefts (|> random.nat (\ ! each (n.% 10)))
right? random.bit
[loop?_record expected_record actual_record] (random_value false)]
@@ -305,7 +305,7 @@
(def: (random_recur arity random_value output?)
(-> Arity Scenario Scenario)
- (do {! random.monad}
+ (do [! random.monad]
[resets (random.list arity (random_value false))]
(in [true
(synthesis.loop/recur (list\each (|>> product.right product.left) resets))
@@ -316,7 +316,7 @@
(def: (random_scope arity output?)
(-> Arity Scenario)
- (do {! random.monad}
+ (do [! random.monad]
[resets (random.list arity (..random_variable arity output?))
[_ expected_output actual_output] (..random_nat output?)]
(in [(list\mix (function (_ new old)
@@ -341,7 +341,7 @@
(def: (random_abstraction' output?)
Scenario
- (do {! random.monad}
+ (do [! random.monad]
[[loop?_output expected_output actual_output] (..random_nat output?)
arity (|> random.nat (\ ! each (|>> (n.% 5) ++)))
.let [environment ($_ list\composite
@@ -361,7 +361,7 @@
(def: (random_apply random_value output?)
(-> Scenario Scenario)
- (do {! random.monad}
+ (do [! random.monad]
[[loop?_abstraction expected_abstraction actual_abstraction] (..random_nat output?)
arity (|> random.nat (\ ! each (|>> (n.% 5) ++)))
inputs (random.list arity (random_value false))]
@@ -393,7 +393,7 @@
(def: (random_extension random_value output?)
(-> Scenario Scenario)
- (do {! random.monad}
+ (do [! random.monad]
[name (random.unicode 1)
[loop?_first expected_first actual_first] (random_value false)
[loop?_second expected_second actual_second] (random_value false)
@@ -418,7 +418,7 @@
(def: random_abstraction
(Random [Synthesis Analysis])
- (do {! random.monad}
+ (do [! random.monad]
[arity (|> random.nat (\ ! each (|>> (n.% 5) ++)))
[loop? expected_body actual_body] (random_body arity true)]
(in [(..n_function loop? arity expected_body)
@@ -437,7 +437,7 @@
(def: application
Test
- (do {! random.monad}
+ (do [! random.monad]
[arity (|> random.nat (\ ! each (|>> (n.% 10) (n.max 1))))
funcA //primitive.primitive
argsA (random.list arity //primitive.primitive)]
diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/loop.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/loop.lux
index 652465a83..486dfa570 100644
--- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/loop.lux
+++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/loop.lux
@@ -30,7 +30,7 @@
(Scenario Synthesis)
(`` ($_ random.either
(~~ (template [<synthesis> <random>]
- [(do {! random.monad}
+ [(do [! random.monad]
[example (\ ! each (|>> <synthesis>) <random>)]
(in [next
[example
@@ -54,7 +54,7 @@
(def: (variable offset arity next)
(Scenario Variable)
- (let [local (do {! random.monad}
+ (let [local (do [! random.monad]
[register (\ ! each (|>> (n.% arity) ++) random.nat)]
(in [next
[(#variable.Local (/.register_optimization offset register))
@@ -63,7 +63,7 @@
0 local
_ ($_ random.either
local
- (do {! random.monad}
+ (do [! random.monad]
[foreign (\ ! each (n.% offset) random.nat)]
(in [next
[(#variable.Local foreign)
@@ -73,7 +73,7 @@
(Scenario Synthesis)
(`` ($_ random.either
(~~ (template [<tag> <random>]
- [(do {! random.monad}
+ [(do [! random.monad]
[[next [exampleE exampleA]] (<random> offset arity next)]
(in [next
[(<tag> exampleE)
@@ -86,7 +86,7 @@
(def: (structure offset arity next)
(Scenario Synthesis)
($_ random.either
- (do {! random.monad}
+ (do [! random.monad]
[lefts random.nat
right? random.bit
[next [valueE valueA]] (..reference offset arity next)]
@@ -99,7 +99,7 @@
[#analysis.lefts lefts
#analysis.right? right?
#analysis.value valueA])]]))
- (do {! random.monad}
+ (do [! random.monad]
[[next [leftE leftA]] (..reference offset arity next)
[next [rightE rightA]] (..reference offset arity next)]
(in [next
@@ -116,7 +116,7 @@
[//.path/pop
//.path/pop]])
(~~ (template [<path> <random>]
- [(do {! random.monad}
+ [(do [! random.monad]
[example (\ ! each (|>> <path>) <random>)]
(in [next
[example
@@ -128,7 +128,7 @@
[//.path/text (random.unicode 1)]
))
(~~ (template [<path>]
- [(do {! random.monad}
+ [(do [! random.monad]
[example (\ ! each (|>> <path>)
(random.or random.nat
random.nat))]
@@ -166,13 +166,13 @@
random.nat))]
($_ random.either
($_ random.either
- (do {! random.monad}
+ (do [! random.monad]
[[next [inputE inputA]] (..reference offset arity next)
[next [bodyE bodyA]] (..reference offset arity next)]
(in [next
[(//.branch/let [inputE (/.register_optimization offset next) bodyE])
(//.branch/let [inputA next bodyA])]]))
- (do {! random.monad}
+ (do [! random.monad]
[[next [testE testA]] (..reference offset arity next)
[next [thenE thenA]] (..reference offset arity next)
[next [elseE elseA]] (..reference offset arity next)]
@@ -180,14 +180,14 @@
[(//.branch/if [testE thenE elseE])
(//.branch/if [testA thenA elseA])]])))
($_ random.either
- (do {! random.monad}
+ (do [! random.monad]
[[next [recordE recordA]] (..reference offset arity next)
path_length (\ ! each (|>> (n.% 5) ++) random.nat)
path (random.list path_length random_member)]
(in [next
[(//.branch/get [path recordE])
(//.branch/get [path recordA])]]))
- (do {! random.monad}
+ (do [! random.monad]
[[next [inputE inputA]] (..reference offset arity next)
[next [pathE pathA]] (..path offset arity next)]
(in [next
@@ -216,7 +216,7 @@
(def: (function offset arity next)
(Scenario Synthesis)
($_ random.either
- (do {! random.monad}
+ (do [! random.monad]
[[next [firstE firstA]] (..variable offset arity next)
[next [secondE secondA]] (..variable offset arity next)
arity (\ ! each (n.max 1) random.nat)
@@ -265,7 +265,7 @@
Test
(<| (_.covering /._)
($_ _.and
- (do {! random.monad}
+ (do [! random.monad]
[expected_offset (\ ! each (|>> (n.% 5) (n.+ 2)) random.nat)
arity (\ ! each (|>> (n.% 5) ++) random.nat)
expected_inits (|> random.nat
diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/structure.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/structure.lux
index 3ff107daa..b132e1027 100644
--- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/structure.lux
+++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/structure.lux
@@ -35,7 +35,7 @@
(def: variant
Test
- (do {! r.monad}
+ (do [! r.monad]
[size (|> r.nat (\ ! each (|>> (n.% 10) (n.+ 2))))
tagA (|> r.nat (\ ! each (n.% size)))
.let [right? (n.= (-- size) tagA)
@@ -58,7 +58,7 @@
(def: tuple
Test
- (do {! r.monad}
+ (do [! r.monad]
[size (|> r.nat (\ ! each (|>> (n.% 10) (n.max 2))))
membersA (r.list size //primitive.primitive)]
(_.test "Can synthesize tuple."
diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/variable.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/variable.lux
index 531c792e5..7f6ed6bc5 100644
--- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/variable.lux
+++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/variable.lux
@@ -44,7 +44,7 @@
(template [<name> <synthesis> <random>]
[(def: (<name> context)
(Scenario Synthesis)
- (do {! random.monad}
+ (do [! random.monad]
[value <random>]
(in [(<synthesis> value)
(<synthesis> value)])))]
@@ -64,7 +64,7 @@
(def: (with_redundancy scenario context)
(-> (Scenario Synthesis) (Scenario Synthesis))
- (do {! random.monad}
+ (do [! random.monad]
[redundant? random.bit]
(if redundant?
(do !
@@ -86,7 +86,7 @@
(def: (variant_scenario scenario context)
(-> (Scenario Synthesis) (Scenario Synthesis))
- (do {! random.monad}
+ (do [! random.monad]
[lefts random.nat
right? random.bit
[expected input] (scenario context)]
@@ -142,7 +142,7 @@
(def: (get_scenario scenario context)
(-> (Scenario Synthesis) (Scenario Synthesis))
- (do {! random.monad}
+ (do [! random.monad]
[length (\ ! each (|>> (n.% 5) ++) random.nat)
path (random.list length ..random_member)
[expected_record actual_record] (scenario context)]
@@ -157,14 +157,14 @@
(-> (Scenario Synthesis) (Scenario Path))
(`` ($_ random.either
($_ random.either
- (do {! random.monad}
+ (do [! random.monad]
[_ (in [])
[expected_then actual_then] (scenario context)]
(in [(#synthesis.Seq #synthesis.Pop
(#synthesis.Then expected_then))
(#synthesis.Seq #synthesis.Pop
(#synthesis.Then actual_then))]))
- (do {! random.monad}
+ (do [! random.monad]
[_ (in [])
.let [real_register (dictionary.size (value@ #necessary context))
fake_register (n.+ (value@ #redundants context)
@@ -178,7 +178,7 @@
(#synthesis.Then actual_then)))])))
($_ random.either
(~~ (template [<tag> <random>]
- [(do {! random.monad}
+ [(do [! random.monad]
[test <random>
[expected_then actual_then] (scenario context)]
(in [(#synthesis.Seq (#synthesis.Test (<tag> test))
@@ -192,21 +192,21 @@
[#synthesis.Text (random.unicode 1)]
)))
($_ random.either
- (do {! random.monad}
+ (do [! random.monad]
[side ..random_side
[expected_next actual_next] (path_scenario scenario context)]
(in [(#synthesis.Seq (#synthesis.Access (#synthesis.Side side))
expected_next)
(#synthesis.Seq (#synthesis.Access (#synthesis.Side side))
actual_next)]))
- (do {! random.monad}
+ (do [! random.monad]
[member ..random_member
[expected_next actual_next] (path_scenario scenario context)]
(in [(#synthesis.Seq (#synthesis.Access (#synthesis.Member member))
expected_next)
(#synthesis.Seq (#synthesis.Access (#synthesis.Member member))
actual_next)])))
- (do {! random.monad}
+ (do [! random.monad]
[_ (in [])
[expected_left actual_left] (path_scenario scenario context)
[expected_right actual_right] (path_scenario scenario context)]
@@ -216,7 +216,7 @@
(def: (case_scenario scenario context)
(-> (Scenario Synthesis) (Scenario Synthesis))
- (do {! random.monad}
+ (do [! random.monad]
[_ (in [])
[expected_input actual_input] (scenario context)
[expected_path actual_path] (..path_scenario scenario context)]
@@ -236,7 +236,7 @@
(def: (scope_scenario scenario context)
(-> (Scenario Synthesis) (Scenario Synthesis))
- (do {! random.monad}
+ (do [! random.monad]
[_ (in [])
.let [real_start (dictionary.size (value@ #necessary context))
fake_start (n.+ (value@ #redundants context)
@@ -256,7 +256,7 @@
(def: (recur_scenario scenario context)
(-> (Scenario Synthesis) (Scenario Synthesis))
- (do {! random.monad}
+ (do [! random.monad]
[_ (in [])
resets (random.list ..scope_arity (scenario context))]
(in [(synthesis.loop/recur (list\each product.left resets))
@@ -271,7 +271,7 @@
(def: (abstraction_scenario scenario context)
(-> (Scenario Synthesis) (Scenario Synthesis))
- (do {! random.monad}
+ (do [! random.monad]
[_ (in [])
.let [registers (dictionary.entries (value@ #necessary context))
expected_environment (list\each (|>> product.left #variable.Local) registers)
@@ -282,7 +282,7 @@
(def: (apply_scenario scenario context)
(-> (Scenario Synthesis) (Scenario Synthesis))
- (do {! random.monad}
+ (do [! random.monad]
[abstraction (\ ! each (|>> synthesis.constant)
(random.and (random.unicode 1)
(random.unicode 1)))
diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/syntax.lux b/stdlib/source/test/lux/tool/compiler/language/lux/syntax.lux
index b9709c14e..36cd99322 100644
--- a/stdlib/source/test/lux/tool/compiler/language/lux/syntax.lux
+++ b/stdlib/source/test/lux/tool/compiler/language/lux/syntax.lux
@@ -26,7 +26,7 @@
(def: name_part^
(Random Text)
- (do {! r.monad}
+ (do [! r.monad]
[size (|> r.nat (\ ! each (|>> (n.% 20) (n.max 1))))]
(r.ascii/lower_alpha size)))
@@ -73,7 +73,7 @@
(def: code
Test
- (do {! r.monad}
+ (do [! r.monad]
[sample code^]
($_ _.and
(_.test "Can parse Lux code."
diff --git a/stdlib/source/test/lux/type.lux b/stdlib/source/test/lux/type.lux
index ec32d7fe8..0ffd8ca7f 100644
--- a/stdlib/source/test/lux/type.lux
+++ b/stdlib/source/test/lux/type.lux
@@ -37,7 +37,7 @@
(def: short
(Random Text)
- (do {! random.monad}
+ (do [! random.monad]
[size (|> random.nat (\ ! each (n.% 10)))]
(random.unicode size)))
@@ -79,7 +79,7 @@
(_.for [/.equivalence]
($equivalence.spec /.equivalence (..random 0)))
- (do {! random.monad}
+ (do [! random.monad]
[anonymousT (random.only (|>> (case> (#.Named _ _) false
_ true))
(..random 0))
@@ -92,7 +92,7 @@
(\ /.equivalence = namedT (/.de_aliased aliasedT)))
(_.cover [/.anonymous]
(\ /.equivalence = anonymousT (/.anonymous aliasedT)))))
- (do {! random.monad}
+ (do [! random.monad]
[size (|> random.nat (\ ! each (n.% 3)))
members (|> (..random 0)
(random.only (function (_ type)
@@ -126,7 +126,7 @@
(in (\ /.equivalence = full (#.Product Bit Int)))))
(|> (/.applied (list Bit) Text)
(case> #.None #1 _ #0))))
- (do {! random.monad}
+ (do [! random.monad]
[size (|> random.nat (\ ! each (n.% 3)))
members (monad.all ! (list.repeated size (..random 0)))
extra (|> (..random 0)
@@ -148,7 +148,7 @@
(let [[tfunc tparams] (|> extra (/.application members) /.flat_application)]
(n.= (list.size members) (list.size tparams))))
))
- (do {! random.monad}
+ (do [! random.monad]
[size (|> random.nat (\ ! each (|>> (n.% 3) ++)))
body_type (|> (..random 0)
(random.only (function (_ type)
@@ -174,7 +174,7 @@
(|> body_type (/.univ_q size) /.quantified?)
(|> body_type (/.ex_q size) /.quantified?)))
)))
- (do {! random.monad}
+ (do [! random.monad]
[depth (|> random.nat (\ ! each (|>> (n.% 3) ++)))
element_type (|> (..random 0)
(random.only (function (_ type)
diff --git a/stdlib/source/test/lux/type/check.lux b/stdlib/source/test/lux/type/check.lux
index d88cd4c95..1a3d50373 100644
--- a/stdlib/source/test/lux/type/check.lux
+++ b/stdlib/source/test/lux/type/check.lux
@@ -414,7 +414,7 @@
(def: (build_ring tail_size)
(-> Nat (/.Check [Type (List Type) Type]))
- (do {! /.monad}
+ (do [! /.monad]
[[id/head var/head] /.var
var/tail+ (monad.each ! (function (_ _)
(do !
@@ -436,7 +436,7 @@
(succeeds? (..build_ring tail_size))
can_bind_rings_of_variables!
- (succeeds? (do {! /.monad}
+ (succeeds? (do [! /.monad]
[[var/head var/tail+ var/last] (..build_ring tail_size)
_ (/.check var/head nominal/0)
failures (monad.each ! (|>> (/.check nominal/1) ..verdict) (list& var/head var/tail+))
@@ -445,7 +445,7 @@
(list.every? (bit\= true) successes)))))
can_merge_multiple_rings_of_variables!
- (succeeds? (do {! /.monad}
+ (succeeds? (do [! /.monad]
[[var/head/0 var/tail+/0 var/last/0] (..build_ring tail_size)
[var/head/1 var/tail+/1 var/last/1] (..build_ring tail_size)
_ (/.check var/head/0 var/head/1)
@@ -610,7 +610,7 @@
(def: check
Test
- (do {! random.monad}
+ (do [! random.monad]
[nominal ..nominal
[name/0 name/1] (..non_twins text\= (random.ascii/upper 10))
[parameter/0 parameter/1] (..non_twins type\= ..nominal)
@@ -657,13 +657,13 @@
[#.Function]
[#.Apply]
))
- (do {! random.monad}
+ (do [! random.monad]
[name (random.ascii/upper 10)
parameterT dirty_type]
(in (function (_ holeT)
(#.Primitive name (list (parameterT holeT))))))
(~~ (template [<tag>]
- [(do {! random.monad}
+ [(do [! random.monad]
[funcT dirty_type
argT dirty_type
body random.nat]
diff --git a/stdlib/source/test/lux/type/implicit.lux b/stdlib/source/test/lux/type/implicit.lux
index 88308baf4..ba60470c7 100644
--- a/stdlib/source/test/lux/type/implicit.lux
+++ b/stdlib/source/test/lux/type/implicit.lux
@@ -24,7 +24,7 @@
(def: .public test
Test
(<| (_.covering /._)
- (do {! random.monad}
+ (do [! random.monad]
[.let [digit (\ ! each (n.% 10) random.nat)]
left digit
right digit
diff --git a/stdlib/source/test/lux/type/poly/equivalence.lux b/stdlib/source/test/lux/type/poly/equivalence.lux
index 551b0118c..8e03475f4 100644
--- a/stdlib/source/test/lux/type/poly/equivalence.lux
+++ b/stdlib/source/test/lux/type/poly/equivalence.lux
@@ -57,7 +57,7 @@
(def: random
(Random Record)
- (do {! random.monad}
+ (do [! random.monad]
[size (\ ! each (n.% 2) random.nat)
.let [gen_int (|> random.int (\ ! each (|>> i.abs (i.% +1,000,000))))]]
($_ random.and
diff --git a/stdlib/source/test/lux/type/poly/json.lux b/stdlib/source/test/lux/type/poly/json.lux
index 75d7c3808..970a9bc46 100644
--- a/stdlib/source/test/lux/type/poly/json.lux
+++ b/stdlib/source/test/lux/type/poly/json.lux
@@ -90,7 +90,7 @@
(def: gen_record
(Random Record)
- (do {! random.monad}
+ (do [! random.monad]
[size (\ ! each (n.% 2) random.nat)]
($_ random.and
random.bit
diff --git a/stdlib/source/test/lux/type/refinement.lux b/stdlib/source/test/lux/type/refinement.lux
index e919a93ca..1f44a90cf 100644
--- a/stdlib/source/test/lux/type/refinement.lux
+++ b/stdlib/source/test/lux/type/refinement.lux
@@ -27,7 +27,7 @@
Test
(<| (_.covering /._)
(_.for [/.Refined])
- (do {! random.monad}
+ (do [! random.monad]
[raw random.nat
modulus (\ ! each (|>> (n.% 10) (n.+ 2)) random.nat)
.let [predicate (: (Predicate Nat)
diff --git a/stdlib/source/test/lux/type/resource.lux b/stdlib/source/test/lux/type/resource.lux
index b1e24d4dc..3e51c9964 100644
--- a/stdlib/source/test/lux/type/resource.lux
+++ b/stdlib/source/test/lux/type/resource.lux
@@ -28,7 +28,7 @@
(def: pure
Test
- (monad.do {! random.monad}
+ (monad.do [! random.monad]
[pre (\ ! each %.nat random.nat)
post (\ ! each %.nat random.nat)
.let [! identity.monad]]
@@ -70,7 +70,7 @@
(def: sync
Test
- (monad.do {! random.monad}
+ (monad.do [! random.monad]
[pre (\ ! each %.nat random.nat)
post (\ ! each %.nat random.nat)
.let [! io.monad]]
@@ -113,7 +113,7 @@
(def: async
Test
- (monad.do {! random.monad}
+ (monad.do [! random.monad]
[pre (\ ! each %.nat random.nat)
post (\ ! each %.nat random.nat)
.let [! async.monad]]
diff --git a/stdlib/source/test/lux/type/unit.lux b/stdlib/source/test/lux/type/unit.lux
index c2e17b665..cf3ed5705 100644
--- a/stdlib/source/test/lux/type/unit.lux
+++ b/stdlib/source/test/lux/type/unit.lux
@@ -93,7 +93,7 @@
(def: scale
Test
- (do {! random.monad}
+ (do [! random.monad]
[small (|> random.int
(\ ! each (i.% +1,000))
(\ ! each (\ /.meter in)))
diff --git a/stdlib/source/test/lux/world/file.lux b/stdlib/source/test/lux/world/file.lux
index 09312a7e2..d2c4703d3 100644
--- a/stdlib/source/test/lux/world/file.lux
+++ b/stdlib/source/test/lux/world/file.lux
@@ -18,7 +18,7 @@
(def: .public test
Test
(<| (_.covering /._)
- (do {! random.monad}
+ (do [! random.monad]
[/ (random.ascii/upper 1)]
($_ _.and
(_.for [/.mock]
diff --git a/stdlib/source/test/lux/world/file/watch.lux b/stdlib/source/test/lux/world/file/watch.lux
index 00406139e..52fa06325 100644
--- a/stdlib/source/test/lux/world/file/watch.lux
+++ b/stdlib/source/test/lux/world/file/watch.lux
@@ -67,7 +67,7 @@
(def: exception
Test
- (do {! random.monad}
+ (do [! random.monad]
[directory (random.ascii/alpha 5)
.let [[fs watcher] (/.mock "/")]]
($_ _.and
@@ -91,7 +91,7 @@
(def: (no_events_prior_to_creation! fs watcher directory)
(-> (//.System Async) (/.Watcher Async) //.Path (Async (Try Bit)))
- (do {! (try.with async.monad)}
+ (do [! (try.with async.monad)]
[_ (\ fs make_directory directory)
_ (\ watcher start /.all directory)]
(|> (\ watcher poll [])
@@ -157,14 +157,14 @@
..concern\\test
..exception
- (do {! random.monad}
+ (do [! random.monad]
[directory (random.ascii/alpha 5)
.let [/ "/"
[fs watcher] (/.mock /)]
expected_path (\ ! each (|>> (format directory /))
(random.ascii/alpha 5))
data ($binary.random 10)]
- (in (do {! async.monad}
+ (in (do [! async.monad]
[verdict (do (try.with !)
[no_events_prior_to_creation!
(..no_events_prior_to_creation! fs watcher directory)
diff --git a/stdlib/source/test/lux/world/input/keyboard.lux b/stdlib/source/test/lux/world/input/keyboard.lux
index 38ff5feb5..9abbbb7cd 100644
--- a/stdlib/source/test/lux/world/input/keyboard.lux
+++ b/stdlib/source/test/lux/world/input/keyboard.lux
@@ -139,7 +139,7 @@
(def: .public random
(Random /.Key)
(let [count (list.size ..listing)]
- (do {! random.monad}
+ (do [! random.monad]
[choice (\ ! each (n.% count) random.nat)]
(in (maybe.trusted (list.item choice ..listing))))))
diff --git a/stdlib/source/test/lux/world/net/http/client.lux b/stdlib/source/test/lux/world/net/http/client.lux
index 851f95002..b2999b74d 100644
--- a/stdlib/source/test/lux/world/net/http/client.lux
+++ b/stdlib/source/test/lux/world/net/http/client.lux
@@ -31,7 +31,7 @@
Test
(<| (_.covering /._)
(_.for [/.Client])
- (do {! random.monad}
+ (do [! random.monad]
[on_post random.nat
on_get random.nat
on_put random.nat
diff --git a/stdlib/source/test/lux/world/output/video/resolution.lux b/stdlib/source/test/lux/world/output/video/resolution.lux
index 6367ff652..59a46f103 100644
--- a/stdlib/source/test/lux/world/output/video/resolution.lux
+++ b/stdlib/source/test/lux/world/output/video/resolution.lux
@@ -46,7 +46,7 @@
(def: .public random
(Random /.Resolution)
(let [count (list.size ..listing)]
- (do {! random.monad}
+ (do [! random.monad]
[choice (\ ! each (n.% count) random.nat)]
(in (maybe.trusted (list.item choice ..listing))))))
diff --git a/stdlib/source/test/lux/world/program.lux b/stdlib/source/test/lux/world/program.lux
index 1160ab879..4b1c4ba22 100644
--- a/stdlib/source/test/lux/world/program.lux
+++ b/stdlib/source/test/lux/world/program.lux
@@ -41,7 +41,7 @@
(def: .public test
Test
(<| (_.covering /._)
- (do {! random.monad}
+ (do [! random.monad]
[env_size (\ ! each (|>> (n.% 10) ++) random.nat)
environment (..environment env_size)
home ..path
diff --git a/stdlib/source/test/lux/world/shell.lux b/stdlib/source/test/lux/world/shell.lux
index a57d8d5e8..250f7f9b2 100644
--- a/stdlib/source/test/lux/world/shell.lux
+++ b/stdlib/source/test/lux/world/shell.lux
@@ -96,7 +96,7 @@
destruction (random.ascii/alpha 5)
exit random.int
.let [shell (/.async (..io_shell command oops input destruction exit))]]
- (in (do {! async.monad}
+ (in (do [! async.monad]
[verdict (do (try.with !)
[process (\ shell execute [environment.empty "~" command (list)])
read (\ process read [])