aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library
diff options
context:
space:
mode:
authorEduardo Julian2021-09-12 15:39:55 -0400
committerEduardo Julian2021-09-12 15:39:55 -0400
commit2dbbaaec93a53f8dd0b96a0028b9cf125c9066cd (patch)
tree14bc8b5abe09b46ef005c3ff7cf132f1d98ddf0d /stdlib/source/library
parentdda05bca0956af5e5b3875c4cc36e61aa04772e4 (diff)
Re-named \ => # && \\ => ##
Diffstat (limited to 'stdlib/source/library')
-rw-r--r--stdlib/source/library/lux.lux778
-rw-r--r--stdlib/source/library/lux/abstract/apply.lux18
-rw-r--r--stdlib/source/library/lux/abstract/codec.lux8
-rw-r--r--stdlib/source/library/lux/abstract/comonad.lux4
-rw-r--r--stdlib/source/library/lux/abstract/comonad/cofree.lux4
-rw-r--r--stdlib/source/library/lux/abstract/equivalence.lux2
-rw-r--r--stdlib/source/library/lux/abstract/functor.lux16
-rw-r--r--stdlib/source/library/lux/abstract/hash.lux6
-rw-r--r--stdlib/source/library/lux/abstract/interval.lux108
-rw-r--r--stdlib/source/library/lux/abstract/mix.lux4
-rw-r--r--stdlib/source/library/lux/abstract/monad.lux48
-rw-r--r--stdlib/source/library/lux/abstract/monad/free.lux12
-rw-r--r--stdlib/source/library/lux/abstract/monad/indexed.lux8
-rw-r--r--stdlib/source/library/lux/abstract/monoid.lux7
-rw-r--r--stdlib/source/library/lux/abstract/order.lux18
-rw-r--r--stdlib/source/library/lux/control/concatenative.lux18
-rw-r--r--stdlib/source/library/lux/control/concurrency/actor.lux24
-rw-r--r--stdlib/source/library/lux/control/concurrency/async.lux4
-rw-r--r--stdlib/source/library/lux/control/concurrency/atom.lux4
-rw-r--r--stdlib/source/library/lux/control/concurrency/frp.lux20
-rw-r--r--stdlib/source/library/lux/control/concurrency/semaphore.lux4
-rw-r--r--stdlib/source/library/lux/control/concurrency/stm.lux4
-rw-r--r--stdlib/source/library/lux/control/concurrency/thread.lux4
-rw-r--r--stdlib/source/library/lux/control/exception.lux38
-rw-r--r--stdlib/source/library/lux/control/function/mutual.lux34
-rw-r--r--stdlib/source/library/lux/control/lazy.lux6
-rw-r--r--stdlib/source/library/lux/control/maybe.lux12
-rw-r--r--stdlib/source/library/lux/control/parser.lux24
-rw-r--r--stdlib/source/library/lux/control/parser/analysis.lux6
-rw-r--r--stdlib/source/library/lux/control/parser/binary.lux16
-rw-r--r--stdlib/source/library/lux/control/parser/cli.lux4
-rw-r--r--stdlib/source/library/lux/control/parser/code.lux34
-rw-r--r--stdlib/source/library/lux/control/parser/environment.lux2
-rw-r--r--stdlib/source/library/lux/control/parser/json.lux16
-rw-r--r--stdlib/source/library/lux/control/parser/synthesis.lux2
-rw-r--r--stdlib/source/library/lux/control/parser/text.lux24
-rw-r--r--stdlib/source/library/lux/control/parser/type.lux18
-rw-r--r--stdlib/source/library/lux/control/parser/xml.lux10
-rw-r--r--stdlib/source/library/lux/control/pipe.lux8
-rw-r--r--stdlib/source/library/lux/control/reader.lux5
-rw-r--r--stdlib/source/library/lux/control/region.lux14
-rw-r--r--stdlib/source/library/lux/control/remember.lux10
-rw-r--r--stdlib/source/library/lux/control/security/capability.lux6
-rw-r--r--stdlib/source/library/lux/control/state.lux8
-rw-r--r--stdlib/source/library/lux/control/try.lux12
-rw-r--r--stdlib/source/library/lux/control/writer.lux12
-rw-r--r--stdlib/source/library/lux/data/collection/array.lux20
-rw-r--r--stdlib/source/library/lux/data/collection/bits.lux4
-rw-r--r--stdlib/source/library/lux/data/collection/dictionary.lux144
-rw-r--r--stdlib/source/library/lux/data/collection/dictionary/ordered.lux52
-rw-r--r--stdlib/source/library/lux/data/collection/dictionary/plist.lux14
-rw-r--r--stdlib/source/library/lux/data/collection/list.lux26
-rw-r--r--stdlib/source/library/lux/data/collection/queue.lux10
-rw-r--r--stdlib/source/library/lux/data/collection/queue/priority.lux16
-rw-r--r--stdlib/source/library/lux/data/collection/row.lux52
-rw-r--r--stdlib/source/library/lux/data/collection/sequence.lux6
-rw-r--r--stdlib/source/library/lux/data/collection/set.lux8
-rw-r--r--stdlib/source/library/lux/data/collection/set/multi.lux18
-rw-r--r--stdlib/source/library/lux/data/collection/set/ordered.lux8
-rw-r--r--stdlib/source/library/lux/data/collection/stack.lux4
-rw-r--r--stdlib/source/library/lux/data/collection/tree.lux16
-rw-r--r--stdlib/source/library/lux/data/collection/tree/finger.lux8
-rw-r--r--stdlib/source/library/lux/data/collection/tree/zipper.lux30
-rw-r--r--stdlib/source/library/lux/data/color.lux12
-rw-r--r--stdlib/source/library/lux/data/format/binary.lux18
-rw-r--r--stdlib/source/library/lux/data/format/css.lux12
-rw-r--r--stdlib/source/library/lux/data/format/css/value.lux24
-rw-r--r--stdlib/source/library/lux/data/format/html.lux24
-rw-r--r--stdlib/source/library/lux/data/format/json.lux72
-rw-r--r--stdlib/source/library/lux/data/format/markdown.lux8
-rw-r--r--stdlib/source/library/lux/data/format/tar.lux68
-rw-r--r--stdlib/source/library/lux/data/format/xml.lux64
-rw-r--r--stdlib/source/library/lux/data/name.lux14
-rw-r--r--stdlib/source/library/lux/data/product.lux12
-rw-r--r--stdlib/source/library/lux/data/store.lux12
-rw-r--r--stdlib/source/library/lux/data/sum.lux12
-rw-r--r--stdlib/source/library/lux/data/text.lux4
-rw-r--r--stdlib/source/library/lux/data/text/buffer.lux6
-rw-r--r--stdlib/source/library/lux/data/text/escape.lux4
-rw-r--r--stdlib/source/library/lux/data/text/format.lux38
-rw-r--r--stdlib/source/library/lux/data/text/regex.lux42
-rw-r--r--stdlib/source/library/lux/data/text/unicode/block.lux12
-rw-r--r--stdlib/source/library/lux/data/text/unicode/set.lux12
-rw-r--r--stdlib/source/library/lux/data/trace.lux4
-rw-r--r--stdlib/source/library/lux/debug.lux12
-rw-r--r--stdlib/source/library/lux/documentation.lux108
-rw-r--r--stdlib/source/library/lux/extension.lux6
-rw-r--r--stdlib/source/library/lux/ffi.js.lux34
-rw-r--r--stdlib/source/library/lux/ffi.jvm.lux276
-rw-r--r--stdlib/source/library/lux/ffi.lua.lux28
-rw-r--r--stdlib/source/library/lux/ffi.old.lux202
-rw-r--r--stdlib/source/library/lux/ffi.php.lux26
-rw-r--r--stdlib/source/library/lux/ffi.py.lux28
-rw-r--r--stdlib/source/library/lux/ffi.rb.lux26
-rw-r--r--stdlib/source/library/lux/ffi.scm.lux16
-rw-r--r--stdlib/source/library/lux/locale.lux10
-rw-r--r--stdlib/source/library/lux/locale/language.lux2
-rw-r--r--stdlib/source/library/lux/locale/territory.lux2
-rw-r--r--stdlib/source/library/lux/macro.lux48
-rw-r--r--stdlib/source/library/lux/macro/code.lux22
-rw-r--r--stdlib/source/library/lux/macro/local.lux4
-rw-r--r--stdlib/source/library/lux/macro/syntax.lux6
-rw-r--r--stdlib/source/library/lux/macro/syntax/declaration.lux8
-rw-r--r--stdlib/source/library/lux/macro/syntax/export.lux2
-rw-r--r--stdlib/source/library/lux/macro/syntax/input.lux6
-rw-r--r--stdlib/source/library/lux/macro/template.lux40
-rw-r--r--stdlib/source/library/lux/math/infix.lux20
-rw-r--r--stdlib/source/library/lux/math/logic/continuous.lux6
-rw-r--r--stdlib/source/library/lux/math/modular.lux18
-rw-r--r--stdlib/source/library/lux/math/number.lux8
-rw-r--r--stdlib/source/library/lux/math/number/complex.lux4
-rw-r--r--stdlib/source/library/lux/math/number/frac.lux14
-rw-r--r--stdlib/source/library/lux/math/number/i16.lux8
-rw-r--r--stdlib/source/library/lux/math/number/i32.lux8
-rw-r--r--stdlib/source/library/lux/math/number/i64.lux2
-rw-r--r--stdlib/source/library/lux/math/number/i8.lux8
-rw-r--r--stdlib/source/library/lux/math/number/int.lux16
-rw-r--r--stdlib/source/library/lux/math/number/nat.lux4
-rw-r--r--stdlib/source/library/lux/math/number/ratio.lux12
-rw-r--r--stdlib/source/library/lux/math/number/rev.lux44
-rw-r--r--stdlib/source/library/lux/math/random.lux76
-rw-r--r--stdlib/source/library/lux/meta.lux112
-rw-r--r--stdlib/source/library/lux/meta/location.lux6
-rw-r--r--stdlib/source/library/lux/program.lux4
-rw-r--r--stdlib/source/library/lux/static.lux2
-rw-r--r--stdlib/source/library/lux/target/common_lisp.lux18
-rw-r--r--stdlib/source/library/lux/target/js.lux20
-rw-r--r--stdlib/source/library/lux/target/jvm/attribute/code.lux10
-rw-r--r--stdlib/source/library/lux/target/jvm/bytecode.lux40
-rw-r--r--stdlib/source/library/lux/target/jvm/bytecode/address.lux4
-rw-r--r--stdlib/source/library/lux/target/jvm/bytecode/environment.lux2
-rw-r--r--stdlib/source/library/lux/target/jvm/bytecode/environment/limit.lux4
-rw-r--r--stdlib/source/library/lux/target/jvm/bytecode/environment/limit/registry.lux12
-rw-r--r--stdlib/source/library/lux/target/jvm/bytecode/environment/limit/stack.lux4
-rw-r--r--stdlib/source/library/lux/target/jvm/bytecode/instruction.lux4
-rw-r--r--stdlib/source/library/lux/target/jvm/class.lux4
-rw-r--r--stdlib/source/library/lux/target/jvm/constant.lux10
-rw-r--r--stdlib/source/library/lux/target/jvm/constant/pool.lux12
-rw-r--r--stdlib/source/library/lux/target/jvm/field.lux4
-rw-r--r--stdlib/source/library/lux/target/jvm/index.lux2
-rw-r--r--stdlib/source/library/lux/target/jvm/method.lux6
-rw-r--r--stdlib/source/library/lux/target/jvm/modifier.lux6
-rw-r--r--stdlib/source/library/lux/target/jvm/reflection.lux22
-rw-r--r--stdlib/source/library/lux/target/jvm/type.lux24
-rw-r--r--stdlib/source/library/lux/target/jvm/type/alias.lux4
-rw-r--r--stdlib/source/library/lux/target/jvm/type/descriptor.lux10
-rw-r--r--stdlib/source/library/lux/target/jvm/type/lux.lux22
-rw-r--r--stdlib/source/library/lux/target/jvm/type/parser.lux14
-rw-r--r--stdlib/source/library/lux/target/jvm/type/reflection.lux6
-rw-r--r--stdlib/source/library/lux/target/jvm/type/signature.lux16
-rw-r--r--stdlib/source/library/lux/target/lua.lux26
-rw-r--r--stdlib/source/library/lux/target/php.lux22
-rw-r--r--stdlib/source/library/lux/target/python.lux26
-rw-r--r--stdlib/source/library/lux/target/r.lux20
-rw-r--r--stdlib/source/library/lux/target/ruby.lux26
-rw-r--r--stdlib/source/library/lux/target/scheme.lux16
-rw-r--r--stdlib/source/library/lux/test.lux58
-rw-r--r--stdlib/source/library/lux/time.lux28
-rw-r--r--stdlib/source/library/lux/time/date.lux46
-rw-r--r--stdlib/source/library/lux/time/day.lux6
-rw-r--r--stdlib/source/library/lux/time/duration.lux22
-rw-r--r--stdlib/source/library/lux/time/instant.lux20
-rw-r--r--stdlib/source/library/lux/time/month.lux6
-rw-r--r--stdlib/source/library/lux/time/year.lux12
-rw-r--r--stdlib/source/library/lux/tool/compiler/default/init.lux14
-rw-r--r--stdlib/source/library/lux/tool/compiler/default/platform.lux52
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/analysis.lux62
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/directive.lux6
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/generation.lux14
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/case.lux14
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/case/coverage.lux36
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/function.lux8
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/inference.lux20
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/module.lux8
-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/scope.lux16
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/structure.lux26
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/directive.lux6
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/jvm.lux236
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux10
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/bundle.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/jvm.lux26
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/common_lisp/common.lux8
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/js/common.lux12
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/js/host.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/jvm/common.lux14
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/jvm/host.lux76
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/lua/common.lux20
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/lua/host.lux6
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/php/common.lux14
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/php/host.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/python/common.lux24
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/python/host.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/r/common.lux8
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/ruby/common.lux20
-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.lux8
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/case.lux36
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/function.lux16
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/loop.lux10
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/runtime.lux14
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/structure.lux8
-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.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/case.lux22
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/function.lux10
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/loop.lux10
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/runtime.lux12
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/structure.lux6
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/case.lux18
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/debug.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function.lux12
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/field/constant.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/field/variable.lux8
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/field/variable/partial.lux8
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/method.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/method/apply.lux18
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/method/init.lux6
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/method/reset.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/host.lux18
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/loop.lux14
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/program.lux9
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/reference.lux8
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/runtime.lux18
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/structure.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/value.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/case.lux24
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/function.lux10
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/loop.lux10
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/runtime.lux12
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/structure.lux8
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php.lux10
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/case.lux26
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/function.lux14
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/loop.lux22
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/runtime.lux14
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/structure.lux8
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/case.lux30
-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.lux10
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/runtime.lux14
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/structure.lux8
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/case.lux20
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/function.lux12
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/loop.lux6
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/runtime.lux18
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/structure.lux8
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/reference.lux8
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/case.lux32
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/function.lux6
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/loop.lux8
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/runtime.lux12
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/structure.lux8
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/case.lux22
-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.lux12
-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.lux12
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/structure.lux8
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis.lux12
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/case.lux64
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/function.lux42
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/loop.lux14
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/variable.lux38
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/program.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/syntax.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/synthesis.lux150
-rw-r--r--stdlib/source/library/lux/tool/compiler/meta/archive.lux16
-rw-r--r--stdlib/source/library/lux/tool/compiler/meta/archive/artifact.lux8
-rw-r--r--stdlib/source/library/lux/tool/compiler/meta/archive/descriptor.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/meta/archive/document.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/meta/cache/dependency.lux10
-rw-r--r--stdlib/source/library/lux/tool/compiler/meta/io.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/meta/io/archive.lux110
-rw-r--r--stdlib/source/library/lux/tool/compiler/meta/io/context.lux44
-rw-r--r--stdlib/source/library/lux/tool/compiler/meta/packager.lux6
-rw-r--r--stdlib/source/library/lux/tool/compiler/meta/packager/jvm.lux8
-rw-r--r--stdlib/source/library/lux/tool/compiler/meta/packager/scheme.lux16
-rw-r--r--stdlib/source/library/lux/tool/compiler/meta/packager/script.lux12
-rw-r--r--stdlib/source/library/lux/tool/compiler/phase.lux8
-rw-r--r--stdlib/source/library/lux/tool/compiler/reference.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/reference/variable.lux2
-rw-r--r--stdlib/source/library/lux/tool/interpreter.lux18
-rw-r--r--stdlib/source/library/lux/type.lux84
-rw-r--r--stdlib/source/library/lux/type/abstract.lux28
-rw-r--r--stdlib/source/library/lux/type/check.lux60
-rw-r--r--stdlib/source/library/lux/type/dynamic.lux2
-rw-r--r--stdlib/source/library/lux/type/implicit.lux62
-rw-r--r--stdlib/source/library/lux/type/poly.lux12
-rw-r--r--stdlib/source/library/lux/type/quotient.lux2
-rw-r--r--stdlib/source/library/lux/type/resource.lux20
-rw-r--r--stdlib/source/library/lux/type/unit.lux6
-rw-r--r--stdlib/source/library/lux/world/console.lux12
-rw-r--r--stdlib/source/library/lux/world/db/jdbc.lux8
-rw-r--r--stdlib/source/library/lux/world/db/sql.lux16
-rw-r--r--stdlib/source/library/lux/world/file.lux150
-rw-r--r--stdlib/source/library/lux/world/file/watch.lux56
-rw-r--r--stdlib/source/library/lux/world/net/http/client.lux22
-rw-r--r--stdlib/source/library/lux/world/net/http/cookie.lux4
-rw-r--r--stdlib/source/library/lux/world/net/http/query.lux4
-rw-r--r--stdlib/source/library/lux/world/net/http/request.lux12
-rw-r--r--stdlib/source/library/lux/world/net/http/response.lux14
-rw-r--r--stdlib/source/library/lux/world/output/video/resolution.lux2
-rw-r--r--stdlib/source/library/lux/world/program.lux28
-rw-r--r--stdlib/source/library/lux/world/service/journal.lux18
-rw-r--r--stdlib/source/library/lux/world/shell.lux28
315 files changed, 3527 insertions, 3526 deletions
diff --git a/stdlib/source/library/lux.lux b/stdlib/source/library/lux.lux
index 7339ac34d..8f8032699 100644
--- a/stdlib/source/library/lux.lux
+++ b/stdlib/source/library/lux.lux
@@ -823,7 +823,7 @@
(failure "Wrong syntax for $'")}
tokens))
-(def:'' .private (list\each f xs)
+(def:'' .private (list#each f xs)
{#UnivQ {#End}
{#UnivQ {#End}
{#Function {#Function {#Parameter 3} {#Parameter 1}}
@@ -833,7 +833,7 @@
{#End}
{#Item x xs'}
- {#Item (f x) (list\each f xs')}}
+ {#Item (f x) (list#each f xs')}}
xs))
(def:'' .private Replacement_Environment
@@ -849,7 +849,7 @@
{#End}}
[xs ys]))
-(def:'' .private (text\= reference sample)
+(def:'' .private (text#= reference sample)
{#Function Text {#Function Text Bit}}
("lux text =" reference sample))
@@ -864,7 +864,7 @@
#0
(replacement for environment')}
- (text\= k for))}
+ (text#= k for))}
environment))
(def:'' .private (with_replacements reps syntax)
@@ -878,13 +878,13 @@
(..replacement name reps))
[meta {#Form parts}]
- [meta {#Form (list\each (with_replacements reps) parts)}]
+ [meta {#Form (list#each (with_replacements reps) parts)}]
[meta {#Variant members}]
- [meta {#Variant (list\each (with_replacements reps) members)}]
+ [meta {#Variant (list#each (with_replacements reps) members)}]
[meta {#Tuple members}]
- [meta {#Tuple (list\each (with_replacements reps) members)}]
+ [meta {#Tuple (list#each (with_replacements reps) members)}]
_
syntax}
@@ -897,7 +897,7 @@
("lux type as" Int param)
("lux type as" Int subject))))
-(def:'' .private (list\mix f init xs)
+(def:'' .private (list#mix f init xs)
... (All (_ a b) (-> (-> b a a) a (List b) a))
{#UnivQ {#End} {#UnivQ {#End} {#Function {#Function {#Parameter 1}
{#Function {#Parameter 3}
@@ -909,13 +909,13 @@
init
{#Item x xs'}
- (list\mix f (f x init) xs')}
+ (list#mix f (f x init) xs')}
xs))
-(def:'' .private (list\size list)
+(def:'' .private (list#size list)
{#UnivQ {#End}
{#Function ($' List {#Parameter 1}) Nat}}
- (list\mix (function'' [_ acc] ("lux i64 +" 1 acc)) 0 list))
+ (list#mix (function'' [_ acc] ("lux i64 +" 1 acc)) 0 list))
(def:'' .private (let$ binding value body)
{#Function Code {#Function Code {#Function Code Code}}}
@@ -985,7 +985,7 @@
... Recur
{#Primitive name parameters}
- {#Primitive name (list\each (__adjusted_quantified_type__ permission depth)
+ {#Primitive name (list#each (__adjusted_quantified_type__ permission depth)
parameters)}
{#Sum left right}
@@ -1050,12 +1050,12 @@
#scopes scopes #type_context _ #host _
#seed _ #expected _ #location _ #extensions _
#scope_type_vars _ #eval _]
- (list\mix (function'' [scope verdict]
+ (list#mix (function'' [scope verdict]
({#1 #1
_ ({[#name _ #inner _ #captured _
#locals [#counter _
#mappings locals]]
- (list\mix (function'' [local verdict]
+ (list#mix (function'' [local verdict]
({[local _]
({#1 #1 _ ("lux text =" ..quantification_level local)}
verdict)}
@@ -1084,13 +1084,13 @@
(let$ self_name (quantified_type_parameter 0)
({[_ raw]
raw}
- (list\mix (function'' [parameter offset,body']
+ (list#mix (function'' [parameter offset,body']
({[offset body']
[("lux i64 +" 2 offset)
(let$ parameter (quantified_type_parameter ("lux i64 +" offset 1))
(UnivQ$ body'))]}
offset,body'))
- [0 (with_quantification (list\size args)
+ [0 (with_quantification (list#size args)
body)]
args))))}
args))
@@ -1116,13 +1116,13 @@
(let$ self_name (quantified_type_parameter 0)
({[_ raw]
raw}
- (list\mix (function'' [parameter offset,body']
+ (list#mix (function'' [parameter offset,body']
({[offset body']
[("lux i64 +" 2 offset)
(let$ parameter (quantified_type_parameter ("lux i64 +" offset 1))
(ExQ$ body'))]}
offset,body'))
- [0 (with_quantification (list\size args)
+ [0 (with_quantification (list#size args)
body)]
args))))}
args))
@@ -1132,10 +1132,10 @@
{#Left "Wrong syntax for Ex"}}
tokens))
-(def:'' .private (list\reversed list)
+(def:'' .private (list#reversed list)
(All (_ a)
{#Function ($' List a) ($' List a)})
- (list\mix ("lux type check" (All (_ a)
+ (list#mix ("lux type check" (All (_ a)
{#Function a {#Function ($' List a) ($' List a)}})
(function'' [head tail] {#Item head tail}))
{#End}
@@ -1143,7 +1143,7 @@
(macro:' .public (-> tokens)
({{#Item output inputs}
- (in_meta {#Item (list\mix ("lux type check" {#Function Code {#Function Code Code}}
+ (in_meta {#Item (list#mix ("lux type check" {#Function Code {#Function Code Code}}
(function'' [i o] (variant$ {#Item (identifier$ [..prelude_module "#Function"]) {#Item i {#Item o {#End}}}})))
output
inputs)
@@ -1151,39 +1151,39 @@
_
(failure "Wrong syntax for ->")}
- (list\reversed tokens)))
+ (list#reversed tokens)))
(macro:' .public (list xs)
- (in_meta {#Item (list\mix |#Item| |#End| (list\reversed xs))
+ (in_meta {#Item (list#mix |#Item| |#End| (list#reversed xs))
{#End}}))
(macro:' .public (list& xs)
({{#Item last init}
- (in_meta (list (list\mix |#Item| last init)))
+ (in_meta (list (list#mix |#Item| last init)))
_
(failure "Wrong syntax for list&")}
- (list\reversed xs)))
+ (list#reversed xs)))
(macro:' .public (Union tokens)
({{#End}
(in_meta (list (identifier$ [..prelude_module "Nothing"])))
{#Item last prevs}
- (in_meta (list (list\mix (function'' [left right] (variant$ (list (identifier$ [..prelude_module "#Sum"]) left right)))
+ (in_meta (list (list#mix (function'' [left right] (variant$ (list (identifier$ [..prelude_module "#Sum"]) left right)))
last
prevs)))}
- (list\reversed tokens)))
+ (list#reversed tokens)))
(macro:' .public (Tuple tokens)
({{#End}
(in_meta (list (identifier$ [..prelude_module "Any"])))
{#Item last prevs}
- (in_meta (list (list\mix (function'' [left right] (variant$ (list (identifier$ [..prelude_module "#Product"]) left right)))
+ (in_meta (list (list#mix (function'' [left right] (variant$ (list (identifier$ [..prelude_module "#Product"]) left right)))
last
prevs)))}
- (list\reversed tokens)))
+ (list#reversed tokens)))
(macro:' .private (function' tokens)
(let'' [name tokens'] ({{#Item [[_ {#Identifier ["" name]}] tokens']}
@@ -1199,12 +1199,12 @@
{#Item [harg targs]}
(in_meta (list (form$ (list (tuple$ (list (local_identifier$ name)
harg))
- (list\mix (function'' [arg body']
+ (list#mix (function'' [arg body']
(form$ (list (tuple$ (list (local_identifier$ "")
arg))
body')))
body
- (list\reversed targs))))))}
+ (list#reversed targs))))))}
args)
_
@@ -1256,14 +1256,14 @@
(macro:' .private (let' tokens)
({{#Item [[_ {#Tuple bindings}] {#Item [body {#End}]}]}
- (in_meta (list (list\mix ("lux type check" (-> (Tuple Code Code) Code
+ (in_meta (list (list#mix ("lux type check" (-> (Tuple Code Code) Code
Code)
(function' [binding body]
({[label value]
(form$ (list (variant$ (list label body)) value))}
binding)))
body
- (list\reversed (pairs bindings)))))
+ (list#reversed (pairs bindings)))))
_
(failure "Wrong syntax for let'")}
@@ -1295,10 +1295,10 @@
(|#Item| token (untemplated_list tokens'))}
tokens))
-(def:''' .private (list\composite xs ys)
+(def:''' .private (list#composite xs ys)
(All (_ a) (-> ($' List a) ($' List a) ($' List a)))
({{#Item x xs'}
- {#Item x (list\composite xs' ys)}
+ {#Item x (list#composite xs' ys)}
{#End}
ys}
@@ -1307,13 +1307,13 @@
(def:''' .private (right_associativity op a1 a2)
(-> Code Code Code Code)
({[_ {#Form parts}]
- (form$ (list\composite parts (list a1 a2)))
+ (form$ (list#composite parts (list a1 a2)))
_
(form$ (list op a1 a2))}
op))
-(def:''' .private (function\flipped func)
+(def:''' .private (function#flipped func)
(All (_ a b c)
(-> (-> a b c) (-> b a c)))
(function' [right left]
@@ -1322,7 +1322,7 @@
(macro:' .public (_$ tokens)
({{#Item op tokens'}
({{#Item first nexts}
- (in_meta (list (list\mix (function\flipped (right_associativity op)) first nexts)))
+ (in_meta (list (list#mix (function#flipped (right_associativity op)) first nexts)))
_
(failure "Wrong syntax for _$")}
@@ -1335,11 +1335,11 @@
(macro:' .public ($_ tokens)
({{#Item op tokens'}
({{#Item last prevs}
- (in_meta (list (list\mix (right_associativity op) last prevs)))
+ (in_meta (list (list#mix (right_associativity op) last prevs)))
_
(failure "Wrong syntax for $_")}
- (list\reversed tokens'))
+ (list#reversed tokens'))
_
(failure "Wrong syntax for $_")}
@@ -1395,7 +1395,7 @@
({{#Item monad {#Item [_ {#Tuple bindings}] {#Item body {#End}}}}
(let' [g!in (local_identifier$ "in")
g!then (local_identifier$ " then ")
- body' (list\mix ("lux type check" (-> (Tuple Code Code) Code Code)
+ body' (list#mix ("lux type check" (-> (Tuple Code Code) Code Code)
(function' [binding body']
(let' [[var value] binding]
({[_ {#Identifier [module short]}]
@@ -1415,7 +1415,7 @@
value))}
var))))
body
- (list\reversed (pairs bindings)))]
+ (list#reversed (pairs bindings)))]
(in_meta (list (form$ (list (variant$ (list (tuple$ (list (identifier$ [..prelude_module "#in"]) g!in
(identifier$ [..prelude_module "#then"]) g!then))
body'))
@@ -1425,7 +1425,7 @@
(failure "Wrong syntax for do")}
tokens))
-(def:''' .private (monad\each m f xs)
+(def:''' .private (monad#each m f xs)
(All (_ m a b)
(-> ($' Monad m)
(-> a ($' m b))
@@ -1438,11 +1438,11 @@
{#Item x xs'}
(do m
[y (f x)
- ys (monad\each m f xs')]
+ ys (monad#each m f xs')]
(in {#Item y ys}))}
xs)))
-(def:''' .private (monad\mix m f y xs)
+(def:''' .private (monad#mix m f y xs)
(All (_ m a b)
(-> ($' Monad m)
(-> a b ($' m b))
@@ -1456,7 +1456,7 @@
{#Item x xs'}
(do m
[y' (f x y)]
- (monad\mix m f y' xs'))}
+ (monad#mix m f y' xs'))}
xs)))
(macro:' .public (if tokens)
@@ -1473,27 +1473,27 @@
Type
(All (_ a) ($' List (Tuple Text a))))
-(def:''' .private (plist\value k plist)
+(def:''' .private (plist#value k plist)
(All (_ a)
(-> Text ($' PList a) ($' Maybe a)))
({{#Item [[k' v] plist']}
- (if (text\= k k')
+ (if (text#= k k')
{#Some v}
- (plist\value k plist'))
+ (plist#value k plist'))
{#End}
{#None}}
plist))
-(def:''' .private (text\composite x y)
+(def:''' .private (text#composite x y)
(-> Text Text Text)
("lux text concat" x y))
-(def:''' .private (name\encoded full_name)
+(def:''' .private (name#encoded full_name)
(-> Name Text)
(let' [[module name] full_name]
({"" name
- _ ($_ text\composite module "." name)}
+ _ ($_ text#composite module "." name)}
module)))
(def:''' .private (global_identifier full_name state)
@@ -1515,12 +1515,12 @@
constant)
{#None}
- {#Left ($_ text\composite "Unknown definition: " (name\encoded full_name))}}
- (plist\value name definitions))
+ {#Left ($_ text#composite "Unknown definition: " (name#encoded full_name))}}
+ (plist#value name definitions))
{#None}
- {#Left ($_ text\composite "Unknown module: " module " @ " (name\encoded full_name))}}
- (plist\value module modules))))
+ {#Left ($_ text#composite "Unknown module: " module " @ " (name#encoded full_name))}}
+ (plist#value module modules))))
(def:''' .private (:List<Code> expression)
(-> Code Code)
@@ -1545,12 +1545,12 @@
[lastO (untemplated lastI)]
(in (:List<Code> (|#Item| lastO |#End|))))}
lastI)]
- (monad\mix meta_monad
+ (monad#mix meta_monad
(function' [leftI rightO]
({[_ {#Form {#Item [[_ {#Identifier ["" "~+"]}] {#Item [spliced {#End}]}]}}]
(let' [g!in-module (form$ (list (text$ "lux in-module")
(text$ ..prelude_module)
- (identifier$ [..prelude_module "list\composite"])))]
+ (identifier$ [..prelude_module "list#composite"])))]
(in (form$ (list g!in-module (:List<Code> spliced) rightO))))
_
@@ -1560,10 +1560,10 @@
leftI))
lastO
inits))}
- (list\reversed elems))
+ (list#reversed elems))
#0
(do meta_monad
- [=elems (monad\each meta_monad untemplated elems)]
+ [=elems (monad#each meta_monad untemplated elems)]
(in (untemplated_list =elems)))}
replace?))
@@ -1594,7 +1594,7 @@
[#1 [_ {#Identifier [module name]}]]
(do meta_monad
[real_name ({""
- (if (text\= "" subst)
+ (if (text#= "" subst)
(in [module name])
(global_identifier [subst name]))
@@ -1702,16 +1702,16 @@
(macro:' .public (|> tokens)
({{#Item [init apps]}
- (in_meta (list (list\mix ("lux type check" (-> Code Code Code)
+ (in_meta (list (list#mix ("lux type check" (-> Code Code Code)
(function' [app acc]
({[_ {#Variant parts}]
- (variant$ (list\composite parts (list acc)))
+ (variant$ (list#composite parts (list acc)))
[_ {#Tuple parts}]
- (tuple$ (list\composite parts (list acc)))
+ (tuple$ (list#composite parts (list acc)))
[_ {#Form parts}]
- (form$ (list\composite parts (list acc)))
+ (form$ (list#composite parts (list acc)))
_
(` ((~ app) (~ acc)))}
@@ -1725,16 +1725,16 @@
(macro:' .public (<| tokens)
({{#Item [init apps]}
- (in_meta (list (list\mix ("lux type check" (-> Code Code Code)
+ (in_meta (list (list#mix ("lux type check" (-> Code Code Code)
(function' [app acc]
({[_ {#Variant parts}]
- (variant$ (list\composite parts (list acc)))
+ (variant$ (list#composite parts (list acc)))
[_ {#Tuple parts}]
- (tuple$ (list\composite parts (list acc)))
+ (tuple$ (list#composite parts (list acc)))
[_ {#Form parts}]
- (form$ (list\composite parts (list acc)))
+ (form$ (list#composite parts (list acc)))
_
(` ((~ app) (~ acc)))}
@@ -1744,9 +1744,9 @@
_
(failure "Wrong syntax for <|")}
- (list\reversed tokens)))
+ (list#reversed tokens)))
-(def:''' .private (function\composite f g)
+(def:''' .private (function#composite f g)
(All (_ a b c)
(-> (-> b c) (-> a b) (-> a c)))
(function' [x] (f (g x))))
@@ -1789,13 +1789,13 @@
(..replacement sname env))
[meta {#Form elems}]
- [meta {#Form (list\each (realized_template env) elems)}]
+ [meta {#Form (list#each (realized_template env) elems)}]
[meta {#Tuple elems}]
- [meta {#Tuple (list\each (realized_template env) elems)}]
+ [meta {#Tuple (list#each (realized_template env) elems)}]
[meta {#Variant elems}]
- [meta {#Variant (list\each (realized_template env) elems)}]
+ [meta {#Variant (list#each (realized_template env) elems)}]
_
template}
@@ -1804,7 +1804,7 @@
(def:''' .private (every? p xs)
(All (_ a)
(-> (-> a Bit) ($' List a) Bit))
- (list\mix (function' [_2 _1] (if _1 (p _2) #0)) #1 xs))
+ (list#mix (function' [_2 _1] (if _1 (p _2) #0)) #1 xs))
(def:''' .private (high_bits value)
(-> ($' I64 Any) I64)
@@ -1830,29 +1830,29 @@
(low_bits sample))
#0))))
-(def:''' .private (list\conjoint xs)
+(def:''' .private (list#conjoint xs)
(All (_ a)
(-> ($' List ($' List a)) ($' List a)))
- (list\mix list\composite {#End} (list\reversed xs)))
+ (list#mix list#composite {#End} (list#reversed xs)))
(macro:' .public (template tokens)
({{#Item [[_ {#Tuple bindings}] {#Item [[_ {#Tuple templates}] data]}]}
({[{#Some bindings'} {#Some data'}]
(let' [apply ("lux type check" (-> Replacement_Environment ($' List Code))
- (function' [env] (list\each (realized_template env) templates)))
- num_bindings (list\size bindings')]
+ (function' [env] (list#each (realized_template env) templates)))
+ num_bindings (list#size bindings')]
(if (every? (function' [size] ("lux i64 =" num_bindings size))
- (list\each list\size data'))
+ (list#each list#size data'))
(|> data'
- (list\each (function\composite apply (replacement_environment bindings')))
- list\conjoint
+ (list#each (function#composite apply (replacement_environment bindings')))
+ list#conjoint
in_meta)
(failure "Irregular arguments tuples for template.")))
_
(failure "Wrong syntax for template")}
- [(monad\each maybe_monad identifier_short bindings)
- (monad\each maybe_monad tuple_list data)])
+ [(monad#each maybe_monad identifier_short bindings)
+ (monad#each maybe_monad tuple_list data)])
_
(failure "Wrong syntax for template")}
@@ -1889,7 +1889,7 @@
left
right))
-(def:''' .private (bit\encoded x)
+(def:''' .private (bit#encoded x)
(-> Bit Text)
(if x "#1" "#0"))
@@ -1902,7 +1902,7 @@
_ ("lux io error" "@digit::format Undefined behavior.")}
digit))
-(def:''' .private (nat\encoded value)
+(def:''' .private (nat#encoded value)
(-> Nat Text)
({0
"0"
@@ -1913,18 +1913,18 @@
(if ("lux i64 =" 0 input)
output
(recur (n// 10 input)
- (text\composite (|> input (n/% 10) digit::format)
+ (text#composite (|> input (n/% 10) digit::format)
output)))))]
(loop value ""))}
value))
-(def:''' .private (int\abs value)
+(def:''' .private (int#abs value)
(-> Int Int)
(if ("lux i64 <" +0 value)
("lux i64 *" -1 value)
value))
-(def:''' .private (int\encoded value)
+(def:''' .private (int#encoded value)
(-> Int Text)
(if ("lux i64 =" +0 value)
"+0"
@@ -1934,14 +1934,14 @@
(("lux type check" (-> Int Text Text)
(function' recur [input output]
(if ("lux i64 =" +0 input)
- (text\composite sign output)
+ (text#composite sign output)
(recur ("lux i64 /" +10 input)
- (text\composite (|> input ("lux i64 %" +10) ("lux type as" Nat) digit::format)
+ (text#composite (|> input ("lux i64 %" +10) ("lux type as" Nat) digit::format)
output)))))
- (|> value ("lux i64 /" +10) int\abs)
- (|> value ("lux i64 %" +10) int\abs ("lux type as" Nat) digit::format)))))
+ (|> value ("lux i64 /" +10) int#abs)
+ (|> value ("lux i64 %" +10) int#abs ("lux type as" Nat) digit::format)))))
-(def:''' .private (frac\encoded x)
+(def:''' .private (frac#encoded x)
(-> Frac Text)
("lux f64 encode" x))
@@ -1967,9 +1967,9 @@
Text Text Text
($' Maybe Macro))
(do maybe_monad
- [$module (plist\value module modules)
+ [$module (plist#value module modules)
gdef (let' [[#module_hash _ #module_aliases _ #definitions bindings #imports _ #module_state _] ("lux type check" Module $module)]
- (plist\value name bindings))]
+ (plist#value name bindings))]
({{#Alias [r_module r_name]}
(macro'' modules current_module r_module r_name)
@@ -1977,7 +1977,7 @@
(if (macro_type? def_type)
(if exported?
{#Some ("lux type as" Macro def_value)}
- (if (text\= module current_module)
+ (if (text#= module current_module)
{#Some ("lux type as" Macro def_value)}
{#None}))
{#None})
@@ -2026,7 +2026,7 @@
{#None} #0}
output))))
-(def:''' .private (list\interposed sep xs)
+(def:''' .private (list#interposed sep xs)
(All (_ a)
(-> a ($' List a) ($' List a)))
({{#End}
@@ -2036,7 +2036,7 @@
xs
{#Item [x xs']}
- (list& x sep (list\interposed sep xs'))}
+ (list& x sep (list#interposed sep xs'))}
xs))
(def:''' .private (single_expansion token)
@@ -2065,8 +2065,8 @@
({{#Some macro}
(do meta_monad
[top_level_expansion (("lux type as" Macro' macro) args)
- recursive_expansion (monad\each meta_monad expansion top_level_expansion)]
- (in (list\conjoint recursive_expansion)))
+ recursive_expansion (monad#each meta_monad expansion top_level_expansion)]
+ (in (list#conjoint recursive_expansion)))
{#None}
(in (list token))}
@@ -2085,92 +2085,92 @@
({{#Some macro}
(do meta_monad
[expansion (("lux type as" Macro' macro) args)
- expansion' (monad\each meta_monad full_expansion expansion)]
- (in (list\conjoint expansion')))
+ expansion' (monad#each meta_monad full_expansion expansion)]
+ (in (list#conjoint expansion')))
{#None}
(do meta_monad
- [args' (monad\each meta_monad full_expansion args)]
- (in (list (form$ {#Item (identifier$ name) (list\conjoint args')}))))}
+ [args' (monad#each meta_monad full_expansion args)]
+ (in (list (form$ {#Item (identifier$ name) (list#conjoint args')}))))}
?macro))
[_ {#Form members}]
(do meta_monad
- [members' (monad\each meta_monad full_expansion members)]
- (in (list (form$ (list\conjoint members')))))
+ [members' (monad#each meta_monad full_expansion members)]
+ (in (list (form$ (list#conjoint members')))))
[_ {#Variant members}]
(do meta_monad
- [members' (monad\each meta_monad full_expansion members)]
- (in (list (variant$ (list\conjoint members')))))
+ [members' (monad#each meta_monad full_expansion members)]
+ (in (list (variant$ (list#conjoint members')))))
[_ {#Tuple members}]
(do meta_monad
- [members' (monad\each meta_monad full_expansion members)]
- (in (list (tuple$ (list\conjoint members')))))
+ [members' (monad#each meta_monad full_expansion members)]
+ (in (list (tuple$ (list#conjoint members')))))
_
(in_meta (list syntax))}
syntax))
-(def:''' .private (text\encoded original)
+(def:''' .private (text#encoded original)
(-> Text Text)
- ($_ text\composite ..double_quote original ..double_quote))
+ ($_ text#composite ..double_quote original ..double_quote))
-(def:''' .private (code\encoded code)
+(def:''' .private (code#encoded code)
(-> Code Text)
({[_ {#Bit value}]
- (bit\encoded value)
+ (bit#encoded value)
[_ {#Nat value}]
- (nat\encoded value)
+ (nat#encoded value)
[_ {#Int value}]
- (int\encoded value)
+ (int#encoded value)
[_ {#Rev value}]
- ("lux io error" "@code\encoded Undefined behavior.")
+ ("lux io error" "@code#encoded Undefined behavior.")
[_ {#Frac value}]
- (frac\encoded value)
+ (frac#encoded value)
[_ {#Text value}]
- (text\encoded value)
+ (text#encoded value)
[_ {#Identifier [module name]}]
- (if (text\= "" module)
+ (if (text#= "" module)
name
- ($_ text\composite module "." name))
+ ($_ text#composite module "." name))
[_ {#Form xs}]
- ($_ text\composite "(" (|> xs
- (list\each code\encoded)
- (list\interposed " ")
- list\reversed
- (list\mix text\composite "")) ")")
+ ($_ text#composite "(" (|> xs
+ (list#each code#encoded)
+ (list#interposed " ")
+ list#reversed
+ (list#mix text#composite "")) ")")
[_ {#Tuple xs}]
- ($_ text\composite "[" (|> xs
- (list\each code\encoded)
- (list\interposed " ")
- list\reversed
- (list\mix text\composite "")) "]")
+ ($_ text#composite "[" (|> xs
+ (list#each code#encoded)
+ (list#interposed " ")
+ list#reversed
+ (list#mix text#composite "")) "]")
[_ {#Variant xs}]
- ($_ text\composite "{" (|> xs
- (list\each code\encoded)
- (list\interposed " ")
- list\reversed
- (list\mix text\composite "")) "}")}
+ ($_ text#composite "{" (|> xs
+ (list#each code#encoded)
+ (list#interposed " ")
+ list#reversed
+ (list#mix text#composite "")) "}")}
code))
(def:''' .private (normal_type type)
(-> Code Code)
({[_ {#Variant {#Item [_ {#Identifier identifier}] parts}}]
- (` {(~ (identifier$ identifier)) (~+ (list\each normal_type parts))})
+ (` {(~ (identifier$ identifier)) (~+ (list#each normal_type parts))})
[_ {#Tuple members}]
- (` (Tuple (~+ (list\each normal_type members))))
+ (` (Tuple (~+ (list#each normal_type members))))
[_ {#Form {#Item [_ {#Text "lux in-module"}]
{#Item [_ {#Text module}]
@@ -2200,10 +2200,10 @@
{#End}}}}}}]
[_ {#Form {#Item type_fn args}}]
- (list\mix ("lux type check" (-> Code Code Code)
+ (list#mix ("lux type check" (-> Code Code Code)
(function' [arg type_fn] (` {.#Apply (~ arg) (~ type_fn)})))
(normal_type type_fn)
- (list\each normal_type args))
+ (list#each normal_type args))
_
type}
@@ -2262,8 +2262,8 @@
(let' [[x y] xy]
<value>))]
- [product\left a x]
- [product\right b y])
+ [product#left a x]
+ [product#right b y])
(def:''' .private (identifier prefix state)
(-> Text ($' Meta Code))
@@ -2277,13 +2277,13 @@
#seed ("lux i64 +" 1 seed) #expected expected
#location location #extensions extensions
#scope_type_vars scope_type_vars #eval _eval]
- (local_identifier$ ($_ text\composite "__gensym__" prefix (nat\encoded seed)))}}
+ (local_identifier$ ($_ text#composite "__gensym__" prefix (nat#encoded seed)))}}
state))
(macro:' .public (exec tokens)
({{#Item value actions}
(let' [dummy (local_identifier$ "")]
- (in_meta (list (list\mix ("lux type check" (-> Code Code Code)
+ (in_meta (list (list#mix ("lux type check" (-> Code Code Code)
(function' [pre post] (` ({(~ dummy) (~ post)}
(~ pre)))))
value
@@ -2291,7 +2291,7 @@
_
(failure "Wrong syntax for exec")}
- (list\reversed tokens)))
+ (list#reversed tokens)))
(macro:' .private (def:' tokens)
(let' [parts (: (Maybe [Code Code (List Code) (Maybe Code) Code])
@@ -2357,11 +2357,11 @@
(do meta_monad [] (in (list)))
_
- (failure ($_ text\composite "'lux.case' expects an even number of tokens: " (|> branches
- (list\each code\encoded)
- (list\interposed " ")
- list\reversed
- (list\mix text\composite ""))))}
+ (failure ($_ text#composite "'lux.case' expects an even number of tokens: " (|> branches
+ (list#each code#encoded)
+ (list#interposed " ")
+ list#reversed
+ (list#mix text#composite ""))))}
branches))
(macro:' .public (case tokens)
@@ -2398,9 +2398,9 @@
_
(let' [pairs (|> patterns
- (list\each (function' [pattern] (list pattern body)))
- (list\conjoint))]
- (in_meta (list\composite pairs branches))))
+ (list#each (function' [pattern] (list pattern body)))
+ (list#conjoint))]
+ (in_meta (list#composite pairs branches))))
_
(failure "Wrong syntax for ^or")))
@@ -2416,9 +2416,9 @@
(macro:' .public (let tokens)
(case tokens
(^ (list [_ {#Tuple bindings}] body))
- (if (multiple? 2 (list\size bindings))
- (|> bindings pairs list\reversed
- (list\mix (: (-> [Code Code] Code Code)
+ (if (multiple? 2 (list#size bindings))
+ (|> bindings pairs list#reversed
+ (list#mix (: (-> [Code Code] Code Code)
(function' [lr body']
(let' [[l r] lr]
(if (identifier? l)
@@ -2450,7 +2450,7 @@
(` ([(~ g!name) (~ g!blank)]
(.case (~ g!blank) (~ arg) (~ body'))))))))]
(in_meta (list (nest (..local_identifier$ g!name) head
- (list\mix (nest g!blank) body (list\reversed tail))))))
+ (list#mix (nest g!blank) body (list#reversed tail))))))
{#None}
(failure "Wrong syntax for function")))
@@ -2622,7 +2622,7 @@
_
(` ("lux macro"
- (function ((~ name) (~+ (list\each local_identifier$ args))) (~ body)))))]
+ (function ((~ name) (~+ (list#each local_identifier$ args))) (~ body)))))]
(in_meta (list (` ("lux def" (~ name)
(~ body)
(~ export_policy))))))
@@ -2630,7 +2630,7 @@
{#None}
(failure "Wrong syntax for macro:")))
-(def: (list\one f xs)
+(def: (list#one f xs)
(All (_ a b)
(-> (-> a (Maybe b)) (List a) (Maybe b)))
(case xs
@@ -2640,16 +2640,16 @@
{#Item x xs'}
(case (f x)
{#None}
- (list\one f xs')
+ (list#one f xs')
{#Some y}
{#Some y})))
(template [<name> <form> <message>]
[(macro: .public (<name> tokens)
- (case (list\reversed tokens)
+ (case (list#reversed tokens)
(^ (list& last init))
- (in_meta (list (list\mix (: (-> Code Code Code)
+ (in_meta (list (list#mix (: (-> Code Code Code)
(function (_ pre post) (` <form>)))
last
init)))
@@ -2668,7 +2668,7 @@
(-> Text Nothing)
("lux io error" message))
-(macro: (maybe\else tokens state)
+(macro: (maybe#else tokens state)
(case tokens
(^ (list else maybe))
(let [g!temp (: Code [dummy_location {#Identifier ["" ""]}])
@@ -2681,9 +2681,9 @@
{#Right [state (list code)]})
_
- {#Left "Wrong syntax for maybe\else"}))
+ {#Left "Wrong syntax for maybe#else"}))
-(def: (text\all_split_by splitter input)
+(def: (text#all_split_by splitter input)
(-> Text Text (List Text))
(case (..index splitter input)
{#None}
@@ -2691,7 +2691,7 @@
{#Some idx}
(list& ("lux text clip" 0 idx input)
- (text\all_split_by splitter
+ (text#all_split_by splitter
(let [after_offset ("lux i64 +" 1 idx)
after_length ("lux i64 -"
after_offset
@@ -2835,29 +2835,29 @@
#scopes scopes #type_context types #host host
#seed seed #expected expected #location location #extensions extensions
#scope_type_vars scope_type_vars #eval _eval] state]
- (case (plist\value name modules)
+ (case (plist#value name modules)
{#Some module}
{#Right state module}
_
- {#Left ($_ text\composite "Unknown module: " name)}))))
+ {#Left ($_ text#composite "Unknown module: " name)}))))
(def: (type_slot [module name])
(-> Name (Meta [Nat (List Name) Bit Type]))
(do meta_monad
[=module (..module module)
.let [[#module_hash _ #module_aliases _ #definitions definitions #imports _ #module_state _] =module]]
- (case (plist\value name definitions)
+ (case (plist#value name definitions)
{#Some {#Slot [exported type group index]}}
(in_meta [index
- (list\each (function (_ slot)
+ (list#each (function (_ slot)
[module slot])
group)
exported
type])
_
- (failure (text\composite "Unknown slot: " (name\encoded [module name]))))))
+ (failure (text#composite "Unknown slot: " (name#encoded [module name]))))))
(def: (record_slots type)
(-> Type (Meta (Maybe [(List Name) (List Type)])))
@@ -2875,11 +2875,11 @@
(do meta_monad
[=module (..module module)
.let [[#module_hash _ #module_aliases _ #definitions definitions #imports _ #module_state _] =module]]
- (case (plist\value name definitions)
+ (case (plist#value name definitions)
{#Some {#Type [exported? {#Named _ _type} {#Right slots}]}}
(case (interface_methods _type)
{#Some members}
- (in_meta {#Some [(list\each (function (_ slot) [module slot])
+ (in_meta {#Some [(list#each (function (_ slot) [module slot])
{#Item slots})
members]})
@@ -2906,7 +2906,7 @@
{#None}
{#Left "Not expecting any type."}))))
-(def: (type\encoded type)
+(def: (type#encoded type)
(-> Type Text)
(case type
{#Primitive name params}
@@ -2915,46 +2915,46 @@
name
_
- ($_ text\composite "(" name " " (|> params (list\each type\encoded) (list\interposed " ") list\reversed (list\mix text\composite "")) ")"))
+ ($_ text#composite "(" name " " (|> params (list#each type#encoded) (list#interposed " ") list#reversed (list#mix text#composite "")) ")"))
{#Sum _}
- ($_ text\composite "{" (|> (flat_variant type) (list\each type\encoded) (list\interposed " ") list\reversed (list\mix text\composite "")) "}")
+ ($_ text#composite "{" (|> (flat_variant type) (list#each type#encoded) (list#interposed " ") list#reversed (list#mix text#composite "")) "}")
{#Product _}
- ($_ text\composite "[" (|> (flat_tuple type) (list\each type\encoded) (list\interposed " ") list\reversed (list\mix text\composite "")) "]")
+ ($_ text#composite "[" (|> (flat_tuple type) (list#each type#encoded) (list#interposed " ") list#reversed (list#mix text#composite "")) "]")
{#Function _}
- ($_ text\composite "(-> " (|> (flat_lambda type) (list\each type\encoded) (list\interposed " ") list\reversed (list\mix text\composite "")) ")")
+ ($_ text#composite "(-> " (|> (flat_lambda type) (list#each type#encoded) (list#interposed " ") list#reversed (list#mix text#composite "")) ")")
{#Parameter id}
- (nat\encoded id)
+ (nat#encoded id)
{#Var id}
- ($_ text\composite "⌈v:" (nat\encoded id) "⌋")
+ ($_ text#composite "⌈v:" (nat#encoded id) "⌋")
{#Ex id}
- ($_ text\composite "⟨e:" (nat\encoded id) "⟩")
+ ($_ text#composite "⟨e:" (nat#encoded id) "⟩")
{#UnivQ env body}
- ($_ text\composite "(All " (type\encoded body) ")")
+ ($_ text#composite "(All " (type#encoded body) ")")
{#ExQ env body}
- ($_ text\composite "(Ex " (type\encoded body) ")")
+ ($_ text#composite "(Ex " (type#encoded body) ")")
{#Apply _}
(let [[func args] (flat_application type)]
- ($_ text\composite
- "(" (type\encoded func) " "
- (|> args (list\each type\encoded) (list\interposed " ") list\reversed (list\mix text\composite ""))
+ ($_ text#composite
+ "(" (type#encoded func) " "
+ (|> args (list#each type#encoded) (list#interposed " ") list#reversed (list#mix text#composite ""))
")"))
{#Named name _}
- (name\encoded name)
+ (name#encoded name)
))
(macro: .public (implementation tokens)
(do meta_monad
- [tokens' (monad\each meta_monad expansion tokens)
+ [tokens' (monad#each meta_monad expansion tokens)
struct_type ..expected_type
tags+type (record_slots struct_type)
tags (: (Meta (List Name))
@@ -2963,40 +2963,40 @@
(in_meta tags)
_
- (failure ($_ text\composite
+ (failure ($_ text#composite
"No tags available for type: "
- (type\encoded struct_type)))))
+ (type#encoded struct_type)))))
.let [tag_mappings (: (List [Text Code])
- (list\each (function (_ tag)
- [(product\right tag)
+ (list#each (function (_ tag)
+ [(product#right tag)
(identifier$ tag)])
tags))]
- members (monad\each meta_monad
+ members (monad#each meta_monad
(: (-> Code (Meta (List Code)))
(function (_ token)
(case token
(^ [_ {#Form (list [_ {#Text "lux def"}] [_ {#Identifier ["" slot_name]}] value export_policy)}])
- (case (plist\value slot_name tag_mappings)
+ (case (plist#value slot_name tag_mappings)
{#Some tag}
(in (list tag value))
_
- (failure (text\composite "Unknown implementation member: " slot_name)))
+ (failure (text#composite "Unknown implementation member: " slot_name)))
_
(failure "Invalid implementation member."))))
- (list\conjoint tokens'))]
- (in (list (tuple$ (list\conjoint members))))))
+ (list#conjoint tokens'))]
+ (in (list (tuple$ (list#conjoint members))))))
-(def: (text\interposed separator parts)
+(def: (text#interposed separator parts)
(-> Text (List Text) Text)
(case parts
{#End}
""
{#Item head tail}
- (list\mix (function (_ right left)
- ($_ text\composite left separator right))
+ (list#mix (function (_ right left)
+ ($_ text#composite left separator right))
head
tail)))
@@ -3036,7 +3036,7 @@
{#None}
(failure "Wrong syntax for implementation:")))
-(def: (function\identity value)
+(def: (function#identity value)
(All (_ a)
(-> a a))
value)
@@ -3076,9 +3076,9 @@
(macro: .public (Variant tokens)
(case (everyP caseP tokens)
{#Some cases}
- (in_meta (list (` (..Union (~+ (list\each product\right cases))))
- (variant$ (list\each (function (_ case)
- (text$ (product\left case)))
+ (in_meta (list (` (..Union (~+ (list#each product#right cases))))
+ (variant$ (list#each (function (_ case)
+ (text$ (product#left case)))
cases))))
{#None}
@@ -3098,9 +3098,9 @@
(^ (list [_ {#Tuple record}]))
(case (everyP slotP record)
{#Some slots}
- (in_meta (list (` (..Tuple (~+ (list\each product\right slots))))
- (tuple$ (list\each (function (_ slot)
- (text$ (product\left slot)))
+ (in_meta (list (` (..Tuple (~+ (list#each product#right slots))))
+ (tuple$ (list#each (function (_ slot)
+ (text$ (product#left slot)))
slots))))
{#None}
@@ -3174,7 +3174,7 @@
{#Some type}
_
- {#Some (` (.All ((~ type_name) (~+ (list\each local_identifier$ args)))
+ {#Some (` (.All ((~ type_name) (~+ (list#each local_identifier$ args)))
(~ type)))}))]]
(case type'
{#Some type''}
@@ -3187,10 +3187,10 @@
(~ typeC)
(~ (case labels
{#Left tags}
- (` {(~+ (list\each text$ tags))})
+ (` {(~+ (list#each text$ tags))})
{#Right slots}
- (` [(~+ (list\each text$ slots))])))
+ (` [(~+ (list#each text$ slots))])))
(~ export_policy)))
_
@@ -3240,7 +3240,7 @@
(def: (referral_references defs)
(-> (List Code) (Meta (List Text)))
- (monad\each meta_monad
+ (monad#each meta_monad
(: (-> Code (Meta Text))
(function (_ def)
(case def
@@ -3285,7 +3285,7 @@
(^ (list& [_ {#Form (list& [_ {#Text prefix}] structs)}] parts'))
(do meta_monad
- [structs' (monad\each meta_monad
+ [structs' (monad#each meta_monad
(function (_ struct)
(case struct
[_ {#Identifier ["" struct_name]}]
@@ -3302,24 +3302,24 @@
_
(in_meta [{#End} parts])))
-(def: (text\split_at' at x)
+(def: (text#split_at' at x)
(-> Nat Text [Text Text])
[("lux text clip" 0 at x)
("lux text clip" at (|> x "lux text size" ("lux i64 -" at)) x)])
-(def: (text\split_by token sample)
+(def: (text#split_by token sample)
(-> Text Text (Maybe [Text Text]))
(do ..maybe_monad
[index (..index token sample)
- .let [[pre post'] (text\split_at' index sample)
- [_ post] (text\split_at' ("lux text size" token) post')]]
+ .let [[pre post'] (text#split_at' index sample)
+ [_ post] (text#split_at' ("lux text size" token) post')]]
(in [pre post])))
(def: (replaced pattern replacement template)
(-> Text Text Text Text)
((: (-> Text Text Text)
(function (recur left right)
- (case (..text\split_by pattern right)
+ (case (..text#split_by pattern right)
{#Some [pre post]}
(recur ($_ "lux text concat" left pre replacement) post)
@@ -3329,12 +3329,12 @@
(def: (alias_stand_in index)
(-> Nat Text)
- ($_ "lux text concat" "[" (nat\encoded index) "]"))
+ ($_ "lux text concat" "[" (nat#encoded index) "]"))
(def: (module_alias context aliased)
(-> (List Text) Text Text)
- (product\right
- (list\mix (function (_ replacement [index aliased])
+ (product#right
+ (list#mix (function (_ replacement [index aliased])
[("lux i64 +" 1 index)
(replaced (alias_stand_in index) replacement aliased)])
[0 aliased]
@@ -3348,8 +3348,8 @@
(def: (normal_parallel_path' hierarchy root)
(-> Text Text Text)
- (case [(text\split_by ..module_separator hierarchy)
- (text\split_by ..parallel_hierarchy_sigil root)]
+ (case [(text#split_by ..module_separator hierarchy)
+ (text#split_by ..parallel_hierarchy_sigil root)]
[{#Some [_ hierarchy']}
{#Some ["" root']}]
(normal_parallel_path' hierarchy' root')
@@ -3357,11 +3357,11 @@
_
(case root
"" hierarchy
- _ ($_ text\composite root ..module_separator hierarchy))))
+ _ ($_ text#composite root ..module_separator hierarchy))))
(def: (normal_parallel_path hierarchy root)
(-> Text Text (Maybe Text))
- (case (text\split_by ..parallel_hierarchy_sigil root)
+ (case (text#split_by ..parallel_hierarchy_sigil root)
{#Some ["" root']}
{#Some (normal_parallel_path' hierarchy root')}
@@ -3379,14 +3379,14 @@
(relative_ups ("lux i64 +" 1 relatives) input)
relatives)))
-(def: (list\after amount list)
+(def: (list#after amount list)
(All (_ a) (-> Nat (List a) (List a)))
(case [amount list]
(^or [0 _] [_ {#End}])
list
[_ {#Item _ tail}]
- (list\after ("lux i64 -" 1 amount) tail)))
+ (list#after ("lux i64 -" 1 amount) tail)))
(def: (absolute_module_name nested? relative_root module)
(-> Bit Text Text (Meta Text))
@@ -3397,28 +3397,28 @@
module))
relatives
- (let [parts (text\all_split_by ..module_separator relative_root)
+ (let [parts (text#all_split_by ..module_separator relative_root)
jumps ("lux i64 -" 1 relatives)]
- (if (n/< (list\size parts) jumps)
+ (if (n/< (list#size parts) jumps)
(let [prefix (|> parts
- list\reversed
- (list\after jumps)
- list\reversed
- (text\interposed ..module_separator))
+ list#reversed
+ (list#after jumps)
+ list#reversed
+ (text#interposed ..module_separator))
clean ("lux text clip" relatives (|> module "lux text size" ("lux i64 -" relatives)) module)
output (case ("lux text size" clean)
0 prefix
- _ ($_ text\composite prefix ..module_separator clean))]
+ _ ($_ text#composite prefix ..module_separator clean))]
(in_meta output))
(failure ($_ "lux text concat"
- "Cannot climb the module hierarchy..." ..\n
- "Importing module: " module ..\n
- " Relative Root: " relative_root ..\n))))))
+ "Cannot climb the module hierarchy..." \n
+ "Importing module: " module \n
+ " Relative Root: " relative_root \n))))))
(def: (imports_parser nested? relative_root context imports)
(-> Bit Text (List Text) (List Code) (Meta (List Importation)))
(do meta_monad
- [imports' (monad\each meta_monad
+ [imports' (monad#each meta_monad
(: (-> Code (Meta (List Importation)))
(function (_ token)
(case token
@@ -3485,11 +3485,11 @@
_
(do meta_monad
[current_module current_module_name]
- (failure ($_ text\composite
+ (failure ($_ text#composite
"Wrong syntax for import @ " current_module
- ..\n (code\encoded token)))))))
+ \n (code#encoded token)))))))
imports)]
- (in (list\conjoint imports'))))
+ (in (list#conjoint imports'))))
(def: (exported_definitions module state)
(-> Text (Meta (List Text)))
@@ -3499,9 +3499,9 @@
#seed seed #expected expected #location location #extensions extensions
#scope_type_vars scope_type_vars #eval _eval]
[current_module modules])]
- (case (plist\value module modules)
+ (case (plist#value module modules)
{#Some =module}
- (let [to_alias (list\each (: (-> [Text Global]
+ (let [to_alias (list#each (: (-> [Text Global]
(List Text))
(function (_ [name definition])
(case definition
@@ -3525,25 +3525,25 @@
(list))))
(let [[#module_hash _ #module_aliases _ #definitions definitions #imports _ #module_state _] =module]
definitions))]
- {#Right state (list\conjoint to_alias)})
+ {#Right state (list#conjoint to_alias)})
{#None}
- {#Left ($_ text\composite
- "Unknown module: " (text\encoded module) ..\n
+ {#Left ($_ text#composite
+ "Unknown module: " (text#encoded module) \n
"Current module: " (case current_module
{#Some current_module}
- (text\encoded current_module)
+ (text#encoded current_module)
{#None}
- "???") ..\n
+ "???") \n
"Known modules: " (|> modules
- (list\each (function (_ [name module])
+ (list#each (function (_ [name module])
(text$ name)))
tuple$
- code\encoded))})
+ code#encoded))})
))
-(def: (list\only p xs)
+(def: (list#only p xs)
(All (_ a)
(-> (-> a Bit) (List a) (List a)))
(case xs
@@ -3552,14 +3552,14 @@
{#Item x xs'}
(if (p x)
- {#Item x (list\only p xs')}
- (list\only p xs'))))
+ {#Item x (list#only p xs')}
+ (list#only p xs'))))
(def: (is_member? cases name)
(-> (List Text) Text Bit)
- (let [output (list\mix (function (_ case prev)
+ (let [output (list#mix (function (_ case prev)
(or prev
- (text\= case name)))
+ (text#= case name)))
#0
cases)]
output))
@@ -3578,16 +3578,16 @@
#scopes scopes #type_context types #host host
#seed seed #expected expected #location location #extensions extensions
#scope_type_vars scope_type_vars #eval _eval]
- (list\one (: (-> Scope (Maybe Type))
+ (list#one (: (-> Scope (Maybe Type))
(function (_ env)
(case env
[#name _
#inner _
#locals [#counter _ #mappings locals]
#captured [#counter _ #mappings closure]]
- (on_either (list\one (: (-> [Text [Type Any]] (Maybe Type))
+ (on_either (list#one (: (-> [Text [Type Any]] (Maybe Type))
(function (_ [bname [type _]])
- (if (text\= name bname)
+ (if (text#= name bname)
{#Some type}
{#None}))))
(: (List [Text [Type Any]]) locals)
@@ -3601,12 +3601,12 @@
#scopes scopes #type_context types #host host
#seed seed #expected expected #location location #extensions extensions
#scope_type_vars scope_type_vars #eval _eval] state]
- (case (plist\value v_module modules)
+ (case (plist#value v_module modules)
{#None}
{#None}
{#Some [#definitions definitions #module_hash _ #module_aliases _ #imports _ #module_state _]}
- (case (plist\value v_name definitions)
+ (case (plist#value v_name definitions)
{#None}
{#None}
@@ -3634,14 +3634,14 @@
#scopes scopes #type_context types #host host
#seed seed #expected expected #location location #extensions extensions
#scope_type_vars scope_type_vars #eval _eval] state]
- (case (plist\value v_module modules)
+ (case (plist#value v_module modules)
{#None}
- {#Left (text\composite "Unknown definition: " (name\encoded name))}
+ {#Left (text#composite "Unknown definition: " (name#encoded name))}
{#Some [#definitions definitions #module_hash _ #module_aliases _ #imports _ #module_state _]}
- (case (plist\value v_name definitions)
+ (case (plist#value v_name definitions)
{#None}
- {#Left (text\composite "Unknown definition: " (name\encoded name))}
+ {#Left (text#composite "Unknown definition: " (name#encoded name))}
{#Some definition}
(case definition
@@ -3655,10 +3655,10 @@
{#Right [state [..Type type]]}
{#Label _}
- {#Left (text\composite "Unknown definition: " (name\encoded name))}
+ {#Left (text#composite "Unknown definition: " (name#encoded name))}
{#Slot _}
- {#Left (text\composite "Unknown definition: " (name\encoded name))})))))
+ {#Left (text#composite "Unknown definition: " (name#encoded name))})))))
(def: (type_variable idx bindings)
(-> Nat (List [Nat (Maybe Type)]) (Maybe Type))
@@ -3677,7 +3677,7 @@
[.let [[module name] full_name]
current_module current_module_name]
(function (_ compiler)
- (let [temp (if (text\= "" module)
+ (let [temp (if (text#= "" module)
(case (in_env name compiler)
{#Some struct_type}
{#Right [compiler struct_type]}
@@ -3688,13 +3688,13 @@
{#Right [compiler struct_type]}
_
- {#Left ($_ text\composite "Unknown var: " (name\encoded full_name))}))
+ {#Left ($_ text#composite "Unknown var: " (name#encoded full_name))}))
(case (definition_type full_name compiler)
{#Some struct_type}
{#Right [compiler struct_type]}
_
- {#Left ($_ text\composite "Unknown var: " (name\encoded full_name))}))]
+ {#Left ($_ text#composite "Unknown var: " (name#encoded full_name))}))]
(case temp
{#Right [compiler {#Var type_id}]}
(let [[#info _ #source _ #current_module _ #modules _
@@ -3741,24 +3741,24 @@
struct_evidence (record_slots init_type)]
(case struct_evidence
{#None}
- (failure (text\composite "Can only 'open' structs: " (type\encoded init_type)))
+ (failure (text#composite "Can only 'open' structs: " (type#encoded init_type)))
{#Some tags&members}
(do meta_monad
[full_body ((: (-> Name [(List Name) (List Type)] Code (Meta Code))
(function (recur source [tags members] target)
- (let [locals (list\each (function (_ [t_module t_name])
+ (let [locals (list#each (function (_ [t_module t_name])
[[t_module t_name]
["" (..module_alias (list t_name) alias)]])
tags)
pattern (|> locals
- (list\each (function (_ [slot binding])
+ (list#each (function (_ [slot binding])
(list (identifier$ slot)
(identifier$ binding))))
- list\conjoint
+ list#conjoint
tuple$)]
(do meta_monad
- [enhanced_target (monad\mix meta_monad
+ [enhanced_target (monad#mix meta_monad
(function (_ [[_ m_local] m_type] enhanced_target)
(do meta_monad
[m_implementation (record_slots m_type)]
@@ -3780,11 +3780,11 @@
(failure "Wrong syntax for ^open")))
(macro: .public (cond tokens)
- (if ("lux i64 =" 0 (n/% 2 (list\size tokens)))
+ (if ("lux i64 =" 0 (n/% 2 (list#size tokens)))
(failure "cond requires an uneven number of arguments.")
- (case (list\reversed tokens)
+ (case (list#reversed tokens)
(^ (list& else branches'))
- (in_meta (list (list\mix (: (-> [Code Code] Code Code)
+ (in_meta (list (list#mix (: (-> [Code Code] Code Code)
(function (_ branch else)
(let [[right left] branch]
(` (if (~ left) (~ right) (~ else))))))
@@ -3821,13 +3821,13 @@
(case (interface_methods type)
{#Some members}
(let [pattern (|> (zipped/2 tags (enumeration members))
- (list\each (: (-> [Name [Nat Type]] (List Code))
+ (list#each (: (-> [Name [Nat Type]] (List Code))
(function (_ [[r_module r_name] [r_idx r_type]])
(list (identifier$ [r_module r_name])
(if ("lux i64 =" idx r_idx)
g!output
g!_)))))
- list\conjoint
+ list#conjoint
tuple$)]
(in_meta (list (` ({(~ pattern) (~ g!output)} (~ record))))))
@@ -3835,7 +3835,7 @@
(failure "value@ can only use records.")))
(^ (list [_ {#Tuple slots}] record))
- (in_meta (list (list\mix (: (-> Code Code Code)
+ (in_meta (list (list#mix (: (-> Code Code Code)
(function (_ slot inner)
(` (..value@ (~ slot) (~ inner)))))
record
@@ -3858,7 +3858,7 @@
.let [g!output (local_identifier$ short)
pattern (|> tags
enumeration
- (list\each (function (_ [tag_idx tag])
+ (list#each (function (_ [tag_idx tag])
(if ("lux i64 =" my_tag_index tag_idx)
g!output
g!_)))
@@ -3867,12 +3867,12 @@
(case output
{#Some [tags' members']}
(do meta_monad
- [decls' (monad\each meta_monad
+ [decls' (monad#each meta_monad
(: (-> [Nat Name Type] (Meta (List Code)))
(function (_ [sub_tag_index sname stype])
(open_declaration alias tags' sub_tag_index sname source+ stype)))
(enumeration (zipped/2 tags' members')))]
- (in_meta (list\conjoint decls')))
+ (in_meta (list#conjoint decls')))
_
(in_meta (list (` ("lux def" (~ (local_identifier$ (..module_alias (list short) alias)))
@@ -3891,14 +3891,14 @@
(case output
{#Some [tags members]}
(do meta_monad
- [decls' (monad\each meta_monad (: (-> [Nat Name Type] (Meta (List Code)))
+ [decls' (monad#each meta_monad (: (-> [Nat Name Type] (Meta (List Code)))
(function (_ [tag_index sname stype])
(open_declaration alias tags tag_index sname source stype)))
(enumeration (zipped/2 tags members)))]
- (in_meta (list\conjoint decls')))
+ (in_meta (list#conjoint decls')))
_
- (failure (text\composite "Can only 'open:' structs: " (type\encoded struct_type)))))
+ (failure (text#composite "Can only 'open:' structs: " (type#encoded struct_type)))))
_
(do meta_monad
@@ -3942,11 +3942,11 @@
#refer_open openings])
_
- (failure ($_ text\composite "Wrong syntax for refer @ " current_module
- ..\n (|> options
- (list\each code\encoded)
- (list\interposed " ")
- (list\mix text\composite "")))))))
+ (failure ($_ text#composite "Wrong syntax for refer @ " current_module
+ \n (|> options
+ (list#each code#encoded)
+ (list#interposed " ")
+ (list#mix text#composite "")))))))
(def: (referral_definitions module_name [r_defs r_opens])
(-> Text Refer (Meta (List Code)))
@@ -3954,12 +3954,12 @@
[current_module current_module_name
.let [test_referrals (: (-> Text (List Text) (List Text) (Meta (List Any)))
(function (_ module_name all_defs referred_defs)
- (monad\each meta_monad
+ (monad#each meta_monad
(: (-> Text (Meta Any))
(function (_ _def)
(if (is_member? all_defs _def)
(in_meta [])
- (failure ($_ text\composite _def " is not defined in module " module_name " @ " current_module)))))
+ (failure ($_ text#composite _def " is not defined in module " module_name " @ " current_module)))))
referred_defs)))]
defs' (case r_defs
{#All}
@@ -3975,25 +3975,25 @@
(do meta_monad
[*defs (exported_definitions module_name)
_ (test_referrals module_name *defs _defs)]
- (in (..list\only (|>> (is_member? _defs) not) *defs)))
+ (in (..list#only (|>> (is_member? _defs) not) *defs)))
{#Ignore}
(in (list))
{#Nothing}
(in (list)))
- .let [defs (list\each (: (-> Text Code)
+ .let [defs (list#each (: (-> Text Code)
(function (_ def)
(` ("lux def alias" (~ (local_identifier$ def)) (~ (identifier$ [module_name def]))))))
defs')
openings (|> r_opens
- (list\each (: (-> Openings (List Code))
+ (list#each (: (-> Openings (List Code))
(function (_ [alias structs])
- (list\each (function (_ name)
+ (list#each (function (_ name)
(` (open: (~ (text$ alias)) (~ (identifier$ [module_name name])))))
structs))))
- list\conjoint)]]
- (in (list\composite defs openings))))
+ list#conjoint)]]
+ (in (list#composite defs openings))))
(macro: (refer tokens)
(case tokens
@@ -4007,26 +4007,26 @@
(def: (refer_code module_name module_alias' [r_defs r_opens])
(-> Text (Maybe Text) Refer Code)
- (let [module_alias (..maybe\else module_name module_alias')
+ (let [module_alias (..maybe#else module_name module_alias')
localizations (: (List Code)
(case r_defs
{#All}
(list (' "*"))
{#Only defs}
- (list (variant$ (list (' "+") (tuple$ (list\each local_identifier$ defs)))))
+ (list (variant$ (list (' "+") (tuple$ (list#each local_identifier$ defs)))))
{#Exclude defs}
- (list (variant$ (list (' "-") (tuple$ (list\each local_identifier$ defs)))))
+ (list (variant$ (list (' "-") (tuple$ (list#each local_identifier$ defs)))))
{#Ignore}
(list)
{#Nothing}
(list)))
- openings (list\each (function (_ [alias structs])
+ openings (list#each (function (_ [alias structs])
(form$ (list& (text$ (..module_alias (list (alias_stand_in 0) module_alias) alias))
- (list\each local_identifier$ structs))))
+ (list#each local_identifier$ structs))))
r_opens)]
(` ((~! ..refer) (~ (text$ module_name))
(~+ localizations)
@@ -4037,27 +4037,27 @@
[current_module current_module_name
imports (imports_parser #0 current_module {#End} _imports)
.let [=imports (|> imports
- (list\each (: (-> Importation Code)
+ (list#each (: (-> Importation Code)
(function (_ [module_name m_alias =refer])
- (` [(~ (text$ module_name)) (~ (text$ (..maybe\else "" m_alias)))]))))
+ (` [(~ (text$ module_name)) (~ (text$ (..maybe#else "" m_alias)))]))))
tuple$)
- =refers (list\each (: (-> Importation Code)
+ =refers (list#each (: (-> Importation Code)
(function (_ [module_name m_alias =refer])
(refer_code module_name m_alias =refer)))
imports)
=module (` ("lux def module" (~ =imports)))]]
(in {#Item =module =refers})))
-(macro: .public (\ tokens)
+(macro: .public (# tokens)
(case tokens
(^ (list struct [_ {#Identifier member}]))
(in_meta (list (` (let [(^open (~ (text$ (alias_stand_in 0)))) (~ struct)] (~ (identifier$ member))))))
(^ (list& struct member args))
- (in_meta (list (` ((..\ (~ struct) (~ member)) (~+ args)))))
+ (in_meta (list (` ((..# (~ struct) (~ member)) (~+ args)))))
_
- (failure "Wrong syntax for \")))
+ (failure "Wrong syntax for #")))
(macro: .public (with@ tokens)
(case tokens
@@ -4069,7 +4069,7 @@
(case (interface_methods type)
{#Some members}
(do meta_monad
- [pattern' (monad\each meta_monad
+ [pattern' (monad#each meta_monad
(: (-> [Name [Nat Type]] (Meta [Name Nat Code]))
(function (_ [r_slot_name [r_idx r_type]])
(do meta_monad
@@ -4077,20 +4077,20 @@
(in_meta [r_slot_name r_idx g!slot]))))
(zipped/2 tags (enumeration members)))]
(let [pattern (|> pattern'
- (list\each (: (-> [Name Nat Code] (List Code))
+ (list#each (: (-> [Name Nat Code] (List Code))
(function (_ [r_slot_name r_idx r_var])
(list (identifier$ r_slot_name)
r_var))))
- list\conjoint
+ list#conjoint
tuple$)
output (|> pattern'
- (list\each (: (-> [Name Nat Code] (List Code))
+ (list#each (: (-> [Name Nat Code] (List Code))
(function (_ [r_slot_name r_idx r_var])
(list (identifier$ r_slot_name)
(if ("lux i64 =" idx r_idx)
value
r_var)))))
- list\conjoint
+ list#conjoint
tuple$)]
(in_meta (list (` ({(~ pattern) (~ output)} (~ record)))))))
@@ -4104,23 +4104,23 @@
_
(do meta_monad
- [bindings (monad\each meta_monad
+ [bindings (monad#each meta_monad
(: (-> Code (Meta Code))
(function (_ _) (..identifier "temp")))
slots)
.let [pairs (zipped/2 slots bindings)
- update_expr (list\mix (: (-> [Code Code] Code Code)
+ update_expr (list#mix (: (-> [Code Code] Code Code)
(function (_ [s b] v)
(` (..with@ (~ s) (~ v) (~ b)))))
value
- (list\reversed pairs))
- [_ accesses'] (list\mix (: (-> [Code Code] [Code (List (List Code))] [Code (List (List Code))])
+ (list#reversed pairs))
+ [_ accesses'] (list#mix (: (-> [Code Code] [Code (List (List Code))] [Code (List (List Code))])
(function (_ [new_slot new_binding] [old_record accesses'])
[(` (value@ (~ new_slot) (~ new_binding)))
{#Item (list new_binding old_record) accesses'}]))
[record (: (List (List Code)) {#End})]
pairs)
- accesses (list\conjoint (list\reversed accesses'))]]
+ accesses (list#conjoint (list#reversed accesses'))]]
(in (list (` (let [(~+ accesses)]
(~ update_expr)))))))
@@ -4152,7 +4152,7 @@
(case (interface_methods type)
{#Some members}
(do meta_monad
- [pattern' (monad\each meta_monad
+ [pattern' (monad#each meta_monad
(: (-> [Name [Nat Type]] (Meta [Name Nat Code]))
(function (_ [r_slot_name [r_idx r_type]])
(do meta_monad
@@ -4160,20 +4160,20 @@
(in_meta [r_slot_name r_idx g!slot]))))
(zipped/2 tags (enumeration members)))]
(let [pattern (|> pattern'
- (list\each (: (-> [Name Nat Code] (List Code))
+ (list#each (: (-> [Name Nat Code] (List Code))
(function (_ [r_slot_name r_idx r_var])
(list (identifier$ r_slot_name)
r_var))))
- list\conjoint
+ list#conjoint
tuple$)
output (|> pattern'
- (list\each (: (-> [Name Nat Code] (List Code))
+ (list#each (: (-> [Name Nat Code] (List Code))
(function (_ [r_slot_name r_idx r_var])
(list (identifier$ r_slot_name)
(if ("lux i64 =" idx r_idx)
(` ((~ fun) (~ r_var)))
r_var)))))
- list\conjoint
+ list#conjoint
tuple$)]
(in_meta (list (` ({(~ pattern) (~ output)} (~ record)))))))
@@ -4219,20 +4219,20 @@
branches))
(case (: (Maybe (List Code))
(do maybe_monad
- [bindings' (monad\each maybe_monad identifier_short bindings)
- data' (monad\each maybe_monad tuple_list data)]
- (let [num_bindings (list\size bindings')]
+ [bindings' (monad#each maybe_monad identifier_short bindings)
+ data' (monad#each maybe_monad tuple_list data)]
+ (let [num_bindings (list#size bindings')]
(if (every? (|>> ("lux i64 =" num_bindings))
- (list\each list\size data'))
+ (list#each list#size data'))
(let [apply (: (-> Replacement_Environment (List Code))
- (function (_ env) (list\each (realized_template env) templates)))]
+ (function (_ env) (list#each (realized_template env) templates)))]
(|> data'
- (list\each (function\composite apply (replacement_environment bindings')))
- list\conjoint
+ (list#each (function#composite apply (replacement_environment bindings')))
+ list#conjoint
in))
{#None}))))
{#Some output}
- (in_meta (list\composite output branches))
+ (in_meta (list#composite output branches))
{#None}
(failure "Wrong syntax for ^template"))
@@ -4269,7 +4269,7 @@
(-> Type Code)
(case type
{#Primitive name params}
- (` {.#Primitive (~ (text$ name)) (~ (untemplated_list (list\each type_code params)))})
+ (` {.#Primitive (~ (text$ name)) (~ (untemplated_list (list#each type_code params)))})
(^template [<tag>]
[{<tag> left right}
@@ -4285,7 +4285,7 @@
(^template [<tag>]
[{<tag> env type}
- (let [env' (untemplated_list (list\each type_code env))]
+ (let [env' (untemplated_list (list#each type_code env))]
(` {<tag> (~ env') (~ (type_code type))}))])
([.#UnivQ] [.#ExQ])
@@ -4309,24 +4309,24 @@
(case ?params
{#Some [name bindings body]}
(let [pairs (pairs bindings)
- vars (list\each product\left pairs)
- inits (list\each product\right pairs)]
+ vars (list#each product#left pairs)
+ inits (list#each product#right pairs)]
(if (every? identifier? inits)
(do meta_monad
[inits' (: (Meta (List Name))
- (case (monad\each maybe_monad identifier_name inits)
+ (case (monad#each maybe_monad identifier_name inits)
{#Some inits'} (in_meta inits')
{#None} (failure "Wrong syntax for loop")))
- init_types (monad\each meta_monad type_definition inits')
+ init_types (monad#each meta_monad type_definition inits')
expected ..expected_type]
(in_meta (list (` (("lux type check"
- (-> (~+ (list\each type_code init_types))
+ (-> (~+ (list#each type_code init_types))
(~ (type_code expected)))
(function ((~ name) (~+ vars))
(~ body)))
(~+ inits))))))
(do meta_monad
- [aliases (monad\each meta_monad
+ [aliases (monad#each meta_monad
(: (-> Code (Meta Code))
(function (_ _) (..identifier "")))
inits)]
@@ -4346,7 +4346,7 @@
(case (: (Maybe [Name (List Name)])
(do maybe_monad
[hslot (..identifier_name hslot')
- tslots (monad\each maybe_monad ..identifier_name tslots')]
+ tslots (monad#each maybe_monad ..identifier_name tslots')]
(in [hslot tslots])))
{#Some slots}
(in_meta slots)
@@ -4355,22 +4355,22 @@
(failure "Wrong syntax for ^slots")))
.let [[hslot tslots] slots]
hslot (..normal hslot)
- tslots (monad\each meta_monad ..normal tslots)
+ tslots (monad#each meta_monad ..normal tslots)
output (..type_slot hslot)
g!_ (..identifier "_")
.let [[idx tags exported? type] output
- slot_pairings (list\each (: (-> Name [Text Code])
+ slot_pairings (list#each (: (-> Name [Text Code])
(function (_ [module name])
[name (local_identifier$ name)]))
(list& hslot tslots))
pattern (|> tags
- (list\each (: (-> Name (List Code))
+ (list#each (: (-> Name (List Code))
(function (_ [module name])
(let [tag (identifier$ [module name])]
- (case (plist\value name slot_pairings)
+ (case (plist#value name slot_pairings)
{#Some binding} (list tag binding)
{#None} (list tag g!_))))))
- list\conjoint
+ list#conjoint
tuple$)]]
(in_meta (list& pattern body branches)))
@@ -4384,14 +4384,14 @@
(list target)
[_ {#Identifier [module name]}]
- (if (and (text\= "" module)
- (text\= label name))
+ (if (and (text#= "" module)
+ (text#= label name))
tokens
(list target))
(^template [<tag>]
[[location {<tag> elems}]
- (list [location {<tag> (list\conjoint (list\each (with_expansions' label tokens) elems))}])])
+ (list [location {<tag> (list#conjoint (list#each (with_expansions' label tokens) elems))}])])
([#Form]
[#Variant]
[#Tuple])))
@@ -4453,13 +4453,13 @@
["Text" Text text$])
_
- (failure (text\composite "Cannot anti-quote type: " (name\encoded name))))))
+ (failure (text#composite "Cannot anti-quote type: " (name#encoded name))))))
(def: (static_literal token)
(-> Code (Meta Code))
(case token
[_ {#Identifier [def_module def_name]}]
- (if (text\= "" def_module)
+ (if (text#= "" def_module)
(do meta_monad
[current_module current_module_name]
(static_simple_literal [current_module def_name]))
@@ -4468,7 +4468,7 @@
(^template [<tag>]
[[meta {<tag> parts}]
(do meta_monad
- [=parts (monad\each meta_monad static_literal parts)]
+ [=parts (monad#each meta_monad static_literal parts)]
(in [meta {<tag> =parts}]))])
([#Form]
[#Variant]
@@ -4477,7 +4477,7 @@
_
(in_meta token)
... TODO: Figure out why this doesn't work:
- ... (\ meta_monad in token)
+ ... (# meta_monad in token)
))
(macro: .public (static tokens)
@@ -4511,12 +4511,12 @@
{#Item init extras}
(do meta_monad
- [extras' (monad\each meta_monad case_level^ extras)]
+ [extras' (monad#each meta_monad case_level^ extras)]
(in [init extras']))))
(def: (multi_level_case$ g!_ [[init_pattern levels] body])
(-> Code [Multi_Level_Case Code] (List Code))
- (let [inner_pattern_body (list\mix (function (_ [calculation pattern] success)
+ (let [inner_pattern_body (list#mix (function (_ [calculation pattern] success)
(let [bind? (case pattern
[_ {#Identifier _}]
#1
@@ -4531,7 +4531,7 @@
(list)
(list g!_ (` {.#None}))))))))
(` {.#Some (~ body)})
- (: (List [Code Code]) (list\reversed levels)))]
+ (: (List [Code Code]) (list#reversed levels)))]
(list init_pattern inner_pattern_body)))
(macro: .public (^multi tokens)
@@ -4571,8 +4571,8 @@
... 'wrong_syntax_error' for easier maintenance of the error_messages.
(def: wrong_syntax_error
(-> Name Text)
- (|>> name\encoded
- (text\composite "Wrong syntax for ")))
+ (|>> name#encoded
+ (text#composite "Wrong syntax for ")))
(macro: .public (name_of tokens)
(case tokens
@@ -4596,12 +4596,12 @@
(^ (list [_ {#Nat idx}]))
(do meta_monad
[stvs ..scope_type_vars]
- (case (..item idx (list\reversed stvs))
+ (case (..item idx (list#reversed stvs))
{#Some var_id}
(in (list (` {.#Ex (~ (nat$ var_id))})))
{#None}
- (failure (text\composite "Indexed-type does not exist: " (nat\encoded idx)))))
+ (failure (text#composite "Indexed-type does not exist: " (nat#encoded idx)))))
_
(failure (..wrong_syntax_error (name_of ..$)))))
@@ -4655,7 +4655,7 @@
(do meta_monad
[location ..location
.let [[module line column] location
- location ($_ "lux text concat" (text\encoded module) "," (nat\encoded line) "," (nat\encoded column))
+ location ($_ "lux text concat" (text#encoded module) "," (nat#encoded line) "," (nat#encoded column))
message ($_ "lux text concat" "Undefined behavior @ " location)]]
(in (list (` (..panic! (~ (text$ message)))))))
@@ -4704,16 +4704,16 @@
[g!tokens (..identifier "tokens")
g!compiler (..identifier "compiler")
g!_ (..identifier "_")
- .let [rep_env (list\each (function (_ arg)
+ .let [rep_env (list#each (function (_ arg)
[arg (` ((~' ~) (~ (local_identifier$ arg))))])
args)]
this_module current_module_name]
(in (list (` (macro: (~ export_policy)
((~ (local_identifier$ name)) (~ g!tokens) (~ g!compiler))
(case (~ g!tokens)
- (^ (list (~+ (list\each local_identifier$ args))))
+ (^ (list (~+ (list#each local_identifier$ args))))
{.#Right [(~ g!compiler)
- (list (~+ (list\each (function (_ template)
+ (list (~+ (list#each (function (_ template)
(` (`' (~ (with_replacements rep_env
template)))))
input_templates)))]}
@@ -4760,14 +4760,14 @@
(in (:as ..Text value))
_
- (failure ($_ text\composite
- "Invalid target platform (must be a value of type Text): " (name\encoded identifier)
- " : " (..code\encoded (..type_code type))))))
+ (failure ($_ text#composite
+ "Invalid target platform (must be a value of type Text): " (name#encoded identifier)
+ " : " (..code#encoded (..type_code type))))))
_
- (failure ($_ text\composite
- "Invalid target platform syntax: " (..code\encoded choice)
- ..\n "Must be either a text literal or an identifier."))))
+ (failure ($_ text#composite
+ "Invalid target platform syntax: " (..code#encoded choice)
+ \n "Must be either a text literal or an identifier."))))
(def: (target_pick target options default)
(-> Text (List [Code Code]) (Maybe Code) (Meta (List Code)))
@@ -4775,7 +4775,7 @@
{#End}
(case default
{#None}
- (failure ($_ text\composite "No code for target platform: " target))
+ (failure ($_ text#composite "No code for target platform: " target))
{#Some default}
(in_meta (list default)))
@@ -4783,14 +4783,14 @@
{#Item [key pick] options'}
(do meta_monad
[platform (..platform_name key)]
- (if (text\= target platform)
+ (if (text#= target platform)
(in_meta (list pick))
(target_pick target options' default)))))
(def: (pairs' tokens)
(-> (List Code) (Maybe (List [Code Code])))
(if (|> tokens
- list\size
+ list#size
(n/% 2)
("lux i64 =" 0))
{#Some (pairs tokens)}
@@ -4830,9 +4830,9 @@
(^template [<tag>]
[[ann {<tag> parts}]
(do meta_monad
- [=parts (monad\each meta_monad embedded_expansions parts)]
- (in [(list\mix list\composite (list) (list\each product\left =parts))
- [ann {<tag> (list\each product\right =parts)}]]))])
+ [=parts (monad#each meta_monad embedded_expansions parts)]
+ (in [(list#mix list#composite (list) (list#each product#left =parts))
+ [ann {<tag> (list#each product#right =parts)}]]))])
([#Form]
[#Variant]
[#Tuple])
@@ -4847,8 +4847,8 @@
[=raw (..embedded_expansions raw)
.let [[labels labelled] =raw]]
(in (list (` (with_expansions [(~+ (|> labels
- (list\each (function (_ [label expansion]) (list label expansion)))
- list\conjoint))]
+ (list#each (function (_ [label expansion]) (list label expansion)))
+ list#conjoint))]
(~ labelled))))))
_
@@ -4871,16 +4871,16 @@
[(def: (<name> g!meta untemplated_pattern elems)
(-> Code (-> Code (Meta Code))
(-> (List Code) (Meta Code)))
- (case (list\reversed elems)
+ (case (list#reversed elems)
{#Item [_ {#Form {#Item [[_ {#Identifier ["" "~+"]}] {#Item [spliced {#End}]}]}}]
inits}
(do meta_monad
- [=inits (monad\each meta_monad untemplated_pattern (list\reversed inits))]
+ [=inits (monad#each meta_monad untemplated_pattern (list#reversed inits))]
(in (` [(~ g!meta) {<tag> (~ (untemplated_list& spliced =inits))}])))
_
(do meta_monad
- [=elems (monad\each meta_monad untemplated_pattern elems)]
+ [=elems (monad#each meta_monad untemplated_pattern elems)]
(in (` [(~ g!meta) {<tag> (~ (untemplated_list =elems))}])))))]
[.#Form untemplated_form]
@@ -4944,12 +4944,12 @@
(macro: .public (:let tokens)
(case tokens
(^ (list [_ {#Tuple bindings}] bodyT))
- (if (multiple? 2 (list\size bindings))
+ (if (multiple? 2 (list#size bindings))
(in_meta (list (` (..with_expansions [(~+ (|> bindings
..pairs
- (list\each (function (_ [localT valueT])
+ (list#each (function (_ [localT valueT])
(list localT (` (..as_is (~ valueT))))))
- (list\mix list\composite (list))))]
+ (list#mix list#composite (list))))]
(~ bodyT)))))
(..failure ":let requires an even number of parts"))
@@ -4980,11 +4980,11 @@
(macro: .public (Interface tokens)
(do meta_monad
- [methods' (monad\each meta_monad expansion tokens)]
- (case (everyP methodP (list\conjoint methods'))
+ [methods' (monad#each meta_monad expansion tokens)]
+ (case (everyP methodP (list#conjoint methods'))
{#Some methods}
- (in (list (` (..Tuple (~+ (list\each product\right methods))))
- (tuple$ (list\each (|>> product\left text$) methods))))
+ (in (list (` (..Tuple (~+ (list#each product#right methods))))
+ (tuple$ (list#each (|>> product#left text$) methods))))
{#None}
(failure "Wrong syntax for Interface"))))
diff --git a/stdlib/source/library/lux/abstract/apply.lux b/stdlib/source/library/lux/abstract/apply.lux
index 366e2e750..80234f653 100644
--- a/stdlib/source/library/lux/abstract/apply.lux
+++ b/stdlib/source/library/lux/abstract/apply.lux
@@ -26,18 +26,18 @@
(def: (on fgx fgf)
... TODO: Switch from this version to the one below (in comments) ASAP.
- (for [@.old (let [fgf' (\ f_apply on
+ (for [@.old (let [fgf' (# f_apply on
fgf
- (\ f_monad in (function (_ gf gx) (\ g_apply on gx gf))))]
- (:expected (\ f_apply on (:expected fgx) (:expected fgf'))))]
- (let [fgf' (\ f_apply on
+ (# f_monad in (function (_ gf gx) (# g_apply on gx gf))))]
+ (:expected (# f_apply on (:expected fgx) (:expected fgf'))))]
+ (let [fgf' (# f_apply on
fgf
- (\ f_monad in (function (_ gf gx) (\ g_apply on gx gf))))]
- (\ f_apply on fgx fgf')))
- ... (let [applyF (\ f_apply on)
- ... applyG (\ g_apply on)]
+ (# f_monad in (function (_ gf gx) (# g_apply on gx gf))))]
+ (# f_apply on fgx fgf')))
+ ... (let [applyF (# f_apply on)
+ ... applyG (# g_apply on)]
... ($_ applyF
... fgf
- ... (\ f_monad in applyG)
+ ... (# f_monad in applyG)
... fgx))
))
diff --git a/stdlib/source/library/lux/abstract/codec.lux b/stdlib/source/library/lux/abstract/codec.lux
index 9a772accf..e3f987bd2 100644
--- a/stdlib/source/library/lux/abstract/codec.lux
+++ b/stdlib/source/library/lux/abstract/codec.lux
@@ -19,10 +19,10 @@
(-> (Codec c b) (Codec b a)
(Codec c a)))
(def: encoded
- (|>> (\ ba_codec encoded)
- (\ cb_codec encoded)))
+ (|>> (# ba_codec encoded)
+ (# cb_codec encoded)))
(def: (decoded cy)
(do try.monad
- [by (\ cb_codec decoded cy)]
- (\ ba_codec decoded by))))
+ [by (# cb_codec decoded cy)]
+ (# ba_codec decoded by))))
diff --git a/stdlib/source/library/lux/abstract/comonad.lux b/stdlib/source/library/lux/abstract/comonad.lux
index d649ea244..5f5279c79 100644
--- a/stdlib/source/library/lux/abstract/comonad.lux
+++ b/stdlib/source/library/lux/abstract/comonad.lux
@@ -3,7 +3,7 @@
[lux "*"
[data
[collection
- ["[0]" list ("[1]\[0]" mix)]]]
+ ["[0]" list ("[1]#[0]" mix)]]]
[math
[number
["n" nat]]]
@@ -42,7 +42,7 @@
g!_ (identifier "_")
g!each (identifier "each")
g!disjoint (identifier "disjoint")
- body' (list\mix (: (-> [Code Code] Code Code)
+ body' (list#mix (: (-> [Code Code] Code Code)
(function (_ binding body')
(with_expansions [<default> (` (|> (~ value) (~ g!disjoint) ((~ g!each) (function ((~ g!_) (~ var)) (~ body')))))]
(let [[var value] binding]
diff --git a/stdlib/source/library/lux/abstract/comonad/cofree.lux b/stdlib/source/library/lux/abstract/comonad/cofree.lux
index a711f60f1..1f56ba91e 100644
--- a/stdlib/source/library/lux/abstract/comonad/cofree.lux
+++ b/stdlib/source/library/lux/abstract/comonad/cofree.lux
@@ -12,7 +12,7 @@
(All (_ F) (-> (Functor F) (Functor (CoFree F))))
(def: (each f [head tail])
- [(f head) (\ dsl each (each f) tail)]))
+ [(f head) (# dsl each (each f) tail)]))
(implementation: .public (comonad dsl)
(All (_ F) (-> (Functor F) (CoMonad (CoFree F))))
@@ -24,4 +24,4 @@
(def: (disjoint [head tail])
[[head tail]
- (\ dsl each disjoint tail)]))
+ (# dsl each disjoint tail)]))
diff --git a/stdlib/source/library/lux/abstract/equivalence.lux b/stdlib/source/library/lux/abstract/equivalence.lux
index 28dd71ce1..e73f6dd6d 100644
--- a/stdlib/source/library/lux/abstract/equivalence.lux
+++ b/stdlib/source/library/lux/abstract/equivalence.lux
@@ -23,4 +23,4 @@
(def: (each f equivalence)
(implementation
(def: (= reference sample)
- (\ equivalence = (f reference) (f sample))))))
+ (# equivalence = (f reference) (f sample))))))
diff --git a/stdlib/source/library/lux/abstract/functor.lux b/stdlib/source/library/lux/abstract/functor.lux
index 36aab9aeb..2789755ba 100644
--- a/stdlib/source/library/lux/abstract/functor.lux
+++ b/stdlib/source/library/lux/abstract/functor.lux
@@ -15,32 +15,32 @@
(type: .public (Or f g)
(All (_ a) (.Or (f a) (g a))))
-(def: .public (sum (^open "f\[0]") (^open "g\[0]"))
+(def: .public (sum (^open "f#[0]") (^open "g#[0]"))
(All (_ F G) (-> (Functor F) (Functor G) (Functor (..Or F G))))
(implementation
(def: (each f fa|ga)
(case fa|ga
{.#Left fa}
- {.#Left (f\each f fa)}
+ {.#Left (f#each f fa)}
{.#Right ga}
- {.#Right (g\each f ga)}))))
+ {.#Right (g#each f ga)}))))
(type: .public (And f g)
(All (_ a) (.And (f a) (g a))))
-(def: .public (product (^open "f\[0]") (^open "g\[0]"))
+(def: .public (product (^open "f#[0]") (^open "g#[0]"))
(All (_ F G) (-> (Functor F) (Functor G) (Functor (..And F G))))
(implementation
(def: (each f [fa ga])
- [(f\each f fa)
- (g\each f ga)])))
+ [(f#each f fa)
+ (g#each f ga)])))
(type: .public (Then f g)
(All (_ a) (f (g a))))
-(def: .public (composite (^open "f\[0]") (^open "g\[0]"))
+(def: .public (composite (^open "f#[0]") (^open "g#[0]"))
(All (_ F G) (-> (Functor F) (Functor G) (Functor (..Then F G))))
(implementation
(def: (each f fga)
- (f\each (g\each f) fga))))
+ (f#each (g#each f) fga))))
diff --git a/stdlib/source/library/lux/abstract/hash.lux b/stdlib/source/library/lux/abstract/hash.lux
index 5b753b484..1c05d022e 100644
--- a/stdlib/source/library/lux/abstract/hash.lux
+++ b/stdlib/source/library/lux/abstract/hash.lux
@@ -19,8 +19,8 @@
(def: (each f super)
(implementation
(def: &equivalence
- (\ equivalence.functor each f
- (\ super &equivalence)))
+ (# equivalence.functor each f
+ (# super &equivalence)))
(def: hash
- (|>> f (\ super hash))))))
+ (|>> f (# super hash))))))
diff --git a/stdlib/source/library/lux/abstract/interval.lux b/stdlib/source/library/lux/abstract/interval.lux
index a6337b770..1e9ea40de 100644
--- a/stdlib/source/library/lux/abstract/interval.lux
+++ b/stdlib/source/library/lux/abstract/interval.lux
@@ -35,28 +35,28 @@
(template [<name> <comp>]
[(def: .public (<name> interval)
(All (_ a) (-> (Interval a) Bit))
- (let [(^open ",\[0]") interval]
- (<comp> ,\bottom ,\top)))]
+ (let [(^open ",#[0]") interval]
+ (<comp> ,#bottom ,#top)))]
- [inner? (order.> ,\&order)]
- [outer? ,\<]
- [singleton? ,\=]
+ [inner? (order.> ,#&order)]
+ [outer? ,#<]
+ [singleton? ,#=]
)
(def: .public (within? interval elem)
(All (_ a) (-> (Interval a) a Bit))
- (let [(^open ",\[0]") interval]
+ (let [(^open ",#[0]") interval]
(cond (inner? interval)
- (and (order.>= ,\&order ,\bottom elem)
- (order.<= ,\&order ,\top elem))
+ (and (order.>= ,#&order ,#bottom elem)
+ (order.<= ,#&order ,#top elem))
(outer? interval)
- (or (order.>= ,\&order ,\bottom elem)
- (order.<= ,\&order ,\top elem))
+ (or (order.>= ,#&order ,#bottom elem)
+ (order.<= ,#&order ,#top elem))
... singleton
- (and (,\= ,\bottom elem)
- (,\= ,\top elem)))))
+ (and (,#= ,#bottom elem)
+ (,#= ,#top elem)))))
(template [<name> <limit>]
[(def: .public (<name> elem interval)
@@ -77,29 +77,29 @@
(All (_ a) (-> (Interval a) (Interval a) (Interval a)))
(def: &enum (value@ &enum right))
- (def: bottom (order.min (\ right &order) (\ left bottom) (\ right bottom)))
- (def: top (order.max (\ right &order) (\ left top) (\ right top))))
+ (def: bottom (order.min (# right &order) (# left bottom) (# right bottom)))
+ (def: top (order.max (# right &order) (# left top) (# right top))))
(implementation: .public (intersection left right)
(All (_ a) (-> (Interval a) (Interval a) (Interval a)))
(def: &enum (value@ &enum right))
- (def: bottom (order.max (\ right &order) (\ left bottom) (\ right bottom)))
- (def: top (order.min (\ right &order) (\ left top) (\ right top))))
+ (def: bottom (order.max (# right &order) (# left bottom) (# right bottom)))
+ (def: top (order.min (# right &order) (# left top) (# right top))))
(implementation: .public (complement interval)
(All (_ a) (-> (Interval a) (Interval a)))
(def: &enum (value@ &enum interval))
- (def: bottom (\ interval succ (\ interval top)))
- (def: top (\ interval pred (\ interval bottom))))
+ (def: bottom (# interval succ (# interval top)))
+ (def: top (# interval pred (# interval bottom))))
(def: .public (precedes? reference sample)
(All (_ a) (-> (Interval a) (Interval a) Bit))
(let [(^open "[0]") reference
- limit (\ reference bottom)]
- (and (< limit (\ sample bottom))
- (< limit (\ sample top)))))
+ limit (# reference bottom)]
+ (and (< limit (# sample bottom))
+ (< limit (# sample top)))))
(def: .public (succeeds? reference sample)
(All (_ a) (-> (Interval a) (Interval a) Bit))
@@ -108,20 +108,20 @@
(template [<name> <comp>]
[(def: .public (<name> reference sample)
(All (_ a) (-> a (Interval a) Bit))
- (let [(^open ",\[0]") sample]
- (and (<comp> reference ,\bottom)
- (<comp> reference ,\top))))]
+ (let [(^open ",#[0]") sample]
+ (and (<comp> reference ,#bottom)
+ (<comp> reference ,#top))))]
- [before? ,\<]
- [after? (order.> ,\&order)]
+ [before? ,#<]
+ [after? (order.> ,#&order)]
)
(def: .public (meets? reference sample)
(All (_ a) (-> (Interval a) (Interval a) Bit))
- (let [(^open ",\[0]") reference
- limit (\ reference bottom)]
- (and (,\= limit (\ sample top))
- (order.<= ,\&order limit (\ sample bottom)))))
+ (let [(^open ",#[0]") reference
+ limit (# reference bottom)]
+ (and (,#= limit (# sample top))
+ (order.<= ,#&order limit (# sample bottom)))))
(def: .public (touches? reference sample)
(All (_ a) (-> (Interval a) (Interval a) Bit))
@@ -131,50 +131,50 @@
(template [<name> <eq_side> <ineq> <ineq_side>]
[(def: .public (<name> reference sample)
(All (_ a) (-> (Interval a) (Interval a) Bit))
- (let [(^open ",\[0]") reference]
- (and (,\= (\ reference <eq_side>)
- (\ sample <eq_side>))
- (<ineq> ,\&order
- (\ reference <ineq_side>)
- (\ sample <ineq_side>)))))]
-
- [starts? ,\bottom order.<= ,\top]
- [finishes? ,\top order.>= ,\bottom]
+ (let [(^open ",#[0]") reference]
+ (and (,#= (# reference <eq_side>)
+ (# sample <eq_side>))
+ (<ineq> ,#&order
+ (# reference <ineq_side>)
+ (# sample <ineq_side>)))))]
+
+ [starts? ,#bottom order.<= ,#top]
+ [finishes? ,#top order.>= ,#bottom]
)
(implementation: .public equivalence
(All (_ a) (Equivalence (Interval a)))
(def: (= reference sample)
- (let [(^open ",\[0]") reference]
- (and (,\= ,\bottom (\ sample bottom))
- (,\= ,\top (\ sample top))))))
+ (let [(^open ",#[0]") reference]
+ (and (,#= ,#bottom (# sample bottom))
+ (,#= ,#top (# sample top))))))
(def: .public (nested? reference sample)
(All (_ a) (-> (Interval a) (Interval a) Bit))
(cond (or (singleton? sample)
(and (inner? reference) (inner? sample))
(and (outer? reference) (outer? sample)))
- (let [(^open ",\[0]") reference]
- (and (order.>= ,\&order (\ reference bottom) (\ sample bottom))
- (order.<= ,\&order (\ reference top) (\ sample top))))
+ (let [(^open ",#[0]") reference]
+ (and (order.>= ,#&order (# reference bottom) (# sample bottom))
+ (order.<= ,#&order (# reference top) (# sample top))))
(or (singleton? reference)
(and (inner? reference) (outer? sample)))
#0
... (and (outer? reference) (inner? sample))
- (let [(^open ",\[0]") reference]
- (or (and (order.>= ,\&order (\ reference bottom) (\ sample bottom))
- (order.> ,\&order (\ reference bottom) (\ sample top)))
- (and (,\< (\ reference top) (\ sample bottom))
- (order.<= ,\&order (\ reference top) (\ sample top)))))
+ (let [(^open ",#[0]") reference]
+ (or (and (order.>= ,#&order (# reference bottom) (# sample bottom))
+ (order.> ,#&order (# reference bottom) (# sample top)))
+ (and (,#< (# reference top) (# sample bottom))
+ (order.<= ,#&order (# reference top) (# sample top)))))
))
(def: .public (overlaps? reference sample)
(All (_ a) (-> (Interval a) (Interval a) Bit))
- (let [(^open ",\[0]") reference]
- (and (not (\ ..equivalence = reference sample))
+ (let [(^open ",#[0]") reference]
+ (and (not (# ..equivalence = reference sample))
(cond (singleton? sample)
#0
@@ -183,8 +183,8 @@
(or (and (inner? sample) (outer? reference))
(and (outer? sample) (inner? reference)))
- (or (order.>= ,\&order (\ reference bottom) (\ sample top))
- (order.<= ,\&order (\ reference top) (\ sample bottom)))
+ (or (order.>= ,#&order (# reference bottom) (# sample top))
+ (order.<= ,#&order (# reference top) (# sample bottom)))
... both inner
(inner? sample)
diff --git a/stdlib/source/library/lux/abstract/mix.lux b/stdlib/source/library/lux/abstract/mix.lux
index 53e6fbcf8..260d8fff1 100644
--- a/stdlib/source/library/lux/abstract/mix.lux
+++ b/stdlib/source/library/lux/abstract/mix.lux
@@ -13,5 +13,5 @@
(def: .public (with_monoid monoid mix value)
(All (_ F a)
(-> (Monoid a) (Mix F) (F a) a))
- (let [(^open "/\[0]") monoid]
- (mix /\composite /\identity value)))
+ (let [(^open "/#[0]") monoid]
+ (mix /#composite /#identity value)))
diff --git a/stdlib/source/library/lux/abstract/monad.lux b/stdlib/source/library/lux/abstract/monad.lux
index 2aca8a09a..1a95fb139 100644
--- a/stdlib/source/library/lux/abstract/monad.lux
+++ b/stdlib/source/library/lux/abstract/monad.lux
@@ -6,7 +6,7 @@
[//
[functor {"+" [Functor]}]])
-(def: (list\mix f init xs)
+(def: (list#mix f init xs)
(All (_ a b)
(-> (-> b a a) a (List b) a))
(case xs
@@ -14,9 +14,9 @@
init
{.#Item x xs'}
- (list\mix f (f x init) xs')))
+ (list#mix f (f x init) xs')))
-(def: (list\size xs)
+(def: (list#size xs)
(All (_ a) (-> (List a) Nat))
(loop [counter 0
xs xs]
@@ -30,7 +30,7 @@
(def: (reversed xs)
(All (_ a)
(-> (List a) (List a)))
- (list\mix (function (_ head tail) {.#Item head tail})
+ (list#mix (function (_ head tail) {.#Item head tail})
{.#End}
xs))
@@ -66,14 +66,14 @@
_
{.#None}))
{.#Some [?name monad bindings body]}
- (if (|> bindings list\size .int ("lux i64 %" +2) ("lux i64 =" +0))
+ (if (|> bindings list#size .int ("lux i64 %" +2) ("lux i64 =" +0))
(let [[module short] (name_of ..do)
identifier (: (-> Text Code)
(|>> ($_ "lux text concat" module " " short " ") [""] {.#Identifier} [location.dummy]))
g!_ (identifier "_")
g!each (identifier "each")
g!conjoint (identifier "conjoint")
- body' (list\mix (: (-> [Code Code] Code Code)
+ body' (list#mix (: (-> [Code Code] Code Code)
(function (_ binding body')
(with_expansions [<default> (` (|> (~ value) ((~ g!each) (function ((~ g!_) (~ var)) (~ body'))) (~ g!conjoint)))]
(let [[var value] binding]
@@ -110,60 +110,60 @@
(All (_ ! a b)
(-> (Monad !) (-> a (! b))
(-> (! a) (! b))))
- (|>> (\ monad each f)
- (\ monad conjoint)))
+ (|>> (# monad each f)
+ (# monad conjoint)))
(def: .public (all monad)
(All (_ ! a)
(-> (Monad !) (List (! a))
(! (List a))))
- (let [(^open "!\[0]") monad]
+ (let [(^open "!#[0]") monad]
(function (recur xs)
(case xs
{.#End}
- (!\in {.#End})
+ (!#in {.#End})
{.#Item x xs'}
(|> x
- (!\each (function (_ _x)
- (!\each (|>> {.#Item _x}) (recur xs'))))
- !\conjoint)))))
+ (!#each (function (_ _x)
+ (!#each (|>> {.#Item _x}) (recur xs'))))
+ !#conjoint)))))
(def: .public (each monad f)
(All (_ M a b)
(-> (Monad M) (-> a (M b)) (List a)
(M (List b))))
- (let [(^open "!\[0]") monad]
+ (let [(^open "!#[0]") monad]
(function (recur xs)
(case xs
{.#End}
- (!\in {.#End})
+ (!#in {.#End})
{.#Item x xs'}
(|> (f x)
- (!\each (function (_ _x)
- (!\each (|>> {.#Item _x}) (recur xs'))))
- !\conjoint)))))
+ (!#each (function (_ _x)
+ (!#each (|>> {.#Item _x}) (recur xs'))))
+ !#conjoint)))))
(def: .public (only monad f)
(All (_ ! a b)
(-> (Monad !) (-> a (! Bit)) (List a)
(! (List a))))
- (let [(^open "!\[0]") monad]
+ (let [(^open "!#[0]") monad]
(function (recur xs)
(case xs
{.#End}
- (!\in {.#End})
+ (!#in {.#End})
{.#Item head xs'}
(|> (f head)
- (!\each (function (_ verdict)
- (!\each (function (_ tail)
+ (!#each (function (_ verdict)
+ (!#each (function (_ tail)
(if verdict
{.#Item head tail}
tail))
(recur xs'))))
- !\conjoint)))))
+ !#conjoint)))))
(def: .public (mix monad f init xs)
(All (_ M a b)
@@ -171,7 +171,7 @@
(M a)))
(case xs
{.#End}
- (\ monad in init)
+ (# monad in init)
{.#Item x xs'}
(do monad
diff --git a/stdlib/source/library/lux/abstract/monad/free.lux b/stdlib/source/library/lux/abstract/monad/free.lux
index 04718ceb8..c3f544604 100644
--- a/stdlib/source/library/lux/abstract/monad/free.lux
+++ b/stdlib/source/library/lux/abstract/monad/free.lux
@@ -20,7 +20,7 @@
{#Pure (f a)}
{#Effect value}
- {#Effect (\ dsl each (each f) value)})))
+ {#Effect (# dsl each (each f) value)})))
(implementation: .public (apply dsl)
(All (_ F) (-> (Functor F) (Apply (Free F))))
@@ -34,12 +34,12 @@
{#Pure (f a)}
[{#Pure f} {#Effect fa}]
- {#Effect (\ dsl each
- (\ (..functor dsl) each f)
+ {#Effect (# dsl each
+ (# (..functor dsl) each f)
fa)}
[{#Effect ff} _]
- {#Effect (\ dsl each (on ea) ff)}
+ {#Effect (# dsl each (on ea) ff)}
)))
(implementation: .public (monad dsl)
@@ -61,7 +61,7 @@
{#Effect fa})
{#Effect fefa}
- {#Effect (\ dsl each
- (\ (monad dsl) conjoint)
+ {#Effect (# dsl each
+ (# (monad dsl) conjoint)
fefa)}
)))
diff --git a/stdlib/source/library/lux/abstract/monad/indexed.lux b/stdlib/source/library/lux/abstract/monad/indexed.lux
index 8a6b6818b..a1daf17fc 100644
--- a/stdlib/source/library/lux/abstract/monad/indexed.lux
+++ b/stdlib/source/library/lux/abstract/monad/indexed.lux
@@ -6,7 +6,7 @@
["<[0]>" code {"+" [Parser]}]]]
[data
[collection
- ["[0]" list ("[1]\[0]" functor mix)]]]
+ ["[0]" list ("[1]#[0]" functor mix)]]]
["[0]" macro
[syntax {"+" [syntax:]}]
["[0]" code]]]]
@@ -55,17 +55,17 @@
(def: named_monad
(Parser [(Maybe Text) Code])
- (<>.either (<code>.tuple (<>.and (\ <>.monad each (|>> {.#Some})
+ (<>.either (<code>.tuple (<>.and (# <>.monad each (|>> {.#Some})
<code>.local_identifier)
<code>.any))
- (\ <>.monad each (|>> [{.#None}])
+ (# <>.monad each (|>> [{.#None}])
<code>.any)))
(syntax: .public (do [[?name monad] ..named_monad
context (<code>.tuple (<>.some context))
expression <code>.any])
(macro.with_identifiers [g!_ g!then]
- (let [body (list\mix (function (_ context next)
+ (let [body (list#mix (function (_ context next)
(case context
{#Macro macro parameter}
(` ((~ (code.identifier macro))
diff --git a/stdlib/source/library/lux/abstract/monoid.lux b/stdlib/source/library/lux/abstract/monoid.lux
index 36b2fe502..f5ffdcd65 100644
--- a/stdlib/source/library/lux/abstract/monoid.lux
+++ b/stdlib/source/library/lux/abstract/monoid.lux
@@ -13,8 +13,9 @@
(All (_ l r) (-> (Monoid l) (Monoid r) (Monoid [l r])))
(implementation
(def: identity
- [(\ left identity) (\ right identity)])
+ [(# left identity)
+ (# right identity)])
(def: (composite [lL rL] [lR rR])
- [(\ left composite lL lR)
- (\ right composite rL rR)])))
+ [(# left composite lL lR)
+ (# right composite rL rR)])))
diff --git a/stdlib/source/library/lux/abstract/order.lux b/stdlib/source/library/lux/abstract/order.lux
index 878a167f5..400801fcd 100644
--- a/stdlib/source/library/lux/abstract/order.lux
+++ b/stdlib/source/library/lux/abstract/order.lux
@@ -21,28 +21,28 @@
(def: .public (<= order parameter subject)
Comparison
- (or (\ order < parameter subject)
- (\ order = parameter subject)))
+ (or (# order < parameter subject)
+ (# order = parameter subject)))
(def: .public (> order parameter subject)
Comparison
- (\ order < subject parameter))
+ (# order < subject parameter))
(def: .public (>= order parameter subject)
Comparison
- (or (\ order < subject parameter)
- (\ order = subject parameter)))
+ (or (# order < subject parameter)
+ (# order = subject parameter)))
(type: .public (Choice a)
(-> (Order a) a a a))
(def: .public (min order x y)
Choice
- (if (\ order < y x) x y))
+ (if (# order < y x) x y))
(def: .public (max order x y)
Choice
- (if (\ order < y x) y x))
+ (if (# order < y x) y x))
(implementation: .public functor
(contravariant.Functor Order)
@@ -50,7 +50,7 @@
(def: (each f order)
(implementation
(def: &equivalence
- (\ equivalence.functor each f (\ order &equivalence)))
+ (# equivalence.functor each f (# order &equivalence)))
(def: (< reference sample)
- (\ order < (f reference) (f sample))))))
+ (# order < (f reference) (f sample))))))
diff --git a/stdlib/source/library/lux/control/concatenative.lux b/stdlib/source/library/lux/control/concatenative.lux
index 4d377e5c5..289b5f789 100644
--- a/stdlib/source/library/lux/control/concatenative.lux
+++ b/stdlib/source/library/lux/control/concatenative.lux
@@ -5,12 +5,12 @@
[abstract
["[0]" monad]]
[control
- ["[0]" maybe ("[1]\[0]" monad)]]
+ ["[0]" maybe ("[1]#[0]" monad)]]
[data
["[0]" text
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" mix functor)]]]
+ ["[0]" list ("[1]#[0]" mix functor)]]]
["[0]" macro {"+" [with_identifiers]}
["[0]" code]
["[0]" template]
@@ -23,7 +23,7 @@
["r" rev]
["f" frac]]]]]
[//
- ["<>" parser ("[1]\[0]" monad)
+ ["<>" parser ("[1]#[0]" monad)
["<[0]>" code {"+" [Parser]}]]])
(type: Alias
@@ -52,12 +52,12 @@
(Parser Stack)
(<>.either (<>.and (<>.maybe bottom^)
..top^)
- (<>.and (<>\each (|>> {.#Some}) bottom^)
- (<>\in (list)))))
+ (<>.and (<>#each (|>> {.#Some}) bottom^)
+ (<>#in (list)))))
(def: (stack_mix tops bottom)
(-> (List Code) Code Code)
- (list\mix (function (_ top bottom)
+ (list#mix (function (_ top bottom)
(` [(~ bottom) (~ top)]))
bottom
tops))
@@ -72,16 +72,16 @@
_
(meta.failure (format "Cannot expand to more than a single AST/Code node:" text.new_line
- (|> expansion (list\each %.code) (text.interposed " ")))))))
+ (|> expansion (list#each %.code) (text.interposed " ")))))))
(def: signature^
(Parser [(List Alias) Stack Stack])
(<>.either ($_ <>.and aliases^ stack^ stack^)
- ($_ <>.and (<>\in (list)) stack^ stack^)))
+ ($_ <>.and (<>#in (list)) stack^ stack^)))
(syntax: .public (=> [[aliases inputs outputs] signature^])
(let [de_alias (function (_ aliased)
- (list\mix (function (_ [from to] pre)
+ (list#mix (function (_ [from to] pre)
(code.replaced (code.local_identifier from) to pre))
aliased
aliases))]
diff --git a/stdlib/source/library/lux/control/concurrency/actor.lux b/stdlib/source/library/lux/control/concurrency/actor.lux
index 64ab1c283..06ada7642 100644
--- a/stdlib/source/library/lux/control/concurrency/actor.lux
+++ b/stdlib/source/library/lux/control/concurrency/actor.lux
@@ -10,7 +10,7 @@
["[0]" try {"+" [Try]}]
["[0]" exception {"+" [exception:]}]
["[0]" io {"+" [IO io]}]
- ["<>" parser ("[1]\[0]" monad)
+ ["<>" parser ("[1]#[0]" monad)
["<[0]>" code {"+" [Parser]}]]]
[data
["[0]" bit]
@@ -18,7 +18,7 @@
[text
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" monoid monad)]]]
+ ["[0]" list ("[1]#[0]" monoid monad)]]]
["[0]" macro {"+" [with_identifiers]}
["[0]" code]
[syntax {"+" [syntax:]}
@@ -32,7 +32,7 @@
["[0]" abstract {"+" [abstract: :representation :abstraction]}]]]]
[//
["[0]" atom {"+" [Atom atom]}]
- ["[0]" async {"+" [Async Resolver]} ("[1]\[0]" monad)]
+ ["[0]" async {"+" [Async Resolver]} ("[1]#[0]" monad)]
["[0]" frp {"+" [Channel]}]])
(exception: .public poisoned)
@@ -55,7 +55,7 @@
[current (async.value read)]
(case current
{.#Some [head tail]}
- (\ ! each (|>> {.#Item head})
+ (# ! each (|>> {.#Item head})
(pending tail))
{.#None}
@@ -111,7 +111,7 @@
(let [[obituary _] (value@ #obituary (:representation actor))]
(|> obituary
async.value
- (\ io.functor each
+ (# io.functor each
(|>> (case> {.#None}
bit.yes
@@ -213,7 +213,7 @@
(def: actor_decl^
(Parser [Text (List Text)])
(<>.either (<code>.form (<>.and <code>.local_identifier (<>.some <code>.local_identifier)))
- (<>.and <code>.local_identifier (\ <>.monad in (list)))))
+ (<>.and <code>.local_identifier (# <>.monad in (list)))))
(type: On_MailC
[[Text Text Text] Code])
@@ -263,7 +263,7 @@
(do meta.monad
[g!type (macro.identifier (format name "_abstract_type"))
.let [g!actor (code.local_identifier name)
- g!vars (list\each code.local_identifier vars)]]
+ g!vars (list#each code.local_identifier vars)]]
(in (list (` ((~! abstract:) (~ export_policy) ((~ g!type) (~+ g!vars))
(~ state_type)
@@ -305,7 +305,7 @@
(def: reference^
(Parser [Name (List Text)])
(<>.either (<code>.form (<>.and <code>.identifier (<>.some <code>.local_identifier)))
- (<>.and <code>.identifier (\ <>.monad in (list)))))
+ (<>.and <code>.identifier (# <>.monad in (list)))))
(def: messageP
(Parser [Code Signature Code Code])
@@ -322,9 +322,9 @@
.let [g!type (code.local_identifier (value@ abstract.#name actor_scope))
g!message (code.local_identifier (value@ #name signature))
g!actor_vars (value@ abstract.#type_vars actor_scope)
- g!all_vars (|> signature (value@ #vars) (list\each code.local_identifier) (list\composite g!actor_vars))
- g!inputsC (|> signature (value@ #inputs) (list\each product.left))
- g!inputsT (|> signature (value@ #inputs) (list\each product.right))
+ g!all_vars (|> signature (value@ #vars) (list#each code.local_identifier) (list#composite g!actor_vars))
+ g!inputsC (|> signature (value@ #inputs) (list#each product.left))
+ g!inputsT (|> signature (value@ #inputs) (list#each product.right))
g!state (|> signature (value@ #state) code.local_identifier)
g!self (|> signature (value@ #self) code.local_identifier)]]
(in (list (` (def: (~ export_policy) ((~ g!message) (~+ g!inputsC))
@@ -360,6 +360,6 @@
(if continue?
(|> actor
(..mail! (action event stop))
- (\ ! each try.maybe))
+ (# ! each try.maybe))
(in {.#None}))))
channel)))
diff --git a/stdlib/source/library/lux/control/concurrency/async.lux b/stdlib/source/library/lux/control/concurrency/async.lux
index 0342da425..1f3db5365 100644
--- a/stdlib/source/library/lux/control/concurrency/async.lux
+++ b/stdlib/source/library/lux/control/concurrency/async.lux
@@ -58,7 +58,7 @@
(All (_ a) (-> (Async a) (IO (Maybe a))))
(|>> :representation
atom.read!
- (\ io.functor each product.left)))
+ (# io.functor each product.left)))
(def: .public (upon! f async)
(All (_ a) (-> (-> a (IO Any)) (Async a) (IO Any)))
@@ -81,7 +81,7 @@
(def: .public resolved?
(All (_ a) (-> (Async a) (IO Bit)))
(|>> ..value
- (\ io.functor each
+ (# io.functor each
(|>> (case> {.#None}
#0
diff --git a/stdlib/source/library/lux/control/concurrency/atom.lux b/stdlib/source/library/lux/control/concurrency/atom.lux
index 6241c90c7..47e771a4e 100644
--- a/stdlib/source/library/lux/control/concurrency/atom.lux
+++ b/stdlib/source/library/lux/control/concurrency/atom.lux
@@ -7,7 +7,7 @@
[monad {"+" [do]}]]
[control
["[0]" function]
- ["[0]" io {"+" [IO]} ("[1]\[0]" functor)]]
+ ["[0]" io {"+" [IO]} ("[1]#[0]" functor)]]
[data
["[0]" product]
[collection
@@ -93,4 +93,4 @@
(All (_ a) (-> a (Atom a) (IO a)))
(|> atom
(..update! (function.constant value))
- (io\each product.left)))
+ (io#each product.left)))
diff --git a/stdlib/source/library/lux/control/concurrency/frp.lux b/stdlib/source/library/lux/control/concurrency/frp.lux
index ebf3728ca..3c731d30f 100644
--- a/stdlib/source/library/lux/control/concurrency/frp.lux
+++ b/stdlib/source/library/lux/control/concurrency/frp.lux
@@ -7,7 +7,7 @@
[apply {"+" [Apply]}]
["[0]" monad {"+" [Monad do]}]]
[control
- ["[0]" maybe ("[1]\[0]" functor)]
+ ["[0]" maybe ("[1]#[0]" functor)]
["[0]" try {"+" [Try]}]
["[0]" exception {"+" [exception:]}]
["[0]" io {"+" [IO io]}]]
@@ -15,7 +15,7 @@
abstract]]]
[//
["[0]" atom {"+" [Atom]}]
- ["[0]" async {"+" [Async]} ("[1]\[0]" functor)]])
+ ["[0]" async {"+" [Async]} ("[1]#[0]" functor)]])
(type: .public (Channel a)
(Async (Maybe [a (Channel a)])))
@@ -87,8 +87,8 @@
(Functor Channel)
(def: (each f)
- (async\each
- (maybe\each
+ (async#each
+ (maybe#each
(function (_ [head tail])
[(f head) (each f tail)])))))
@@ -136,7 +136,7 @@
(case ?ma
{.#Some [a ma']}
(exec
- (io.run! (\ sink feed a))
+ (io.run! (# sink feed a))
(recur ma'))
{.#None}
@@ -144,7 +144,7 @@
(recur mma'))
{.#None}
- (in (: Any (io.run! (\ sink close))))))))
+ (in (: Any (io.run! (# sink close))))))))
output))))
(type: .public (Subscriber a)
@@ -186,7 +186,7 @@
(def: .public (of_async async)
(All (_ a) (-> (Async a) (Channel a)))
- (async\each (function (_ value)
+ (async#each (function (_ value)
{.#Some [value ..empty]})
async))
@@ -228,7 +228,7 @@
(io.run! (loop [_ []]
(do io.monad
[value action
- _ (\ sink feed value)]
+ _ (# sink feed value)]
(async.upon! recur (async.delay milli_seconds)))))
[output sink])))
@@ -253,7 +253,7 @@
[item channel]
(case item
{.#Some [head tail]}
- (if (\ equivalence = previous head)
+ (if (# equivalence = previous head)
(distinct' equivalence previous tail)
(in {.#Some [head (distinct' equivalence head tail)]}))
@@ -277,7 +277,7 @@
[item channel]
(case item
{.#Some [head tail]}
- (\ ! each (|>> {.#Item head})
+ (# ! each (|>> {.#Item head})
(list tail))
{.#None}
diff --git a/stdlib/source/library/lux/control/concurrency/semaphore.lux b/stdlib/source/library/lux/control/concurrency/semaphore.lux
index 268cf3736..c74588eaf 100644
--- a/stdlib/source/library/lux/control/concurrency/semaphore.lux
+++ b/stdlib/source/library/lux/control/concurrency/semaphore.lux
@@ -34,7 +34,7 @@
(Atom State)
(def: most_positions_possible
- (.nat (\ i.interval top)))
+ (.nat (# i.interval top)))
(def: .public (semaphore initial_open_positions)
(-> Nat Semaphore)
@@ -145,7 +145,7 @@
(do async.monad
[outcome (..signal! turnstile)]
(recur (++ step)))
- (\ async.monad in []))))
+ (# async.monad in []))))
(template [<phase> <update> <goal> <turnstile>]
[(def: (<phase> (^:representation barrier))
diff --git a/stdlib/source/library/lux/control/concurrency/stm.lux b/stdlib/source/library/lux/control/concurrency/stm.lux
index d2355b689..c2a8b1ecc 100644
--- a/stdlib/source/library/lux/control/concurrency/stm.lux
+++ b/stdlib/source/library/lux/control/concurrency/stm.lux
@@ -52,7 +52,7 @@
(do !
[_ (monad.each ! (function (_ sink)
(do !
- [result (\ sink feed new_value)]
+ [result (# sink feed new_value)]
(case result
{try.#Success _}
(in [])
@@ -91,7 +91,7 @@
(list.example (function (_ [_var _original _current])
(same? (:as (Var Any) var)
(:as (Var Any) _var))))
- (\ maybe.monad each (function (_ [_var _original _current])
+ (# maybe.monad each (function (_ [_var _original _current])
_current))
:expected))
diff --git a/stdlib/source/library/lux/control/concurrency/thread.lux b/stdlib/source/library/lux/control/concurrency/thread.lux
index 5696bcdc9..9445c2c7a 100644
--- a/stdlib/source/library/lux/control/concurrency/thread.lux
+++ b/stdlib/source/library/lux/control/concurrency/thread.lux
@@ -128,7 +128,7 @@
... Default
(do [! io.monad]
- [now (\ ! each (|>> instant.millis .nat) instant.now)
+ [now (# ! each (|>> instant.millis .nat) instant.now)
_ (atom.update! (|>> {.#Item [#creation now
#delay milli_seconds
#action action]})
@@ -157,7 +157,7 @@
_
(do !
- [now (\ ! each (|>> instant.millis .nat) instant.now)
+ [now (# ! each (|>> instant.millis .nat) instant.now)
.let [[ready pending] (list.partition (function (_ thread)
(|> (value@ #creation thread)
(n.+ (value@ #delay thread))
diff --git a/stdlib/source/library/lux/control/exception.lux b/stdlib/source/library/lux/control/exception.lux
index 455318e39..bf7cabd0e 100644
--- a/stdlib/source/library/lux/control/exception.lux
+++ b/stdlib/source/library/lux/control/exception.lux
@@ -7,13 +7,13 @@
[monad {"+" [do]}]]
[control
["[0]" maybe]
- ["<>" parser ("[1]\[0]" monad)
+ ["<>" parser ("[1]#[0]" monad)
["<[0]>" code {"+" [Parser]}]]]
[data
["[0]" product]
- ["[0]" text ("[1]\[0]" monoid)]
+ ["[0]" text ("[1]#[0]" monoid)]
[collection
- ["[0]" list ("[1]\[0]" functor mix)]]]
+ ["[0]" list ("[1]#[0]" functor mix)]]]
[macro
["[0]" code]
[syntax {"+" [syntax:]}
@@ -22,7 +22,7 @@
["|[1]_[0]|" variable]]]]
[math
[number
- ["n" nat ("[1]\[0]" decimal)]]]]]
+ ["n" nat ("[1]#[0]" decimal)]]]]]
[//
["//" try {"+" [Try]}]])
@@ -82,34 +82,34 @@
($_ <>.and
(<>.else (list) (<code>.tuple (<>.some |type_variable|.parser)))
(<>.either (<code>.form (<>.and <code>.local_identifier |input|.parser))
- (<>.and <code>.local_identifier (<>\in (list))))
+ (<>.and <code>.local_identifier (<>#in (list))))
(<>.maybe <code>.any)
))]
($_ <>.either
(<>.and <code>.any private)
- (<>.and (<>\in (` .private)) private)
+ (<>.and (<>#in (` .private)) private)
)))
(syntax: .public (exception: [[export_policy t_vars [name inputs] body] ..exception])
(macro.with_identifiers [g!_ g!descriptor]
(do meta.monad
[current_module meta.current_module_name
- .let [descriptor ($_ text\composite "{" current_module "." name "}" text.new_line)
+ .let [descriptor ($_ text#composite "{" current_module "." name "}" text.new_line)
g!self (code.local_identifier name)]]
(in (list (` (def: (~ export_policy)
(~ g!self)
- (All ((~ g!_) (~+ (list\each |type_variable|.format t_vars)))
- (..Exception [(~+ (list\each (value@ |input|.#type) inputs))]))
+ (All ((~ g!_) (~+ (list#each |type_variable|.format t_vars)))
+ (..Exception [(~+ (list#each (value@ |input|.#type) inputs))]))
(let [(~ g!descriptor) (~ (code.text descriptor))]
[..#label (~ g!descriptor)
- ..#constructor (function ((~ g!self) [(~+ (list\each (value@ |input|.#binding) inputs))])
- ((~! text\composite) (~ g!descriptor)
+ ..#constructor (function ((~ g!self) [(~+ (list#each (value@ |input|.#binding) inputs))])
+ ((~! text#composite) (~ g!descriptor)
(~ (maybe.else (' "") body))))]))))))))
(def: (report' entries)
(-> (List [Text Text]) Text)
(let [header_separator ": "
- largest_header_size (list\mix (function (_ [header _] max)
+ largest_header_size (list#mix (function (_ [header _] max)
(n.max (text.size header) max))
0
entries)
@@ -117,7 +117,7 @@
(list.repeated (n.+ (text.size header_separator)
largest_header_size))
text.together
- (text\composite text.new_line))
+ (text#composite text.new_line))
on_entry (: (-> [Text Text] Text)
(function (_ [header message])
(let [padding (|> " "
@@ -126,29 +126,29 @@
text.together)]
(|> message
(text.replaced text.new_line on_new_line)
- ($_ text\composite padding header header_separator)))))]
+ ($_ text#composite padding header header_separator)))))]
(case entries
{.#End}
""
{.#Item head tail}
- (list\mix (function (_ post pre)
- ($_ text\composite pre text.new_line (on_entry post)))
+ (list#mix (function (_ post pre)
+ ($_ text#composite pre text.new_line (on_entry post)))
(on_entry head)
tail))))
(syntax: .public (report [entries (<>.many (<code>.tuple (<>.and <code>.any <code>.any)))])
(in (list (` ((~! ..report') (list (~+ (|> entries
- (list\each (function (_ [header message])
+ (list#each (function (_ [header message])
(` [(~ header) (~ message)])))))))))))
(def: .public (listing format entries)
(All (_ a)
(-> (-> a Text) (List a) Text))
(|> entries
- (list\mix (function (_ entry [index next])
+ (list#mix (function (_ entry [index next])
[(++ index)
- {.#Item [(n\encoded index) (format entry)]
+ {.#Item [(n#encoded index) (format entry)]
next}])
[0 {.#End}])
product.right
diff --git a/stdlib/source/library/lux/control/function/mutual.lux b/stdlib/source/library/lux/control/function/mutual.lux
index 282779593..da5abe3b1 100644
--- a/stdlib/source/library/lux/control/function/mutual.lux
+++ b/stdlib/source/library/lux/control/function/mutual.lux
@@ -7,14 +7,14 @@
[control
["[0]" try {"+" [Try]}]
["[0]" exception {"+" [exception:]}]
- ["<>" parser ("[1]\[0]" monad)
+ ["<>" parser ("[1]#[0]" monad)
["<[0]>" code {"+" [Parser]}]]]
[data
["[0]" product]
[text
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" functor)]
+ ["[0]" list ("[1]#[0]" functor)]
[dictionary
["[0]" plist {"+" [PList]}]]]]
["[0]" macro
@@ -50,7 +50,7 @@
(<| (:as Macro)
(: Macro')
(function (_ parameters)
- (\ meta.monad in (list (` (((~ g!self) (~ g!context)) (~+ parameters))))))))
+ (# meta.monad in (list (` (((~ g!self) (~ g!context)) (~+ parameters))))))))
(syntax: .public (let [functions (<code>.tuple (<>.some ..mutual))
body <code>.any])
@@ -71,15 +71,15 @@
[here_name meta.current_module_name
hidden_names (monad.each ! (//.constant (macro.identifier "mutual_function#"))
functions)
- .let [definitions (list\each (..mutual_definition hidden_names g!context)
+ .let [definitions (list#each (..mutual_definition hidden_names g!context)
(list.zipped/2 hidden_names
functions))
- context_types (list\each (function (_ mutual)
+ context_types (list#each (function (_ mutual)
(` (-> (~ g!context) (~ (value@ #type mutual)))))
functions)
- user_names (list\each (|>> (value@ [#declaration declaration.#name]) code.local_identifier)
+ user_names (list#each (|>> (value@ [#declaration declaration.#name]) code.local_identifier)
functions)]
- g!pop (local.push (list\each (function (_ [g!name mutual])
+ g!pop (local.push (list#each (function (_ [g!name mutual])
[[here_name (value@ [#declaration declaration.#name] mutual)]
(..macro g!context g!name)])
(list.zipped/2 hidden_names
@@ -88,7 +88,7 @@
[(~+ context_types)])
[(~+ definitions)])
[(~+ user_names)] (.let [[(~+ user_names)] (~ g!context)]
- [(~+ (list\each (function (_ g!name)
+ [(~+ (list#each (function (_ g!name)
(` ((~ g!name) (~ g!context))))
user_names))])
(~ g!output) (~ body)]
@@ -103,7 +103,7 @@
(.def: definition
(Parser Definition)
(<code>.tuple (<>.either (<>.and <code>.any ..mutual)
- (<>.and (<>\in (` .private)) ..mutual))))
+ (<>.and (<>#in (` .private)) ..mutual))))
(syntax: .public (def: [functions (<>.many ..definition)])
(case functions
@@ -123,30 +123,30 @@
[here_name meta.current_module_name
hidden_names (monad.each ! (//.constant (macro.identifier "mutual_function#"))
functions)
- .let [definitions (list\each (..mutual_definition hidden_names g!context)
+ .let [definitions (list#each (..mutual_definition hidden_names g!context)
(list.zipped/2 hidden_names
- (list\each (value@ #mutual) functions)))
- context_types (list\each (function (_ mutual)
+ (list#each (value@ #mutual) functions)))
+ context_types (list#each (function (_ mutual)
(` (-> (~ g!context) (~ (value@ [#mutual #type] mutual)))))
functions)
- user_names (list\each (|>> (value@ [#mutual #declaration declaration.#name]) code.local_identifier)
+ user_names (list#each (|>> (value@ [#mutual #declaration declaration.#name]) code.local_identifier)
functions)]
- g!pop (local.push (list\each (function (_ [g!name mutual])
+ g!pop (local.push (list#each (function (_ [g!name mutual])
[[here_name (value@ [#mutual #declaration declaration.#name] mutual)]
(..macro g!context g!name)])
(list.zipped/2 hidden_names
functions)))]
(in (list& (` (.def: (~ g!context)
- [(~+ (list\each (value@ [#mutual #type]) functions))]
+ [(~+ (list#each (value@ [#mutual #type]) functions))]
(.let [(~ g!context) (: (Rec (~ g!context)
[(~+ context_types)])
[(~+ definitions)])
[(~+ user_names)] (~ g!context)]
- [(~+ (list\each (function (_ g!name)
+ [(~+ (list#each (function (_ g!name)
(` ((~ g!name) (~ g!context))))
user_names))])))
g!pop
- (list\each (function (_ mutual)
+ (list#each (function (_ mutual)
(.let [g!name (|> mutual (value@ [#mutual #declaration declaration.#name]) code.local_identifier)]
(` (.def:
(~ (value@ #export_policy mutual))
diff --git a/stdlib/source/library/lux/control/lazy.lux b/stdlib/source/library/lux/control/lazy.lux
index f827e65a3..a818b164c 100644
--- a/stdlib/source/library/lux/control/lazy.lux
+++ b/stdlib/source/library/lux/control/lazy.lux
@@ -42,12 +42,12 @@
(with_identifiers [g!_]
(in (list (` ((~! ..lazy') (function ((~ g!_) (~ g!_)) (~ expression))))))))
-(implementation: .public (equivalence (^open "\[0]"))
+(implementation: .public (equivalence (^open "_#[0]"))
(All (_ a) (-> (Equivalence a) (Equivalence (Lazy a))))
(def: (= left right)
- (\= (..value left)
- (..value right))))
+ (_#= (..value left)
+ (..value right))))
(implementation: .public functor
(Functor Lazy)
diff --git a/stdlib/source/library/lux/control/maybe.lux b/stdlib/source/library/lux/control/maybe.lux
index 2deaa50d2..ce169c875 100644
--- a/stdlib/source/library/lux/control/maybe.lux
+++ b/stdlib/source/library/lux/control/maybe.lux
@@ -75,7 +75,7 @@
#1
[{.#Some x} {.#Some y}]
- (\ super = x y)
+ (# super = x y)
_
#0)))
@@ -84,7 +84,7 @@
(All (_ a) (-> (Hash a) (Hash (Maybe a))))
(def: &equivalence
- (..equivalence (\ super &equivalence)))
+ (..equivalence (# super &equivalence)))
(def: (hash value)
(case value
@@ -92,7 +92,7 @@
0
{.#Some value}
- (\ super hash value))))
+ (# super hash value))))
(implementation: .public (with monad)
(All (_ M) (-> (Monad M) (Monad (All (_ a) (M (Maybe a))))))
@@ -101,7 +101,9 @@
(functor.composite (value@ monad.&functor monad)
..functor))
- (def: in (|>> (\ ..monad in) (\ monad in)))
+ (def: in
+ (|>> (# ..monad in)
+ (# monad in)))
(def: (conjoint MmMma)
(do monad
@@ -115,7 +117,7 @@
(def: .public (lifted monad)
(All (_ M a) (-> (Monad M) (-> (M a) (M (Maybe a)))))
- (\ monad each (\ ..monad in)))
+ (# monad each (# ..monad in)))
(macro: .public (else tokens state)
(case tokens
diff --git a/stdlib/source/library/lux/control/parser.lux b/stdlib/source/library/lux/control/parser.lux
index 3d78dd546..775d0b4fd 100644
--- a/stdlib/source/library/lux/control/parser.lux
+++ b/stdlib/source/library/lux/control/parser.lux
@@ -11,7 +11,7 @@
[data
["[0]" product]
[collection
- ["[0]" list ("[1]\[0]" functor monoid)]]]
+ ["[0]" list ("[1]#[0]" functor monoid)]]]
[math
[number
["n" nat]]]]])
@@ -96,7 +96,7 @@
(-> (Parser s a) (Parser s b) (Parser s [a b])))
(do [! ..monad]
[head first]
- (\ ! each (|>> [head]) second)))
+ (# ! each (|>> [head]) second)))
(def: .public (or left right)
(All (_ s a b)
@@ -134,7 +134,7 @@
{try.#Success [input (list)]}
{try.#Success [input' head]}
- (..result (\ ..monad each (|>> (list& head))
+ (..result (# ..monad each (|>> (list& head))
(some parser))
input'))))
@@ -143,35 +143,35 @@
(-> (Parser s a) (Parser s (List a))))
(|> (..some parser)
(..and parser)
- (\ ..monad each (|>> {.#Item}))))
+ (# ..monad each (|>> {.#Item}))))
(def: .public (exactly amount parser)
(All (_ s a) (-> Nat (Parser s a) (Parser s (List a))))
(case amount
- 0 (\ ..monad in (list))
+ 0 (# ..monad in (list))
_ (do [! ..monad]
[x parser]
(|> parser
(exactly (-- amount))
- (\ ! each (|>> {.#Item x}))))))
+ (# ! each (|>> {.#Item x}))))))
(def: .public (at_least amount parser)
(All (_ s a) (-> Nat (Parser s a) (Parser s (List a))))
(do [! ..monad]
[minimum (..exactly amount parser)]
- (\ ! each (list\composite minimum) (..some parser))))
+ (# ! each (list#composite minimum) (..some parser))))
(def: .public (at_most amount parser)
(All (_ s a) (-> Nat (Parser s a) (Parser s (List a))))
(case amount
- 0 (\ ..monad in (list))
+ 0 (# ..monad in (list))
_ (function (_ input)
(case (parser input)
{try.#Failure msg}
{try.#Success [input (list)]}
{try.#Success [input' x]}
- (..result (\ ..monad each (|>> {.#Item x})
+ (..result (# ..monad each (|>> {.#Item x})
(at_most (-- amount) parser))
input')))))
@@ -181,7 +181,7 @@
[minimum (..exactly minimum parser)]
(case additional
0 (in minimum)
- _ (\ ! each (list\composite minimum)
+ _ (# ! each (list#composite minimum)
(..at_most additional parser)))))
(def: .public (separated_by separator parser)
@@ -196,7 +196,7 @@
(|> parser
(..and separator)
..some
- (\ ! each (|>> (list\each product.right) {.#Item x}))))))
+ (# ! each (|>> (list#each product.right) {.#Item x}))))))
(def: .public (not parser)
(All (_ s a) (-> (Parser s a) (Parser s Any)))
@@ -301,7 +301,7 @@
{try.#Failure error}
{try.#Success [input' to_decode]}
- (case (\ codec decoded to_decode)
+ (case (# codec decoded to_decode)
{try.#Failure error}
{try.#Failure error}
diff --git a/stdlib/source/library/lux/control/parser/analysis.lux b/stdlib/source/library/lux/control/parser/analysis.lux
index 03b29e3f3..8e16ad74f 100644
--- a/stdlib/source/library/lux/control/parser/analysis.lux
+++ b/stdlib/source/library/lux/control/parser/analysis.lux
@@ -12,7 +12,7 @@
["[0]" text
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" functor)]]]
+ ["[0]" list ("[1]#[0]" functor)]]]
[macro
["[0]" template]]
[math
@@ -36,7 +36,7 @@
(-> (List Analysis) Text)
(format text.new_line "Remaining input: "
(|> asts
- (list\each /.%analysis)
+ (list#each /.%analysis)
(text.interposed " "))))
(exception: .public (cannot_parse [input (List Analysis)])
@@ -103,7 +103,7 @@
(function (_ input)
(case input
(^ (list& (<tag> actual) input'))
- (if (\ <eq> = expected actual)
+ (if (# <eq> = expected actual)
{try.#Success [input' []]}
(exception.except ..cannot_parse input))
diff --git a/stdlib/source/library/lux/control/parser/binary.lux b/stdlib/source/library/lux/control/parser/binary.lux
index c37298d24..0b60d49f7 100644
--- a/stdlib/source/library/lux/control/parser/binary.lux
+++ b/stdlib/source/library/lux/control/parser/binary.lux
@@ -24,7 +24,7 @@
[number
["n" nat]
["[0]" frac]]]]]
- ["[0]" // ("[1]\[0]" monad)])
+ ["[0]" // ("[1]#[0]" monad)])
(type: .public Offset
Nat)
@@ -100,7 +100,7 @@
(def: .public frac
(Parser Frac)
- (//\each frac.of_bits ..bits/64))
+ (//#each frac.of_bits ..bits/64))
(exception: .public (invalid_tag [range Nat
byte Nat])
@@ -115,7 +115,7 @@
(with_expansions [<case>+' (template.spliced <case>+)]
(case flag
(^template [<number> <tag> <parser>]
- [<number> (`` (\ ! each (|>> {(~~ (template.spliced <tag>))}) <parser>))])
+ [<number> (`` (# ! each (|>> {(~~ (template.spliced <tag>))}) <parser>))])
(<case>+')
_ (//.lifted (exception.except ..invalid_tag [(template.amount [<case>+]) flag])))))])
@@ -133,7 +133,7 @@
(def: .public any
(Parser Any)
- (//\in []))
+ (//#in []))
(exception: .public (not_a_bit [value Nat])
(exception.report
@@ -157,13 +157,13 @@
0 {try.#Success [[offset binary] (/.empty 0)]}
_ (|> binary
(/.slice offset size)
- (\ try.monad each (|>> [[(n.+ size offset) binary]]))))))
+ (# try.monad each (|>> [[(n.+ size offset) binary]]))))))
(template [<size> <name> <bits>]
[(`` (def: .public <name>
(Parser Binary)
(do //.monad
- [size (//\each .nat <bits>)]
+ [size (//#each .nat <bits>)]
(..segment size))))]
[08 binary/8 ..bits/8]
@@ -177,7 +177,7 @@
(Parser Text)
(do //.monad
[utf8 <binary>]
- (//.lifted (\ utf8.codec decoded utf8)))))]
+ (//.lifted (# utf8.codec decoded utf8)))))]
[08 utf8/8 ..binary/8]
[16 utf8/16 ..binary/16]
@@ -205,7 +205,7 @@
[value valueP]
(recur (.++ index)
(row.suffix value output)))
- (//\in output)))))]
+ (//#in output)))))]
[08 row/8 ..bits/8]
[16 row/16 ..bits/16]
diff --git a/stdlib/source/library/lux/control/parser/cli.lux b/stdlib/source/library/lux/control/parser/cli.lux
index f68605f14..4ab6193e4 100644
--- a/stdlib/source/library/lux/control/parser/cli.lux
+++ b/stdlib/source/library/lux/control/parser/cli.lux
@@ -6,7 +6,7 @@
[control
["[0]" try {"+" [Try]}]]
[data
- ["[0]" text ("[1]\[0]" equivalence)
+ ["[0]" text ("[1]#[0]" equivalence)
["%" format {"+" [format]}]]]]]
["[0]" //])
@@ -50,7 +50,7 @@
(function (_ inputs)
(do try.monad
[[remaining raw] (any inputs)]
- (if (text\= reference raw)
+ (if (text#= reference raw)
(in [remaining []])
{try.#Failure (format "Missing token: '" reference "'")}))))
diff --git a/stdlib/source/library/lux/control/parser/code.lux b/stdlib/source/library/lux/control/parser/code.lux
index 4e31cb1b4..c29fb8419 100644
--- a/stdlib/source/library/lux/control/parser/code.lux
+++ b/stdlib/source/library/lux/control/parser/code.lux
@@ -7,12 +7,12 @@
["[0]" try {"+" [Try]}]]
[data
["[0]" bit]
- ["[0]" text ("[1]\[0]" monoid)]
+ ["[0]" text ("[1]#[0]" monoid)]
["[0]" name]
[collection
- ["[0]" list ("[1]\[0]" functor)]]]
+ ["[0]" list ("[1]#[0]" functor)]]]
[macro
- ["[0]" code ("[1]\[0]" equivalence)]]
+ ["[0]" code ("[1]#[0]" equivalence)]]
[math
[number
["[0]" nat]
@@ -32,9 +32,9 @@
(def: remaining_inputs
(-> (List Code) Text)
- (|>> (list\each code.format)
+ (|>> (list#each code.format)
(text.interposed " ")
- ($_ text\composite text.new_line "Remaining input: ")))
+ ($_ text#composite text.new_line "Remaining input: ")))
(def: .public any
(Parser Code)
@@ -57,7 +57,7 @@
{try.#Success [tokens next]})))
(template [<query> <check> <type> <tag> <eq> <desc>]
- [(with_expansions [<failure> (as_is {try.#Failure ($_ text\composite "Cannot parse " <desc> (remaining_inputs tokens))})]
+ [(with_expansions [<failure> (as_is {try.#Failure ($_ text#composite "Cannot parse " <desc> (remaining_inputs tokens))})]
(def: .public <query>
(Parser <type>)
(function (_ tokens)
@@ -73,7 +73,7 @@
(function (_ tokens)
(case tokens
{.#Item [[_ {<tag> actual}] tokens']}
- (if (\ <eq> = expected actual)
+ (if (# <eq> = expected actual)
{try.#Success [tokens' []]}
<failure>)
@@ -94,16 +94,16 @@
(function (_ tokens)
(case tokens
{.#Item [token tokens']}
- (if (code\= code token)
+ (if (code#= code token)
{try.#Success [tokens' []]}
- {try.#Failure ($_ text\composite "Expected a " (code.format code) " but instead got " (code.format token)
+ {try.#Failure ($_ text#composite "Expected a " (code.format code) " but instead got " (code.format token)
(remaining_inputs tokens))})
_
{try.#Failure "There are no tokens to parse!"})))
(template [<query> <check> <tag> <eq> <desc>]
- [(with_expansions [<failure> (as_is {try.#Failure ($_ text\composite "Cannot parse " <desc> (remaining_inputs tokens))})]
+ [(with_expansions [<failure> (as_is {try.#Failure ($_ text#composite "Cannot parse " <desc> (remaining_inputs tokens))})]
(def: .public <query>
(Parser Text)
(function (_ tokens)
@@ -119,7 +119,7 @@
(function (_ tokens)
(case tokens
{.#Item [[_ {<tag> ["" actual]}] tokens']}
- (if (\ <eq> = expected actual)
+ (if (# <eq> = expected actual)
{try.#Success [tokens' []]}
<failure>)
@@ -138,10 +138,10 @@
{.#Item [[_ {<tag> members}] tokens']}
(case (p members)
{try.#Success [{.#End} x]} {try.#Success [tokens' x]}
- _ {try.#Failure ($_ text\composite "Parser was expected to fully consume " <desc> (remaining_inputs tokens))})
+ _ {try.#Failure ($_ text#composite "Parser was expected to fully consume " <desc> (remaining_inputs tokens))})
_
- {try.#Failure ($_ text\composite "Cannot parse " <desc> (remaining_inputs tokens))})))]
+ {try.#Failure ($_ text#composite "Cannot parse " <desc> (remaining_inputs tokens))})))]
[form .#Form "form"]
[variant .#Variant "variant"]
@@ -153,7 +153,7 @@
(function (_ tokens)
(case tokens
{.#End} {try.#Success [tokens []]}
- _ {try.#Failure ($_ text\composite "Expected list of tokens to be empty!" (remaining_inputs tokens))})))
+ _ {try.#Failure ($_ text#composite "Expected list of tokens to be empty!" (remaining_inputs tokens))})))
(def: .public end?
(Parser Bit)
@@ -175,9 +175,9 @@
_
{try.#Failure (|> unconsumed
- (list\each code.format)
+ (list#each code.format)
(text.interposed ", ")
- (text\composite "Unconsumed inputs: "))})))
+ (text#composite "Unconsumed inputs: "))})))
(def: .public (local inputs parser)
(All (_ a) (-> (List Code) (Parser a) (Parser a)))
@@ -193,5 +193,5 @@
result (//.or parser
..any)]
(case result
- {.#Left _} (//.failure (text\composite "Did NOT expect to parse code: " (code.format sample)))
+ {.#Left _} (//.failure (text#composite "Did NOT expect to parse code: " (code.format sample)))
{.#Right output} (in output))))
diff --git a/stdlib/source/library/lux/control/parser/environment.lux b/stdlib/source/library/lux/control/parser/environment.lux
index b6a788e24..53d6c69c2 100644
--- a/stdlib/source/library/lux/control/parser/environment.lux
+++ b/stdlib/source/library/lux/control/parser/environment.lux
@@ -41,4 +41,4 @@
(def: .public (result parser environment)
(All (_ a) (-> (Parser a) Environment (Try a)))
- (\ try.monad each product.right (parser environment)))
+ (# try.monad each product.right (parser environment)))
diff --git a/stdlib/source/library/lux/control/parser/json.lux b/stdlib/source/library/lux/control/parser/json.lux
index 979d7c8a8..1811700e7 100644
--- a/stdlib/source/library/lux/control/parser/json.lux
+++ b/stdlib/source/library/lux/control/parser/json.lux
@@ -8,9 +8,9 @@
["[0]" exception {"+" [exception:]}]]
[data
["[0]" bit]
- ["[0]" text ("[1]\[0]" equivalence monoid)]
+ ["[0]" text ("[1]#[0]" equivalence monoid)]
[collection
- ["[0]" list ("[1]\[0]" functor)]
+ ["[0]" list ("[1]#[0]" functor)]
["[0]" row]
["[0]" dictionary {"+" [Dictionary]}]]
[format
@@ -20,7 +20,7 @@
[math
[number
["[0]" frac]]]]]
- ["[0]" // ("[1]\[0]" functor)])
+ ["[0]" // ("[1]#[0]" functor)])
(type: .public (Parser a)
(//.Parser (List JSON) a))
@@ -90,7 +90,7 @@
[head ..any]
(case head
{<tag> value}
- (in (\ <equivalence> = test value))
+ (in (# <equivalence> = test value))
_
(//.failure (exception.error ..unexpected_value [head])))))
@@ -101,7 +101,7 @@
[head ..any]
(case head
{<tag> value}
- (if (\ <equivalence> = test value)
+ (if (# <equivalence> = test value)
(in [])
(//.failure (exception.error ..value_mismatch [{<tag> test} {<tag> value}])))
@@ -147,7 +147,7 @@
{/.#Object kvs}
(case (|> kvs
dictionary.entries
- (list\each (function (_ [key value])
+ (list#each (function (_ [key value])
(list {/.#String key} value)))
list.together
(//.result parser))
@@ -170,7 +170,7 @@
(function (recur inputs)
(case inputs
(^ (list& {/.#String key} value inputs'))
- (if (text\= key field_name)
+ (if (text#= key field_name)
(case (//.result parser (list value))
{try.#Success [{.#End} output]}
{try.#Success [inputs' output]}
@@ -196,4 +196,4 @@
(|>> (//.and ..string)
//.some
..object
- (//\each (dictionary.of_list text.hash))))
+ (//#each (dictionary.of_list text.hash))))
diff --git a/stdlib/source/library/lux/control/parser/synthesis.lux b/stdlib/source/library/lux/control/parser/synthesis.lux
index 0a8db3267..828042bd4 100644
--- a/stdlib/source/library/lux/control/parser/synthesis.lux
+++ b/stdlib/source/library/lux/control/parser/synthesis.lux
@@ -102,7 +102,7 @@
(.function (_ input)
(case input
(^ (list& (<tag> actual) input'))
- (if (\ <eq> = expected actual)
+ (if (# <eq> = expected actual)
{try.#Success [input' []]}
(exception.except ..cannot_parse input))
diff --git a/stdlib/source/library/lux/control/parser/text.lux b/stdlib/source/library/lux/control/parser/text.lux
index b887806ba..b74ac2f44 100644
--- a/stdlib/source/library/lux/control/parser/text.lux
+++ b/stdlib/source/library/lux/control/parser/text.lux
@@ -8,16 +8,16 @@
["[0]" try {"+" [Try]}]
["[0]" exception {"+" [exception:]}]]
[data
- ["/" text {"+" [Char]} ("[1]\[0]" monoid)]
+ ["/" text {"+" [Char]} ("[1]#[0]" monoid)]
["[0]" product]
[collection
- ["[0]" list ("[1]\[0]" mix)]]]
+ ["[0]" list ("[1]#[0]" mix)]]]
[macro
["[0]" code]
["[0]" template]]
[math
[number
- ["n" nat ("[1]\[0]" decimal)]]]]]
+ ["n" nat ("[1]#[0]" decimal)]]]]]
["[0]" //])
(type: .public Offset
@@ -42,14 +42,14 @@
(exception: .public (unconsumed_input [offset Offset
tape Text])
(exception.report
- ["Offset" (n\encoded offset)]
- ["Input size" (n\encoded (/.size tape))]
+ ["Offset" (n#encoded offset)]
+ ["Input size" (n#encoded (/.size tape))]
["Remaining input" (..left_over offset tape)]))
(exception: .public (expected_to_fail [offset Offset
tape Text])
(exception.report
- ["Offset" (n\encoded offset)]
+ ["Offset" (n#encoded offset)]
["Input" (..left_over offset tape)]))
(exception: .public cannot_parse)
@@ -76,7 +76,7 @@
(do //.monad
[offset ..offset
slices parser]
- (in (list\mix (function (_ [slice::basis slice::distance]
+ (in (list#mix (function (_ [slice::basis slice::distance]
[total::basis total::distance])
[total::basis ("lux i64 +" slice::distance total::distance)])
[#basis offset
@@ -164,7 +164,7 @@
(do //.monad
[char any
.let [char' (maybe.trusted (/.char 0 char))]
- _ (//.assertion ($_ /\composite "Character is not within range: " (/.of_char bottom) "-" (/.of_char top))
+ _ (//.assertion ($_ /#composite "Character is not within range: " (/.of_char bottom) "-" (/.of_char top))
(.and (n.>= bottom char')
(n.<= top char')))]
(in char)))
@@ -269,7 +269,7 @@
(do //.monad
[=left left
=right right]
- (in ($_ /\composite =left =right))))
+ (in ($_ /#composite =left =right))))
(def: .public (and! left right)
(-> (Parser Slice) (Parser Slice) (Parser Slice))
@@ -281,7 +281,7 @@
(template [<name> <base> <doc_modifier>]
[(def: .public (<name> parser)
(-> (Parser Text) (Parser Text))
- (|> parser <base> (\ //.monad each /.together)))]
+ (|> parser <base> (# //.monad each /.together)))]
[some //.some "some"]
[many //.many "many"]
@@ -301,7 +301,7 @@
(-> Nat (Parser Text) (Parser Text))
(|> parser
(<base> amount)
- (\ //.monad each /.together)))]
+ (# //.monad each /.together)))]
[exactly //.exactly "exactly"]
[at_most //.at_most "at most"]
@@ -323,7 +323,7 @@
(-> Nat Nat (Parser Text) (Parser Text))
(|> parser
(//.between minimum additional)
- (\ //.monad each /.together)))
+ (# //.monad each /.together)))
(def: .public (between! minimum additional parser)
(-> Nat Nat (Parser Slice) (Parser Slice))
diff --git a/stdlib/source/library/lux/control/parser/type.lux b/stdlib/source/library/lux/control/parser/type.lux
index 29fab0aa4..936f8f522 100644
--- a/stdlib/source/library/lux/control/parser/type.lux
+++ b/stdlib/source/library/lux/control/parser/type.lux
@@ -8,17 +8,17 @@
["[0]" exception {"+" [exception:]}]
["[0]" function]]
[data
- ["[0]" text ("[1]\[0]" monoid)
+ ["[0]" text ("[1]#[0]" monoid)
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" functor)]
+ ["[0]" list ("[1]#[0]" functor)]
["[0]" dictionary {"+" [Dictionary]}]]]
[macro
["[0]" code]]
[math
[number
- ["n" nat ("[1]\[0]" decimal)]]]
- ["[0]" type ("[1]\[0]" equivalence)
+ ["n" nat ("[1]#[0]" decimal)]]]
+ ["[0]" type ("[1]#[0]" equivalence)
["[0]" check]]]]
["[0]" //])
@@ -58,7 +58,7 @@
(exception: .public (unconsumed_input [remaining (List Type)])
(exception.report
["Types" (|> remaining
- (list\each (|>> %.type (format text.new_line "* ")))
+ (list#each (|>> %.type (format text.new_line "* ")))
(text.interposed ""))]))
(type: .public Env
@@ -136,7 +136,7 @@
(def: (label idx)
(-> Nat Code)
- (code.local_identifier ($_ text\composite "label" text.tab (n\encoded idx))))
+ (code.local_identifier ($_ text#composite "label" text.tab (n#encoded idx))))
(def: .public (with_extension type poly)
(All (_ a) (-> Type (Parser a) (Parser [Code a])))
@@ -179,7 +179,7 @@
(All (_ a) (-> (Parser a) (Parser [Code (List Code) a])))
(do [! //.monad]
[headT any
- funcI (\ ! each dictionary.size ..env)
+ funcI (# ! each dictionary.size ..env)
[num_args non_poly] (local (list headT) ..polymorphic')
env ..env
.let [funcL (label funcI)
@@ -198,7 +198,7 @@
partial_varI (++ partialI)
partial_varL (label partial_varI)
partialC (` ((~ funcL) (~+ (|> (list.indices num_args)
- (list\each (|>> (n.* 2) ++ (n.+ funcI) label))
+ (list#each (|>> (n.* 2) ++ (n.+ funcI) label))
list.reversed))))]
(recur (++ current_arg)
(|> env'
@@ -240,7 +240,7 @@
(in [])
(//.failure (exception.error ..types_do_not_match [expected actual])))))]
- [exactly type\=]
+ [exactly type#=]
[sub check.subsumes?]
[super (function.flipped check.subsumes?)]
)
diff --git a/stdlib/source/library/lux/control/parser/xml.lux b/stdlib/source/library/lux/control/parser/xml.lux
index 71fb6fab9..a4efa259b 100644
--- a/stdlib/source/library/lux/control/parser/xml.lux
+++ b/stdlib/source/library/lux/control/parser/xml.lux
@@ -4,10 +4,10 @@
[abstract
[monad {"+" [do]}]]
[control
- ["[0]" try {"+" [Try]} ("[1]\[0]" functor)]
+ ["[0]" try {"+" [Try]} ("[1]#[0]" functor)]
["[0]" exception {"+" [exception:]}]]
[data
- ["[0]" name ("[1]\[0]" equivalence codec)]
+ ["[0]" name ("[1]#[0]" equivalence codec)]
["[0]" text
["%" format {"+" [format]}]]
[collection
@@ -37,7 +37,7 @@
(exception: .public (unconsumed_inputs [inputs (List XML)])
(exception.report
- ["Inputs" (exception.listing (\ /.codec encoded) inputs)]))
+ ["Inputs" (exception.listing (# /.codec encoded) inputs)]))
(def: (result' parser attrs documents)
(All (_ a) (-> (Parser a) Attrs (List XML) (Try a)))
@@ -107,10 +107,10 @@
(exception.except ..unexpected_input [])
{/.#Node actual attrs' children}
- (if (name\= expected actual)
+ (if (name#= expected actual)
(|> children
(..result' parser attrs')
- (try\each (|>> [[attrs tail]])))
+ (try#each (|>> [[attrs tail]])))
(exception.except ..wrong_tag [expected actual]))))))
(def: .public any
diff --git a/stdlib/source/library/lux/control/pipe.lux b/stdlib/source/library/lux/control/pipe.lux
index 7ce13b79d..f6158f039 100644
--- a/stdlib/source/library/lux/control/pipe.lux
+++ b/stdlib/source/library/lux/control/pipe.lux
@@ -10,7 +10,7 @@
[data
["[0]" identity]
[collection
- ["[0]" list ("[1]\[0]" monad)]]]
+ ["[0]" list ("[1]#[0]" monad)]]]
[macro {"+" [with_identifiers]}
[syntax {"+" [syntax:]}]
["[0]" code]]
@@ -104,12 +104,12 @@
prev <code>.any])
(with_identifiers [g!temp]
(in (list (` (let [(~ g!temp) (~ prev)]
- [(~+ (list\each (function (_ body) (` (|> (~ g!temp) (~+ body))))
+ [(~+ (list#each (function (_ body) (` (|> (~ g!temp) (~+ body))))
paths))]))))))
(syntax: .public (case> [branches (<>.many (<>.and <code>.any <code>.any))
prev <code>.any])
(in (list (` (case (~ prev)
(~+ (|> branches
- (list\each (function (_ [pattern body]) (list pattern body)))
- list\conjoint)))))))
+ (list#each (function (_ [pattern body]) (list pattern body)))
+ list#conjoint)))))))
diff --git a/stdlib/source/library/lux/control/reader.lux b/stdlib/source/library/lux/control/reader.lux
index 09431e513..a946469d3 100644
--- a/stdlib/source/library/lux/control/reader.lux
+++ b/stdlib/source/library/lux/control/reader.lux
@@ -56,7 +56,8 @@
(functor.composite ..functor (value@ monad.&functor monad)))
(def: in
- (|>> (\ monad in) (\ ..monad in)))
+ (|>> (# monad in)
+ (# ..monad in)))
(def: (conjoint eMeMa)
(function (_ env)
@@ -66,4 +67,4 @@
(def: .public lifted
(All (_ M e a) (-> (M a) (Reader e (M a))))
- (\ ..monad in))
+ (# ..monad in))
diff --git a/stdlib/source/library/lux/control/region.lux b/stdlib/source/library/lux/control/region.lux
index 0082844a2..b17393bda 100644
--- a/stdlib/source/library/lux/control/region.lux
+++ b/stdlib/source/library/lux/control/region.lux
@@ -11,7 +11,7 @@
["[0]" text
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" mix)]]]]]
+ ["[0]" list ("[1]#[0]" mix)]]]]]
[//
["[0]" exception {"+" [Exception exception:]}]])
@@ -59,13 +59,13 @@
[[cleaners output] (computation [[] (list)])]
(|> cleaners
(monad.each ! (function (_ cleaner) (cleaner [])))
- (\ ! each (list\mix clean output)))))
+ (# ! each (list#mix clean output)))))
(def: .public (acquire! monad cleaner value)
(All (_ ! a) (-> (Monad !) (-> a (! (Try Any))) a
(All (_ r) (Region r ! a))))
(function (_ [region cleaners])
- (\ monad in [{.#Item (function (_ region) (cleaner value))
+ (# monad in [{.#Item (function (_ region) (cleaner value))
cleaners}
{try.#Success value}])))
@@ -77,7 +77,7 @@
(def: (each f)
(function (_ fa)
(function (_ region+cleaners)
- (\ super each
+ (# super each
(function (_ [cleaners' temp])
[cleaners' (case temp
{try.#Success value}
@@ -122,7 +122,7 @@
(def: (in value)
(function (_ [region cleaners])
- (\ super in [cleaners {try.#Success value}])))
+ (# super in [cleaners {try.#Success value}])))
(def: (conjoint ffa)
(function (_ [region cleaners])
@@ -140,7 +140,7 @@
(-> (Monad !) Text
(All (_ r) (Region r ! a))))
(function (_ [region cleaners])
- (\ monad in [cleaners {try.#Failure error}])))
+ (# monad in [cleaners {try.#Failure error}])))
(def: .public (except monad exception message)
(All (_ ! e a)
@@ -153,6 +153,6 @@
(-> (Monad !) (! a)
(All (_ r) (Region r ! a))))
(function (_ [region cleaners])
- (\ monad each
+ (# monad each
(|>> {try.#Success} [cleaners])
operation)))
diff --git a/stdlib/source/library/lux/control/remember.lux b/stdlib/source/library/lux/control/remember.lux
index b7047517d..f8a0dbc2d 100644
--- a/stdlib/source/library/lux/control/remember.lux
+++ b/stdlib/source/library/lux/control/remember.lux
@@ -7,14 +7,14 @@
["[0]" io]
["[0]" try]
["[0]" exception {"+" [exception:]}]
- ["<>" parser ("[1]\[0]" functor)
+ ["<>" parser ("[1]#[0]" functor)
["<c>" code {"+" [Parser]}]]]
[data
["[0]" text
["%" format {"+" [format]}]]]
[time
["[0]" instant]
- ["[0]" date {"+" [Date]} ("[1]\[0]" order)]]
+ ["[0]" date {"+" [Date]} ("[1]#[0]" order)]]
["[0]" meta]
[macro
["[0]" code]
@@ -39,11 +39,11 @@
(def: deadline
(Parser Date)
($_ <>.either
- (<>\each (|>> instant.of_millis instant.date)
+ (<>#each (|>> instant.of_millis instant.date)
<c>.int)
(do <>.monad
[raw <c>.text]
- (case (\ date.codec decoded raw)
+ (case (# date.codec decoded raw)
{try.#Success date}
(in date)
@@ -55,7 +55,7 @@
focus (<>.maybe <c>.any)])
(let [now (io.run! instant.now)
today (instant.date now)]
- (if (date\< deadline today)
+ (if (date#< deadline today)
(in (case focus
{.#Some focus}
(list focus)
diff --git a/stdlib/source/library/lux/control/security/capability.lux b/stdlib/source/library/lux/control/security/capability.lux
index 2a49f4b51..18696f851 100644
--- a/stdlib/source/library/lux/control/security/capability.lux
+++ b/stdlib/source/library/lux/control/security/capability.lux
@@ -13,7 +13,7 @@
[text
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" functor)]]]
+ ["[0]" list ("[1]#[0]" functor)]]]
[type
abstract]
["[0]" meta]
@@ -48,14 +48,14 @@
(do [! meta.monad]
[this_module meta.current_module_name
.let [[name vars] declaration]
- g!brand (\ ! each (|>> %.code code.text)
+ g!brand (# ! each (|>> %.code code.text)
(macro.identifier (format (%.name [this_module name]))))
.let [capability (` (..Capability (.primitive (~ g!brand)) (~ input) (~ output)))]]
(in (list (` (type: (~ export_policy)
(~ (|declaration|.format declaration))
(~ capability)))
(` (def: (~ (code.local_identifier forger))
- (All ((~ g!_) (~+ (list\each code.local_identifier vars)))
+ (All ((~ g!_) (~+ (list#each code.local_identifier vars)))
(-> (-> (~ input) (~ output))
(~ capability)))
(~! ..capability)))
diff --git a/stdlib/source/library/lux/control/state.lux b/stdlib/source/library/lux/control/state.lux
index c9a6566bb..e9ad5dc92 100644
--- a/stdlib/source/library/lux/control/state.lux
+++ b/stdlib/source/library/lux/control/state.lux
@@ -93,13 +93,13 @@
(def: (each f sfa)
(function (_ state)
- (\ functor each (function (_ [s a]) [s (f a)])
+ (# functor each (function (_ [s a]) [s (f a)])
(sfa state)))))
(implementation: (with//apply monad)
(All (_ M s) (-> (Monad M) (Apply (All (_ a) (-> s (M [s a]))))))
- (def: &functor (with//functor (\ monad &functor)))
+ (def: &functor (with//functor (# monad &functor)))
(def: (on sFa sFf)
(function (_ state)
@@ -118,11 +118,11 @@
(implementation: .public (with monad)
(All (_ M s) (-> (Monad M) (Monad (+State M s))))
- (def: &functor (with//functor (\ monad &functor)))
+ (def: &functor (with//functor (# monad &functor)))
(def: (in a)
(function (_ state)
- (\ monad in [state a])))
+ (# monad in [state a])))
(def: (conjoint sMsMa)
(function (_ state)
diff --git a/stdlib/source/library/lux/control/try.lux b/stdlib/source/library/lux/control/try.lux
index eb078497f..6ef29b2e9 100644
--- a/stdlib/source/library/lux/control/try.lux
+++ b/stdlib/source/library/lux/control/try.lux
@@ -68,8 +68,8 @@
..functor))
(def: in
- (|>> (\ ..monad in)
- (\ monad in)))
+ (|>> (# ..monad in)
+ (# monad in)))
(def: (conjoint MeMea)
(do monad
@@ -83,15 +83,15 @@
(def: .public (lifted monad)
(All (_ ! a) (-> (Monad !) (-> (! a) (! (Try a)))))
- (\ monad each (\ ..monad in)))
+ (# monad each (# ..monad in)))
-(implementation: .public (equivalence (^open "_\[0]"))
+(implementation: .public (equivalence (^open "_#[0]"))
(All (_ a) (-> (Equivalence a) (Equivalence (Try a))))
(def: (= reference sample)
(case [reference sample]
[{#Success reference} {#Success sample}]
- (_\= reference sample)
+ (_#= reference sample)
[{#Failure reference} {#Failure sample}]
("lux text =" reference sample)
@@ -128,7 +128,7 @@
{#Success value}
{.#None}
- {#Failure (`` (("lux in-module" (~~ (static .prelude_module)) .name\encoded)
+ {#Failure (`` (("lux in-module" (~~ (static .prelude_module)) .name#encoded)
(name_of ..of_maybe)))}))
(macro: .public (else tokens compiler)
diff --git a/stdlib/source/library/lux/control/writer.lux b/stdlib/source/library/lux/control/writer.lux
index c30494e56..92b3b9ab9 100644
--- a/stdlib/source/library/lux/control/writer.lux
+++ b/stdlib/source/library/lux/control/writer.lux
@@ -34,7 +34,7 @@
(def: (on fa ff)
(let [[log1 f] ff
[log2 a] fa]
- [(\ monoid composite log1 log2) (f a)])))
+ [(# monoid composite log1 log2) (f a)])))
(implementation: .public (monad monoid)
(All (_ l)
@@ -43,11 +43,11 @@
(def: &functor ..functor)
(def: in
- (|>> [(\ monoid identity)]))
+ (|>> [(# monoid identity)]))
(def: (conjoint mma)
(let [[log1 [log2 a]] mma]
- [(\ monoid composite log1 log2) a])))
+ [(# monoid composite log1 log2) a])))
(implementation: .public (with monoid monad)
(All (_ l M) (-> (Monoid l) (Monad M) (Monad (All (_ a) (M (Writer l a))))))
@@ -58,7 +58,7 @@
(def: in
(let [writer (..monad monoid)]
- (|>> (\ writer in) (\ monad in))))
+ (|>> (# writer in) (# monad in))))
(def: (conjoint MlMla)
(do monad
@@ -72,10 +72,10 @@
... On new compiler
MlMla)
[l2 a] Mla]
- (in [(\ monoid composite l1 l2) a]))))
+ (in [(# monoid composite l1 l2) a]))))
(def: .public (lifted monoid monad)
(All (_ l M a)
(-> (Monoid l) (Monad M)
(-> (M a) (M (Writer l a)))))
- (\ monad each (|>> [(\ monoid identity)])))
+ (# monad each (|>> [(# monoid identity)])))
diff --git a/stdlib/source/library/lux/data/collection/array.lux b/stdlib/source/library/lux/data/collection/array.lux
index 08cfac991..8830266ce 100644
--- a/stdlib/source/library/lux/data/collection/array.lux
+++ b/stdlib/source/library/lux/data/collection/array.lux
@@ -13,7 +13,7 @@
[data
["[0]" product]
[collection
- ["[0]" list ("[1]\[0]" mix)]]]
+ ["[0]" list ("[1]#[0]" mix)]]]
[math
[number
["n" nat]]]]])
@@ -178,7 +178,7 @@
(Array a)))
(if (n.= 0 length)
dest_array
- (list\mix (function (_ offset target)
+ (list#mix (function (_ offset target)
(case (read! (n.+ offset src_start) src_array)
{.#None}
target
@@ -190,7 +190,7 @@
(def: .public (occupancy array)
(All (_ a) (-> (Array a) Nat))
- (list\mix (function (_ idx count)
+ (list#mix (function (_ idx count)
(case (read! idx array)
{.#None}
count
@@ -207,7 +207,7 @@
(def: .public (filter! p xs)
(All (_ a)
(-> (Predicate a) (Array a) (Array a)))
- (list\mix (function (_ idx xs')
+ (list#mix (function (_ idx xs')
(case (read! idx xs)
{.#None}
xs'
@@ -254,7 +254,7 @@
(def: .public (clone xs)
(All (_ a) (-> (Array a) (Array a)))
(let [arr_size (size xs)]
- (list\mix (function (_ idx ys)
+ (list#mix (function (_ idx ys)
(case (read! idx xs)
{.#None}
ys
@@ -266,7 +266,7 @@
(def: .public (of_list xs)
(All (_ a) (-> (List a) (Array a)))
- (product.right (list\mix (function (_ x [idx arr])
+ (product.right (list#mix (function (_ x [idx arr])
[(++ idx) (write! idx x arr)])
[0 (empty (list.size xs))]
xs)))
@@ -314,21 +314,21 @@
{.#None}
(list|-default array)))
-(implementation: .public (equivalence (^open ",\[0]"))
+(implementation: .public (equivalence (^open ",#[0]"))
(All (_ a) (-> (Equivalence a) (Equivalence (Array a))))
(def: (= xs ys)
(let [sxs (size xs)
sxy (size ys)]
(and (n.= sxy sxs)
- (list\mix (function (_ idx prev)
+ (list#mix (function (_ idx prev)
(and prev
(case [(read! idx xs) (read! idx ys)]
[{.#None} {.#None}]
true
[{.#Some x} {.#Some y}]
- (,\= x y)
+ (,#= x y)
_
false)))
@@ -354,7 +354,7 @@
(let [arr_size (size ma)]
(if (n.= 0 arr_size)
(empty arr_size)
- (list\mix (function (_ idx mb)
+ (list#mix (function (_ idx mb)
(case (read! idx ma)
{.#None}
mb
diff --git a/stdlib/source/library/lux/data/collection/bits.lux b/stdlib/source/library/lux/data/collection/bits.lux
index 8bfe7f2f9..42070dc8d 100644
--- a/stdlib/source/library/lux/data/collection/bits.lux
+++ b/stdlib/source/library/lux/data/collection/bits.lux
@@ -8,7 +8,7 @@
["[0]" maybe]]
[data
[collection
- ["[0]" array {"+" [Array]} ("[1]\[0]" mix)]]]
+ ["[0]" array {"+" [Array]} ("[1]#[0]" mix)]]]
[math
[number
["n" nat]
@@ -33,7 +33,7 @@
(def: .public (size bits)
(-> Bits Nat)
- (array\mix (function (_ chunk total)
+ (array#mix (function (_ chunk total)
(|> chunk i64.ones (n.+ total)))
0
bits))
diff --git a/stdlib/source/library/lux/data/collection/dictionary.lux b/stdlib/source/library/lux/data/collection/dictionary.lux
index bdfc2638a..6b0aff962 100644
--- a/stdlib/source/library/lux/data/collection/dictionary.lux
+++ b/stdlib/source/library/lux/data/collection/dictionary.lux
@@ -12,8 +12,8 @@
[data
["[0]" product]
[collection
- ["[0]" list ("[1]\[0]" mix functor monoid)]
- ["[0]" array {"+" [Array]} ("[1]\[0]" functor mix)]]]
+ ["[0]" list ("[1]#[0]" mix functor monoid)]
+ ["[0]" array {"+" [Array]} ("[1]#[0]" functor mix)]]]
[math
["[0]" number
["n" nat]
@@ -131,7 +131,7 @@
... Expands a copy of the array, to have 1 extra slot, which is used
... for storing the value.
-(def: (array\has idx value old_array)
+(def: (array#has idx value old_array)
(All (_ a) (-> Index a (Array a) (Array a)))
(let [old_size (array.size old_array)]
(|> (array.empty (++ old_size))
@@ -140,19 +140,19 @@
(array.copy! (n.- idx old_size) idx old_array (++ idx)))))
... Creates a copy of an array with an index set to a particular value.
-(def: (array\revised idx value array)
+(def: (array#revised idx value array)
(All (_ a) (-> Index a (Array a) (Array a)))
(|> array array.clone (array.write! idx value)))
... Creates a clone of the array, with an empty position at index.
-(def: (array\clear idx array)
+(def: (array#clear idx array)
(All (_ a) (-> Index (Array a) (Array a)))
(|> array
array.clone
(array.delete! idx)))
... Shrinks a copy of the array by removing the space at index.
-(def: (array\lacks idx array)
+(def: (array#lacks idx array)
(All (_ a) (-> Index (Array a) (Array a)))
(let [new_size (-- (array.size array))]
(|> (array.empty new_size)
@@ -228,16 +228,16 @@
... Produces the index of a KV-pair within a #Collisions node.
(def: (collision_index key_hash key colls)
(All (_ k v) (-> (Hash k) k (Collisions k v) (Maybe Index)))
- (\ maybe.monad each product.left
+ (# maybe.monad each product.left
(array.example+ (function (_ idx [key' val'])
- (\ key_hash = key key'))
+ (# key_hash = key key'))
colls)))
... When #Hierarchy nodes grow too small, they're demoted to #Base
... nodes to save space.
(def: (demotion except_idx [h_size h_array])
(All (_ k v) (-> Index (Hierarchy k v) [Bit_Map (Base k v)]))
- (product.right (list\mix (function (_ idx [insertion_idx node])
+ (product.right (list#mix (function (_ idx [insertion_idx node])
(let [[bitmap base] node]
(case (array.read! idx h_array)
{.#None} [insertion_idx node]
@@ -257,13 +257,13 @@
(List Index)
(list.indices hierarchy_nodes_size))
-(def: (promotion node\has key_hash level bitmap base)
+(def: (promotion node#has key_hash level bitmap base)
(All (_ k v)
(-> (-> Level Hash_Code k v (Hash k) (Node k v) (Node k v))
(Hash k) Level
Bit_Map (Base k v)
(Array (Node k v))))
- (product.right (list\mix (function (_ hierarchy_idx (^@ default [base_idx h_array]))
+ (product.right (list#mix (function (_ hierarchy_idx (^@ default [base_idx h_array]))
(if (with_bit_position? (to_bit_position hierarchy_idx)
bitmap)
[(++ base_idx)
@@ -273,7 +273,7 @@
{.#Some {.#Right [key' val']}}
(array.write! hierarchy_idx
- (node\has (level_up level) (\ key_hash hash key') key' val' key_hash empty_node)
+ (node#has (level_up level) (# key_hash hash key') key' val' key_hash empty_node)
h_array)
{.#None}
@@ -286,7 +286,7 @@
... All empty nodes look the same (a #Base node with clean bitmap is
... used).
... So, this test is introduced to detect them.
-(def: (node\empty? node)
+(def: (node#empty? node)
(All (_ k v) (-> (Node k v) Bit))
(`` (case node
{#Base (~~ (static ..clean_bitmap)) _}
@@ -295,7 +295,7 @@
_
#0)))
-(def: (node\has level hash key val key_hash node)
+(def: (node#has level hash key val key_hash node)
(All (_ k v) (-> Level Hash_Code k v (Hash k) (Node k v) (Node k v)))
(case node
... For #Hierarchy nodes, check whether one can add the element to
@@ -309,7 +309,7 @@
_
[(++ _size) empty_node])]
{#Hierarchy _size'
- (array\revised idx (node\has (level_up level) hash key val key_hash sub_node)
+ (array#revised idx (node#has (level_up level) hash key val key_hash sub_node)
hierarchy)})
... For #Base nodes, check if the corresponding Bit_Position has
@@ -322,17 +322,17 @@
(case (array.read! idx base)
... If it's being used by a node, add the KV to it.
{.#Some {.#Left sub_node}}
- (let [sub_node' (node\has (level_up level) hash key val key_hash sub_node)]
- {#Base bitmap (array\revised idx {.#Left sub_node'} base)})
+ (let [sub_node' (node#has (level_up level) hash key val key_hash sub_node)]
+ {#Base bitmap (array#revised idx {.#Left sub_node'} base)})
... Otherwise, if it's being used by a KV, compare the keys.
{.#Some {.#Right key' val'}}
- (if (\ key_hash = key key')
+ (if (# key_hash = key key')
... If the same key is found, replace the value.
- {#Base bitmap (array\revised idx {.#Right key val} base)}
+ {#Base bitmap (array#revised idx {.#Right key val} base)}
... Otherwise, compare the hashes of the keys.
- {#Base bitmap (array\revised idx
- {.#Left (let [hash' (\ key_hash hash key')]
+ {#Base bitmap (array#revised idx
+ {.#Left (let [hash' (# key_hash hash key')]
(if (n.= hash hash')
... If the hashes are
... the same, a new
@@ -348,8 +348,8 @@
... to the empty one.
(let [next_level (level_up level)]
(|> empty_node
- (node\has next_level hash' key' val' key_hash)
- (node\has next_level hash key val key_hash)))))}
+ (node#has next_level hash' key' val' key_hash)
+ (node#has next_level hash key val key_hash)))))}
base)})
{.#None}
@@ -361,14 +361,14 @@
... If so, resize the #Base node to accommodate the
... new KV-pair.
{#Base (with_bit_position bit bitmap)
- (array\has (base_index bit bitmap) {.#Right [key val]} base)}
+ (array#has (base_index bit bitmap) {.#Right [key val]} base)}
... Otherwise, promote it to a #Hierarchy node, and add the new
... KV-pair as a singleton node to it.
{#Hierarchy (++ base_count)
(|> base
- (promotion node\has key_hash level bitmap)
+ (promotion node#has key_hash level bitmap)
(array.write! (level_index level hash)
- (node\has (level_up level) hash key val key_hash empty_node)))}))))
+ (node#has (level_up level) hash key val key_hash empty_node)))}))))
... For #Collisions nodes, compare the hashes.
{#Collisions _hash _colls}
@@ -379,20 +379,20 @@
... If the key was already present in the collisions-list, its
... value gets updated.
{.#Some coll_idx}
- {#Collisions _hash (array\revised coll_idx [key val] _colls)}
+ {#Collisions _hash (array#revised coll_idx [key val] _colls)}
... Otherwise, the KV-pair is added to the collisions-list.
{.#None}
- {#Collisions _hash (array\has (array.size _colls) [key val] _colls)})
+ {#Collisions _hash (array#has (array.size _colls) [key val] _colls)})
... If the hashes are not equal, create a new #Base node that
... contains the old #Collisions node, plus the new KV-pair.
(|> {#Base (level_bit_position level _hash)
(|> (array.empty 1)
(array.write! 0 {.#Left node}))}
- (node\has level hash key val key_hash)))
+ (node#has level hash key val key_hash)))
))
-(def: (node\lacks level hash key key_hash node)
+(def: (node#lacks level hash key key_hash node)
(All (_ k v) (-> Level Hash_Code k (Hash k) (Node k v) (Node k v)))
(case node
... For #Hierarchy nodes, find out if there's a valid sub-node for
@@ -406,22 +406,22 @@
... But if there is, try to remove the key from the sub-node.
{.#Some sub_node}
- (let [sub_node' (node\lacks (level_up level) hash key key_hash sub_node)]
+ (let [sub_node' (node#lacks (level_up level) hash key key_hash sub_node)]
... Then check if a removal was actually done.
(if (same? sub_node sub_node')
... If not, then there's nothing to change here either.
node
... But if the sub_removal yielded an empty sub_node...
- (if (node\empty? sub_node')
+ (if (node#empty? sub_node')
... Check if it's due time for a demotion.
(if (n.> demotion_threshold h_size)
... If so, just clear the space.
- {#Hierarchy (-- h_size) (array\clear idx h_array)}
+ {#Hierarchy (-- h_size) (array#clear idx h_array)}
... Otherwise, perform it.
{#Base (demotion idx [h_size h_array])})
... But if the sub_removal yielded a non_empty node, then
... just update the hiearchy branch.
- {#Hierarchy h_size (array\revised idx sub_node' h_array)})))))
+ {#Hierarchy h_size (array#revised idx sub_node' h_array)})))))
... For #Base nodes, check whether the Bit_Position is set.
{#Base bitmap base}
@@ -432,13 +432,13 @@
... If set, check if it's a sub_node, and remove the KV
... from it.
{.#Some {.#Left sub_node}}
- (let [sub_node' (node\lacks (level_up level) hash key key_hash sub_node)]
+ (let [sub_node' (node#lacks (level_up level) hash key key_hash sub_node)]
... Verify that it was removed.
(if (same? sub_node sub_node')
... If not, there's also nothing to change here.
node
... But if it came out empty...
- (if (node\empty? sub_node')
+ (if (node#empty? sub_node')
...# ... figure out whether that's the only position left.
(if (only_bit_position? bit bitmap)
... If so, removing it leaves this node empty too.
@@ -446,19 +446,19 @@
... But if not, then just unset the position and
... remove the node.
{#Base (without_bit_position bit bitmap)
- (array\lacks idx base)})
+ (array#lacks idx base)})
... But, if it did not come out empty, then the
... position is kept, and the node gets updated.
{#Base bitmap
- (array\revised idx {.#Left sub_node'} base)})))
+ (array#revised idx {.#Left sub_node'} base)})))
... If, however, there was a KV-pair instead of a sub-node.
{.#Some {.#Right [key' val']}}
... Check if the keys match.
- (if (\ key_hash = key key')
+ (if (# key_hash = key key')
... If so, remove the KV-pair and unset the Bit_Position.
{#Base (without_bit_position bit bitmap)
- (array\lacks idx base)}
+ (array#lacks idx base)}
... Otherwise, there's nothing to remove.
node)
@@ -481,17 +481,17 @@
... an empty node.
empty_node
... Otherwise, just shrink the array by removing the KV-pair.
- {#Collisions _hash (array\lacks idx _colls)}))
+ {#Collisions _hash (array#lacks idx _colls)}))
))
-(def: (node\value level hash key key_hash node)
+(def: (node#value level hash key key_hash node)
(All (_ k v) (-> Level Hash_Code k (Hash k) (Node k v) (Maybe v)))
(case node
... For #Hierarchy nodes, just look-up the key on its children.
{#Hierarchy _size hierarchy}
(case (array.read! (level_index level hash) hierarchy)
{.#None} {.#None}
- {.#Some sub_node} (node\value (level_up level) hash key key_hash sub_node))
+ {.#Some sub_node} (node#value (level_up level) hash key key_hash sub_node))
... For #Base nodes, check the leaves, and recursively check the branches.
{#Base bitmap base}
@@ -499,10 +499,10 @@
(if (with_bit_position? bit bitmap)
(case (array.read! (base_index bit bitmap) base)
{.#Some {.#Left sub_node}}
- (node\value (level_up level) hash key key_hash sub_node)
+ (node#value (level_up level) hash key key_hash sub_node)
{.#Some {.#Right [key' val']}}
- (if (\ key_hash = key key')
+ (if (# key_hash = key key')
{.#Some val'}
{.#None})
@@ -512,21 +512,21 @@
... For #Collisions nodes, do a linear scan of all the known KV-pairs.
{#Collisions _hash _colls}
- (\ maybe.monad each product.right
- (array.example (|>> product.left (\ key_hash = key))
+ (# maybe.monad each product.right
+ (array.example (|>> product.left (# key_hash = key))
_colls))
))
-(def: (node\size node)
+(def: (node#size node)
(All (_ k v) (-> (Node k v) Nat))
(case node
{#Hierarchy _size hierarchy}
- (array\mix n.+ 0 (array\each node\size hierarchy))
+ (array#mix n.+ 0 (array#each node#size hierarchy))
{#Base _ base}
- (array\mix n.+ 0 (array\each (function (_ sub_node')
+ (array#mix n.+ 0 (array#each (function (_ sub_node')
(case sub_node'
- {.#Left sub_node} (node\size sub_node)
+ {.#Left sub_node} (node#size sub_node)
{.#Right _} 1))
base))
@@ -534,19 +534,19 @@
(array.size colls)
))
-(def: (node\entries node)
+(def: (node#entries node)
(All (_ k v) (-> (Node k v) (List [k v])))
(case node
{#Hierarchy _size hierarchy}
- (array\mix (function (_ sub_node tail) (list\composite (node\entries sub_node) tail))
+ (array#mix (function (_ sub_node tail) (list#composite (node#entries sub_node) tail))
{.#End}
hierarchy)
{#Base bitmap base}
- (array\mix (function (_ branch tail)
+ (array#mix (function (_ branch tail)
(case branch
{.#Left sub_node}
- (list\composite (node\entries sub_node) tail)
+ (list#composite (node#entries sub_node) tail)
{.#Right [key' val']}
{.#Item [key' val'] tail}))
@@ -554,7 +554,7 @@
base)
{#Collisions hash colls}
- (array\mix (function (_ [key' val'] tail) {.#Item [key' val'] tail})
+ (array#mix (function (_ [key' val'] tail) {.#Item [key' val'] tail})
{.#End}
colls)))
@@ -575,17 +575,17 @@
(def: .public (has key val dict)
(All (_ k v) (-> k v (Dictionary k v) (Dictionary k v)))
(let [[key_hash node] dict]
- [key_hash (node\has root_level (\ key_hash hash key) key val key_hash node)]))
+ [key_hash (node#has root_level (# key_hash hash key) key val key_hash node)]))
(def: .public (lacks key dict)
(All (_ k v) (-> k (Dictionary k v) (Dictionary k v)))
(let [[key_hash node] dict]
- [key_hash (node\lacks root_level (\ key_hash hash key) key key_hash node)]))
+ [key_hash (node#lacks root_level (# key_hash hash key) key key_hash node)]))
(def: .public (value key dict)
(All (_ k v) (-> k (Dictionary k v) (Maybe v)))
(let [[key_hash node] dict]
- (node\value root_level (\ key_hash hash key) key key_hash node)))
+ (node#value root_level (# key_hash hash key) key key_hash node)))
(def: .public (key? dict key)
(All (_ k v) (-> (Dictionary k v) k Bit))
@@ -619,7 +619,7 @@
(def: .public size
(All (_ k v) (-> (Dictionary k v) Nat))
- (|>> product.right ..node\size))
+ (|>> product.right ..node#size))
(def: .public empty?
(All (_ k v) (-> (Dictionary k v) Bit))
@@ -627,11 +627,11 @@
(def: .public entries
(All (_ k v) (-> (Dictionary k v) (List [k v])))
- (|>> product.right ..node\entries))
+ (|>> product.right ..node#entries))
(def: .public (of_list key_hash kvs)
(All (_ k v) (-> (Hash k) (List [k v]) (Dictionary k v)))
- (list\mix (function (_ [k v] dict)
+ (list#mix (function (_ [k v] dict)
(..has k v dict))
(empty key_hash)
kvs))
@@ -640,7 +640,7 @@
[(def: .public <name>
(All (_ k v) (-> (Dictionary k v) (List <side>)))
(|>> ..entries
- (list\mix (function (_ [k v] bundle)
+ (list#mix (function (_ [k v] bundle)
{.#Item <side> bundle})
{.#End})))]
@@ -650,13 +650,13 @@
(def: .public (merged dict2 dict1)
(All (_ k v) (-> (Dictionary k v) (Dictionary k v) (Dictionary k v)))
- (list\mix (function (_ [key val] dict) (has key val dict))
+ (list#mix (function (_ [key val] dict) (has key val dict))
dict1
(entries dict2)))
(def: .public (merged_with f dict2 dict1)
(All (_ k v) (-> (-> v v v) (Dictionary k v) (Dictionary k v) (Dictionary k v)))
- (list\mix (function (_ [key val2] dict)
+ (list#mix (function (_ [key val2] dict)
(case (value key dict)
{.#None}
(has key val2 dict)
@@ -680,14 +680,14 @@
(def: .public (sub keys dict)
(All (_ k v) (-> (List k) (Dictionary k v) (Dictionary k v)))
(let [[key_hash _] dict]
- (list\mix (function (_ key new_dict)
+ (list#mix (function (_ key new_dict)
(case (value key dict)
{.#None} new_dict
{.#Some val} (has key val new_dict)))
(empty key_hash)
keys)))
-(implementation: .public (equivalence (^open ",\[0]"))
+(implementation: .public (equivalence (^open ",#[0]"))
(All (_ k v) (-> (Equivalence v) (Equivalence (Dictionary k v))))
(def: (= reference subject)
@@ -696,7 +696,7 @@
(list.every? (function (_ [k rv])
(case (..value k subject)
{.#Some sv}
- (,\= rv sv)
+ (,#= rv sv)
_
#0))
@@ -708,10 +708,10 @@
(def: (each f fa)
(case fa
{#Hierarchy size hierarchy}
- {#Hierarchy size (array\each (each f) hierarchy)}
+ {#Hierarchy size (array#each (each f) hierarchy)}
{#Base bitmap base}
- {#Base bitmap (array\each (function (_ either)
+ {#Base bitmap (array#each (function (_ either)
(case either
{.#Left fa'}
{.#Left (each f fa')}
@@ -721,7 +721,7 @@
base)}
{#Collisions hash collisions}
- {#Collisions hash (array\each (function (_ [k v])
+ {#Collisions hash (array#each (function (_ [k v])
[k (f v)])
collisions)})))
@@ -729,4 +729,4 @@
(All (_ k) (Functor (Dictionary k)))
(def: (each f fa)
- (revised@ #root (\ ..node_functor each f) fa)))
+ (revised@ #root (# ..node_functor each f) fa)))
diff --git a/stdlib/source/library/lux/data/collection/dictionary/ordered.lux b/stdlib/source/library/lux/data/collection/dictionary/ordered.lux
index 1fc2e3ea5..1b02f03a3 100644
--- a/stdlib/source/library/lux/data/collection/dictionary/ordered.lux
+++ b/stdlib/source/library/lux/data/collection/dictionary/ordered.lux
@@ -10,7 +10,7 @@
[data
["p" product]
[collection
- ["[0]" list ("[1]\[0]" monoid mix)]]]
+ ["[0]" list ("[1]#[0]" monoid mix)]]]
[math
[number
["n" nat]]]]])
@@ -58,7 +58,7 @@
... TODO: Must improve it as soon as bug is fixed.
(def: .public (value key dict)
(All (_ k v) (-> k (Dictionary k v) (Maybe v)))
- (let [... (^open "_\[0]") (value@ #&order dict)
+ (let [... (^open "_#[0]") (value@ #&order dict)
]
(loop [node (value@ #root dict)]
(case node
@@ -67,15 +67,15 @@
{.#Some node}
(let [node_key (value@ #key node)]
- (cond (\ dict = node_key key)
- ... (_\= node_key key)
+ (cond (# dict = node_key key)
+ ... (_#= node_key key)
{.#Some (value@ #value node)}
- (\ dict < node_key key)
- ... (_\< node_key key)
+ (# dict < node_key key)
+ ... (_#< node_key key)
(recur (value@ #left node))
- ... (_\> (value@ #key node) key)
+ ... (_#> (value@ #key node) key)
(recur (value@ #right node))))
))))
@@ -83,7 +83,7 @@
... TODO: Must improve it as soon as bug is fixed.
(def: .public (key? dict key)
(All (_ k v) (-> (Dictionary k v) k Bit))
- (let [... (^open "_\[0]") (value@ #&order dict)
+ (let [... (^open "_#[0]") (value@ #&order dict)
]
(loop [node (value@ #root dict)]
(case node
@@ -92,10 +92,10 @@
{.#Some node}
(let [node_key (value@ #key node)]
- (or (\ dict = node_key key)
- ... (_\= node_key key)
- (if (\ dict < node_key key)
- ... (_\< node_key key)
+ (or (# dict = node_key key)
+ ... (_#= node_key key)
+ (if (# dict < node_key key)
+ ... (_#< node_key key)
(recur (value@ #left node))
(recur (value@ #right node)))))))))
@@ -249,7 +249,7 @@
(def: .public (has key value dict)
(All (_ k v) (-> k v (Dictionary k v) (Dictionary k v)))
- (let [(^open "_\[0]") (value@ #&order dict)
+ (let [(^open "_#[0]") (value@ #&order dict)
root' (loop [?root (value@ #root dict)]
(case ?root
{.#None}
@@ -266,11 +266,11 @@
{.#Some (<add> (maybe.trusted outcome)
root)}))]
- [_\< #left ..with_left]
+ [_#< #left ..with_left]
[(order.> (value@ #&order dict)) #right ..with_right]
))
- ... (_\= reference key)
+ ... (_#= reference key)
{.#Some (with@ #value value root)}
)))
))]
@@ -355,7 +355,7 @@
{.#Some (right_balanced (value@ #key right)
(value@ #value right)
(value@ #right right>>left)
- (\ maybe.functor each reddened (value@ #right right)))})
+ (# maybe.functor each reddened (value@ #right right)))})
_
(panic! error_message))
@@ -382,7 +382,7 @@
(value@ #value left>>right)
{.#Some (left_balanced (value@ #key left)
(value@ #value left)
- (\ maybe.functor each reddened (value@ #left left))
+ (# maybe.functor each reddened (value@ #left left))
(value@ #left left>>right))}
{.#Some (black key value (value@ #right left>>right) ?right)})
@@ -472,7 +472,7 @@
(def: .public (lacks key dict)
(All (_ k v) (-> k (Dictionary k v) (Dictionary k v)))
- (let [(^open "_\[0]") (value@ #&order dict)
+ (let [(^open "_#[0]") (value@ #&order dict)
[?root found?] (loop [?root (value@ #root dict)]
(case ?root
{.#None}
@@ -481,11 +481,11 @@
{.#Some root}
(let [root_key (value@ #key root)
root_val (value@ #value root)]
- (if (_\= root_key key)
+ (if (_#= root_key key)
[(prepended (value@ #left root)
(value@ #right root))
#1]
- (let [go_left? (_\< root_key key)]
+ (let [go_left? (_#< root_key key)]
(case (recur (if go_left?
(value@ #left root)
(value@ #right root)))
@@ -536,7 +536,7 @@
(def: .public (of_list order list)
(All (_ k v) (-> (Order k) (List [k v]) (Dictionary k v)))
- (list\mix (function (_ [key value] dict)
+ (list#mix (function (_ [key value] dict)
(has key value dict))
(empty order)
list))
@@ -550,7 +550,7 @@
(list)
{.#Some node'}
- ($_ list\composite
+ ($_ list#composite
(recur (value@ #left node'))
(list <output>)
(recur (value@ #right node'))))))]
@@ -560,11 +560,11 @@
[values v (value@ #value node')]
)
-(implementation: .public (equivalence (^open ",\[0]"))
+(implementation: .public (equivalence (^open ",#[0]"))
(All (_ k v) (-> (Equivalence v) (Equivalence (Dictionary k v))))
(def: (= reference sample)
- (let [(^open "/\[0]") (value@ #&order reference)]
+ (let [(^open "/#[0]") (value@ #&order reference)]
(loop [entriesR (entries reference)
entriesS (entries sample)]
(case [entriesR entriesS]
@@ -572,8 +572,8 @@
#1
[{.#Item [keyR valueR] entriesR'} {.#Item [keyS valueS] entriesS'}]
- (and (/\= keyR keyS)
- (,\= valueR valueS)
+ (and (/#= keyR keyS)
+ (,#= valueR valueS)
(recur entriesR' entriesS'))
_
diff --git a/stdlib/source/library/lux/data/collection/dictionary/plist.lux b/stdlib/source/library/lux/data/collection/dictionary/plist.lux
index 8ffa6682a..a429d56f9 100644
--- a/stdlib/source/library/lux/data/collection/dictionary/plist.lux
+++ b/stdlib/source/library/lux/data/collection/dictionary/plist.lux
@@ -5,9 +5,9 @@
[equivalence {"+" [Equivalence]}]]
[data
["[0]" product]
- ["[0]" text ("[1]\[0]" equivalence)]
+ ["[0]" text ("[1]#[0]" equivalence)]
[collection
- ["[0]" list ("[1]\[0]" functor)]]]
+ ["[0]" list ("[1]#[0]" functor)]]]
[math
[number
["n" nat]]]]])
@@ -35,14 +35,14 @@
{.#None}
{.#Item [k' v'] properties'}
- (if (text\= key k')
+ (if (text#= key k')
{.#Some v'}
(value key properties'))))
(template [<name> <type> <access>]
[(def: .public <name>
(All (_ a) (-> (PList a) (List <type>)))
- (list\each <access>))]
+ (list#each <access>))]
[keys Text product.left]
[values a product.right]
@@ -64,7 +64,7 @@
(list [key val])
{.#Item [k' v'] properties'}
- (if (text\= key k')
+ (if (text#= key k')
{.#Item [key val]
properties'}
{.#Item [k' v']
@@ -77,7 +77,7 @@
{.#End}
{.#Item [k' v'] properties'}
- (if (text\= key k')
+ (if (text#= key k')
{.#Item [k' (f v')] properties'}
{.#Item [k' v'] (revised key f properties')})))
@@ -88,7 +88,7 @@
properties
{.#Item [k' v'] properties'}
- (if (text\= key k')
+ (if (text#= key k')
properties'
{.#Item [k' v']
(lacks key properties')})))
diff --git a/stdlib/source/library/lux/data/collection/list.lux b/stdlib/source/library/lux/data/collection/list.lux
index 4232af895..e6a7ced34 100644
--- a/stdlib/source/library/lux/data/collection/list.lux
+++ b/stdlib/source/library/lux/data/collection/list.lux
@@ -290,7 +290,7 @@
#1
[{.#Item x xs'} {.#Item y ys'}]
- (and (\ Equivalence<a> = x y)
+ (and (# Equivalence<a> = x y)
(= xs' ys'))
[_ _]
@@ -301,12 +301,12 @@
(All (_ a) (-> (Hash a) (Hash (List a))))
(def: &equivalence
- (..equivalence (\ super &equivalence)))
+ (..equivalence (# super &equivalence)))
(def: hash
- (\ ..mix mix
+ (# ..mix mix
(function (_ member hash)
- (n.+ (\ super hash member) hash))
+ (n.+ (# super hash member) hash))
0)))
(implementation: .public monoid
@@ -394,7 +394,7 @@
#0
{.#Item x' xs'}
- (or (\ eq = x x')
+ (or (# eq = x x')
(member? eq xs' x))))
(template [<name> <output> <side>]
@@ -421,7 +421,7 @@
(-> Text Code)
[["" 0 0] {.#Identifier "" name}])
-(def: (nat\encoded value)
+(def: (nat#encoded value)
(-> Nat Text)
(loop [input value
output ""]
@@ -449,7 +449,7 @@
(if (n.> 0 num_lists)
(let [(^open "[0]") ..functor
indices (..indices num_lists)
- type_vars (: (List Code) (each (|>> nat\encoded identifier$) indices))
+ type_vars (: (List Code) (each (|>> nat#encoded identifier$) indices))
zipped_type (` (.All ((~ (identifier$ "0_")) (~+ type_vars))
(-> (~+ (each (: (-> Code Code) (function (_ var) (` (List (~ var)))))
type_vars))
@@ -457,7 +457,7 @@
vars+lists (|> indices
(each ++)
(each (function (_ idx)
- (let [base (nat\encoded idx)]
+ (let [base (nat#encoded idx)]
[(identifier$ base)
(identifier$ ("lux text concat" base "'"))]))))
pattern (` [(~+ (each (function (_ [v vs]) (` {.#Item (~ v) (~ vs)}))
@@ -491,7 +491,7 @@
indices (..indices num_lists)
g!return_type (identifier$ "0return_type0")
g!func (identifier$ "0func0")
- type_vars (: (List Code) (each (|>> nat\encoded identifier$) indices))
+ type_vars (: (List Code) (each (|>> nat#encoded identifier$) indices))
zipped_type (` (All ((~ (identifier$ "0_")) (~+ type_vars) (~ g!return_type))
(-> (-> (~+ type_vars) (~ g!return_type))
(~+ (each (: (-> Code Code) (function (_ var) (` (List (~ var)))))
@@ -500,7 +500,7 @@
vars+lists (|> indices
(each ++)
(each (function (_ idx)
- (let [base (nat\encoded idx)]
+ (let [base (nat#encoded idx)]
[(identifier$ base)
(identifier$ ("lux text concat" base "'"))]))))
pattern (` [(~+ (each (function (_ [v vs]) (` {.#Item (~ v) (~ vs)}))
@@ -558,7 +558,7 @@
(def: .public together
(All (_ a) (-> (List (List a)) (List a)))
- (\ ..monad conjoint))
+ (# ..monad conjoint))
(implementation: .public (with monad)
(All (_ M) (-> (Monad M) (Monad (All (_ a) (M (List a))))))
@@ -568,7 +568,7 @@
..functor))
(def: in
- (|>> (\ ..monad in) (\ monad in)))
+ (|>> (# ..monad in) (# monad in)))
(def: (conjoint MlMla)
(do [! monad]
@@ -583,7 +583,7 @@
(def: .public (lifted monad)
(All (_ M a) (-> (Monad M) (-> (M a) (M (List a)))))
- (\ monad each (\ ..monad in)))
+ (# monad each (# ..monad in)))
(def: .public (enumeration xs)
(All (_ a) (-> (List a) (List [Nat a])))
diff --git a/stdlib/source/library/lux/data/collection/queue.lux b/stdlib/source/library/lux/data/collection/queue.lux
index 4fc1e31a1..a60f9613e 100644
--- a/stdlib/source/library/lux/data/collection/queue.lux
+++ b/stdlib/source/library/lux/data/collection/queue.lux
@@ -6,7 +6,7 @@
[functor {"+" [Functor]}]]
[data
[collection
- ["[0]" list ("[1]\[0]" monoid functor)]]]
+ ["[0]" list ("[1]#[0]" monoid functor)]]]
[math
[number
["n" nat]]]]])
@@ -29,7 +29,7 @@
(def: .public (list queue)
(All (_ a) (-> (Queue a) (List a)))
(let [(^slots [#front #rear]) queue]
- (list\composite #front (list.reversed #rear))))
+ (list#composite #front (list.reversed #rear))))
(def: .public front
(All (_ a) (-> (Queue a) (Maybe a)))
@@ -82,7 +82,7 @@
(All (_ a) (-> (Equivalence a) (Equivalence (Queue a))))
(def: (= reference subject)
- (\ (list.equivalence super) =
+ (# (list.equivalence super) =
(..list reference)
(..list subject))))
@@ -90,5 +90,5 @@
(Functor Queue)
(def: (each f fa)
- [#front (|> fa (value@ #front) (list\each f))
- #rear (|> fa (value@ #rear) (list\each f))]))
+ [#front (|> fa (value@ #front) (list#each f))
+ #rear (|> fa (value@ #rear) (list#each f))]))
diff --git a/stdlib/source/library/lux/data/collection/queue/priority.lux b/stdlib/source/library/lux/data/collection/queue/priority.lux
index e9069fa5e..cc2ecdb7c 100644
--- a/stdlib/source/library/lux/data/collection/queue/priority.lux
+++ b/stdlib/source/library/lux/data/collection/queue/priority.lux
@@ -12,7 +12,7 @@
["[1]" finger {"+" [Tree]}]]]]
[math
[number
- ["n" nat ("[1]\[0]" interval)]]]
+ ["n" nat ("[1]#[0]" interval)]]]
[type {"+" [:by_example]}
[abstract {"+" [abstract: :abstraction :representation]}]]]])
@@ -21,11 +21,11 @@
(def: .public max
Priority
- n\top)
+ n#top)
(def: .public min
Priority
- n\bottom)
+ n#bottom)
(def: builder
(tree.builder n.maximum))
@@ -76,7 +76,7 @@
(loop [node tree]
(case (tree.root node)
{0 #0 reference}
- (\ equivalence = reference member)
+ (# equivalence = reference member)
{0 #1 [left right]}
(or (recur left)
@@ -102,24 +102,24 @@
{.#Some right}
{.#Some =left}
- {.#Some (\ ..builder branch =left right)})
+ {.#Some (# ..builder branch =left right)})
(case (recur right)
{.#None}
{.#Some left}
{.#Some =right}
- {.#Some (\ ..builder branch left =right)})))))))
+ {.#Some (# ..builder branch left =right)})))))))
(def: .public (end priority value queue)
(All (_ a) (-> Priority a (Queue a) (Queue a)))
- (let [addition (\ ..builder leaf priority value)]
+ (let [addition (# ..builder leaf priority value)]
(:abstraction
(case (:representation queue)
{.#None}
{.#Some addition}
{.#Some tree}
- {.#Some (\ ..builder branch tree addition)}))))
+ {.#Some (# ..builder branch tree addition)}))))
)
(def: .public empty?
diff --git a/stdlib/source/library/lux/data/collection/row.lux b/stdlib/source/library/lux/data/collection/row.lux
index a39ea8af3..d6b4bba5e 100644
--- a/stdlib/source/library/lux/data/collection/row.lux
+++ b/stdlib/source/library/lux/data/collection/row.lux
@@ -22,8 +22,8 @@
[data
["[0]" product]
[collection
- ["[0]" list ("[1]\[0]" mix functor monoid)]
- ["[0]" array {"+" [Array]} ("[1]\[0]" functor mix)]]]
+ ["[0]" list ("[1]#[0]" mix functor monoid)]
+ ["[0]" array {"+" [Array]} ("[1]#[0]" functor mix)]]]
[macro
[syntax {"+" [syntax:]}]
["[0]" code]]
@@ -132,13 +132,13 @@
(array.copy! tail_size 0 tail 0)
(array.write! tail_size val))))
-(def: (hierarchy\has level idx val hierarchy)
+(def: (hierarchy#has level idx val hierarchy)
(All (_ a) (-> Level Index a (Hierarchy a) (Hierarchy a)))
(let [sub_idx (branch_idx (i64.right_shifted level idx))]
(case (array.read! sub_idx hierarchy)
{.#Some {#Hierarchy sub_node}}
(|> (array.clone hierarchy)
- (array.write! sub_idx {#Hierarchy (hierarchy\has (level_down level) idx val sub_node)}))
+ (array.write! sub_idx {#Hierarchy (hierarchy#has (level_down level) idx val sub_node)}))
(^multi {.#Some {#Base base}}
(n.= 0 (level_down level)))
@@ -175,7 +175,7 @@
{.#Some})
)))
-(def: (node\list node)
+(def: (node#list node)
(All (_ a) (-> (Node a) (List a)))
(case node
{#Base base}
@@ -185,8 +185,8 @@
(|> hierarchy
(array.list {.#None})
list.reversed
- (list\mix (function (_ sub acc)
- (list\composite (node\list sub) acc))
+ (list#mix (function (_ sub acc)
+ (list#composite (node#list sub) acc))
{.#End}))))
(type: .public (Row a)
@@ -244,8 +244,8 @@
(exception: .public [a] (index_out_of_bounds [row (Row a)
index Nat])
- (exception.report ["Size" (\ n.decimal encoded (value@ #size row))]
- ["Index" (\ n.decimal encoded index)]))
+ (exception.report ["Size" (# n.decimal encoded (value@ #size row))]
+ ["Index" (# n.decimal encoded index)]))
(exception: base_was_not_found)
@@ -291,7 +291,7 @@
(let [row_size (value@ #size row)]
(if (within_bounds? row idx)
{try.#Success (if (n.< (tail_off row_size) idx)
- (revised@ #root (hierarchy\has (value@ #level row) idx val)
+ (revised@ #root (hierarchy#has (value@ #level row) idx val)
row)
(revised@ #tail (for [@.old
(: (-> (Base (:parameter 0)) (Base (:parameter 0)))
@@ -350,12 +350,12 @@
(def: .public (list row)
(All (_ a) (-> (Row a) (List a)))
- (list\composite (node\list {#Hierarchy (value@ #root row)})
- (node\list {#Base (value@ #tail row)})))
+ (list#composite (node#list {#Hierarchy (value@ #root row)})
+ (node#list {#Base (value@ #tail row)})))
(def: .public of_list
(All (_ a) (-> (List a) (Row a)))
- (list\mix ..suffix ..empty))
+ (list#mix ..suffix ..empty))
(def: .public (member? equivalence row val)
(All (_ a) (-> (Equivalence a) (Row a) a Bit))
@@ -374,10 +374,10 @@
(def: (= v1 v2)
(case [v1 v2]
[{#Base b1} {#Base b2}]
- (\ (array.equivalence Equivalence<a>) = b1 b2)
+ (# (array.equivalence Equivalence<a>) = b1 b2)
[{#Hierarchy h1} {#Hierarchy h2}]
- (\ (array.equivalence (node_equivalence Equivalence<a>)) = h1 h2)
+ (# (array.equivalence (node_equivalence Equivalence<a>)) = h1 h2)
_
#0)))
@@ -387,10 +387,10 @@
(def: (= v1 v2)
(and (n.= (value@ #size v1) (value@ #size v2))
- (let [(^open "node\[0]") (node_equivalence Equivalence<a>)]
- (and (node\= {#Base (value@ #tail v1)}
+ (let [(^open "node#[0]") (node_equivalence Equivalence<a>)]
+ (and (node#= {#Base (value@ #tail v1)}
{#Base (value@ #tail v2)})
- (node\= {#Hierarchy (value@ #root v1)}
+ (node#= {#Hierarchy (value@ #root v1)}
{#Hierarchy (value@ #root v2)}))))))
(implementation: node_mix
@@ -399,10 +399,10 @@
(def: (mix f init xs)
(case xs
{#Base base}
- (array\mix f init base)
+ (array#mix f init base)
{#Hierarchy hierarchy}
- (array\mix (function (_ node init') (mix f init' node))
+ (array#mix (function (_ node init') (mix f init' node))
init
hierarchy))))
@@ -423,7 +423,7 @@
(def: identity ..empty)
(def: (composite xs ys)
- (list\mix suffix xs (..list ys))))
+ (list#mix suffix xs (..list ys))))
(implementation: node_functor
(Functor Node)
@@ -431,10 +431,10 @@
(def: (each f xs)
(case xs
{#Base base}
- {#Base (array\each f base)}
+ {#Base (array#each f base)}
{#Hierarchy hierarchy}
- {#Hierarchy (array\each (each f) hierarchy)})))
+ {#Hierarchy (array#each (each f) hierarchy)})))
(implementation: .public functor
(Functor Row)
@@ -442,8 +442,8 @@
(def: (each f xs)
[#level (value@ #level xs)
#size (value@ #size xs)
- #root (|> xs (value@ #root) (array\each (\ node_functor each f)))
- #tail (|> xs (value@ #tail) (array\each f))]))
+ #root (|> xs (value@ #root) (array#each (# node_functor each f)))
+ #tail (|> xs (value@ #tail) (array#each f))]))
(implementation: .public apply
(Apply Row)
@@ -475,7 +475,7 @@
(All (_ a) (-> (Row a) (Row a)))
(|>> ..list
list.reversed
- (list\mix suffix ..empty)))
+ (list#mix suffix ..empty)))
(template [<name> <array> <init> <op>]
[(def: .public <name>
diff --git a/stdlib/source/library/lux/data/collection/sequence.lux b/stdlib/source/library/lux/data/collection/sequence.lux
index fccc576df..c482ad8dc 100644
--- a/stdlib/source/library/lux/data/collection/sequence.lux
+++ b/stdlib/source/library/lux/data/collection/sequence.lux
@@ -14,7 +14,7 @@
[data
["[0]" bit]
[collection
- ["[0]" list ("[1]\[0]" monad)]]]
+ ["[0]" list ("[1]#[0]" monad)]]]
[math
[number
["n" nat]]]]])
@@ -132,9 +132,9 @@
branches (<>.some <code>.any)])
(with_identifiers [g!sequence]
(let [body+ (` (let [(~+ (|> patterns
- (list\each (function (_ pattern)
+ (list#each (function (_ pattern)
(list (` [(~ pattern) (~ g!sequence)])
(` ((~! //.result) (~ g!sequence))))))
- list\conjoint))]
+ list#conjoint))]
(~ body)))]
(in (list& g!sequence body+ branches)))))
diff --git a/stdlib/source/library/lux/data/collection/set.lux b/stdlib/source/library/lux/data/collection/set.lux
index 585ee60eb..b921444ff 100644
--- a/stdlib/source/library/lux/data/collection/set.lux
+++ b/stdlib/source/library/lux/data/collection/set.lux
@@ -8,7 +8,7 @@
[monoid {"+" [Monoid]}]]
[data
[collection
- ["[0]" list ("[1]\[0]" mix)]]]
+ ["[0]" list ("[1]#[0]" mix)]]]
[math
[number
["n" nat]]]]]
@@ -52,7 +52,7 @@
(def: .public (difference sub base)
(All (_ a) (-> (Set a) (Set a) (Set a)))
- (list\mix ..lacks base (..list sub)))
+ (list#mix ..lacks base (..list sub)))
(def: .public (intersection filter base)
(All (_ a) (-> (Set a) (Set a) (Set a)))
@@ -76,7 +76,7 @@
(def: (hash set)
(|> set
..list
- (\ (list.hash (..member_hash set)) hash))))
+ (# (list.hash (..member_hash set)) hash))))
(implementation: .public (monoid hash)
(All (_ a) (-> (Hash a) (Monoid (Set a))))
@@ -90,7 +90,7 @@
(def: .public (of_list hash elements)
(All (_ a) (-> (Hash a) (List a) (Set a)))
- (list\mix ..has (..empty hash) elements))
+ (list#mix ..has (..empty hash) elements))
(def: .public (sub? super sub)
(All (_ a) (-> (Set a) (Set a) Bit))
diff --git a/stdlib/source/library/lux/data/collection/set/multi.lux b/stdlib/source/library/lux/data/collection/set/multi.lux
index b325c793a..38c1e81af 100644
--- a/stdlib/source/library/lux/data/collection/set/multi.lux
+++ b/stdlib/source/library/lux/data/collection/set/multi.lux
@@ -15,7 +15,7 @@
[abstract {"+" [abstract: :abstraction :representation ^:representation]}]]]]
["[0]" //
[//
- ["[0]" list ("[1]\[0]" mix monoid)]
+ ["[0]" list ("[1]#[0]" mix monoid)]
["[0]" dictionary {"+" [Dictionary]}]]])
(abstract: .public (Set a)
@@ -27,7 +27,7 @@
(def: .public size
(All (_ a) (-> (Set a) Nat))
- (|>> :representation dictionary.values (list\mix n.+ 0)))
+ (|>> :representation dictionary.values (list#mix n.+ 0)))
(def: .public (has multiplicity elem set)
(All (_ a) (-> Nat a (Set a) (Set a)))
@@ -60,8 +60,8 @@
(All (_ a) (-> (Set a) (List a)))
(|>> :representation
dictionary.entries
- (list\mix (function (_ [elem multiplicity] output)
- (list\composite (list.repeated multiplicity elem) output))
+ (list#mix (function (_ [elem multiplicity] output)
+ (list#composite (list.repeated multiplicity elem) output))
{.#End})))
(template [<name> <composite>]
@@ -75,7 +75,7 @@
(def: .public (intersection parameter (^:representation subject))
(All (_ a) (-> (Set a) (Set a) (Set a)))
- (list\mix (function (_ [elem multiplicity] output)
+ (list#mix (function (_ [elem multiplicity] output)
(..has (n.min (..multiplicity parameter elem)
multiplicity)
elem
@@ -88,7 +88,7 @@
(|> parameter
:representation
dictionary.entries
- (list\mix (function (_ [elem multiplicity] output)
+ (list#mix (function (_ [elem multiplicity] output)
(..lacks multiplicity elem output))
subject)))
@@ -129,8 +129,8 @@
(def: (hash (^:representation set))
(let [[hash _] set]
- (list\mix (function (_ [elem multiplicity] acc)
- (|> elem (\ hash hash) (n.* multiplicity) (n.+ acc)))
+ (list#mix (function (_ [elem multiplicity] acc)
+ (|> elem (# hash hash) (n.* multiplicity) (n.+ acc)))
0
(dictionary.entries set)))))
)
@@ -145,7 +145,7 @@
(def: .public (of_list hash subject)
(All (_ a) (-> (Hash a) (List a) (Set a)))
- (list\mix (..has 1) (..empty hash) subject))
+ (list#mix (..has 1) (..empty hash) subject))
(def: .public (of_set subject)
(All (_ a) (-> (//.Set a) (Set a)))
diff --git a/stdlib/source/library/lux/data/collection/set/ordered.lux b/stdlib/source/library/lux/data/collection/set/ordered.lux
index 2fea2876a..965d85c28 100644
--- a/stdlib/source/library/lux/data/collection/set/ordered.lux
+++ b/stdlib/source/library/lux/data/collection/set/ordered.lux
@@ -6,7 +6,7 @@
[order {"+" [Order]}]]
[data
[collection
- ["[0]" list ("[1]\[0]" mix)]
+ ["[0]" list ("[1]#[0]" mix)]
[dictionary
["/" ordered]]]]
[type
@@ -48,11 +48,11 @@
(def: .public (of_list &order list)
(All (_ a) (-> (Order a) (List a) (Set a)))
- (list\mix has (..empty &order) list))
+ (list#mix has (..empty &order) list))
(def: .public (union left right)
(All (_ a) (-> (Set a) (Set a) (Set a)))
- (list\mix ..has right (..list left)))
+ (list#mix ..has right (..list left)))
(def: .public (intersection left right)
(All (_ a) (-> (Set a) (Set a) (Set a)))
@@ -70,7 +70,7 @@
(All (_ a) (Equivalence (Set a)))
(def: (= reference sample)
- (\ (list.equivalence (\ (:representation reference) &equivalence))
+ (# (list.equivalence (# (:representation reference) &equivalence))
= (..list reference) (..list sample))))
)
diff --git a/stdlib/source/library/lux/data/collection/stack.lux b/stdlib/source/library/lux/data/collection/stack.lux
index 8c55178f9..a64bb17e9 100644
--- a/stdlib/source/library/lux/data/collection/stack.lux
+++ b/stdlib/source/library/lux/data/collection/stack.lux
@@ -53,7 +53,7 @@
(Equivalence (Stack a))))
(def: (= reference subject)
- (\ (//.equivalence super) = (:representation reference) (:representation subject))))
+ (# (//.equivalence super) = (:representation reference) (:representation subject))))
(implementation: .public functor
(Functor Stack)
@@ -61,6 +61,6 @@
(def: (each f value)
(|> value
:representation
- (\ //.functor each f)
+ (# //.functor each f)
:abstraction)))
)
diff --git a/stdlib/source/library/lux/data/collection/tree.lux b/stdlib/source/library/lux/data/collection/tree.lux
index 4beb81cf3..9fd7d6cc7 100644
--- a/stdlib/source/library/lux/data/collection/tree.lux
+++ b/stdlib/source/library/lux/data/collection/tree.lux
@@ -11,7 +11,7 @@
["<[0]>" code {"+" [Parser]}]]]
[data
[collection
- ["[0]" list ("[1]\[0]" monad mix)]]]
+ ["[0]" list ("[1]#[0]" monad mix)]]]
[macro
[syntax {"+" [syntax:]}]
["[0]" code]]]])
@@ -25,8 +25,8 @@
(All (_ a) (-> (Tree a) (List a)))
(|> tree
(value@ #children)
- (list\each flat)
- list\conjoint
+ (list#each flat)
+ list#conjoint
{.#Item (value@ #value tree)}))
(def: .public (leaf value)
@@ -57,28 +57,28 @@
(syntax: .public (tree [root tree^])
(in (list (` (~ (loop [[value children] root]
(` [#value (~ value)
- #children (list (~+ (list\each recur children)))])))))))
+ #children (list (~+ (list#each recur children)))])))))))
(implementation: .public (equivalence super)
(All (_ a) (-> (Equivalence a) (Equivalence (Tree a))))
(def: (= tx ty)
- (and (\ super = (value@ #value tx) (value@ #value ty))
- (\ (list.equivalence (equivalence super)) = (value@ #children tx) (value@ #children ty)))))
+ (and (# super = (value@ #value tx) (value@ #value ty))
+ (# (list.equivalence (equivalence super)) = (value@ #children tx) (value@ #children ty)))))
(implementation: .public functor
(Functor Tree)
(def: (each f fa)
[#value (f (value@ #value fa))
- #children (list\each (each f)
+ #children (list#each (each f)
(value@ #children fa))]))
(implementation: .public mix
(Mix Tree)
(def: (mix f init tree)
- (list\mix (function (_ tree' init') (mix f init' tree'))
+ (list#mix (function (_ tree' init') (mix f init' tree'))
(f (value@ #value tree)
init)
(value@ #children tree))))
diff --git a/stdlib/source/library/lux/data/collection/tree/finger.lux b/stdlib/source/library/lux/data/collection/tree/finger.lux
index 01e125e9d..8399577f4 100644
--- a/stdlib/source/library/lux/data/collection/tree/finger.lux
+++ b/stdlib/source/library/lux/data/collection/tree/finger.lux
@@ -6,7 +6,7 @@
["[0]" monoid {"+" [Monoid]}]]
[data
[collection
- ["[0]" list ("[1]\[0]" monoid)]]]
+ ["[0]" list ("[1]#[0]" monoid)]]]
[type
[abstract {"+" [abstract: :abstraction :representation]}]]]])
@@ -50,7 +50,7 @@
(def: (branch left right)
(:abstraction
[#monoid monoid
- #tag (\ monoid composite (..tag left) (..tag right))
+ #tag (# monoid composite (..tag left) (..tag right))
#root {0 #1 [left right]}])))
(def: .public (value tree)
@@ -69,7 +69,7 @@
(list (value@ #tag (:representation tree)))
{0 #1 [left right]}
- (list\composite (tags left)
+ (list#composite (tags left)
(tags right))))
(def: .public (values tree)
@@ -79,7 +79,7 @@
(list value)
{0 #1 [left right]}
- (list\composite (values left)
+ (list#composite (values left)
(values right))))
(def: .public (one predicate tree)
diff --git a/stdlib/source/library/lux/data/collection/tree/zipper.lux b/stdlib/source/library/lux/data/collection/tree/zipper.lux
index 767365e6f..ef9e8b662 100644
--- a/stdlib/source/library/lux/data/collection/tree/zipper.lux
+++ b/stdlib/source/library/lux/data/collection/tree/zipper.lux
@@ -8,14 +8,14 @@
[monad {"+" [do]}]
[equivalence {"+" [Equivalence]}]]
[control
- ["[0]" maybe ("[1]\[0]" monad)]]
+ ["[0]" maybe ("[1]#[0]" monad)]]
[data
["[0]" product]
[text
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" functor monoid)]]]]]
- ["[0]" // {"+" [Tree]} ("[1]\[0]" functor)])
+ ["[0]" list ("[1]#[0]" functor monoid)]]]]]
+ ["[0]" // {"+" [Tree]} ("[1]#[0]" functor)])
(type: (Family Zipper a)
(Record
@@ -106,12 +106,12 @@
(for [@.old
(revised@ #node (: (-> (Tree (:parameter 0))
(Tree (:parameter 0)))
- (with@ //.#children (list\composite (list.reversed #lefts)
+ (with@ //.#children (list#composite (list.reversed #lefts)
{.#Item (value@ #node zipper)
#rights})))
#parent)]
(with@ [#node //.#children]
- (list\composite (list.reversed #lefts)
+ (list#composite (list.reversed #lefts)
{.#Item (value@ #node zipper)
#rights})
#parent))))))
@@ -156,13 +156,13 @@
{.#Some (for [@.old [#family {.#Some (|> family
(with@ <side> {.#End})
(revised@ <op_side> (|>> {.#Item (value@ #node zipper)}
- (list\composite prevs))))}
+ (list#composite prevs))))}
#node last]]
(let [move (: (All (_ a) (-> (List (Tree a)) (Zipper a) (Family Zipper a) (Family Zipper a)))
(function (_ prevs zipper)
(|>> (with@ <side> {.#End})
(revised@ <op_side> (|>> {.#Item (value@ #node zipper)}
- (list\composite prevs))))))]
+ (list#composite prevs))))))]
[#family {.#Some (move prevs zipper family)}
#node last]))})))]
@@ -293,12 +293,12 @@
(Functor Zipper)
(def: (each f (^slots [#family #node]))
- [#family (maybe\each (function (_ (^slots [#parent #lefts #rights]))
+ [#family (maybe#each (function (_ (^slots [#parent #lefts #rights]))
[#parent (each f #parent)
- #lefts (list\each (//\each f) #lefts)
- #rights (list\each (//\each f) #rights)])
+ #lefts (list#each (//#each f) #lefts)
+ #rights (list#each (//#each f) #rights)])
#family)
- #node (//\each f #node)]))
+ #node (//#each f #node)]))
(implementation: .public comonad
(CoMonad Zipper)
@@ -315,10 +315,10 @@
[//.#value (..zipper tree)
//.#children (|> tree
(value@ //.#children)
- (list\each tree_splitter))]))]
- [#family (maybe\each (function (_ (^slots [#parent #lefts #rights]))
+ (list#each tree_splitter))]))]
+ [#family (maybe#each (function (_ (^slots [#parent #lefts #rights]))
[..#parent (disjoint #parent)
- ..#lefts (list\each tree_splitter #lefts)
- ..#rights (list\each tree_splitter #rights)])
+ ..#lefts (list#each tree_splitter #lefts)
+ ..#rights (list#each tree_splitter #rights)])
#family)
#node (tree_splitter #node)])))
diff --git a/stdlib/source/library/lux/data/color.lux b/stdlib/source/library/lux/data/color.lux
index 52581fbc8..648535721 100644
--- a/stdlib/source/library/lux/data/color.lux
+++ b/stdlib/source/library/lux/data/color.lux
@@ -10,13 +10,13 @@
["<[0]>" code]]]
[data
[collection
- ["[0]" list ("[1]\[0]" functor)]]]
+ ["[0]" list ("[1]#[0]" functor)]]]
["[0]" math
[number
["n" nat]
["f" frac]
["[0]" int]
- ["[0]" rev ("[1]\[0]" interval)]
+ ["[0]" rev ("[1]#[0]" interval)]
["[0]" i64]]]
[type
abstract]]])
@@ -395,7 +395,7 @@
Palette
(let [[hue saturation brightness] (hsb color)
spread (..normal spread)]
- (list\each (function (_ idx)
+ (list#each (function (_ idx)
(of_hsb [(|> idx ++ .int int.frac (f.* spread) (f.+ hue) ..normal)
saturation
brightness]))
@@ -406,7 +406,7 @@
(let [[hue saturation brightness] (hsb color)
spread (..normal spread)]
(|> (list.indices variations)
- (list\each (|>> ++ .int int.frac
+ (list#each (|>> ++ .int int.frac
(f.* spread)
(f.+ brightness)
..normal
@@ -418,7 +418,7 @@
(def: .public transparent
Alpha
- rev\bottom)
+ rev#bottom)
(def: .public translucent
Alpha
@@ -426,7 +426,7 @@
(def: .public opaque
Alpha
- rev\top)
+ rev#top)
(type: .public Pigment
(Record
diff --git a/stdlib/source/library/lux/data/format/binary.lux b/stdlib/source/library/lux/data/format/binary.lux
index 8905c32bf..55bf4bb79 100644
--- a/stdlib/source/library/lux/data/format/binary.lux
+++ b/stdlib/source/library/lux/data/format/binary.lux
@@ -9,7 +9,7 @@
[pipe {"+" [case>]}]
["[0]" function]
["[0]" try {"+" [Try]}]
- ["<>" parser ("[1]\[0]" monad)
+ ["<>" parser ("[1]#[0]" monad)
["/" binary {"+" [Offset Size Parser]}]]]
[data
["[0]" product]
@@ -20,7 +20,7 @@
["[0]" utf8]]]
[collection
["[0]" list]
- ["[0]" row {"+" [Row]} ("[1]\[0]" functor)]
+ ["[0]" row {"+" [Row]} ("[1]#[0]" functor)]
["[0]" set {"+" [Set]}]]]
[math
[number
@@ -101,7 +101,7 @@
(def: .public (and pre post)
(All (_ a b) (-> (Writer a) (Writer b) (Writer [a b])))
(function (_ [preV postV])
- (\ ..monoid composite (pre preV) (post postV))))
+ (# ..monoid composite (pre preV) (post postV))))
(def: .public (rec body)
(All (_ a) (-> (-> (Writer a) (Writer a)) (Writer a)))
@@ -165,7 +165,7 @@
(template [<name> <binary>]
[(def: .public <name>
(Writer Text)
- (|>> (\ utf8.codec encoded) <binary>))]
+ (|>> (# utf8.codec encoded) <binary>))]
[utf8/8 ..binary/8]
[utf8/16 ..binary/16]
@@ -185,13 +185,13 @@
value (if (n.= original_count capped_count)
value
(|> value row.list (list.first capped_count) row.of_list))
- (^open "specification\[0]") ..monoid
+ (^open "specification#[0]") ..monoid
[size mutation] (|> value
- (row\each valueW)
- (\ row.mix mix
+ (row#each valueW)
+ (# row.mix mix
(function (_ post pre)
- (specification\composite pre post))
- specification\identity))]
+ (specification#composite pre post))
+ specification#identity))]
[(n.+ <size> size)
(function (_ [offset binary])
(try.trusted
diff --git a/stdlib/source/library/lux/data/format/css.lux b/stdlib/source/library/lux/data/format/css.lux
index 90cb8ad54..8d44055ea 100644
--- a/stdlib/source/library/lux/data/format/css.lux
+++ b/stdlib/source/library/lux/data/format/css.lux
@@ -10,7 +10,7 @@
["%" format {"+" [format]}]
["[0]" encoding {"+" [Encoding]}]]
[collection
- ["[0]" list ("[1]\[0]" functor)]]]
+ ["[0]" list ("[1]#[0]" functor)]]]
[type
abstract]
[world
@@ -51,8 +51,8 @@
(-> Font (CSS Special))
(let [with_unicode (case (value@ /font.#unicode_range font)
{.#Some unicode_range}
- (let [unicode_range' (format "U+" (\ nat.hex encoded (value@ /font.#start unicode_range))
- "-" (\ nat.hex encoded (value@ /font.#end unicode_range)))]
+ (let [unicode_range' (format "U+" (# nat.hex encoded (value@ /font.#start unicode_range))
+ "-" (# nat.hex encoded (value@ /font.#end unicode_range)))]
(list ["unicode-range" unicode_range']))
{.#None}
@@ -63,7 +63,7 @@
["font-style" (|> font (value@ /font.#style) (maybe.else /value.normal_style) /value.value)]
["font-weight" (|> font (value@ /font.#weight) (maybe.else /value.normal_weight) /value.value)]
with_unicode)
- (list\each (function (_ [property value])
+ (list#each (function (_ [property value])
(format property ": " value ";")))
(text.interposed /style.separator)
(text.enclosed ["{" "}"])
@@ -93,7 +93,7 @@
(-> (Value Animation) (List Frame) (CSS Special))
(:abstraction (format "@keyframes " (/value.value animation) " {"
(|> frames
- (list\each (function (_ frame)
+ (list#each (function (_ frame)
(format (/value.percentage (value@ #when frame)) " {"
(/style.inline (value@ #what frame))
"}")))
@@ -113,7 +113,7 @@
(|> css
:representation
(text.all_split_by ..css_separator)
- (list\each (|>> (format (/selector.selector (|> selector (combinator (/selector.tag "")))))))
+ (list#each (|>> (format (/selector.selector (|> selector (combinator (/selector.tag "")))))))
(text.interposed ..css_separator)
:abstraction))
diff --git a/stdlib/source/library/lux/data/format/css/value.lux b/stdlib/source/library/lux/data/format/css/value.lux
index ba082cb05..7817c9769 100644
--- a/stdlib/source/library/lux/data/format/css/value.lux
+++ b/stdlib/source/library/lux/data/format/css/value.lux
@@ -16,7 +16,7 @@
["[0]" text
["%" format {"+" [Format format]}]]
[collection
- ["[0]" list ("[1]\[0]" functor)]]]
+ ["[0]" list ("[1]#[0]" functor)]]]
[type
abstract]
[macro
@@ -800,7 +800,7 @@
(def: .public (cubic_bezier p0 p1 p2 p3)
(-> Frac Frac Frac Frac (Value Timing))
(|> (list p0 p1 p2 p3)
- (list\each %number)
+ (list#each %number)
(..apply "cubic-bezier")))
(template [<name> <brand>]
@@ -832,7 +832,7 @@
(..apply "rgba" (list (%.nat red)
(%.nat green)
(%.nat blue)
- (if (r.= (\ r.interval top) alpha)
+ (if (r.= (# r.interval top) alpha)
"1.0"
(format "0" (%.rev alpha)))))))
@@ -962,7 +962,7 @@
(let [[now after] next]
(..apply <function> (list& (:representation Angle angle)
(with_hint now)
- (list\each with_hint after)))))]
+ (list#each with_hint after)))))]
[linear_gradient "linear-gradient"]
[repeating_linear_gradient "repeating-linear-gradient"]
@@ -1087,7 +1087,7 @@
[now after] next]
(..apply <function> (list& (..shape shape)
(with_hint now)
- (list\each with_hint after)))))]
+ (list#each with_hint after)))))]
[radial_gradient "radial-gradient"]
[repeating_radial_gradient "repeating-radial-gradient"]
@@ -1160,7 +1160,7 @@
(case options
{.#Item _}
(|> options
- (list\each ..font_name)
+ (list#each ..font_name)
(text.interposed ",")
(:abstraction Value))
@@ -1199,7 +1199,7 @@
(-> (List (List (Maybe (Value Grid)))) (Value Grid_Template))
(let [empty (: (Value Grid)
(:abstraction "."))]
- (|>> (list\each (|>> (list\each (|>> (maybe.else empty)
+ (|>> (list#each (|>> (list#each (|>> (maybe.else empty)
:representation))
(text.interposed ..grid_column_separator)
(text.enclosed ["'" "'"])))
@@ -1236,7 +1236,7 @@
(def: .public (quotes [left0 right0] [left1 right1])
(-> [Quote Quote] [Quote Quote] (Value Quotes))
(|> (list left0 right0 left1 right1)
- (list\each (|>> ..quote_text %.text))
+ (list#each (|>> ..quote_text %.text))
(text.interposed ..quote_separator)
:abstraction))
@@ -1246,7 +1246,7 @@
[Frac Frac]
(Value Transform))
(|> (list a b c d tx ty)
- (list\each %number)
+ (list#each %number)
(..apply "matrix")))
(def: .public (matrix_3d [a0 b0 c0 d0] [a1 b1 c1 d1] [a2 b2 c2 d2] [a3 b3 c3 d3])
@@ -1256,14 +1256,14 @@
[Frac Frac Frac Frac]
(Value Transform))
(|> (list a0 b0 c0 d0 a1 b1 c1 d1 a2 b2 c2 d2 a3 b3 c3 d3)
- (list\each %number)
+ (list#each %number)
(..apply "matrix3d")))
(template [<name> <function> <input_types> <input_values>]
[(`` (def: .public (<name> [(~~ (template.spliced <input_values>))])
(-> [(~~ (template.spliced <input_types>))] (Value Transform))
(|> (list (~~ (template.spliced <input_values>)))
- (list\each %number)
+ (list#each %number)
(..apply <function>))))]
[translate_2d "translate" [Frac Frac] [x y]]
@@ -1285,7 +1285,7 @@
[(`` (def: .public (<name> [(~~ (template.spliced <input_values>))])
(-> [(~~ (template.spliced <input_types>))] (Value Transform))
(|> (list (~~ (template.spliced <input_values>)))
- (list\each ..angle)
+ (list#each ..angle)
(..apply <function>))))]
[rotate_2d "rotate" [Angle] [angle]]
diff --git a/stdlib/source/library/lux/data/format/html.lux b/stdlib/source/library/lux/data/format/html.lux
index 60c405963..1813d46db 100644
--- a/stdlib/source/library/lux/data/format/html.lux
+++ b/stdlib/source/library/lux/data/format/html.lux
@@ -3,13 +3,13 @@
[lux {"-" [Meta Source comment and]}
[control
["[0]" function]
- ["[0]" maybe ("[1]\[0]" functor)]]
+ ["[0]" maybe ("[1]#[0]" functor)]]
[data
["[0]" product]
["[0]" text
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" functor mix)]]]
+ ["[0]" list ("[1]#[0]" functor mix)]]]
[type
abstract]
[host
@@ -64,7 +64,7 @@
(def: attributes
(-> Attributes Text)
- (|>> (list\each (function (_ [key val])
+ (|>> (list#each (function (_ [key val])
(format key "=" text.double_quote (..safe val) text.double_quote)))
(text.interposed " ")))
@@ -190,7 +190,7 @@
(def: .public (script attributes inline)
(-> Attributes (Maybe Script) Meta)
(|> inline
- (maybe\each js.code)
+ (maybe#each js.code)
(maybe.else "")
(..raw "script" attributes)))
@@ -219,7 +219,7 @@
(def: .public (svg attributes content)
(-> Attributes XML Element)
(|> content
- (\ xml.codec encoded)
+ (# xml.codec encoded)
(..raw "svg" attributes)))
(type: .public Coord
@@ -262,7 +262,7 @@
(def: (%polygon [first second third extra])
(Format Polygon)
(|> (list& first second third extra)
- (list\each %coord)
+ (list#each %coord)
(text.interposed ..coord_separator)))
(type: .public Shape
@@ -299,13 +299,13 @@
(-> Attributes (List [Attributes Shape]) Image Image)
($_ ..and
for
- (case (list\each (product.uncurried ..area) areas)
+ (case (list#each (product.uncurried ..area) areas)
{.#End}
(..empty "map" attributes)
{.#Item head tail}
(..tag "map" attributes
- (list\mix (function.flipped ..and) head tail)))))
+ (list#mix (function.flipped ..and) head tail)))))
(template [<name> <tag> <type>]
[(def: .public <name>
@@ -461,7 +461,7 @@
(def: .public (description_list attributes descriptions)
(-> Attributes (List [Content Element]) Element)
- (case (list\each (function (_ [term description])
+ (case (list#each (function (_ [term description])
($_ ..and
(..term term)
(..description description)))
@@ -471,7 +471,7 @@
{.#Item head tail}
(..tag "dl" attributes
- (list\mix (function.flipped ..and) head tail))))
+ (list#mix (function.flipped ..and) head tail))))
(def: .public p ..paragraph)
@@ -523,14 +523,14 @@
(def: .public (table attributes caption columns headers rows footer)
(-> Attributes (Maybe Content) (Maybe Column) Header (List Cell) (Maybe Cell) Element)
(let [head (..table_head (..table_row headers))
- content (case (list\each table_row rows)
+ content (case (list#each table_row rows)
{.#End}
head
{.#Item first rest}
(..and head
(..table_body
- (list\mix (function.flipped ..and) first rest))))
+ (list#mix (function.flipped ..and) first rest))))
content (case footer
{.#None}
content
diff --git a/stdlib/source/library/lux/data/format/json.lux b/stdlib/source/library/lux/data/format/json.lux
index 734a38177..342e847f4 100644
--- a/stdlib/source/library/lux/data/format/json.lux
+++ b/stdlib/source/library/lux/data/format/json.lux
@@ -11,16 +11,16 @@
pipe
["[0]" maybe]
["[0]" try {"+" [Try]}]
- ["<>" parser ("[1]\[0]" monad)
+ ["<>" parser ("[1]#[0]" monad)
["<[0]>" text {"+" [Parser]}]
["<[0]>" code]]]
[data
["[0]" bit]
["[0]" product]
- ["[0]" text ("[1]\[0]" equivalence monoid)]
+ ["[0]" text ("[1]#[0]" equivalence monoid)]
[collection
- ["[0]" list ("[1]\[0]" mix functor)]
- ["[0]" row {"+" [Row row]} ("[1]\[0]" monad)]
+ ["[0]" list ("[1]#[0]" mix functor)]
+ ["[0]" row {"+" [Row row]} ("[1]#[0]" monad)]
["[0]" dictionary {"+" [Dictionary]}]]]
[macro
[syntax {"+" [syntax:]}]
@@ -28,7 +28,7 @@
[math
[number
["n" nat]
- ["f" frac ("[1]\[0]" decimal)]]]]])
+ ["f" frac ("[1]#[0]" decimal)]]]]])
(template [<name> <type>]
[(type: .public <name>
@@ -83,13 +83,13 @@
(<>.rec
(function (_ jsonP)
($_ <>.or
- (<code>.form (<>\in []))
+ (<code>.form (<>#in []))
<code>.bit
<code>.frac
<code>.text
- (<>\each row.of_list
+ (<>#each row.of_list
(<code>.tuple (<>.some jsonP)))
- (<>\each (dictionary.of_list text.hash)
+ (<>#each (dictionary.of_list text.hash)
(<code>.variant (<>.some (<>.and <code>.text jsonP))))
<code>.any
))))
@@ -108,14 +108,14 @@
[code.text ..#String' ..#String])
{#Array' members}
- (` {..#Array ((~! row.row) (~+ (row.list (row\each jsonF members))))})
+ (` {..#Array ((~! row.row) (~+ (row.list (row#each jsonF members))))})
{#Object' pairs}
(` {..#Object ((~! dictionary.of_list)
(~! text.hash)
(list (~+ (|> pairs
dictionary.entries
- (list\each (function (_ [key_name value])
+ (list#each (function (_ [key_name value])
(` [(~ (code.text key_name)) (~ (jsonF value))])))))))})
{#Code' code}
@@ -131,7 +131,7 @@
{try.#Success (dictionary.keys obj)}
_
- {try.#Failure ($_ text\composite "Cannot get the fields of a non-object.")}))
+ {try.#Failure ($_ text#composite "Cannot get the fields of a non-object.")}))
(def: .public (field key json)
(-> String JSON (Try JSON))
@@ -142,10 +142,10 @@
{try.#Success value}
{.#None}
- {try.#Failure ($_ text\composite "Missing field '" key "' on object.")})
+ {try.#Failure ($_ text#composite "Missing field '" key "' on object.")})
_
- {try.#Failure ($_ text\composite "Cannot get field '" key "' on a non-object.")}))
+ {try.#Failure ($_ text#composite "Cannot get field '" key "' on a non-object.")}))
(def: .public (has key value json)
(-> String JSON JSON (Try JSON))
@@ -154,7 +154,7 @@
{try.#Success {#Object (dictionary.has key value obj)}}
_
- {try.#Failure ($_ text\composite "Cannot set field '" key "' on a non-object.")}))
+ {try.#Failure ($_ text#composite "Cannot set field '" key "' on a non-object.")}))
(template [<name> <tag> <type>]
[(def: .public (<name> key json)
@@ -164,7 +164,7 @@
{try.#Success value}
{try.#Success _}
- {try.#Failure ($_ text\composite "Wrong value type at key: " key)}
+ {try.#Failure ($_ text#composite "Wrong value type at key: " key)}
{try.#Failure error}
{try.#Failure error}))]
@@ -186,14 +186,14 @@
(^template [<tag> <struct>]
[[{<tag> x'} {<tag> y'}]
- (\ <struct> = x' y')])
+ (# <struct> = x' y')])
([#Boolean bit.equivalence]
[#Number f.equivalence]
[#String text.equivalence])
[{#Array xs} {#Array ys}]
(and (n.= (row.size xs) (row.size ys))
- (list\mix (function (_ idx prev)
+ (list#mix (function (_ idx prev)
(and prev
(maybe.else #0
(do maybe.monad
@@ -205,7 +205,7 @@
[{#Object xs} {#Object ys}]
(and (n.= (dictionary.size xs) (dictionary.size ys))
- (list\mix (function (_ [xk xv] prev)
+ (list#mix (function (_ [xk xv] prev)
(and prev
(case (dictionary.value xk ys)
{.#None} #0
@@ -234,13 +234,13 @@
(-> Number Text)
(|>> (case>
(^or +0.0 -0.0) "0.0"
- value (let [raw (\ f.decimal encoded value)]
+ value (let [raw (# f.decimal encoded value)]
(if (f.< +0.0 value)
raw
(|> raw (text.split_at 1) maybe.trusted product.right))))))
(def: escape "\")
-(def: escaped_dq (text\composite ..escape text.double_quote))
+(def: escaped_dq (text#composite ..escape text.double_quote))
(def: string_format
(-> String Text)
@@ -264,14 +264,14 @@
(def: (array_format format)
(-> (-> JSON Text) (-> Array Text))
- (|>> (row\each format)
+ (|>> (row#each format)
row.list
(text.interposed ..value_separator)
(text.enclosed [..array_start ..array_end])))
(def: (kv_format format [key value])
(-> (-> JSON Text) (-> [String JSON] Text))
- ($_ text\composite
+ ($_ text#composite
(..string_format key)
..entry_separator
(format value)
@@ -280,7 +280,7 @@
(def: (object_format format)
(-> (-> JSON Text) (-> Object Text))
(|>> dictionary.entries
- (list\each (..kv_format format))
+ (list#each (..kv_format format))
(text.interposed ..value_separator)
(text.enclosed [..object_start ..object_end])))
@@ -350,8 +350,8 @@
[mark (<text>.one_of "eE")
signed?' (<>.parses? (<text>.this "-"))
offset (<text>.many <text>.decimal)]
- (in ($_ text\composite mark (if signed?' "-" "") offset))))]
- (case (f\decoded ($_ text\composite (if signed? "-" "") digits "." decimals exp))
+ (in ($_ text#composite mark (if signed?' "-" "") offset))))]
+ (case (f#decoded ($_ text#composite (if signed? "-" "") digits "." decimals exp))
{try.#Failure message}
(<>.failure message)
@@ -362,32 +362,32 @@
(Parser Text)
($_ <>.either
(<>.after (<text>.this "\t")
- (<>\in text.tab))
+ (<>#in text.tab))
(<>.after (<text>.this "\b")
- (<>\in text.back_space))
+ (<>#in text.back_space))
(<>.after (<text>.this "\n")
- (<>\in text.new_line))
+ (<>#in text.new_line))
(<>.after (<text>.this "\r")
- (<>\in text.carriage_return))
+ (<>#in text.carriage_return))
(<>.after (<text>.this "\f")
- (<>\in text.form_feed))
- (<>.after (<text>.this (text\composite "\" text.double_quote))
- (<>\in text.double_quote))
+ (<>#in text.form_feed))
+ (<>.after (<text>.this (text#composite "\" text.double_quote))
+ (<>#in text.double_quote))
(<>.after (<text>.this "\\")
- (<>\in "\"))))
+ (<>#in "\"))))
(def: string_parser
(Parser String)
(<| (<text>.enclosed [text.double_quote text.double_quote])
(loop [_ []])
(do [! <>.monad]
- [chars (<text>.some (<text>.none_of (text\composite "\" text.double_quote)))
+ [chars (<text>.some (<text>.none_of (text#composite "\" text.double_quote)))
stop <text>.next])
- (if (text\= "\" stop)
+ (if (text#= "\" stop)
(do !
[escaped escaped_parser
next_chars (recur [])]
- (in ($_ text\composite chars escaped next_chars)))
+ (in ($_ text#composite chars escaped next_chars)))
(in chars))))
(def: (kv_parser json_parser)
diff --git a/stdlib/source/library/lux/data/format/markdown.lux b/stdlib/source/library/lux/data/format/markdown.lux
index 0e45ec331..0737bc52b 100644
--- a/stdlib/source/library/lux/data/format/markdown.lux
+++ b/stdlib/source/library/lux/data/format/markdown.lux
@@ -5,7 +5,7 @@
["[0]" text
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" functor)]]]
+ ["[0]" list ("[1]#[0]" functor)]]]
[type
abstract]
[world
@@ -87,7 +87,7 @@
(def: (prefix with)
(-> Text (-> Text Text))
(|>> (text.all_split_by text.new_line)
- (list\each (function (_ line)
+ (list#each (function (_ line)
(if (text.empty? line)
line
(format with line))))
@@ -107,7 +107,7 @@
(-> (List [(Markdown Span) (Maybe (Markdown Block))])
(Markdown Block))
(|>> list.enumeration
- (list\each (function (_ [idx [summary detail]])
+ (list#each (function (_ [idx [summary detail]])
(format "1. " (:representation summary)
(case detail
{.#Some detail}
@@ -125,7 +125,7 @@
(def: .public bullet_list
(-> (List [(Markdown Span) (Maybe (Markdown Block))])
(Markdown Block))
- (|>> (list\each (function (_ [summary detail])
+ (|>> (list#each (function (_ [summary detail])
(format "* " (:representation summary)
(case detail
{.#Some detail}
diff --git a/stdlib/source/library/lux/data/format/tar.lux b/stdlib/source/library/lux/data/format/tar.lux
index bfc337c87..8306aeaf5 100644
--- a/stdlib/source/library/lux/data/format/tar.lux
+++ b/stdlib/source/library/lux/data/format/tar.lux
@@ -17,10 +17,10 @@
[encoding
["[0]" utf8]]]
["[0]" format "_"
- ["[1]" binary {"+" [Writer]} ("[1]\[0]" monoid)]]
+ ["[1]" binary {"+" [Writer]} ("[1]#[0]" monoid)]]
[collection
- ["[0]" list ("[1]\[0]" mix)]
- ["[0]" row {"+" [Row]} ("[1]\[0]" mix)]]]
+ ["[0]" list ("[1]#[0]" mix)]
+ ["[0]" row {"+" [Row]} ("[1]#[0]" mix)]]]
[math
["[0]" number
["n" nat]
@@ -62,7 +62,7 @@
Nat
(|> ..octal_size
(list.repeated <size>)
- (list\mix n.* 1)
+ (list#mix n.* 1)
++))
(exception: .public (<exception> [value Nat])
@@ -88,10 +88,10 @@
(let [suffix <suffix>
padded_size (n.+ (text.size suffix) <size>)]
(|>> :representation
- (\ n.octal encoded)
+ (# n.octal encoded)
(..octal_padding <size>)
(text.suffix suffix)
- (\ utf8.codec encoded)
+ (# utf8.codec encoded)
(format.segment padded_size))))
(def: <coercion>
@@ -133,25 +133,25 @@
(Parser Small)
(do <>.monad
[digits (<binary>.segment ..small_size)
- digits (<>.lifted (\ utf8.codec decoded digits))
+ digits (<>.lifted (# utf8.codec decoded digits))
_ ..small_suffix]
(<>.lifted
(do [! try.monad]
- [value (\ n.octal decoded digits)]
+ [value (# n.octal decoded digits)]
(..small value)))))
(def: big_parser
(Parser Big)
(do <>.monad
[digits (<binary>.segment ..big_size)
- digits (<>.lifted (\ utf8.codec decoded digits))
+ digits (<>.lifted (# utf8.codec decoded digits))
end <binary>.bits/8
_ (let [expected (`` (char (~~ (static ..blank))))]
(<>.assertion (exception.error ..wrong_character [expected end])
(n.= expected end)))]
(<>.lifted
(do [! try.monad]
- [value (\ n.octal decoded digits)]
+ [value (# n.octal decoded digits)]
(..big value)))))
(abstract: Checksum
@@ -175,7 +175,7 @@
(def: checksum_checksum
(|> ..dummy_checksum
:representation
- (\ utf8.codec encoded)
+ (# utf8.codec encoded)
..checksum))
(def: checksum_code
@@ -183,7 +183,7 @@
(|>> ..checksum
..as_small
..from_small
- (\ n.octal encoded)
+ (# n.octal encoded)
(..octal_padding ..small_size)
(text.suffix ..checksum_suffix)
:abstraction))
@@ -193,17 +193,17 @@
(let [padded_size (n.+ (text.size ..checksum_suffix)
..small_size)]
(|>> :representation
- (\ utf8.codec encoded)
+ (# utf8.codec encoded)
(format.segment padded_size))))
(def: checksum_parser
(Parser [Nat Checksum])
(do <>.monad
[ascii (<binary>.segment ..small_size)
- digits (<>.lifted (\ utf8.codec decoded ascii))
+ digits (<>.lifted (# utf8.codec decoded ascii))
_ ..small_suffix
value (<>.lifted
- (\ n.octal decoded digits))]
+ (# n.octal decoded digits))]
(in [value
(:abstraction (format digits ..checksum_suffix))])))
)
@@ -214,7 +214,7 @@
(def: ascii?
(-> Text Bit)
- (|>> (\ utf8.codec encoded)
+ (|>> (# utf8.codec encoded)
(binary.aggregate (function (_ char verdict)
(.and verdict
(n.<= ..last_ascii char)))
@@ -233,7 +233,7 @@
0 {try.#Success string}
size (loop [end (-- size)]
(case end
- 0 {try.#Success (\ utf8.codec encoded "")}
+ 0 {try.#Success (# utf8.codec encoded "")}
_ (do try.monad
[last_char (binary.read/8! end string)]
(`` (case (.nat last_char)
@@ -257,7 +257,7 @@
(-> <representation> (Try <type>))
(if (..ascii? value)
(if (|> value
- (\ utf8.codec encoded)
+ (# utf8.codec encoded)
binary.size
(n.> <size>))
(exception.except <exception> [value])
@@ -274,7 +274,7 @@
padded_size (n.+ (text.size suffix) <size>)]
(|>> :representation
(text.suffix suffix)
- (\ utf8.codec encoded)
+ (# utf8.codec encoded)
(format.segment padded_size))))
(def: <parser>
@@ -288,7 +288,7 @@
(<>.lifted
(do [! try.monad]
[ascii (..un_padded string)
- text (\ utf8.codec decoded ascii)]
+ text (# utf8.codec decoded ascii)]
(<in> text)))))
(def: .public <none>
@@ -317,7 +317,7 @@
(let [padded_size (n.+ (text.size ..null)
..magic_size)]
(|>> :representation
- (\ utf8.codec encoded)
+ (# utf8.codec encoded)
(format.segment padded_size))))
(def: magic_parser
@@ -329,8 +329,8 @@
_ (<>.assertion (exception.error ..wrong_character [expected end])
(n.= expected end))]
(<>.lifted
- (\ try.monad each (|>> :abstraction)
- (\ utf8.codec decoded string)))))
+ (# try.monad each (|>> :abstraction)
+ (# utf8.codec decoded string)))))
)
(def: block_size Size 512)
@@ -511,7 +511,7 @@
(def: mode_parser
(Parser Mode)
(do [! <>.monad]
- [value (\ ! each ..from_small ..small_parser)]
+ [value (# ! each ..from_small ..small_parser)]
(if (n.> (:representation ..maximum_mode)
value)
(<>.lifted
@@ -523,7 +523,7 @@
Nat
(|> ..octal_size
(list.repeated ..content_size)
- (list\mix n.* 1)))
+ (list#mix n.* 1)))
(abstract: .public Content
[Big Binary]
@@ -734,9 +734,9 @@
(Writer Tar)
(let [end_of_archive (binary.empty ..end_of_archive_size)]
(function (_ tar)
- (format\composite (row\mix (function (_ next total)
- (format\composite total (..entry_writer next)))
- format\identity
+ (format#composite (row#mix (function (_ next total)
+ (format#composite total (..entry_writer next)))
+ format#identity
tar)
(format.segment ..end_of_archive_size end_of_archive)))))
@@ -759,7 +759,7 @@
(-> Checksum Binary Nat)
(let [|checksum| (|> checksum
..from_checksum
- (\ utf8.codec encoded)
+ (# utf8.codec encoded)
..checksum)]
(|> (..checksum header)
(n.- |checksum|)
@@ -848,14 +848,14 @@
(def: entry_parser
(Parser Entry)
($_ <>.either
- (\ <>.monad each (|>> {..#Normal})
+ (# <>.monad each (|>> {..#Normal})
(<>.either (..file_parser ..normal)
(..file_parser ..old_normal)))
- (\ <>.monad each (|>> {..#Symbolic_Link})
+ (# <>.monad each (|>> {..#Symbolic_Link})
(..file_name_parser ..symbolic_link (value@ #link_name)))
- (\ <>.monad each (|>> {..#Directory})
+ (# <>.monad each (|>> {..#Directory})
(..file_name_parser ..directory (value@ #path)))
- (\ <>.monad each (|>> {..#Contiguous})
+ (# <>.monad each (|>> {..#Contiguous})
(..file_parser ..contiguous))))
... It's safe to implement the parser this way because the range of values for Nat is 2^64
@@ -883,5 +883,5 @@
(def: .public parser
(Parser Tar)
(|> (<>.some entry_parser)
- (\ <>.monad each row.of_list)
+ (# <>.monad each row.of_list)
(<>.before ..end_of_archive_parser)))
diff --git a/stdlib/source/library/lux/data/format/xml.lux b/stdlib/source/library/lux/data/format/xml.lux
index f2064c166..42f5aafcf 100644
--- a/stdlib/source/library/lux/data/format/xml.lux
+++ b/stdlib/source/library/lux/data/format/xml.lux
@@ -7,14 +7,14 @@
[codec {"+" [Codec]}]]
[control
[try {"+" [Try]}]
- ["<>" parser ("[1]\[0]" monad)
+ ["<>" parser ("[1]#[0]" monad)
["<[0]>" text {"+" [Parser]}]]]
[data
["[0]" product]
- ["[0]" name ("[1]\[0]" equivalence codec)]
- ["[0]" text ("[1]\[0]" equivalence monoid)]
+ ["[0]" name ("[1]#[0]" equivalence codec)]
+ ["[0]" text {"+" [\n]} ("[1]#[0]" equivalence monoid)]
[collection
- ["[0]" list ("[1]\[0]" functor)]
+ ["[0]" list ("[1]#[0]" functor)]
["[0]" dictionary {"+" [Dictionary]}]]]
[math
[number
@@ -46,11 +46,11 @@
(def: xml_standard_escape_char^
(Parser Text)
($_ <>.either
- (<>.after (<text>.this "&lt;") (<>\in "<"))
- (<>.after (<text>.this "&gt;") (<>\in ">"))
- (<>.after (<text>.this "&amp;") (<>\in "&"))
- (<>.after (<text>.this "&apos;") (<>\in "'"))
- (<>.after (<text>.this "&quot;") (<>\in text.double_quote))
+ (<>.after (<text>.this "&lt;") (<>#in "<"))
+ (<>.after (<text>.this "&gt;") (<>#in ">"))
+ (<>.after (<text>.this "&amp;") (<>#in "&"))
+ (<>.after (<text>.this "&apos;") (<>#in "'"))
+ (<>.after (<text>.this "&quot;") (<>#in text.double_quote))
))
(def: xml_unicode_escape_char^
@@ -74,7 +74,7 @@
(def: xml_char^
(Parser Text)
- (<>.either (<text>.none_of ($_ text\composite "<>&" text.double_quote))
+ (<>.either (<text>.none_of ($_ text#composite "<>&" text.double_quote))
xml_escape_char^))
(def: xml_identifier
@@ -84,7 +84,7 @@
<text>.alpha)
tail (<text>.some (<>.either (<text>.one_of "_.-")
<text>.alpha_num))]
- (in ($_ text\composite head tail))))
+ (in ($_ text#composite head tail))))
(def: namespaced_symbol^
(Parser Name)
@@ -115,7 +115,7 @@
(def: attrs^
(Parser Attrs)
- (<| (\ <>.monad each (dictionary.of_list name.hash))
+ (<| (# <>.monad each (dictionary.of_list name.hash))
<>.some
(<>.and (..spaced^ attr_name^))
(<>.after (<text>.this "="))
@@ -128,10 +128,10 @@
..spaced^
(<>.after (<text>.this "/"))
(<text>.enclosed ["<" ">"]))]
- (<>.assertion ($_ text\composite "Close tag does not match open tag." text.new_line
- "Expected: " (name\encoded expected) text.new_line
- " Actual: " (name\encoded actual) text.new_line)
- (name\= expected actual))))
+ (<>.assertion ($_ text#composite "Close tag does not match open tag." \n
+ "Expected: " (name#encoded expected) \n
+ " Actual: " (name#encoded actual) \n)
+ (name#= expected actual))))
(def: comment^
(Parser Text)
@@ -159,7 +159,7 @@
(Parser XML)
(|> (..spaced^ (<text>.many xml_char^))
(<>.either cdata^)
- (<>\each (|>> {#Text}))))
+ (<>#each (|>> {#Text}))))
(def: null^
(Parser Any)
@@ -211,7 +211,7 @@
(-> Tag Text)
(case namespace
"" name
- _ ($_ text\composite namespace ..namespace_separator name)))
+ _ ($_ text#composite namespace ..namespace_separator name)))
(def: .public attribute
(-> Attribute Text)
@@ -221,8 +221,8 @@
Text
(let [quote (: (-> Text Text)
(function (_ value)
- ($_ text\composite text.double_quote value text.double_quote)))]
- ($_ text\composite
+ ($_ text#composite text.double_quote value text.double_quote)))]
+ ($_ text#composite
"<?xml"
" version=" (quote "1.0")
" encoding=" (quote "UTF-8")
@@ -236,11 +236,11 @@
(function (_ attrs)
(|> attrs
dictionary.entries
- (list\each (function (_ [key value])
- ($_ text\composite (..attribute key) "=" text.double_quote (sanitize_value value) text.double_quote)))
+ (list#each (function (_ [key value])
+ ($_ text#composite (..attribute key) "=" text.double_quote (sanitize_value value) text.double_quote)))
(text.interposed " "))))]
(function (_ input)
- ($_ text\composite
+ ($_ text#composite
..xml_header text.new_line
(loop [prefix ""
input input]
@@ -252,8 +252,8 @@
(let [tag (..tag xml_tag)
attrs (if (dictionary.empty? xml_attrs)
""
- ($_ text\composite " " (attributes xml_attrs)))]
- ($_ text\composite
+ ($_ text#composite " " (attributes xml_attrs)))]
+ ($_ text#composite
prefix "<" tag attrs ">"
(sanitize_value value)
"</" tag ">"))
@@ -262,12 +262,12 @@
(let [tag (..tag xml_tag)
attrs (if (dictionary.empty? xml_attrs)
""
- ($_ text\composite " " (attributes xml_attrs)))]
+ ($_ text#composite " " (attributes xml_attrs)))]
(if (list.empty? xml_children)
- ($_ text\composite prefix "<" tag attrs "/>")
- ($_ text\composite prefix "<" tag attrs ">"
+ ($_ text#composite prefix "<" tag attrs "/>")
+ ($_ text#composite prefix "<" tag attrs ">"
(|> xml_children
- (list\each (|>> (recur (text\composite prefix text.tab)) (text\composite text.new_line)))
+ (list#each (|>> (recur (text#composite prefix text.tab)) (text#composite text.new_line)))
text.together)
text.new_line prefix "</" tag ">")))))
))))
@@ -280,12 +280,12 @@
(def: (= reference sample)
(case [reference sample]
[{#Text reference/value} {#Text sample/value}]
- (text\= reference/value sample/value)
+ (text#= reference/value sample/value)
[{#Node reference/tag reference/attrs reference/children}
{#Node sample/tag sample/attrs sample/children}]
- (and (name\= reference/tag sample/tag)
- (\ (dictionary.equivalence text.equivalence) = reference/attrs sample/attrs)
+ (and (name#= reference/tag sample/tag)
+ (# (dictionary.equivalence text.equivalence) = reference/attrs sample/attrs)
(n.= (list.size reference/children)
(list.size sample/children))
(|> (list.zipped/2 reference/children sample/children)
diff --git a/stdlib/source/library/lux/data/name.lux b/stdlib/source/library/lux/data/name.lux
index 86f813cf7..1e35dc237 100644
--- a/stdlib/source/library/lux/data/name.lux
+++ b/stdlib/source/library/lux/data/name.lux
@@ -7,7 +7,7 @@
[order {"+" [Order]}]
[codec {"+" [Codec]}]]
[data
- ["[0]" text ("[1]\[0]" equivalence monoid)]
+ ["[0]" text ("[1]#[0]" equivalence monoid)]
["[0]" product]]]])
... (type: Name
@@ -28,16 +28,16 @@
(def: .public equivalence
(Equivalence Name)
- (\ ..hash &equivalence))
+ (# ..hash &equivalence))
(implementation: .public order
(Order Name)
(def: &equivalence ..equivalence)
(def: (< [moduleP shortP] [moduleS shortS])
- (if (text\= moduleP moduleS)
- (\ text.order < shortP shortS)
- (\ text.order < moduleP moduleS))))
+ (if (text#= moduleP moduleS)
+ (# text.order < shortP shortS)
+ (# text.order < moduleP moduleS))))
(def: separator
".")
@@ -48,7 +48,7 @@
(def: (encoded [module short])
(case module
"" short
- _ ($_ text\composite module ..separator short)))
+ _ ($_ text#composite module ..separator short)))
(def: (decoded input)
(case (text.all_split_by ..separator input)
@@ -59,4 +59,4 @@
{.#Right [module short]}
_
- {.#Left (text\composite "Invalid format for Name: " input)})))
+ {.#Left (text#composite "Invalid format for Name: " input)})))
diff --git a/stdlib/source/library/lux/data/product.lux b/stdlib/source/library/lux/data/product.lux
index df2df9ed1..22cb46a1a 100644
--- a/stdlib/source/library/lux/data/product.lux
+++ b/stdlib/source/library/lux/data/product.lux
@@ -53,16 +53,16 @@
(All (_ l r) (-> (Equivalence l) (Equivalence r) (Equivalence [l r])))
(def: (= [rl rr] [sl sr])
- (and (\ left = rl sl)
- (\ right = rr sr))))
+ (and (# left = rl sl)
+ (# right = rr sr))))
(def: .public (hash left right)
(All (_ l r) (-> (Hash l) (Hash r) (Hash [l r])))
(implementation
(def: &equivalence
- (..equivalence (\ left &equivalence)
- (\ right &equivalence)))
+ (..equivalence (# left &equivalence)
+ (# right &equivalence)))
(def: (hash [leftV rightV])
("lux i64 +"
- (\ left hash leftV)
- (\ right hash rightV)))))
+ (# left hash leftV)
+ (# right hash rightV)))))
diff --git a/stdlib/source/library/lux/data/store.lux b/stdlib/source/library/lux/data/store.lux
index 005c9d69c..627a52440 100644
--- a/stdlib/source/library/lux/data/store.lux
+++ b/stdlib/source/library/lux/data/store.lux
@@ -22,7 +22,7 @@
(def: (each f fa)
(extend (function (_ store)
- (f (\ store peek (\ store cursor))))
+ (f (# store peek (# store cursor))))
fa)))
(implementation: .public comonad
@@ -32,23 +32,23 @@
..functor)
(def: (out wa)
- (\\ peek (\\ cursor)))
+ (## peek (## cursor)))
(def: disjoint
(extend id)))
(def: .public (peeks trans store)
(All (_ s a) (-> (-> s s) (Store s a) a))
- (|> (\\ cursor) trans (\\ peek)))
+ (|> (## cursor) trans (## peek)))
(def: .public (seek cursor store)
(All (_ s a) (-> s (Store s a) (Store s a)))
- (\ (\\ disjoint store) peek cursor))
+ (# (## disjoint store) peek cursor))
(def: .public (seeks change store)
(All (_ s a) (-> (-> s s) (Store s a) (Store s a)))
- (|> store (\\ disjoint) (peeks change)))
+ (|> store (## disjoint) (peeks change)))
(def: .public (experiment Functor<f> change store)
(All (_ f s a) (-> (Functor f) (-> s (f s)) (Store s a) (f a)))
- (\ Functor<f> each (\\ peek) (change (\\ cursor))))
+ (# Functor<f> each (## peek) (change (## cursor))))
diff --git a/stdlib/source/library/lux/data/sum.lux b/stdlib/source/library/lux/data/sum.lux
index cd66c8aa4..518b48f0b 100644
--- a/stdlib/source/library/lux/data/sum.lux
+++ b/stdlib/source/library/lux/data/sum.lux
@@ -67,10 +67,10 @@
(def: (= reference sample)
(case [reference sample]
[{.#Left reference} {.#Left sample}]
- (\ left = reference sample)
+ (# left = reference sample)
[{.#Right reference} {.#Right sample}]
- (\ right = reference sample)
+ (# right = reference sample)
_
false))))
@@ -79,12 +79,12 @@
(All (_ l r) (-> (Hash l) (Hash r) (Hash (Or l r))))
(implementation
(def: &equivalence
- (..equivalence (\ left &equivalence)
- (\ right &equivalence)))
+ (..equivalence (# left &equivalence)
+ (# right &equivalence)))
(def: (hash value)
(case value
{.#Left value}
- (\ left hash value)
+ (# left hash value)
{.#Right value}
- (\ right hash value)))))
+ (# right hash value)))))
diff --git a/stdlib/source/library/lux/data/text.lux b/stdlib/source/library/lux/data/text.lux
index a95490493..10d6ebf22 100644
--- a/stdlib/source/library/lux/data/text.lux
+++ b/stdlib/source/library/lux/data/text.lux
@@ -13,7 +13,7 @@
["[0]" maybe]]
[data
[collection
- ["[0]" list ("[1]\[0]" mix)]]]
+ ["[0]" list ("[1]#[0]" mix)]]]
[math
[number
["n" nat]
@@ -284,7 +284,7 @@
(-> (List Text) Text)
(let [(^open "[0]") ..monoid]
(|>> list.reversed
- (list\mix composite identity))))
+ (list#mix composite identity))))
(def: .public (interposed separator texts)
(-> Text (List Text) Text)
diff --git a/stdlib/source/library/lux/data/text/buffer.lux b/stdlib/source/library/lux/data/text/buffer.lux
index 50d78c021..3c55712f7 100644
--- a/stdlib/source/library/lux/data/text/buffer.lux
+++ b/stdlib/source/library/lux/data/text/buffer.lux
@@ -11,7 +11,7 @@
["%" format {"+" [format]}]]
[collection
["[0]" array]
- ["[0]" row {"+" [Row]} ("[1]\[0]" mix)]]]
+ ["[0]" row {"+" [Row]} ("[1]#[0]" mix)]]]
[math
[number
["n" nat]]]
@@ -106,7 +106,7 @@
@.lua <jvm>]
... default
(|>> :representation
- (row\mix (function (_ chunk total)
+ (row#mix (function (_ chunk total)
(n.+ (//.size chunk) total))
0)))))
@@ -126,7 +126,7 @@
@.lua (let [[capacity transform] (:representation buffer)]
(table/concat [(transform (array.empty 0)) ""]))]
... default
- (row\mix (function (_ chunk total)
+ (row#mix (function (_ chunk total)
(format total chunk))
""
(:representation buffer)))))
diff --git a/stdlib/source/library/lux/data/text/escape.lux b/stdlib/source/library/lux/data/text/escape.lux
index 67e31e72c..8e34c4845 100644
--- a/stdlib/source/library/lux/data/text/escape.lux
+++ b/stdlib/source/library/lux/data/text/escape.lux
@@ -94,7 +94,7 @@
(def: (unicode_escaped char pre_offset pre_limit previous current)
(-> Char Nat Nat Text Text [Text Text Nat])
- (let [code (\ n.hex encoded char)
+ (let [code (# n.hex encoded char)
replacement (format ..sigil "u"
(case ("lux text size" code)
1 (format "000" code)
@@ -181,7 +181,7 @@
(-> Nat Text Text Nat (Try [Text Text Nat]))
(case (|> current
("lux text clip" (n.+ ..ascii_escape_offset offset) ..code_size)
- (\ n.hex decoded))
+ (# n.hex decoded))
{try.#Success char}
(let [limit' (|> limit (n.- offset) (n.- ..unicode_escape_offset))]
{try.#Success [(format previous
diff --git a/stdlib/source/library/lux/data/text/format.lux b/stdlib/source/library/lux/data/text/format.lux
index 03de3ed04..d801c25f5 100644
--- a/stdlib/source/library/lux/data/text/format.lux
+++ b/stdlib/source/library/lux/data/text/format.lux
@@ -16,7 +16,7 @@
["[0]" xml]
["[0]" json]]
[collection
- ["[0]" list ("[1]\[0]" monad)]]]
+ ["[0]" list ("[1]#[0]" monad)]]]
["[0]" time
["[0]" instant]
["[0]" duration]
@@ -56,35 +56,35 @@
(Format <type>)
<formatter>)]
- [bit Bit (\ bit.codec encoded)]
- [nat Nat (\ nat.decimal encoded)]
- [int Int (\ int.decimal encoded)]
- [rev Rev (\ rev.decimal encoded)]
- [frac Frac (\ frac.decimal encoded)]
+ [bit Bit (# bit.codec encoded)]
+ [nat Nat (# nat.decimal encoded)]
+ [int Int (# int.decimal encoded)]
+ [rev Rev (# rev.decimal encoded)]
+ [frac Frac (# frac.decimal encoded)]
[text Text text.format]
- [ratio ratio.Ratio (\ ratio.codec encoded)]
- [name Name (\ name.codec encoded)]
+ [ratio ratio.Ratio (# ratio.codec encoded)]
+ [name Name (# name.codec encoded)]
[location Location location.format]
[code Code code.format]
[type Type type.format]
- [instant instant.Instant (\ instant.codec encoded)]
- [duration duration.Duration (\ duration.codec encoded)]
- [date date.Date (\ date.codec encoded)]
- [time time.Time (\ time.codec encoded)]
- [day day.Day (\ day.codec encoded)]
- [month month.Month (\ month.codec encoded)]
+ [instant instant.Instant (# instant.codec encoded)]
+ [duration duration.Duration (# duration.codec encoded)]
+ [date date.Date (# date.codec encoded)]
+ [time time.Time (# time.codec encoded)]
+ [day day.Day (# day.codec encoded)]
+ [month month.Month (# month.codec encoded)]
- [xml xml.XML (\ xml.codec encoded)]
- [json json.JSON (\ json.codec encoded)]
+ [xml xml.XML (# xml.codec encoded)]
+ [json json.JSON (# json.codec encoded)]
)
(template [<type> <format>,<codec>]
[(`` (template [<format> <codec>]
[(def: .public <format>
(Format <type>)
- (\ <codec> encoded))]
+ (# <codec> encoded))]
(~~ (template.spliced <format>,<codec>))))]
@@ -113,11 +113,11 @@
(def: .public (mod modular)
(All (_ m) (Format (modular.Mod m)))
(let [codec (modular.codec (modular.modulus modular))]
- (\ codec encoded modular)))
+ (# codec encoded modular)))
(def: .public (list formatter)
(All (_ a) (-> (Format a) (Format (List a))))
- (|>> (list\each (|>> formatter (format " ")))
+ (|>> (list#each (|>> formatter (format " ")))
text.together
(text.enclosed ["(list" ")"])))
diff --git a/stdlib/source/library/lux/data/text/regex.lux b/stdlib/source/library/lux/data/text/regex.lux
index 189665302..81104a0fe 100644
--- a/stdlib/source/library/lux/data/text/regex.lux
+++ b/stdlib/source/library/lux/data/text/regex.lux
@@ -8,19 +8,19 @@
["[0]" maybe]
["[0]" try]
["[0]" exception {"+" [exception:]}]
- ["<>" parser ("[1]\[0]" monad)
+ ["<>" parser ("[1]#[0]" monad)
["<[0]>" text {"+" [Parser]}]
["<[0]>" code]]]
[data
["[0]" product]
[collection
- ["[0]" list ("[1]\[0]" mix monad)]]]
+ ["[0]" list ("[1]#[0]" mix monad)]]]
[macro {"+" [with_identifiers]}
[syntax {"+" [syntax:]}]
["[0]" code]]
[math
[number {"+" [hex]}
- ["n" nat ("[1]\[0]" decimal)]]]]]
+ ["n" nat ("[1]#[0]" decimal)]]]]]
["[0]" //
["%" format {"+" [format]}]])
@@ -50,11 +50,11 @@
(def: (copy reference)
(-> Text (Parser Text))
- (<>.after (<text>.this reference) (<>\in reference)))
+ (<>.after (<text>.this reference) (<>#in reference)))
(def: together^
(-> (Parser (List Text)) (Parser Text))
- (\ <>.monad each //.together))
+ (# <>.monad each //.together))
(def: name_char^
(Parser Text)
@@ -71,10 +71,10 @@
(def: (name^ current_module)
(-> Text (Parser Name))
($_ <>.either
- (<>.and (<>\in current_module) (<>.after (<text>.this "..") name_part^))
+ (<>.and (<>#in current_module) (<>.after (<text>.this "..") name_part^))
(<>.and name_part^ (<>.after (<text>.this ".") name_part^))
- (<>.and (<>\in .prelude_module) (<>.after (<text>.this ".") name_part^))
- (<>.and (<>\in "") name_part^)))
+ (<>.and (<>#in .prelude_module) (<>.after (<text>.this ".") name_part^))
+ (<>.and (<>#in "") name_part^)))
(def: (re_var^ current_module)
(-> Text (Parser Code))
@@ -85,9 +85,9 @@
(def: re_range^
(Parser Code)
(do [! <>.monad]
- [from (|> regex_char^ (\ ! each (|>> (//.char 0) maybe.trusted)))
+ [from (|> regex_char^ (# ! each (|>> (//.char 0) maybe.trusted)))
_ (<text>.this "-")
- to (|> regex_char^ (\ ! each (|>> (//.char 0) maybe.trusted)))]
+ to (|> regex_char^ (# ! each (|>> (//.char 0) maybe.trusted)))]
(in (` ((~! <text>.range) (~ (code.nat from)) (~ (code.nat to)))))))
(def: re_char^
@@ -120,7 +120,7 @@
rest (<>.some (<>.after (<text>.this "&&")
(<text>.enclosed ["[" "]"]
..re_user_class^')))]
- (in (list\mix (function (_ refinement base)
+ (in (list#mix (function (_ refinement base)
(` ((~! refine^) (~ refinement) (~ base))))
init
rest))))
@@ -196,7 +196,7 @@
(<>.either (do <>.monad
[_ (<text>.this "\")
id number^]
- (in (` ((~! ..copy) (~ (code.identifier ["" (n\encoded id)]))))))
+ (in (` ((~! ..copy) (~ (code.identifier ["" (n#encoded id)]))))))
(do <>.monad
[_ (<text>.this "\k<")
captured_name name_part^
@@ -285,7 +285,7 @@
(re_scoped^ current_module)))
.let [g!total (code.identifier ["" "0total"])
g!temp (code.identifier ["" "0temp"])
- [_ names steps] (list\mix (: (-> (Either Code [Re_Group Code])
+ [_ names steps] (list#mix (: (-> (Either Code [Re_Group Code])
[Nat (List Code) (List (List Code))]
[Nat (List Code) (List (List Code))])
(function (_ part [idx names steps])
@@ -295,7 +295,7 @@
[idx
names
(list& (list g!temp complex
- (` .let) (` [(~ g!total) (\ (~! //.monoid) (~' composite) (~ g!total) (~ g!temp))]))
+ (` .let) (` [(~ g!total) (# (~! //.monoid) (~' composite) (~ g!total) (~ g!temp))]))
steps)]
{.#Right [{#Capturing [?name num_captures]} scoped]}
@@ -304,14 +304,14 @@
[idx (code.identifier ["" _name])]
{.#None}
- [(++ idx) (code.identifier ["" (n\encoded idx)])])
+ [(++ idx) (code.identifier ["" (n#encoded idx)])])
access (if (n.> 0 num_captures)
(` ((~! product.left) (~ name!)))
name!)]
[idx!
(list& name! names)
(list& (list name! scoped
- (` .let) (` [(~ g!total) (\ (~! //.monoid) (~' composite) (~ g!total) (~ access))]))
+ (` .let) (` [(~ g!total) (# (~! //.monoid) (~' composite) (~ g!total) (~ access))]))
steps)])
)))
[0
@@ -323,13 +323,13 @@
0)
(` ((~! do) (~! <>.monad)
[.let [(~ g!total) ""]
- (~+ (|> steps list.reversed list\conjoint))]
+ (~+ (|> steps list.reversed list#conjoint))]
((~ (' in)) [(~ g!total) (~+ (list.reversed names))])))])
))
(def: (unflatten^ lexer)
(-> (Parser Text) (Parser [Text Any]))
- (<>.and lexer (\ <>.monad in [])))
+ (<>.and lexer (# <>.monad in [])))
(def: (|||^ left right)
(All (_ l r) (-> (Parser [Text l]) (Parser [Text r]) (Parser [Text (Or l r)])))
@@ -378,12 +378,12 @@
tail (<>.some (<>.after (<text>.this "|") sub^))]
(if (list.empty? tail)
(in head)
- (in [(list\mix n.max (product.left head) (list\each product.left tail))
+ (in [(list#mix n.max (product.left head) (list#each product.left tail))
(` ($_ ((~ (if capturing?
(` (~! |||^))
(` (~! |||_^)))))
(~ (prep_alternative head))
- (~+ (list\each prep_alternative tail))))]))))
+ (~+ (list#each prep_alternative tail))))]))))
(def: (re_scoped^ current_module)
(-> Text (Parser [Re_Group Code]))
@@ -411,7 +411,7 @@
(def: (regex^ current_module)
(-> Text (Parser Code))
- (\ <>.monad each product.right (re_alternative^ #1 re_scoped^ current_module)))
+ (# <>.monad each product.right (re_alternative^ #1 re_scoped^ current_module)))
(syntax: .public (regex [pattern <code>.text])
(do meta.monad
diff --git a/stdlib/source/library/lux/data/text/unicode/block.lux b/stdlib/source/library/lux/data/text/unicode/block.lux
index 770ae8554..051bbd585 100644
--- a/stdlib/source/library/lux/data/text/unicode/block.lux
+++ b/stdlib/source/library/lux/data/text/unicode/block.lux
@@ -8,7 +8,7 @@
["[0]" interval {"+" [Interval]}]]
[math
[number {"+" [hex]}
- ["n" nat ("[1]\[0]" interval)]
+ ["n" nat ("[1]#[0]" interval)]
["[0]" i64]]]
[type
abstract]]]
@@ -22,17 +22,17 @@
(def: identity
(:abstraction
- (interval.between n.enum n\top n\bottom)))
+ (interval.between n.enum n#top n#bottom)))
(def: (composite left right)
(let [left (:representation left)
right (:representation right)]
(:abstraction
(interval.between n.enum
- (n.min (\ left bottom)
- (\ right bottom))
- (n.max (\ left top)
- (\ right top)))))))
+ (n.min (# left bottom)
+ (# right bottom))
+ (n.max (# left top)
+ (# right top)))))))
(def: .public (block start additional)
(-> Char Nat Block)
diff --git a/stdlib/source/library/lux/data/text/unicode/set.lux b/stdlib/source/library/lux/data/text/unicode/set.lux
index 3ee3dfb49..ce4b6f7d5 100644
--- a/stdlib/source/library/lux/data/text/unicode/set.lux
+++ b/stdlib/source/library/lux/data/text/unicode/set.lux
@@ -5,8 +5,8 @@
[equivalence {"+" [Equivalence]}]]
[data
[collection
- ["[0]" list ("[1]\[0]" mix functor)]
- ["[0]" set ("[1]\[0]" equivalence)]
+ ["[0]" list ("[1]#[0]" mix functor)]
+ ["[0]" set ("[1]#[0]" equivalence)]
["[0]" tree "_"
["[1]" finger {"+" [Tree]}]]]]
[type {"+" [:by_example]}
@@ -32,18 +32,18 @@
(def: .public (composite left right)
(-> Set Set Set)
(:abstraction
- (\ builder branch
+ (# builder branch
(:representation left)
(:representation right))))
(def: (singleton block)
(-> Block Set)
(:abstraction
- (\ builder leaf block [])))
+ (# builder leaf block [])))
(def: .public (set [head tail])
(-> [Block (List Block)] Set)
- (list\mix (: (-> Block Set Set)
+ (list#mix (: (-> Block Set Set)
(function (_ block set)
(..composite (..singleton block) set)))
(..singleton head)
@@ -229,7 +229,7 @@
(Equivalence Set)
(def: (= reference subject)
- (set\= (set.of_list //block.hash (tree.tags (:representation reference)))
+ (set#= (set.of_list //block.hash (tree.tags (:representation reference)))
(set.of_list //block.hash (tree.tags (:representation subject))))))
)
diff --git a/stdlib/source/library/lux/data/trace.lux b/stdlib/source/library/lux/data/trace.lux
index 5fdf1b1c4..8f54f37d3 100644
--- a/stdlib/source/library/lux/data/trace.lux
+++ b/stdlib/source/library/lux/data/trace.lux
@@ -34,8 +34,8 @@
[#monoid monoid
#trace (function (_ t2)
((value@ #trace wa)
- (\ monoid composite t1 t2)))])])))
+ (# monoid composite t1 t2)))])])))
(def: .public (result context tracer)
(All (_ t a) (-> t (Trace t a) a))
- (\ tracer trace context))
+ (# tracer trace context))
diff --git a/stdlib/source/library/lux/debug.lux b/stdlib/source/library/lux/debug.lux
index 6e582e3fa..380bbaa0b 100644
--- a/stdlib/source/library/lux/debug.lux
+++ b/stdlib/source/library/lux/debug.lux
@@ -23,7 +23,7 @@
["[0]" json]]
[collection
["[0]" array]
- ["[0]" list ("[1]\[0]" functor)]
+ ["[0]" list ("[1]#[0]" functor)]
["[0]" dictionary]]]
[macro
["[0]" template]
@@ -136,7 +136,7 @@
(`` (|>> (:as (array.Array Any))
<adaption>
(array.list {.#None})
- (list\each inspection)
+ (list#each inspection)
(text.interposed " ")
(text.enclosed ["[" "]"])))))
@@ -546,9 +546,9 @@
(def: target
(<code>.Parser Target)
(<>.either (<>.and <code>.local_identifier
- (\ <>.monad in {.#None}))
+ (# <>.monad in {.#None}))
(<code>.tuple (<>.and <code>.local_identifier
- (\ <>.monad each (|>> {.#Some}) <code>.any)))))
+ (# <>.monad each (|>> {.#Some}) <code>.any)))))
(exception: .public (unknown_local_binding [name Text])
(exception.report
@@ -572,7 +572,7 @@
{.#End}
(|> environment
dictionary.keys
- (list\each (function (_ local) [local {.#None}]))
+ (list#each (function (_ local) [local {.#None}]))
in)
_
@@ -584,7 +584,7 @@
(in (list (` (..log! ("lux text concat"
(~ (code.text (%.format (%.location location) text.new_line)))
((~! exception.report)
- (~+ (list\each (function (_ [name format])
+ (~+ (list#each (function (_ [name format])
(let [format (case format
{.#None}
(` (~! ..inspection))
diff --git a/stdlib/source/library/lux/documentation.lux b/stdlib/source/library/lux/documentation.lux
index 818f08761..e1a4ffb1a 100644
--- a/stdlib/source/library/lux/documentation.lux
+++ b/stdlib/source/library/lux/documentation.lux
@@ -2,21 +2,21 @@
[library
[lux {"-" [Definition Module type]}
["[0]" meta]
- ["[0]" type ("[1]\[0]" equivalence)]
+ ["[0]" type ("[1]#[0]" equivalence)]
[abstract
[monad {"+" [do]}]
["[0]" enum]]
[control
- ["[0]" maybe ("[1]\[0]" functor)]
+ ["[0]" maybe ("[1]#[0]" functor)]
["[0]" exception {"+" [exception:]}]
- ["<>" parser ("[1]\[0]" monad)
+ ["<>" parser ("[1]#[0]" monad)
["<[0]>" code {"+" [Parser]}]]]
[data
["[0]" product]
- ["[0]" text {"+" [\n]} ("[1]\[0]" order)
+ ["[0]" text {"+" [\n]} ("[1]#[0]" order)
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" monad mix monoid)]
+ ["[0]" list ("[1]#[0]" monad mix monoid)]
["[0]" set {"+" [Set]}]
["[0]" sequence {"+" [Sequence]}]]
[format
@@ -64,8 +64,8 @@
(^template [<tag>]
[[[_ _ column] {<tag> members}]
(|> members
- (list\each reference_column)
- (list\mix n.min column))])
+ (list#each reference_column)
+ (list#mix n.min column))])
([.#Form]
[.#Variant]
[.#Tuple])
@@ -88,10 +88,10 @@
(-> Text Location Nat Code [Location Text])
(case example
[new_location {.#Identifier [module short]}]
- (let [documentation (cond (text\= expected_module module)
+ (let [documentation (cond (text#= expected_module module)
short
- (text\= .prelude_module module)
+ (text#= .prelude_module module)
(format "." short)
... else
@@ -115,7 +115,7 @@
(^template [|<| |>| <tag>]
[[group_location {<tag> members}]
- (let [[group_location' members_documentation] (list\mix (function (_ part [last_location text_accum])
+ (let [[group_location' members_documentation] (list#mix (function (_ part [last_location text_accum])
(let [[member_location member_documentation] (code_documentation expected_module last_location reference_column part)]
[member_location (format text_accum member_documentation)]))
[(revised@ .#column ++ group_location) ""]
@@ -205,13 +205,13 @@
(|> level
--
(enum.range n.enum 0)
- (list\each (|>> (n.+ (++ offset)) parameter_type_name)))))
+ (list#each (|>> (n.+ (++ offset)) parameter_type_name)))))
(def: (nested line_prefix body)
(-> Text Text Text)
(|> body
(text.all_split_by \n)
- (list\each (text.prefix line_prefix))
+ (list#each (text.prefix line_prefix))
(text.interposed \n)))
(def: (%type' level type_function_name nestable? module type)
@@ -219,7 +219,7 @@
(case type
{.#Primitive name params}
(|> params
- (list\each (|>> (%type' level type_function_name false module)
+ (list#each (|>> (%type' level type_function_name false module)
(format " ")))
{.#Item (%.text name)}
text.together
@@ -228,21 +228,21 @@
{.#Sum _}
(|> type
type.flat_variant
- (list\each (%type' level type_function_name false module))
+ (list#each (%type' level type_function_name false module))
(text.interposed " ")
(text.enclosed ["(Or " ")"]))
{.#Product _}
(|> type
type.flat_tuple
- (list\each (%type' level type_function_name false module))
+ (list#each (%type' level type_function_name false module))
(text.interposed " ")
(text.enclosed ["[" "]"]))
{.#Function input output}
(let [[ins out] (type.flat_function type)]
(format "(-> "
- (|> ins (list\each (%type' level type_function_name false module)) (text.interposed " "))
+ (|> ins (list#each (%type' level type_function_name false module)) (text.interposed " "))
" "
(%type' level type_function_name false module out)
")"))
@@ -281,15 +281,15 @@
(let [[type_func type_arguments] (type.flat_application type)]
(format "(" (%type' level type_function_name false module type_func)
" " (|> type_arguments
- (list\each (%type' level type_function_name false module))
+ (list#each (%type' level type_function_name false module))
(text.interposed " "))
")"))
{.#Named [_module _name] type}
- (cond (text\= module _module)
+ (cond (text#= module _module)
_name
- (text\= .prelude_module _module)
+ (text#= .prelude_module _module)
(format "." _name)
... else
@@ -326,7 +326,7 @@
(format "(primitive " (%.text name) ")")
_
- (format "(primitive " (%.text name) " " (|> params (list\each (type_definition' false level arity type_function_info {.#None} module)) (text.interposed " ")) ")"))
+ (format "(primitive " (%.text name) " " (|> params (list#each (type_definition' false level arity type_function_info {.#None} module)) (text.interposed " ")) ")"))
{.#Sum _}
(let [members (type.flat_variant type)]
@@ -334,20 +334,20 @@
{.#End}
(format "(Or "
(|> members
- (list\each (type_definition' false level arity type_function_info {.#None} module))
+ (list#each (type_definition' false level arity type_function_info {.#None} module))
(text.interposed " "))
")")
_
(|> members
(list.zipped/2 tags)
- (list\each (function (_ [t_name type])
+ (list#each (function (_ [t_name type])
(case type
{.#Product _}
(let [types (type.flat_tuple type)]
(format " {" t_name " "
(|> types
- (list\each (type_definition' false level arity type_function_info {.#None} module))
+ (list#each (type_definition' false level arity type_function_info {.#None} module))
(text.interposed " "))
"}"))
@@ -360,12 +360,12 @@
(let [members (type.flat_tuple type)]
(case tags
{.#End}
- (format "[" (|> members (list\each (type_definition' false level arity type_function_info {.#None} module)) (text.interposed " ")) "]")
+ (format "[" (|> members (list#each (type_definition' false level arity type_function_info {.#None} module)) (text.interposed " ")) "]")
_
(|> members
(list.zipped/2 tags)
- (list\each (function (_ [t_name type])
+ (list#each (function (_ [t_name type])
(format t_name " " (type_definition' false level arity type_function_info {.#None} module type))))
(text.interposed (format \n " "))
(text.enclosed [" [" "]"])
@@ -373,7 +373,7 @@
{.#Function input output}
(let [[ins out] (type.flat_function type)]
- (format "(-> " (|> ins (list\each (type_definition' false level arity type_function_info {.#None} module)) (text.interposed " "))
+ (format "(-> " (|> ins (list#each (type_definition' false level arity type_function_info {.#None} module)) (text.interposed " "))
" "
(type_definition' false level arity type_function_info {.#None} module out)
")"))
@@ -410,7 +410,7 @@
(^ {.#Apply (|recursion_dummy|) {.#UnivQ _ body}})
(|> (type_definition' nestable? level arity type_function_info tags module body)
(text.all_split_by \n)
- (list\each (text.prefix " "))
+ (list#each (text.prefix " "))
(text.interposed \n)
(text.enclosed [(format "(Rec " (product.left type_function_info) \n)
")"]))
@@ -419,15 +419,15 @@
(let [[type_func type_arguments] (type.flat_application type)]
(format "(" (type_definition' false level arity type_function_info tags module type_func)
" " (|> type_arguments
- (list\each (type_definition' false level arity type_function_info {.#None} module))
+ (list#each (type_definition' false level arity type_function_info {.#None} module))
(text.interposed " "))
")"))
{.#Named [_module _name] type}
- (cond (text\= module _module)
+ (cond (text#= module _module)
_name
- (text\= .prelude_module _module)
+ (text#= .prelude_module _module)
(format "." _name)
... else
@@ -483,7 +483,7 @@
(def: (example_documentation module example)
(-> Text Example Code)
(|> example
- (list\each (..fragment_documentation module))
+ (list#each (..fragment_documentation module))
(list.interposed ..blank_line)
(text.interposed "")
code.text))
@@ -493,7 +493,7 @@
(def: declaration
(Parser Declaration)
- (<>.either (<>.and ..qualified_identifier (<>\in (list)))
+ (<>.either (<>.and ..qualified_identifier (<>#in (list)))
(<code>.form (<>.and ..qualified_identifier
(<>.some (<code>.local_identifier))))))
@@ -514,22 +514,22 @@
g!name
_
- (` ((~ g!name) (~+ (list\each code.local_identifier parameters))))))))))
+ (` ((~ g!name) (~+ (list#each code.local_identifier parameters))))))))))
... Type
(let [(~ g!type) ("lux in-module"
(~ g!module)
(.:of (~ (code.identifier name))))]
((~! md.code) "clojure"
- (~ (if (type\= .Type def_type)
+ (~ (if (type#= .Type def_type)
(` (|> (~ (code.identifier name))
(:as .Type)
((~! type.anonymous))
((~! ..type_definition)
(~ g!module)
- [(~ (code.text (product.right name))) (list (~+ (list\each code.text parameters)))]
+ [(~ (code.text (product.right name))) (list (~+ (list#each code.text parameters)))]
(.list (~+ (|> tags
(maybe.else (list))
- (list\each (|>> product.right code.text))))))
+ (list#each (|>> product.right code.text))))))
((~! %.format)
((~! ..single_line_comment) ((~! ..type) (~ g!module) (~ g!type)))
<\n>)))
@@ -544,7 +544,7 @@
(in (list (` ($_ ((~! md.then))
((~! ..minimal_definition_documentation)
((~ (code.identifier name))
- (~+ (list\each code.local_identifier parameters))))
+ (~+ (list#each code.local_identifier parameters))))
... Description
(~+ (case description
{.#Some description}
@@ -563,7 +563,7 @@
(list (` (<| ((~! md.code) "clojure")
((~! %.format)
(~+ (|> examples
- (list\each (..example_documentation (product.left name)))
+ (list#each (..example_documentation (product.left name)))
(list.interposed ..example_separator))))))))))
)))))
@@ -585,7 +585,7 @@
(list [..#definition (~ (code.text short))
..#documentation ((~! ..minimal_definition_documentation)
((~ (code.identifier name))
- (~+ (list\each code.local_identifier parameters))))])))))))
+ (~+ (list#each code.local_identifier parameters))))])))))))
(syntax: .public (documentation: [[name parameters] ..declaration
extra (<>.some <code>.any)])
@@ -595,16 +595,16 @@
(.list [..#definition (~ (code.text short))
..#documentation ((~! ..definition_documentation)
((~ (code.identifier name))
- (~+ (list\each code.local_identifier parameters)))
+ (~+ (list#each code.local_identifier parameters)))
(~+ extra))])))))))
(def: definitions_documentation
(-> (List Definition) (Markdown Block))
(|>> (list.sorted (function (_ left right)
- (text\< (value@ #definition right)
+ (text#< (value@ #definition right)
(value@ #definition left))))
- (list\each (value@ #documentation))
- (list\mix md.then md.empty)))
+ (list#each (value@ #documentation))
+ (list#mix md.then md.empty)))
(def: expected_separator
Text
@@ -612,7 +612,7 @@
(def: expected_format
(-> (List Text) Text)
- (list\mix (function (_ short aggregate)
+ (list#mix (function (_ short aggregate)
(case aggregate
"" short
_ (format aggregate ..expected_separator short)))
@@ -634,18 +634,18 @@
..#description (~ description)
..#expected ((~! ..expected)
(~ (code.text (|> expected
- (list\each product.left)
+ (list#each product.left)
..expected_format))))
..#definitions ((~! list.together) (list (~+ definitions)))]
- ($_ (\ (~! list.monoid) (~' composite))
+ ($_ (# (~! list.monoid) (~' composite))
(: (List Module)
- (\ (~! list.monoid) (~' identity)))
+ (# (~! list.monoid) (~' identity)))
(~+ subs)))))))))
(def: listing
(-> (List Text) (Markdown Block))
- (|>> (list.sorted text\<)
- (list\each (function (_ definition)
+ (|>> (list.sorted text#<)
+ (list#each (function (_ definition)
[(md.snippet definition)
{.#None}]))
md.numbered_list))
@@ -672,7 +672,7 @@
... Missing documentation
(case (|> module
(value@ #definitions)
- (list\mix (function (_ definition missing)
+ (list#mix (function (_ definition missing)
(set.lacks (value@ #definition definition) missing))
_#expected)
set.list)
@@ -689,7 +689,7 @@
(list.only (|>> (value@ #definition)
(set.member? _#expected)
not))
- (list\each (value@ #definition)))
+ (list#each (value@ #definition)))
{.#End}
md.empty
@@ -702,8 +702,8 @@
(def: .public documentation
(-> (List Module) Text)
(|>> (list.sorted (function (_ left right)
- (text\< (value@ #module right) (value@ #module left))))
- (list\each ..module_documentation)
+ (text#< (value@ #module right) (value@ #module left))))
+ (list#each ..module_documentation)
(list.interposed md.horizontal_rule)
- (list\mix md.then (: (Markdown Block) md.empty))
+ (list#mix md.then (: (Markdown Block) md.empty))
md.markdown))
diff --git a/stdlib/source/library/lux/extension.lux b/stdlib/source/library/lux/extension.lux
index e7851f2d3..6fc278a48 100644
--- a/stdlib/source/library/lux/extension.lux
+++ b/stdlib/source/library/lux/extension.lux
@@ -4,14 +4,14 @@
[abstract
["[0]" monad]]
[control
- ["<>" parser ("[1]\[0]" monad)
+ ["<>" parser ("[1]#[0]" monad)
["<c>" code {"+" [Parser]}]
["<a>" analysis]
["<s>" synthesis]]]
[data
["[0]" product]
[collection
- ["[0]" list ("[1]\[0]" functor)]]]
+ ["[0]" list ("[1]#[0]" functor)]]]
[macro {"+" [with_identifiers]}
["[0]" code]
[syntax {"+" [syntax:]}]]
@@ -49,7 +49,7 @@
((~! monad.do) (~! <>.monad)
[(~+ inputs)
(~ g!_) <end>]
- (.\ (~! <>.monad) (~' in) (~ body)))
+ (.# (~! <>.monad) (~' in) (~ body)))
(~ g!inputs))
{.#Right (~ g!_)}
(~ g!_)
diff --git a/stdlib/source/library/lux/ffi.js.lux b/stdlib/source/library/lux/ffi.js.lux
index 8230be249..99499826e 100644
--- a/stdlib/source/library/lux/ffi.js.lux
+++ b/stdlib/source/library/lux/ffi.js.lux
@@ -7,14 +7,14 @@
[control
["[0]" io]
["[0]" maybe]
- ["<>" parser ("[1]\[0]" monad)
+ ["<>" parser ("[1]#[0]" monad)
["<[0]>" code {"+" [Parser]}]]]
[data
["[0]" product]
["[0]" text
["%" format]]
[collection
- ["[0]" list ("[1]\[0]" functor)]]]
+ ["[0]" list ("[1]#[0]" functor)]]]
[type
abstract]
[macro {"+" [with_identifiers]}
@@ -131,7 +131,7 @@
(def: input_variables
(-> (List Nullable) (List [Bit Code]))
(|>> list.enumeration
- (list\each (function (_ [idx [nullable? type]])
+ (list#each (function (_ [idx [nullable? type]])
[nullable? (|> idx %.nat code.local_identifier)]))))
(def: (nullable_type [nullable? type])
@@ -182,7 +182,7 @@
(def: class_declaration
(Parser Class_Declaration)
(<>.either (<>.and <code>.local_identifier
- (<>\in (list)))
+ (<>#in (list)))
(<code>.form (<>.and <code>.local_identifier
(<>.some <code>.local_identifier)))))
@@ -222,8 +222,8 @@
(-> Code Code Text (List Nullable) Bit Bit Nullable Code)
(let [g!inputs (input_variables inputsT)]
(` (def: ((~ g!method)
- [(~+ (list\each product.right g!inputs))])
- (-> [(~+ (list\each nullable_type inputsT))]
+ [(~+ (list#each product.right g!inputs))])
+ (-> [(~+ (list#each nullable_type inputsT))]
(~ (|> (nullable_type outputT)
(try_type try?)
(io_type io?))))
@@ -233,7 +233,7 @@
(without_null g!temp outputT)
(` ("js apply"
("js constant" (~ (code.text source)))
- (~+ (list\each (with_null g!temp) g!inputs)))))))))))
+ (~+ (list#each (with_null g!temp) g!inputs)))))))))))
(syntax: .public (import: [import ..import])
(with_identifiers [g!temp g!_]
@@ -246,30 +246,30 @@
(text.replaced "[1]" class_name)
(text.replaced "." member_name)
code.local_identifier)))
- class_parameters (list\each code.local_identifier class_parameters)
+ class_parameters (list#each code.local_identifier class_parameters)
declaration (` ((~ (code.local_identifier class_name))
(~+ class_parameters)))
real_class (text.replaced "/" "." class_name)]
(in (list& (` (type: (~ declaration)
(..Object (primitive (~ (code.text real_class))))))
- (list\each (function (_ member)
+ (list#each (function (_ member)
(case member
{#Constructor inputsT}
(let [g!inputs (input_variables inputsT)]
(` (def: ((~ (qualify "new"))
- [(~+ (list\each product.right g!inputs))])
+ [(~+ (list#each product.right g!inputs))])
(All ((~ g!_) (~+ class_parameters))
- (-> [(~+ (list\each nullable_type inputsT))]
+ (-> [(~+ (list#each nullable_type inputsT))]
(~ declaration)))
(:expected
("js object new"
("js constant" (~ (code.text real_class)))
- [(~+ (list\each (with_null g!temp) g!inputs))])))))
+ [(~+ (list#each (with_null g!temp) g!inputs))])))))
{#Field [static? field fieldT]}
(if static?
(` ((~! syntax:) ((~ (qualify field)) [])
- (\ (~! meta.monad) (~' in)
+ (# (~! meta.monad) (~' in)
(list (` (.:as (~ (nullable_type fieldT))
("js constant" (~ (code.text (%.format real_class "." field))))))))))
(` (def: ((~ (qualify field))
@@ -294,10 +294,10 @@
{#Virtual [method alias inputsT io? try? outputT]}
(let [g!inputs (input_variables inputsT)]
(` (def: ((~ (qualify (maybe.else method alias)))
- [(~+ (list\each product.right g!inputs))]
+ [(~+ (list#each product.right g!inputs))]
(~ g!object))
(All ((~ g!_) (~+ class_parameters))
- (-> [(~+ (list\each nullable_type inputsT))]
+ (-> [(~+ (list#each nullable_type inputsT))]
(~ declaration)
(~ (|> (nullable_type outputT)
(try_type try?)
@@ -309,7 +309,7 @@
(` ("js object do"
(~ (code.text method))
(~ g!object)
- [(~+ (list\each (with_null g!temp) g!inputs))])))))))))))
+ [(~+ (list#each (with_null g!temp) g!inputs))])))))))))))
members)))))
{#Function [name alias inputsT io? try? outputT]}
@@ -348,7 +348,7 @@
(~ g!_)
(..constant (~ type) [(~ (code.local_identifier (%.format head "." next)))
- (~+ (list\each code.local_identifier tail))])))))))))))
+ (~+ (list#each code.local_identifier tail))])))))))))))
(template: (!defined? <constant>)
[(.case (..constant Any <constant>)
diff --git a/stdlib/source/library/lux/ffi.jvm.lux b/stdlib/source/library/lux/ffi.jvm.lux
index c4056320a..eb5eea250 100644
--- a/stdlib/source/library/lux/ffi.jvm.lux
+++ b/stdlib/source/library/lux/ffi.jvm.lux
@@ -1,7 +1,7 @@
(.module:
[library
["[0]" lux {"-" [Type type int char :as]}
- ["[1]_[0]" type ("[1]\[0]" equivalence)]
+ ["[1]_[0]" type ("[1]#[0]" equivalence)]
[abstract
["[0]" monad {"+" [Monad do]}]
["[0]" enum]]
@@ -11,15 +11,15 @@
["[0]" maybe]
["[0]" try {"+" [Try]}]
["[0]" exception {"+" [Exception exception:]}]
- ["<>" parser ("[1]\[0]" monad)
+ ["<>" parser ("[1]#[0]" monad)
["<[0]>" code {"+" [Parser]}]]]
[data
["[0]" product]
- ["[0]" text ("[1]\[0]" equivalence)
+ ["[0]" text ("[1]#[0]" equivalence)
["%" format {"+" [format]}]]
[collection
["[0]" array]
- ["[0]" list ("[1]\[0]" monad mix monoid)]
+ ["[0]" list ("[1]#[0]" monad mix monoid)]
["[0]" dictionary {"+" [Dictionary]}]]]
[macro {"+" [with_identifiers]}
[syntax {"+" [syntax:]}]
@@ -327,32 +327,32 @@
(-> Primitive_Mode (Type Primitive) Code)
(case mode
{#ManualPrM}
- (cond (\ type.equivalence = type.boolean type) (` ..Boolean)
- (\ type.equivalence = type.byte type) (` ..Byte)
- (\ type.equivalence = type.short type) (` ..Short)
- (\ type.equivalence = type.int type) (` ..Integer)
- (\ type.equivalence = type.long type) (` ..Long)
- (\ type.equivalence = type.float type) (` ..Float)
- (\ type.equivalence = type.double type) (` ..Double)
- (\ type.equivalence = type.char type) (` ..Character)
+ (cond (# type.equivalence = type.boolean type) (` ..Boolean)
+ (# type.equivalence = type.byte type) (` ..Byte)
+ (# type.equivalence = type.short type) (` ..Short)
+ (# type.equivalence = type.int type) (` ..Integer)
+ (# type.equivalence = type.long type) (` ..Long)
+ (# type.equivalence = type.float type) (` ..Float)
+ (# type.equivalence = type.double type) (` ..Double)
+ (# type.equivalence = type.char type) (` ..Character)
... else
(undefined))
{#AutoPrM}
- (cond (\ type.equivalence = type.boolean type)
+ (cond (# type.equivalence = type.boolean type)
(` .Bit)
- (or (\ type.equivalence = type.short type)
- (\ type.equivalence = type.byte type)
- (\ type.equivalence = type.int type)
- (\ type.equivalence = type.long type))
+ (or (# type.equivalence = type.short type)
+ (# type.equivalence = type.byte type)
+ (# type.equivalence = type.int type)
+ (# type.equivalence = type.long type))
(` .Int)
- (or (\ type.equivalence = type.float type)
- (\ type.equivalence = type.double type))
+ (or (# type.equivalence = type.float type)
+ (# type.equivalence = type.double type))
(` .Frac)
- (\ type.equivalence = type.char type)
+ (# type.equivalence = type.char type)
(` .Nat)
... else
@@ -373,7 +373,7 @@
[parser.upper? limit (parameter_type limit)]
[parser.class? [name parameters]
(` (.primitive (~ (code.text name))
- [(~+ (list\each parameter_type parameters))]))]))
+ [(~+ (list#each parameter_type parameters))]))]))
... else
(undefined)
)))
@@ -434,7 +434,7 @@
(case (f input)
(^template [<tag>]
[[meta {<tag> parts}]
- [meta {<tag> (list\each (replaced f) parts)}]])
+ [meta {<tag> (list#each (replaced f) parts)}]])
([.#Form]
[.#Variant]
[.#Tuple])
@@ -474,8 +474,8 @@
(<code>.tuple (<>.exactly (list.size arguments) <code>.any)))))]
(in (` ("jvm member invoke constructor" (~ (code.text class_name))
(~+ (|> args
- (list.zipped/2 (list\each product.right arguments))
- (list\each ..decorate_input))))))))
+ (list.zipped/2 (list#each product.right arguments))
+ (list#each ..decorate_input))))))))
(def: (static_method_parser class_name method_name arguments)
(-> Text Text (List Argument) (Parser Code))
@@ -486,8 +486,8 @@
(<code>.tuple (<>.exactly (list.size arguments) <code>.any)))))]
(in (` ("jvm member invoke static" (~ (code.text class_name)) (~ (code.text method_name))
(~+ (|> args
- (list.zipped/2 (list\each product.right arguments))
- (list\each ..decorate_input))))))))
+ (list.zipped/2 (list#each product.right arguments))
+ (list#each ..decorate_input))))))))
(template [<name> <jvm_op>]
[(def: (<name> class_name method_name arguments self_name)
@@ -500,8 +500,8 @@
(in (` (<jvm_op> (~ (code.text class_name)) (~ (code.text method_name))
(~ (code.local_identifier self_name))
(~+ (|> args
- (list.zipped/2 (list\each product.right arguments))
- (list\each ..decorate_input))))))))]
+ (list.zipped/2 (list#each product.right arguments))
+ (list#each ..decorate_input))))))))]
[special_method_parser "jvm member invoke special"]
[virtual_method_parser "jvm member invoke virtual"]
@@ -568,7 +568,7 @@
(not (text.contains? name.external_separator name)))
_ (..assertion ..class_name_cannot_be_a_type_variable [name type_vars]
(not (list.member? text.equivalence
- (list\each parser.name type_vars)
+ (list#each parser.name type_vars)
name)))]
(in name)))
@@ -579,7 +579,7 @@
[.let [class_name^ (..valid_class_name type_vars)]
[name parameters] (: (Parser [External (List (Type Parameter))])
($_ <>.either
- (<>.and class_name^ (<>\in (list)))
+ (<>.and class_name^ (<>#in (list)))
(<code>.form (<>.and class_name^ (<>.some (parameter^ type_vars))))))]
(in (type.class (name.safe name) parameters))))
@@ -594,7 +594,7 @@
(do <>.monad
[name <code>.local_identifier
_ (..assertion ..unexpected_type_variable [name type_vars]
- (list.member? text.equivalence (list\each parser.name type_vars) name))]
+ (list.member? text.equivalence (list#each parser.name type_vars) name))]
(in (type.var name))))
(def: wildcard^
@@ -609,7 +609,7 @@
(|>> (<>.after (<code>.this! (' <comparison>)))
(<>.after ..wildcard^)
<code>.tuple
- (\ <>.monad each <constructor>)))]
+ (# <>.monad each <constructor>)))]
[upper^ < type.upper]
[lower^ > type.lower]
@@ -652,7 +652,7 @@
(def: array^
(-> (Parser (Type Value)) (Parser (Type Array)))
(|>> <code>.tuple
- (\ <>.monad each type.array)))
+ (# <>.monad each type.array)))
(def: (type^ type_vars)
(-> (List (Type Var)) (Parser (Type Value)))
@@ -677,7 +677,7 @@
(def: var^
(Parser (Type Var))
- (\ <>.monad each type.var <code>.local_identifier))
+ (# <>.monad each type.var <code>.local_identifier))
(def: vars^
(Parser (List (Type Var)))
@@ -688,7 +688,7 @@
(do <>.monad
[[name variables] (: (Parser [External (List (Type Var))])
(<>.either (<>.and (..valid_class_name (list))
- (<>\in (list)))
+ (<>#in (list)))
(<code>.form (<>.and (..valid_class_name (list))
(<>.some var^)))
))]
@@ -728,7 +728,7 @@
(-> (List (Type Var)) (Parser [Member_Declaration MethodDecl]))
(<code>.form (do <>.monad
[tvars (<>.else (list) ..vars^)
- .let [total_vars (list\composite tvars type_vars)]
+ .let [total_vars (list#composite tvars type_vars)]
name <code>.local_identifier
anns ..annotations^
inputs (<code>.tuple (<>.some (..type^ total_vars)))
@@ -744,7 +744,7 @@
($_ <>.or
(<code>.this! (' "volatile"))
(<code>.this! (' "final"))
- (\ <>.monad in [])))
+ (# <>.monad in [])))
(def: (field_decl^ type_vars)
(-> (List (Type Var)) (Parser [Member_Declaration FieldDecl]))
@@ -786,7 +786,7 @@
[pm privacy_modifier^
strict_fp? (<>.parses? (<code>.this! (' "strict")))
method_vars (<>.else (list) ..vars^)
- .let [total_vars (list\composite class_vars method_vars)]
+ .let [total_vars (list#composite class_vars method_vars)]
[_ self_name arguments] (<code>.form ($_ <>.and
(<code>.this! (' new))
<code>.local_identifier
@@ -807,7 +807,7 @@
strict_fp? (<>.parses? (<code>.this! (' "strict")))
final? (<>.parses? (<code>.this! (' "final")))
method_vars (<>.else (list) ..vars^)
- .let [total_vars (list\composite class_vars method_vars)]
+ .let [total_vars (list#composite class_vars method_vars)]
[name self_name arguments] (<code>.form ($_ <>.and
<code>.local_identifier
<code>.local_identifier
@@ -827,7 +827,7 @@
[strict_fp? (<>.parses? (<code>.this! (' "strict")))
owner_class ..declaration^
method_vars (<>.else (list) ..vars^)
- .let [total_vars (list\composite (product.right (parser.declaration owner_class))
+ .let [total_vars (list#composite (product.right (parser.declaration owner_class))
method_vars)]
[name self_name arguments] (<code>.form ($_ <>.and
<code>.local_identifier
@@ -943,7 +943,7 @@
[tvars (<>.else (list) ..vars^)
_ (<code>.identifier! ["" "new"])
?alias import_member_alias^
- .let [total_vars (list\composite owner_vars tvars)]
+ .let [total_vars (list#composite owner_vars tvars)]
?prim_mode (<>.maybe primitive_mode^)
args (..import_member_args^ total_vars)
[io? try? maybe?] import_member_return_flags^]
@@ -964,7 +964,7 @@
tvars (<>.else (list) ..vars^)
name <code>.local_identifier
?alias import_member_alias^
- .let [total_vars (list\composite owner_vars tvars)]
+ .let [total_vars (list#composite owner_vars tvars)]
?prim_mode (<>.maybe primitive_mode^)
args (..import_member_args^ total_vars)
[io? try? maybe?] import_member_return_flags^
@@ -1022,7 +1022,7 @@
(def: (annotation$ [name params])
(-> Annotation Code)
- (` ((~ (code.text name)) (~+ (list\each annotation_parameter$ params)))))
+ (` ((~ (code.text name)) (~+ (list#each annotation_parameter$ params)))))
(template [<name> <category>]
[(def: <name>
@@ -1045,10 +1045,10 @@
(-> [Member_Declaration MethodDecl] Code)
(let [(^slots [#method_tvars #method_inputs #method_output #method_exs]) method_decl]
(` ((~ (code.text name))
- [(~+ (list\each annotation$ anns))]
- [(~+ (list\each var$ #method_tvars))]
- [(~+ (list\each class$ #method_exs))]
- [(~+ (list\each value$ #method_inputs))]
+ [(~+ (list#each annotation$ anns))]
+ [(~+ (list#each var$ #method_tvars))]
+ [(~+ (list#each class$ #method_exs))]
+ [(~+ (list#each value$ #method_inputs))]
(~ (return$ #method_output))))))
(def: (state_modifier$ sm)
@@ -1063,7 +1063,7 @@
(case field
{#ConstantField class value}
(` ("constant" (~ (code.text name))
- [(~+ (list\each annotation$ anns))]
+ [(~+ (list#each annotation$ anns))]
(~ (value$ class))
(~ value)
))
@@ -1072,7 +1072,7 @@
(` ("variable" (~ (code.text name))
(~ (privacy_modifier$ pm))
(~ (state_modifier$ sm))
- [(~+ (list\each annotation$ anns))]
+ [(~+ (list#each annotation$ anns))]
(~ (value$ class))
))
))
@@ -1089,41 +1089,41 @@
(-> External (Parser Code) (Type Class) (List [Member_Declaration FieldDecl]) [Member_Declaration Method_Definition] Code)
(case method_def
{#ConstructorMethod strict_fp? type_vars self_name arguments constructor_args body exs}
- (let [replacer (|> (list\each (field->parser fully_qualified_class_name self_name) fields)
- (list\mix <>.either method_parser)
+ (let [replacer (|> (list#each (field->parser fully_qualified_class_name self_name) fields)
+ (list#mix <>.either method_parser)
parser->replacer)]
(` ("init"
(~ (privacy_modifier$ pm))
(~ (code.bit strict_fp?))
- [(~+ (list\each annotation$ anns))]
- [(~+ (list\each var$ type_vars))]
- [(~+ (list\each class$ exs))]
+ [(~+ (list#each annotation$ anns))]
+ [(~+ (list#each var$ type_vars))]
+ [(~+ (list#each class$ exs))]
(~ (code.text self_name))
- [(~+ (list\each argument$ arguments))]
- [(~+ (list\each constructor_arg$ constructor_args))]
+ [(~+ (list#each argument$ arguments))]
+ [(~+ (list#each constructor_arg$ constructor_args))]
(~ (replaced replacer body))
)))
{#VirtualMethod final? strict_fp? type_vars self_name arguments return_type body exs}
- (let [replacer (|> (list\each (field->parser fully_qualified_class_name self_name) fields)
- (list\mix <>.either method_parser)
+ (let [replacer (|> (list#each (field->parser fully_qualified_class_name self_name) fields)
+ (list#mix <>.either method_parser)
parser->replacer)]
(` ("virtual"
(~ (code.text name))
(~ (privacy_modifier$ pm))
(~ (code.bit final?))
(~ (code.bit strict_fp?))
- [(~+ (list\each annotation$ anns))]
- [(~+ (list\each var$ type_vars))]
+ [(~+ (list#each annotation$ anns))]
+ [(~+ (list#each var$ type_vars))]
(~ (code.text self_name))
- [(~+ (list\each argument$ arguments))]
+ [(~+ (list#each argument$ arguments))]
(~ (return$ return_type))
- [(~+ (list\each class$ exs))]
+ [(~+ (list#each class$ exs))]
(~ (replaced replacer body)))))
{#OverridenMethod strict_fp? declaration type_vars self_name arguments return_type body exs}
- (let [replacer (|> (list\each (field->parser fully_qualified_class_name self_name) fields)
- (list\mix <>.either method_parser)
+ (let [replacer (|> (list#each (field->parser fully_qualified_class_name self_name) fields)
+ (list#mix <>.either method_parser)
parser->replacer)
super_replacer (parser->replacer (<code>.form (do <>.monad
[_ (<code>.this! (' ::super!))
@@ -1133,18 +1133,18 @@
(~ (code.text name))
(~ (code.local_identifier self_name))
(~+ (|> args
- (list.zipped/2 (list\each product.right arguments))
- (list\each ..decorate_input)))))))))]
+ (list.zipped/2 (list#each product.right arguments))
+ (list#each ..decorate_input)))))))))]
(` ("override"
(~ (declaration$ declaration))
(~ (code.text name))
(~ (code.bit strict_fp?))
- [(~+ (list\each annotation$ anns))]
- [(~+ (list\each var$ type_vars))]
+ [(~+ (list#each annotation$ anns))]
+ [(~+ (list#each var$ type_vars))]
(~ (code.text self_name))
- [(~+ (list\each argument$ arguments))]
+ [(~+ (list#each argument$ arguments))]
(~ (return$ return_type))
- [(~+ (list\each class$ exs))]
+ [(~+ (list#each class$ exs))]
(~ (|> body
(replaced replacer)
(replaced super_replacer)))
@@ -1156,31 +1156,31 @@
(~ (code.text name))
(~ (privacy_modifier$ pm))
(~ (code.bit strict_fp?))
- [(~+ (list\each annotation$ anns))]
- [(~+ (list\each var$ type_vars))]
- [(~+ (list\each argument$ arguments))]
+ [(~+ (list#each annotation$ anns))]
+ [(~+ (list#each var$ type_vars))]
+ [(~+ (list#each argument$ arguments))]
(~ (return$ return_type))
- [(~+ (list\each class$ exs))]
+ [(~+ (list#each class$ exs))]
(~ (replaced replacer body)))))
{#AbstractMethod type_vars arguments return_type exs}
(` ("abstract"
(~ (code.text name))
(~ (privacy_modifier$ pm))
- [(~+ (list\each annotation$ anns))]
- [(~+ (list\each var$ type_vars))]
- [(~+ (list\each argument$ arguments))]
+ [(~+ (list#each annotation$ anns))]
+ [(~+ (list#each var$ type_vars))]
+ [(~+ (list#each argument$ arguments))]
(~ (return$ return_type))
- [(~+ (list\each class$ exs))]))
+ [(~+ (list#each class$ exs))]))
{#NativeMethod type_vars arguments return_type exs}
(` ("native"
(~ (code.text name))
(~ (privacy_modifier$ pm))
- [(~+ (list\each annotation$ anns))]
- [(~+ (list\each var$ type_vars))]
- [(~+ (list\each class$ exs))]
- [(~+ (list\each argument$ arguments))]
+ [(~+ (list#each annotation$ anns))]
+ [(~+ (list#each var$ type_vars))]
+ [(~+ (list#each class$ exs))]
+ [(~+ (list#each argument$ arguments))]
(~ (return$ return_type))))
))
@@ -1194,7 +1194,7 @@
(syntax: .public (class: [.let [! <>.monad]
im inheritance_modifier^
- [full_class_name class_vars] (\ ! each parser.declaration ..declaration^)
+ [full_class_name class_vars] (# ! each parser.declaration ..declaration^)
super (<>.else $Object
(class^ class_vars))
interfaces (<>.else (list)
@@ -1206,28 +1206,28 @@
[.let [fully_qualified_class_name full_class_name
method_parser (: (Parser Code)
(|> methods
- (list\each (method->parser fully_qualified_class_name))
- (list\mix <>.either (<>.failure ""))))]]
+ (list#each (method->parser fully_qualified_class_name))
+ (list#mix <>.either (<>.failure ""))))]]
(in (list (` ("jvm class"
(~ (declaration$ (type.declaration full_class_name class_vars)))
(~ (class$ super))
- [(~+ (list\each class$ interfaces))]
+ [(~+ (list#each class$ interfaces))]
(~ (inheritance_modifier$ im))
- [(~+ (list\each annotation$ annotations))]
- [(~+ (list\each field_decl$ fields))]
- [(~+ (list\each (method_def$ fully_qualified_class_name method_parser super fields) methods))]))))))
+ [(~+ (list#each annotation$ annotations))]
+ [(~+ (list#each field_decl$ fields))]
+ [(~+ (list#each (method_def$ fully_qualified_class_name method_parser super fields) methods))]))))))
(syntax: .public (interface: [.let [! <>.monad]
- [full_class_name class_vars] (\ ! each parser.declaration ..declaration^)
+ [full_class_name class_vars] (# ! each parser.declaration ..declaration^)
supers (<>.else (list)
(<code>.tuple (<>.some (class^ class_vars))))
annotations ..annotations^
members (<>.some (..method_decl^ class_vars))])
(in (list (` ("jvm class interface"
(~ (declaration$ (type.declaration full_class_name class_vars)))
- [(~+ (list\each class$ supers))]
- [(~+ (list\each annotation$ annotations))]
- (~+ (list\each method_decl$ members)))))))
+ [(~+ (list#each class$ supers))]
+ [(~+ (list#each annotation$ annotations))]
+ (~+ (list#each method_decl$ members)))))))
(syntax: .public (object [class_vars ..vars^
super (<>.else $Object
@@ -1237,11 +1237,11 @@
constructor_args (..constructor_args^ class_vars)
methods (<>.some ..overriden_method_def^)])
(in (list (` ("jvm class anonymous"
- [(~+ (list\each var$ class_vars))]
+ [(~+ (list#each var$ class_vars))]
(~ (class$ super))
- [(~+ (list\each class$ interfaces))]
- [(~+ (list\each constructor_arg$ constructor_args))]
- [(~+ (list\each (method_def$ "" (<>.failure "") super (list)) methods))])))))
+ [(~+ (list#each class$ interfaces))]
+ [(~+ (list#each constructor_arg$ constructor_args))]
+ [(~+ (list#each (method_def$ "" (<>.failure "") super (list)) methods))])))))
(syntax: .public (null [])
(in (list (` ("jvm object null")))))
@@ -1296,14 +1296,14 @@
methods (<>.some partial_call^)])
(with_identifiers [g!obj]
(in (list (` (let [(~ g!obj) (~ obj)]
- (exec (~+ (list\each (complete_call$ g!obj) methods))
+ (exec (~+ (list#each (complete_call$ g!obj) methods))
(~ g!obj))))))))
(def: (class_import$ declaration)
(-> (Type Declaration) Code)
(let [[full_name params] (parser.declaration declaration)
def_name (..internal full_name)
- params' (list\each ..var$' params)]
+ params' (list#each ..var$' params)]
(template.with_locals [g!_]
(` (def: (~ (code.identifier ["" def_name]))
.Type
@@ -1315,7 +1315,7 @@
(-> (List (Type Var)) Import_Member_Declaration (List (Type Var)))
(case member
{#ConstructorDecl [commons _]}
- (list\composite class_tvars (value@ #import_member_tvars commons))
+ (list#composite class_tvars (value@ #import_member_tvars commons))
{#MethodDecl [commons _]}
(case (value@ #import_member_kind commons)
@@ -1323,7 +1323,7 @@
(value@ #import_member_tvars commons)
_
- (list\composite class_tvars (value@ #import_member_tvars commons)))
+ (list#composite class_tvars (value@ #import_member_tvars commons)))
_
class_tvars))
@@ -1340,8 +1340,8 @@
(with_identifiers [arg_name]
(in [maybe? arg_name]))))
#import_member_args)
- .let [input_jvm_types (list\each product.right #import_member_args)
- arg_types (list\each (: (-> [Bit (Type Value)] Code)
+ .let [input_jvm_types (list#each product.right #import_member_args)
+ arg_types (list#each (: (-> [Bit (Type Value)] Code)
(function (_ [maybe? arg])
(let [arg_type (value_type (value@ #import_member_mode commons) arg)]
(if maybe?
@@ -1351,7 +1351,7 @@
(in [arg_inputs input_jvm_types arg_types])))
_
- (\ meta.monad in [(list) (list) (list)])))
+ (# meta.monad in [(list) (list) (list)])))
(def: (with_return_maybe member never_null? unboxed return_term)
(-> Import_Member_Declaration Bit (Type Value) Code Code)
@@ -1405,7 +1405,7 @@
{#AutoPrM}
(with_expansions [<special+>' (template.spliced <special+>)
<cond_cases> (template [<old> <new> <pre> <post>]
- [(\ type.equivalence = <old> unboxed)
+ [(# type.equivalence = <old> unboxed)
(with_expansions [<post>' (template.spliced <post>)]
[<new>
(` (.|> (~ raw) (~+ <pre>)))
@@ -1466,7 +1466,7 @@
(-> Primitive_Mode (List (Type Value)) (List [Bit Code]) (List Code))
(|> inputs
(list.zipped/2 classes)
- (list\each (function (_ [class [maybe? input]])
+ (list#each (function (_ [class [maybe? input]])
(|> (if maybe?
(` (: (.primitive (~ (code.text (..reflection class))))
((~! !!!) (~ (..un_quoted input)))))
@@ -1482,9 +1482,9 @@
(def: syntax_inputs
(-> (List Code) (List Code))
- (|>> (list\each (function (_ name)
+ (|>> (list#each (function (_ name)
(list name (` (~! <code>.any)))))
- list\conjoint))
+ list#conjoint))
(def: (member_def_interop vars kind class [arg_function_inputs input_jvm_types arg_types] member method_prefix import_format)
(-> (List (Type Var)) Class_Kind (Type Declaration) [(List [Bit Code]) (List (Type Value)) (List Code)] Import_Member_Declaration Text Text (Meta (List Code)))
@@ -1499,7 +1499,7 @@
(` (primitive (~ (code.text full_name))))
_
- (let [=class_tvars (list\each ..var$' class_tvars)]
+ (let [=class_tvars (list#each ..var$' class_tvars)]
(` (All ((~ g!_) (~+ =class_tvars)) (primitive (~ (code.text full_name)) [(~+ =class_tvars)]))))))
getter_interop (: (-> Text Code)
(function (_ name)
@@ -1507,7 +1507,7 @@
(` (def: (~ getter_name)
(~ enum_type)
(~ (get_static_field full_name name)))))))]]
- (in (list\each getter_interop enum_members))))
+ (in (list#each getter_interop enum_members))))
{#ConstructorDecl [commons _]}
(do meta.monad
@@ -1515,17 +1515,17 @@
def_name (code.identifier ["" (..import_name import_format method_prefix (value@ #import_member_alias commons))])
jvm_interop (|> [classT
(` ("jvm member invoke constructor"
- [(~+ (list\each ..var$ class_tvars))]
+ [(~+ (list#each ..var$ class_tvars))]
(~ (code.text full_name))
- [(~+ (list\each ..var$ (value@ #import_member_tvars commons)))]
+ [(~+ (list#each ..var$ (value@ #import_member_tvars commons)))]
(~+ (|> (jvm_invoke_inputs (value@ #import_member_mode commons) input_jvm_types arg_function_inputs)
(list.zipped/2 input_jvm_types)
- (list\each ..decorate_input)))))]
+ (list#each ..decorate_input)))))]
(with_automatic_output_conversion (value@ #import_member_mode commons))
(with_return_maybe member true classT)
(with_return_try member)
(with_return_io member))]]
- (in (list (` ((~! syntax:) ((~ def_name) [(~+ (syntax_inputs (list\each product.right arg_function_inputs)))])
+ (in (list (` ((~! syntax:) ((~ def_name) [(~+ (syntax_inputs (list#each product.right arg_function_inputs)))])
((~' in) (.list (.` (~ jvm_interop)))))))))
{#MethodDecl [commons method]}
@@ -1553,17 +1553,17 @@
method_return (value@ #import_method_return method)
callC (: Code
(` ((~ (code.text jvm_op))
- [(~+ (list\each ..var$ class_tvars))]
+ [(~+ (list#each ..var$ class_tvars))]
(~ (code.text full_name))
(~ (code.text #import_method_name))
- [(~+ (list\each ..var$ (value@ #import_member_tvars commons)))]
+ [(~+ (list#each ..var$ (value@ #import_member_tvars commons)))]
(~+ (|> object_ast
- (list\each ..un_quoted)
+ (list#each ..un_quoted)
(list.zipped/2 (list (type.class full_name (list))))
- (list\each (with_automatic_input_conversion (value@ #import_member_mode commons)))))
+ (list#each (with_automatic_input_conversion (value@ #import_member_mode commons)))))
(~+ (|> (jvm_invoke_inputs (value@ #import_member_mode commons) input_jvm_types arg_function_inputs)
(list.zipped/2 input_jvm_types)
- (list\each ..decorate_input))))))
+ (list#each ..decorate_input))))))
jvm_interop (: Code
(case (type.void? method_return)
{.#Left method_return}
@@ -1579,7 +1579,7 @@
(|> callC
(with_return_try member)
(with_return_io member))))]]
- (in (list (` ((~! syntax:) ((~ def_name) [(~+ (syntax_inputs (list\each product.right arg_function_inputs)))
+ (in (list (` ((~! syntax:) ((~ def_name) [(~+ (syntax_inputs (list#each product.right arg_function_inputs)))
(~+ (syntax_inputs object_ast))])
((~' in) (.list (.` (~ jvm_interop))))))))))
@@ -1656,7 +1656,7 @@
(let [[class_name _] (parser.declaration declaration)]
(case (load_class class_name)
{.#Right class}
- (\ meta.monad in (if (interface? class)
+ (# meta.monad in (if (interface? class)
{#Interface}
{#Class}))
@@ -1669,11 +1669,11 @@
(do [! meta.monad]
[kind (class_kind declaration)
=members (|> bundles
- (list\each (function (_ [import_format members])
- (list\each (|>> [import_format]) members)))
+ (list#each (function (_ [import_format members])
+ (list#each (|>> [import_format]) members)))
list.together
(monad.each ! (member_import$ class_type_vars kind declaration)))]
- (in (list& (class_import$ declaration) (list\conjoint =members)))))
+ (in (list& (class_import$ declaration) (list#conjoint =members)))))
(syntax: .public (array [type (..type^ (list))
size <code>.any])
@@ -1683,7 +1683,7 @@
"jvm object cast"
"jvm conversion long-to-int"))]
(`` (cond (~~ (template [<primitive> <array_op>]
- [(\ type.equivalence = <primitive> type)
+ [(# type.equivalence = <primitive> type)
(in (list (` (<array_op> (~ g!size)))))]
[type.boolean "jvm array new boolean"]
@@ -1705,15 +1705,15 @@
(with_expansions [<failure> (as_is (meta.failure (exception.error ..cannot_convert_to_jvm_type [type])))]
(def: (lux_type->jvm_type type)
(-> .Type (Meta (Type Value)))
- (if (lux_type\= .Any type)
- (\ meta.monad in $Object)
+ (if (lux_type#= .Any type)
+ (# meta.monad in $Object)
(case type
{.#Primitive name params}
(`` (cond (~~ (template [<type>]
- [(text\= (..reflection <type>) name)
+ [(text#= (..reflection <type>) name)
(case params
{.#End}
- (\ meta.monad in <type>)
+ (# meta.monad in <type>)
_
<failure>)]
@@ -1728,10 +1728,10 @@
[type.char]))
(~~ (template [<type>]
- [(text\= (..reflection (type.array <type>)) name)
+ [(text#= (..reflection (type.array <type>)) name)
(case params
{.#End}
- (\ meta.monad in (type.array <type>))
+ (# meta.monad in (type.array <type>))
_
<failure>)]
@@ -1745,10 +1745,10 @@
[type.double]
[type.char]))
- (text\= array.type_name name)
+ (text#= array.type_name name)
(case params
{.#Item elementLT {.#End}}
- (\ meta.monad each type.array
+ (# meta.monad each type.array
(lux_type->jvm_type elementLT))
_
@@ -1758,14 +1758,14 @@
(case params
{.#End}
(let [[_ unprefixed] (maybe.trusted (text.split_by descriptor.array_prefix name))]
- (\ meta.monad each type.array
+ (# meta.monad each type.array
(lux_type->jvm_type {.#Primitive unprefixed (list)})))
_
<failure>)
... else
- (\ meta.monad each (type.class name)
+ (# meta.monad each (type.class name)
(: (Meta (List (Type Parameter)))
(monad.each meta.monad
(function (_ paramLT)
@@ -1800,7 +1800,7 @@
[array_type (meta.type array_name)
array_jvm_type (lux_type->jvm_type array_type)
.let [g!extension (code.text (`` (cond (~~ (template [<primitive> <extension>]
- [(\ type.equivalence =
+ [(# type.equivalence =
(type.array <primitive>)
array_jvm_type)
<extension>]
@@ -1840,7 +1840,7 @@
"jvm object cast"
"jvm conversion long-to-int"))]]
(`` (cond (~~ (template [<primitive> <extension> <box>]
- [(\ type.equivalence =
+ [(# type.equivalence =
(type.array <primitive>)
array_jvm_type)
(in (list (` (.|> (<extension> (~ g!idx) (~ array))
@@ -1878,7 +1878,7 @@
"jvm object cast"
"jvm conversion long-to-int"))]]
(`` (cond (~~ (template [<primitive> <extension> <box>]
- [(\ type.equivalence =
+ [(# type.equivalence =
(type.array <primitive>)
array_jvm_type)
(let [g!value (` (.|> (~ value)
diff --git a/stdlib/source/library/lux/ffi.lua.lux b/stdlib/source/library/lux/ffi.lua.lux
index bfe88282e..de47621b5 100644
--- a/stdlib/source/library/lux/ffi.lua.lux
+++ b/stdlib/source/library/lux/ffi.lua.lux
@@ -8,14 +8,14 @@
[control
["[0]" io]
["[0]" maybe]
- ["<>" parser ("[1]\[0]" monad)
+ ["<>" parser ("[1]#[0]" monad)
["<[0]>" code {"+" [Parser]}]]]
[data
["[0]" product]
["[0]" text
["%" format]]
[collection
- ["[0]" list ("[1]\[0]" functor mix)]]]
+ ["[0]" list ("[1]#[0]" functor mix)]]]
[type
abstract]
[macro {"+" [with_identifiers]}
@@ -73,7 +73,7 @@
(def: constant
(Parser Field)
(<code>.form ($_ <>.and
- (<>\in true)
+ (<>#in true)
<code>.local_identifier
..nilable)))
@@ -127,7 +127,7 @@
(def: input_variables
(-> (List Nilable) (List [Bit Code]))
(|>> list.enumeration
- (list\each (function (_ [idx [nilable? type]])
+ (list#each (function (_ [idx [nilable? type]])
[nilable? (|> idx %.nat code.local_identifier)]))))
(def: (nilable_type [nilable? type])
@@ -203,8 +203,8 @@
(-> Code Code Code (List Nilable) Bit Bit Nilable Code)
(let [g!inputs (input_variables inputsT)]
(` (def: ((~ g!method)
- [(~+ (list\each product.right g!inputs))])
- (-> [(~+ (list\each nilable_type inputsT))]
+ [(~+ (list#each product.right g!inputs))])
+ (-> [(~+ (list#each nilable_type inputsT))]
(~ (|> (nilable_type outputT)
(try_type try?)
(io_type io?))))
@@ -214,7 +214,7 @@
(without_nil g!temp outputT)
(` ("lua apply"
(:as ..Function (~ source))
- (~+ (list\each (with_nil g!temp) g!inputs)))))))))))
+ (~+ (list#each (with_nil g!temp) g!inputs)))))))))))
(syntax: .public (import: [import ..import])
... {.#doc (example "Easily import types, methods, functions and constants."
@@ -233,7 +233,7 @@
real_class (text.replaced "/" "." class)
imported (case (text.all_split_by "/" class)
{.#Item head tail}
- (list\mix (function (_ sub super)
+ (list#mix (function (_ sub super)
(` ("lua object get" (~ (code.text sub))
(:as (..Object .Any) (~ super)))))
(` ("lua import" (~ (code.text head))))
@@ -243,12 +243,12 @@
(` ("lua import" (~ (code.text class)))))]
(in (list& (` (type: (~ g!type)
(..Object (primitive (~ (code.text real_class))))))
- (list\each (function (_ member)
+ (list#each (function (_ member)
(case member
{#Field [static? field fieldT]}
(if static?
(` ((~! syntax:) ((~ (qualify field)) [])
- (\ (~! meta.monad) (~' in)
+ (# (~! meta.monad) (~' in)
(list (` (.:as (~ (nilable_type fieldT))
("lua object get" (~ (code.text field))
(:as (..Object .Any) (~ imported)))))))))
@@ -275,9 +275,9 @@
{#Virtual [method alias inputsT io? try? outputT]}
(let [g!inputs (input_variables inputsT)]
(` (def: ((~ (qualify (maybe.else method alias)))
- [(~+ (list\each product.right g!inputs))]
+ [(~+ (list#each product.right g!inputs))]
(~ g!object))
- (-> [(~+ (list\each nilable_type inputsT))]
+ (-> [(~+ (list#each nilable_type inputsT))]
(~ g!type)
(~ (|> (nilable_type outputT)
(try_type try?)
@@ -289,7 +289,7 @@
(` ("lua object do"
(~ (code.text method))
(~ g!object)
- (~+ (list\each (with_nil g!temp) g!inputs)))))))))))))
+ (~+ (list#each (with_nil g!temp) g!inputs)))))))))))))
members)))))
{#Function [name alias inputsT io? try? outputT]}
@@ -303,7 +303,7 @@
{#Constant [_ name fieldT]}
(in (list (` ((~! syntax:) ((~ (code.local_identifier name)) [])
- (\ (~! meta.monad) (~' in)
+ (# (~! meta.monad) (~' in)
(list (` (.:as (~ (nilable_type fieldT))
("lua constant" (~ (code.text (text.replaced "/" "." name))))))))))))
)))
diff --git a/stdlib/source/library/lux/ffi.old.lux b/stdlib/source/library/lux/ffi.old.lux
index f54bd2b6b..6e9d50442 100644
--- a/stdlib/source/library/lux/ffi.old.lux
+++ b/stdlib/source/library/lux/ffi.old.lux
@@ -1,7 +1,7 @@
(.module:
[library
[lux {"-" [type]}
- ["[0]" type ("[1]\[0]" equivalence)]
+ ["[0]" type ("[1]#[0]" equivalence)]
[abstract
["[0]" monad {"+" [Monad do]}]
["[0]" enum]]
@@ -14,12 +14,12 @@
["<[0]>" code {"+" [Parser]}]]]
[data
["[0]" product]
- ["[0]" bit ("[1]\[0]" codec)]
- ["[0]" text ("[1]\[0]" equivalence monoid)
+ ["[0]" bit ("[1]#[0]" codec)]
+ ["[0]" text ("[1]#[0]" equivalence monoid)
["%" format {"+" [format]}]]
[collection
["[0]" array {"+" [Array]}]
- ["[0]" list ("[1]\[0]" monad mix monoid)]]]
+ ["[0]" list ("[1]#[0]" monad mix monoid)]]]
["[0]" macro {"+" [with_identifiers]}
[syntax {"+" [syntax:]}]
["[0]" code]
@@ -310,7 +310,7 @@
[[name params] _ _]
(let [name (safe name)
- =params (list\each (class_type' mode type_params in_array?) params)]
+ =params (list#each (class_type' mode type_params in_array?) params)]
(` (primitive (~ (code.text name)) [(~+ =params)])))))
(def: (class_type' mode type_params in_array? class)
@@ -318,7 +318,7 @@
(case class
{#GenericTypeVar name}
(case (list.example (function (_ [pname pbounds])
- (and (text\= name pname)
+ (and (text#= name pname)
(not (list.empty? pbounds))))
type_params)
{.#None}
@@ -353,7 +353,7 @@
(def: (class_decl_type$ (^slots [#class_name #class_params]))
(-> Class_Declaration Code)
- (let [=params (list\each (: (-> Type_Parameter Code)
+ (let [=params (list#each (: (-> Type_Parameter Code)
(function (_ [pname pbounds])
(case pbounds
{.#End}
@@ -372,7 +372,7 @@
(case class
{#GenericTypeVar name}
(case (list.example (function (_ [pname pbounds])
- (and (text\= name pname)
+ (and (text#= name pname)
(not (list.empty? pbounds))))
env)
{.#None}
@@ -439,7 +439,7 @@
(case (f input)
(^template [<tag>]
[[meta {<tag> parts}]
- [meta {<tag> (list\each (pre_walk_replace f) parts)}]])
+ [meta {<tag> (list#each (pre_walk_replace f) parts)}]])
([.#Form]
[.#Variant]
[.#Tuple])
@@ -473,7 +473,7 @@
[args (: (Parser (List Code))
(<code>.form (<>.after (<code>.this! (' ::new!))
(<code>.tuple (<>.exactly (list.size arg_decls) <code>.any)))))
- .let [arg_decls' (: (List Text) (list\each (|>> product.right (simple_class$ params)) arg_decls))]]
+ .let [arg_decls' (: (List Text) (list#each (|>> product.right (simple_class$ params)) arg_decls))]]
(in (` ((~ (code.text (format "jvm new" ":" class_name ":" (text.interposed "," arg_decls'))))
(~+ args))))))
@@ -484,7 +484,7 @@
args (: (Parser (List Code))
(<code>.form (<>.after (<code>.this! (code.identifier ["" dotted_name]))
(<code>.tuple (<>.exactly (list.size arg_decls) <code>.any)))))
- .let [arg_decls' (: (List Text) (list\each (|>> product.right (simple_class$ params)) arg_decls))]]
+ .let [arg_decls' (: (List Text) (list#each (|>> product.right (simple_class$ params)) arg_decls))]]
(in (`' ((~ (code.text (format "jvm invokestatic" ":" class_name ":" method_name ":" (text.interposed "," arg_decls'))))
(~+ args))))))
@@ -496,7 +496,7 @@
args (: (Parser (List Code))
(<code>.form (<>.after (<code>.this! (code.identifier ["" dotted_name]))
(<code>.tuple (<>.exactly (list.size arg_decls) <code>.any)))))
- .let [arg_decls' (: (List Text) (list\each (|>> product.right (simple_class$ params)) arg_decls))]]
+ .let [arg_decls' (: (List Text) (list#each (|>> product.right (simple_class$ params)) arg_decls))]]
(in (`' ((~ (code.text (format <jvm_op> ":" class_name ":" method_name ":" (text.interposed "," arg_decls'))))
(~' _jvm_this) (~+ args))))))]
@@ -567,7 +567,7 @@
(do <>.monad
[name <code>.local_identifier
_ (no_periods_assertion name)]
- (if (list.member? text.equivalence (list\each product.left type_vars) name)
+ (if (list.member? text.equivalence (list#each product.left type_vars) name)
(in {#GenericTypeVar name})
(in {#GenericClass name (list)})))
(<code>.tuple (do <>.monad
@@ -592,7 +592,7 @@
_ (no_periods_assertion name)
params (<>.some recur^)
_ (<>.assertion (format name " cannot be a type-parameter!")
- (not (list.member? text.equivalence (list\each product.left type_vars) name)))]
+ (not (list.member? text.equivalence (list#each product.left type_vars) name)))]
(in {#GenericClass name params})))
))))
@@ -694,7 +694,7 @@
($_ <>.or
(<code>.this! (' "volatile"))
(<code>.this! (' "final"))
- (\ <>.monad in [])))
+ (# <>.monad in [])))
(def: (field_decl^ type_vars)
(-> (List Type_Parameter) (Parser [Member_Declaration FieldDecl]))
@@ -736,7 +736,7 @@
[pm privacy_modifier^
strict_fp? (<>.parses? (<code>.this! (' "strict")))
method_vars ..type_params^
- .let [total_vars (list\composite class_vars method_vars)]
+ .let [total_vars (list#composite class_vars method_vars)]
[_ arg_decls] (<code>.form (<>.and (<code>.this! (' new))
(..arg_decls^ total_vars)))
constructor_args (..constructor_args^ total_vars)
@@ -755,7 +755,7 @@
strict_fp? (<>.parses? (<code>.this! (' "strict")))
final? (<>.parses? (<code>.this! (' "final")))
method_vars ..type_params^
- .let [total_vars (list\composite class_vars method_vars)]
+ .let [total_vars (list#composite class_vars method_vars)]
[name this_name arg_decls] (<code>.form ($_ <>.and
<code>.local_identifier
<code>.local_identifier
@@ -778,7 +778,7 @@
[strict_fp? (<>.parses? (<code>.this! (' "strict")))
owner_class ..class_decl^
method_vars ..type_params^
- .let [total_vars (list\composite (product.right owner_class) method_vars)]
+ .let [total_vars (list#composite (product.right owner_class) method_vars)]
[name this_name arg_decls] (<code>.form ($_ <>.and
<code>.local_identifier
<code>.local_identifier
@@ -892,7 +892,7 @@
[tvars ..type_params^
_ (<code>.this! (' new))
?alias import_member_alias^
- .let [total_vars (list\composite owner_vars tvars)]
+ .let [total_vars (list#composite owner_vars tvars)]
?prim_mode (<>.maybe primitive_mode^)
args (..import_member_args^ total_vars)
[io? try? maybe?] import_member_return_flags^]
@@ -912,7 +912,7 @@
tvars ..type_params^
name <code>.local_identifier
?alias import_member_alias^
- .let [total_vars (list\composite owner_vars tvars)]
+ .let [total_vars (list#composite owner_vars tvars)]
?prim_mode (<>.maybe primitive_mode^)
args (..import_member_args^ total_vars)
[io? try? maybe?] import_member_return_flags^
@@ -983,7 +983,7 @@
(def: (annotation$ [name params])
(-> Annotation JVM_Code)
- (format "(" name " " "{" (text.interposed text.tab (list\each annotation_param$ params)) "}" ")"))
+ (format "(" name " " "{" (text.interposed text.tab (list#each annotation_param$ params)) "}" ")"))
(def: (bound_kind$ kind)
(-> BoundKind JVM_Code)
@@ -998,7 +998,7 @@
name
{#GenericClass name params}
- (format "(" (safe name) " " (spaced (list\each generic_type$ params)) ")")
+ (format "(" (safe name) " " (spaced (list#each generic_type$ params)) ")")
{#GenericArray param}
(format "(" array.type_name " " (generic_type$ param) ")")
@@ -1011,16 +1011,16 @@
(def: (type_param$ [name bounds])
(-> Type_Parameter JVM_Code)
- (format "(" name " " (spaced (list\each generic_type$ bounds)) ")"))
+ (format "(" name " " (spaced (list#each generic_type$ bounds)) ")"))
(def: (class_decl$ (^open "[0]"))
(-> Class_Declaration JVM_Code)
- (format "(" (safe #class_name) " " (spaced (list\each type_param$ #class_params)) ")"))
+ (format "(" (safe #class_name) " " (spaced (list#each type_param$ #class_params)) ")"))
(def: (super_class_decl$ (^slots [#super_class_name #super_class_params]))
(-> Super_Class_Decl JVM_Code)
(format "(" (safe #super_class_name)
- " " (spaced (list\each generic_type$ #super_class_params))
+ " " (spaced (list#each generic_type$ #super_class_params))
")"))
(def: (method_decl$ [[name pm anns] method_decl])
@@ -1028,10 +1028,10 @@
(let [(^slots [#method_tvars #method_inputs #method_output #method_exs]) method_decl]
(with_parens
(spaced (list name
- (with_brackets (spaced (list\each annotation$ anns)))
- (with_brackets (spaced (list\each type_param$ #method_tvars)))
- (with_brackets (spaced (list\each generic_type$ #method_exs)))
- (with_brackets (spaced (list\each generic_type$ #method_inputs)))
+ (with_brackets (spaced (list#each annotation$ anns)))
+ (with_brackets (spaced (list#each type_param$ #method_tvars)))
+ (with_brackets (spaced (list#each generic_type$ #method_exs)))
+ (with_brackets (spaced (list#each generic_type$ #method_inputs)))
(generic_type$ #method_output))
))))
@@ -1048,7 +1048,7 @@
{#ConstantField class value}
(with_parens
(spaced (list "constant" name
- (with_brackets (spaced (list\each annotation$ anns)))
+ (with_brackets (spaced (list#each annotation$ anns)))
(generic_type$ class)
(code.format value))
))
@@ -1058,7 +1058,7 @@
(spaced (list "variable" name
(privacy_modifier$ pm)
(state_modifier$ sm)
- (with_brackets (spaced (list\each annotation$ anns)))
+ (with_brackets (spaced (list#each annotation$ anns)))
(generic_type$ class))
))
))
@@ -1080,12 +1080,12 @@
(with_parens
(spaced (list "init"
(privacy_modifier$ pm)
- (bit\encoded strict_fp?)
- (with_brackets (spaced (list\each annotation$ anns)))
- (with_brackets (spaced (list\each type_param$ type_vars)))
- (with_brackets (spaced (list\each generic_type$ exs)))
- (with_brackets (spaced (list\each arg_decl$ arg_decls)))
- (with_brackets (spaced (list\each constructor_arg$ constructor_args)))
+ (bit#encoded strict_fp?)
+ (with_brackets (spaced (list#each annotation$ anns)))
+ (with_brackets (spaced (list#each type_param$ type_vars)))
+ (with_brackets (spaced (list#each generic_type$ exs)))
+ (with_brackets (spaced (list#each arg_decl$ arg_decls)))
+ (with_brackets (spaced (list#each constructor_arg$ constructor_args)))
(code.format (pre_walk_replace replacer body))
)))
@@ -1094,12 +1094,12 @@
(spaced (list "virtual"
name
(privacy_modifier$ pm)
- (bit\encoded final?)
- (bit\encoded strict_fp?)
- (with_brackets (spaced (list\each annotation$ anns)))
- (with_brackets (spaced (list\each type_param$ type_vars)))
- (with_brackets (spaced (list\each generic_type$ exs)))
- (with_brackets (spaced (list\each arg_decl$ arg_decls)))
+ (bit#encoded final?)
+ (bit#encoded strict_fp?)
+ (with_brackets (spaced (list#each annotation$ anns)))
+ (with_brackets (spaced (list#each type_param$ type_vars)))
+ (with_brackets (spaced (list#each generic_type$ exs)))
+ (with_brackets (spaced (list#each arg_decl$ arg_decls)))
(generic_type$ return_type)
(code.format (pre_walk_replace replacer (` (let [(~ (code.local_identifier this_name)) (~' _jvm_this)]
(~ body))))))))
@@ -1108,7 +1108,7 @@
(let [super_replacer (parser_replacer (<code>.form (do <>.monad
[_ (<code>.this! (' ::super!))
args (<code>.tuple (<>.exactly (list.size arg_decls) <code>.any))
- .let [arg_decls' (: (List Text) (list\each (|>> product.right (simple_class$ (list)))
+ .let [arg_decls' (: (List Text) (list#each (|>> product.right (simple_class$ (list)))
arg_decls))]]
(in (`' ((~ (code.text (format "jvm invokespecial"
":" (value@ #super_class_name super_class)
@@ -1119,11 +1119,11 @@
(spaced (list "override"
(class_decl$ class_decl)
name
- (bit\encoded strict_fp?)
- (with_brackets (spaced (list\each annotation$ anns)))
- (with_brackets (spaced (list\each type_param$ type_vars)))
- (with_brackets (spaced (list\each generic_type$ exs)))
- (with_brackets (spaced (list\each arg_decl$ arg_decls)))
+ (bit#encoded strict_fp?)
+ (with_brackets (spaced (list#each annotation$ anns)))
+ (with_brackets (spaced (list#each type_param$ type_vars)))
+ (with_brackets (spaced (list#each generic_type$ exs)))
+ (with_brackets (spaced (list#each arg_decl$ arg_decls)))
(generic_type$ return_type)
(|> (` (let [(~ (code.local_identifier this_name)) (~' _jvm_this)]
(~ body)))
@@ -1137,11 +1137,11 @@
(spaced (list "static"
name
(privacy_modifier$ pm)
- (bit\encoded strict_fp?)
- (with_brackets (spaced (list\each annotation$ anns)))
- (with_brackets (spaced (list\each type_param$ type_vars)))
- (with_brackets (spaced (list\each generic_type$ exs)))
- (with_brackets (spaced (list\each arg_decl$ arg_decls)))
+ (bit#encoded strict_fp?)
+ (with_brackets (spaced (list#each annotation$ anns)))
+ (with_brackets (spaced (list#each type_param$ type_vars)))
+ (with_brackets (spaced (list#each generic_type$ exs)))
+ (with_brackets (spaced (list#each arg_decl$ arg_decls)))
(generic_type$ return_type)
(code.format (pre_walk_replace replacer body)))))
@@ -1150,10 +1150,10 @@
(spaced (list "abstract"
name
(privacy_modifier$ pm)
- (with_brackets (spaced (list\each annotation$ anns)))
- (with_brackets (spaced (list\each type_param$ type_vars)))
- (with_brackets (spaced (list\each generic_type$ exs)))
- (with_brackets (spaced (list\each arg_decl$ arg_decls)))
+ (with_brackets (spaced (list#each annotation$ anns)))
+ (with_brackets (spaced (list#each type_param$ type_vars)))
+ (with_brackets (spaced (list#each generic_type$ exs)))
+ (with_brackets (spaced (list#each arg_decl$ arg_decls)))
(generic_type$ return_type))))
{#NativeMethod type_vars arg_decls return_type exs}
@@ -1161,10 +1161,10 @@
(spaced (list "native"
name
(privacy_modifier$ pm)
- (with_brackets (spaced (list\each annotation$ anns)))
- (with_brackets (spaced (list\each type_param$ type_vars)))
- (with_brackets (spaced (list\each generic_type$ exs)))
- (with_brackets (spaced (list\each arg_decl$ arg_decls)))
+ (with_brackets (spaced (list#each annotation$ anns)))
+ (with_brackets (spaced (list#each type_param$ type_vars)))
+ (with_brackets (spaced (list#each generic_type$ exs)))
+ (with_brackets (spaced (list#each arg_decl$ arg_decls)))
(generic_type$ return_type))))
))
@@ -1192,19 +1192,19 @@
(do meta.monad
[current_module meta.current_module_name
.let [fully_qualified_class_name (format (safe current_module) "." full_class_name)
- field_parsers (list\each (field_parser fully_qualified_class_name) fields)
- method_parsers (list\each (method_parser (product.right class_decl) fully_qualified_class_name) methods)
- replacer (parser_replacer (list\mix <>.either
+ field_parsers (list#each (field_parser fully_qualified_class_name) fields)
+ method_parsers (list#each (method_parser (product.right class_decl) fully_qualified_class_name) methods)
+ replacer (parser_replacer (list#mix <>.either
(<>.failure "")
- (list\composite field_parsers method_parsers)))
+ (list#composite field_parsers method_parsers)))
def_code (format "jvm class:"
(spaced (list (class_decl$ class_decl)
(super_class_decl$ super)
- (with_brackets (spaced (list\each super_class_decl$ interfaces)))
+ (with_brackets (spaced (list#each super_class_decl$ interfaces)))
(inheritance_modifier$ im)
- (with_brackets (spaced (list\each annotation$ annotations)))
- (with_brackets (spaced (list\each field_decl$ fields)))
- (with_brackets (spaced (list\each (method_def$ replacer super) methods))))))]]
+ (with_brackets (spaced (list#each annotation$ annotations)))
+ (with_brackets (spaced (list#each field_decl$ fields)))
+ (with_brackets (spaced (list#each (method_def$ replacer super) methods))))))]]
(in (list (` ((~ (code.text def_code))))))))
(syntax: .public (interface: [class_decl ..class_decl^
@@ -1215,9 +1215,9 @@
members (<>.some (..method_decl^ class_vars))])
(let [def_code (format "jvm interface:"
(spaced (list (class_decl$ class_decl)
- (with_brackets (spaced (list\each super_class_decl$ supers)))
- (with_brackets (spaced (list\each annotation$ annotations)))
- (spaced (list\each method_decl$ members)))))]
+ (with_brackets (spaced (list#each super_class_decl$ supers)))
+ (with_brackets (spaced (list#each annotation$ annotations)))
+ (spaced (list#each method_decl$ members)))))]
(in (list (` ((~ (code.text def_code))))))))
(syntax: .public (object [class_vars (<code>.tuple (<>.some ..type_param^))
@@ -1229,9 +1229,9 @@
methods (<>.some ..overriden_method_def^)])
(let [def_code (format "jvm anon-class:"
(spaced (list (super_class_decl$ super)
- (with_brackets (spaced (list\each super_class_decl$ interfaces)))
- (with_brackets (spaced (list\each constructor_arg$ constructor_args)))
- (with_brackets (spaced (list\each (method_def$ function.identity super) methods))))))]
+ (with_brackets (spaced (list#each super_class_decl$ interfaces)))
+ (with_brackets (spaced (list#each constructor_arg$ constructor_args)))
+ (with_brackets (spaced (list#each (method_def$ function.identity super) methods))))))]
(in (list (` ((~ (code.text def_code))))))))
(syntax: .public (null [])
@@ -1287,12 +1287,12 @@
methods (<>.some partial_call^)])
(with_identifiers [g!obj]
(in (list (` (let [(~ g!obj) (~ obj)]
- (exec (~+ (list\each (complete_call$ g!obj) methods))
+ (exec (~+ (list#each (complete_call$ g!obj) methods))
(~ g!obj))))))))
(def: (class_import$ [full_name params])
(-> Class_Declaration Code)
- (let [params' (list\each (|>> product.left code.local_identifier) params)]
+ (let [params' (list#each (|>> product.left code.local_identifier) params)]
(template.with_locals [g!_]
(` (def: (~ (code.identifier ["" full_name]))
Type
@@ -1304,7 +1304,7 @@
(-> (List Type_Parameter) Import_Member_Declaration (List Type_Parameter))
(case member
{#ConstructorDecl [commons _]}
- (list\composite class_tvars (value@ #import_member_tvars commons))
+ (list#composite class_tvars (value@ #import_member_tvars commons))
{#MethodDecl [commons _]}
(case (value@ #import_member_kind commons)
@@ -1312,7 +1312,7 @@
(value@ #import_member_tvars commons)
_
- (list\composite class_tvars (value@ #import_member_tvars commons)))
+ (list#composite class_tvars (value@ #import_member_tvars commons)))
_
class_tvars))
@@ -1330,9 +1330,9 @@
(in [maybe? arg_name]))))
#import_member_args)
.let [arg_classes (: (List Text)
- (list\each (|>> product.right (simple_class$ (list\composite type_params #import_member_tvars)))
+ (list#each (|>> product.right (simple_class$ (list#composite type_params #import_member_tvars)))
#import_member_args))
- arg_types (list\each (: (-> [Bit GenericType] Code)
+ arg_types (list#each (: (-> [Bit GenericType] Code)
(function (_ [maybe? arg])
(let [arg_type (class_type (value@ #import_member_mode commons) type_params arg)]
(if maybe?
@@ -1342,7 +1342,7 @@
(in [arg_inputs arg_classes arg_types])))
_
- (\ meta.monad in [(list) (list) (list)])))
+ (# meta.monad in [(list) (list) (list)])))
(def: (decorate_return_maybe class member return_term)
(-> Class_Declaration Import_Member_Declaration Code Code)
@@ -1414,12 +1414,12 @@
(def: (jvm_extension_inputs mode classes inputs)
(-> Primitive_Mode (List Text) (List [Bit Code]) (List Code))
(|> inputs
- (list\each (function (_ [maybe? input])
+ (list#each (function (_ [maybe? input])
(if maybe?
(` ((~! !!!) (~ (un_quote input))))
(un_quote input))))
(list.zipped/2 classes)
- (list\each (auto_convert_input mode))))
+ (list#each (auto_convert_input mode))))
(def: (import_name format class member)
(-> Text Text Text Text)
@@ -1429,9 +1429,9 @@
(def: syntax_inputs
(-> (List Code) (List Code))
- (|>> (list\each (function (_ name)
+ (|>> (list#each (function (_ name)
(list name (` (~! <code>.any)))))
- list\conjoint))
+ list#conjoint))
(def: (member_def_interop type_params kind class [arg_function_inputs arg_classes arg_types] member method_prefix import_format)
(-> (List Type_Parameter) Class_Kind Class_Declaration [(List [Bit Code]) (List Text) (List Code)] Import_Member_Declaration Text Text (Meta (List Code)))
@@ -1439,7 +1439,7 @@
full_name (safe full_name)
all_params (|> (member_type_vars class_tvars member)
(list.only free_type_param?)
- (list\each lux_type_parameter))]
+ (list#each lux_type_parameter))]
(case member
{#EnumDecl enum_members}
(macro.with_identifiers [g!_]
@@ -1452,7 +1452,7 @@
_
(let [=class_tvars (|> class_tvars
(list.only free_type_param?)
- (list\each lux_type_parameter))]
+ (list#each lux_type_parameter))]
(` (All ((~ g!_) (~+ =class_tvars)) (primitive (~ (code.text full_name)) [(~+ =class_tvars)]))))))
getter_interop (: (-> Text Code)
(function (_ name)
@@ -1460,7 +1460,7 @@
(` (def: (~ getter_name)
(~ enum_type)
((~ (code.text (format "jvm getstatic" ":" full_name ":" name)))))))))]]
- (in (list\each getter_interop enum_members))))
+ (in (list#each getter_interop enum_members))))
{#ConstructorDecl [commons _]}
(do meta.monad
@@ -1471,7 +1471,7 @@
(decorate_return_maybe class member)
(decorate_return_try member)
(decorate_return_io member))]]
- (in (list (` ((~! syntax:) ((~ def_name) [(~+ (syntax_inputs (list\each product.right arg_function_inputs)))])
+ (in (list (` ((~! syntax:) ((~ def_name) [(~+ (syntax_inputs (list#each product.right arg_function_inputs)))])
((~' in) (.list (.` (~ jvm_interop)))))))))
{#MethodDecl [commons method]}
@@ -1498,13 +1498,13 @@
)))
jvm_extension (code.text (format "jvm " jvm_op ":" full_name ":" #import_method_name ":" (text.interposed "," arg_classes)))
jvm_interop (|> [(simple_class$ (list) (value@ #import_method_return method))
- (` ((~ jvm_extension) (~+ (list\each un_quote object_ast))
+ (` ((~ jvm_extension) (~+ (list#each un_quote object_ast))
(~+ (jvm_extension_inputs (value@ #import_member_mode commons) arg_classes arg_function_inputs))))]
(auto_convert_output (value@ #import_member_mode commons))
(decorate_return_maybe class member)
(decorate_return_try member)
(decorate_return_io member))]]
- (in (list (` ((~! syntax:) ((~ def_name) [(~+ (syntax_inputs (list\each product.right arg_function_inputs)))
+ (in (list (` ((~! syntax:) ((~ def_name) [(~+ (syntax_inputs (list#each product.right arg_function_inputs)))
(~+ (syntax_inputs object_ast))])
((~' in) (.list (.` (~ jvm_interop))))))))))
@@ -1519,7 +1519,7 @@
tvar_asts (: (List Code)
(|> class_tvars
(list.only free_type_param?)
- (list\each lux_type_parameter)))
+ (list#each lux_type_parameter)))
getter_name (code.identifier ["" (..import_name import_format method_prefix #import_field_name)])
setter_name (code.identifier ["" (..import_name import_format method_prefix (format #import_field_name "!"))])]
getter_interop (with_identifiers [g!obj]
@@ -1588,7 +1588,7 @@
(let [class_name (..safe class_name)]
(case (..load_class class_name)
{try.#Success class}
- (\ meta.monad in (if (interface? class)
+ (# meta.monad in (if (interface? class)
{#Interface}
{#Class}))
@@ -1601,11 +1601,11 @@
(do [! meta.monad]
[kind (class_kind class_decl)
=members (|> bundles
- (list\each (function (_ [import_format members])
- (list\each (|>> [import_format]) members)))
+ (list#each (function (_ [import_format members])
+ (list#each (|>> [import_format]) members)))
list.together
(monad.each ! (member_import$ (product.right class_decl) kind class_decl)))]
- (in (list& (class_import$ class_decl) (list\conjoint =members)))))
+ (in (list& (class_import$ class_decl) (list#conjoint =members)))))
(syntax: .public (array [type (..generic_type^ (list))
size <code>.any])
@@ -1630,11 +1630,11 @@
(def: (type_class_name type)
(-> Type (Meta Text))
- (if (type\= Any type)
- (\ meta.monad in "java.lang.Object")
+ (if (type#= Any type)
+ (# meta.monad in "java.lang.Object")
(case type
{.#Primitive name params}
- (\ meta.monad in name)
+ (# meta.monad in name)
{.#Apply A F}
(case (type.applied (list A) F)
diff --git a/stdlib/source/library/lux/ffi.php.lux b/stdlib/source/library/lux/ffi.php.lux
index 94732874e..6199df2ad 100644
--- a/stdlib/source/library/lux/ffi.php.lux
+++ b/stdlib/source/library/lux/ffi.php.lux
@@ -8,14 +8,14 @@
[control
["[0]" io]
["[0]" maybe]
- ["<>" parser ("[1]\[0]" monad)
+ ["<>" parser ("[1]#[0]" monad)
["<[0]>" code {"+" [Parser]}]]]
[data
["[0]" product]
["[0]" text
["%" format]]
[collection
- ["[0]" list ("[1]\[0]" functor)]]]
+ ["[0]" list ("[1]#[0]" functor)]]]
[type
abstract]
[macro {"+" [with_identifiers]}
@@ -80,7 +80,7 @@
(def: constant
(Parser Field)
(<code>.form ($_ <>.and
- (<>\in true)
+ (<>#in true)
<code>.local_identifier
(<>.maybe ..alias)
..nullable)))
@@ -135,7 +135,7 @@
(def: input_variables
(-> (List Nullable) (List [Bit Code]))
(|>> list.enumeration
- (list\each (function (_ [idx [nullable? type]])
+ (list#each (function (_ [idx [nullable? type]])
[nullable? (|> idx %.nat code.local_identifier)]))))
(def: (nullable_type [nullable? type])
@@ -223,8 +223,8 @@
(-> Code Code Code (List Nullable) Bit Bit Nullable Code)
(let [g!inputs (input_variables inputsT)]
(` (def: ((~ g!method)
- [(~+ (list\each product.right g!inputs))])
- (-> [(~+ (list\each nullable_type inputsT))]
+ [(~+ (list#each product.right g!inputs))])
+ (-> [(~+ (list#each nullable_type inputsT))]
(~ (|> (nullable_type outputT)
(try_type try?)
(io_type io?))))
@@ -234,7 +234,7 @@
(without_null g!temp outputT)
(` ("php apply"
(:as ..Function (~ source))
- (~+ (list\each (with_null g!temp) g!inputs)))))))))))
+ (~+ (list#each (with_null g!temp) g!inputs)))))))))))
(syntax: .public (import: [import ..import])
(with_identifiers [g!temp]
@@ -251,12 +251,12 @@
class_import (` ("php constant" (~ (code.text class))))]
(in (list& (` (type: (~ g!type)
(..Object (primitive (~ (code.text class))))))
- (list\each (function (_ member)
+ (list#each (function (_ member)
(case member
{#Field [static? field alias fieldT]}
(if static?
(` ((~! syntax:) ((~ (qualify (maybe.else field alias))) [])
- (\ (~! meta.monad) (~' in)
+ (# (~! meta.monad) (~' in)
(list (` (.:as (~ (nullable_type fieldT))
("php constant" (~ (code.text (%.format class "::" field))))))))))
(` (def: ((~ (qualify field))
@@ -283,9 +283,9 @@
{#Virtual [method alias inputsT io? try? outputT]}
(let [g!inputs (input_variables inputsT)]
(` (def: ((~ (qualify (maybe.else method alias)))
- [(~+ (list\each product.right g!inputs))]
+ [(~+ (list#each product.right g!inputs))]
(~ g!object))
- (-> [(~+ (list\each nullable_type inputsT))]
+ (-> [(~+ (list#each nullable_type inputsT))]
(~ g!type)
(~ (|> (nullable_type outputT)
(try_type try?)
@@ -297,7 +297,7 @@
(` ("php object do"
(~ (code.text method))
(~ g!object)
- (~+ (list\each (with_null g!temp) g!inputs)))))))))))))
+ (~+ (list#each (with_null g!temp) g!inputs)))))))))))))
members)))))
{#Function [name alias inputsT io? try? outputT]}
@@ -313,6 +313,6 @@
{#Constant [_ name alias fieldT]}
(let [imported (` ("php constant" (~ (code.text name))))]
(in (list (` ((~! syntax:) ((~ (code.local_identifier (maybe.else name alias))) [])
- (\ (~! meta.monad) (~' in)
+ (# (~! meta.monad) (~' in)
(list (` (.:as (~ (nullable_type fieldT)) (~ imported))))))))))
)))
diff --git a/stdlib/source/library/lux/ffi.py.lux b/stdlib/source/library/lux/ffi.py.lux
index b425c9f3b..792122b9d 100644
--- a/stdlib/source/library/lux/ffi.py.lux
+++ b/stdlib/source/library/lux/ffi.py.lux
@@ -15,7 +15,7 @@
["[0]" text
["%" format]]
[collection
- ["[0]" list ("[1]\[0]" functor mix)]]]
+ ["[0]" list ("[1]#[0]" functor mix)]]]
[type
abstract]
[macro {"+" [with_identifiers]}
@@ -130,7 +130,7 @@
(def: input_variables
(-> (List Noneable) (List [Bit Code]))
(|>> list.enumeration
- (list\each (function (_ [idx [noneable? type]])
+ (list#each (function (_ [idx [noneable? type]])
[noneable? (|> idx %.nat code.local_identifier)]))))
(def: (noneable_type [noneable? type])
@@ -203,8 +203,8 @@
(-> Code Code Code (List Noneable) Bit Bit Noneable Code)
(let [g!inputs (input_variables inputsT)]
(` (def: ((~ g!method)
- [(~+ (list\each product.right g!inputs))])
- (-> [(~+ (list\each noneable_type inputsT))]
+ [(~+ (list#each product.right g!inputs))])
+ (-> [(~+ (list#each noneable_type inputsT))]
(~ (|> (noneable_type outputT)
(try_type try?)
(io_type io?))))
@@ -214,7 +214,7 @@
(without_none g!temp outputT)
(` ("python apply"
(:as ..Function (~ source))
- (~+ (list\each (with_none g!temp) g!inputs)))))))))))
+ (~+ (list#each (with_none g!temp) g!inputs)))))))))))
(syntax: .public (import: [import ..import])
... {.#doc (example "Easily import types, methods, functions and constants."
@@ -253,7 +253,7 @@
real_class (text.replaced "/" "." class)
imported (case (text.all_split_by "/" class)
{.#Item head tail}
- (list\mix (function (_ sub super)
+ (list#mix (function (_ sub super)
(` ("python object get" (~ (code.text sub))
(:as (..Object .Any) (~ super)))))
(` ("python import" (~ (code.text head))))
@@ -263,23 +263,23 @@
(` ("python import" (~ (code.text class)))))]
(in (list& (` (type: (~ g!type)
(..Object (primitive (~ (code.text real_class))))))
- (list\each (function (_ member)
+ (list#each (function (_ member)
(case member
{#Constructor inputsT}
(let [g!inputs (input_variables inputsT)]
(` (def: ((~ (qualify "new"))
- [(~+ (list\each product.right g!inputs))])
- (-> [(~+ (list\each noneable_type inputsT))]
+ [(~+ (list#each product.right g!inputs))])
+ (-> [(~+ (list#each noneable_type inputsT))]
(~ g!type))
(:expected
("python apply"
(:as ..Function (~ imported))
- (~+ (list\each (with_none g!temp) g!inputs)))))))
+ (~+ (list#each (with_none g!temp) g!inputs)))))))
{#Field [static? field fieldT]}
(if static?
(` ((~! syntax:) ((~ (qualify field)) [])
- (\ (~! meta.monad) (~' in)
+ (# (~! meta.monad) (~' in)
(list (` (.:as (~ (noneable_type fieldT))
("python object get" (~ (code.text field))
(:as (..Object .Any) (~ imported)))))))))
@@ -306,9 +306,9 @@
{#Virtual [method alias inputsT io? try? outputT]}
(let [g!inputs (input_variables inputsT)]
(` (def: ((~ (qualify (maybe.else method alias)))
- [(~+ (list\each product.right g!inputs))]
+ [(~+ (list#each product.right g!inputs))]
(~ g!object))
- (-> [(~+ (list\each noneable_type inputsT))]
+ (-> [(~+ (list#each noneable_type inputsT))]
(~ g!type)
(~ (|> (noneable_type outputT)
(try_type try?)
@@ -320,7 +320,7 @@
(` ("python object do"
(~ (code.text method))
(~ g!object)
- (~+ (list\each (with_none g!temp) g!inputs)))))))))))))
+ (~+ (list#each (with_none g!temp) g!inputs)))))))))))))
members)))))
{#Function [name alias inputsT io? try? outputT]}
diff --git a/stdlib/source/library/lux/ffi.rb.lux b/stdlib/source/library/lux/ffi.rb.lux
index 366dc65de..2e611f72a 100644
--- a/stdlib/source/library/lux/ffi.rb.lux
+++ b/stdlib/source/library/lux/ffi.rb.lux
@@ -8,14 +8,14 @@
[control
["[0]" io]
["[0]" maybe]
- ["<>" parser ("[1]\[0]" monad)
+ ["<>" parser ("[1]#[0]" monad)
["<[0]>" code {"+" [Parser]}]]]
[data
["[0]" product]
["[0]" text
["%" format]]
[collection
- ["[0]" list ("[1]\[0]" functor)]]]
+ ["[0]" list ("[1]#[0]" functor)]]]
[type
abstract]
[macro {"+" [with_identifiers]}
@@ -80,7 +80,7 @@
(def: constant
(Parser Field)
(<code>.form ($_ <>.and
- (<>\in true)
+ (<>#in true)
<code>.local_identifier
(<>.maybe ..alias)
..nilable)))
@@ -135,7 +135,7 @@
(def: input_variables
(-> (List Nilable) (List [Bit Code]))
(|>> list.enumeration
- (list\each (function (_ [idx [nilable? type]])
+ (list#each (function (_ [idx [nilable? type]])
[nilable? (|> idx %.nat code.local_identifier)]))))
(def: (nilable_type [nilable? type])
@@ -216,8 +216,8 @@
(-> Code Code Code (List Nilable) Bit Bit Nilable Code)
(let [g!inputs (input_variables inputsT)]
(` (def: ((~ g!method)
- [(~+ (list\each product.right g!inputs))])
- (-> [(~+ (list\each nilable_type inputsT))]
+ [(~+ (list#each product.right g!inputs))])
+ (-> [(~+ (list#each nilable_type inputsT))]
(~ (|> (nilable_type outputT)
(try_type try?)
(io_type io?))))
@@ -227,7 +227,7 @@
(without_nil g!temp outputT)
(` ("ruby apply"
(:as ..Function (~ source))
- (~+ (list\each (with_nil g!temp) g!inputs)))))))))))
+ (~+ (list#each (with_nil g!temp) g!inputs)))))))))))
(syntax: .public (import: [[?module import] ..import])
(with_identifiers [g!temp]
@@ -251,12 +251,12 @@
class_import (` ("ruby constant" (~ (code.text class))))]
(in (list& (` (type: (~ g!type)
(..Object (primitive (~ (code.text class))))))
- (list\each (function (_ member)
+ (list#each (function (_ member)
(case member
{#Field [static? field alias fieldT]}
(if static?
(` ((~! syntax:) ((~ (qualify (maybe.else field alias))) [])
- (\ (~! meta.monad) (~' in)
+ (# (~! meta.monad) (~' in)
(list (` (.:as (~ (nilable_type fieldT))
(.exec
(~+ module_import)
@@ -287,9 +287,9 @@
{#Virtual [method alias inputsT io? try? outputT]}
(let [g!inputs (input_variables inputsT)]
(` (def: ((~ (qualify (maybe.else method alias)))
- [(~+ (list\each product.right g!inputs))]
+ [(~+ (list#each product.right g!inputs))]
(~ g!object))
- (-> [(~+ (list\each nilable_type inputsT))]
+ (-> [(~+ (list#each nilable_type inputsT))]
(~ g!type)
(~ (|> (nilable_type outputT)
(try_type try?)
@@ -301,7 +301,7 @@
(` ("ruby object do"
(~ (code.text method))
(~ g!object)
- (~+ (list\each (with_nil g!temp) g!inputs)))))))))))))
+ (~+ (list#each (with_nil g!temp) g!inputs)))))))))))))
members)))))
{#Function [name alias inputsT io? try? outputT]}
@@ -331,6 +331,6 @@
(list)))
("ruby constant" (~ (code.text name)))))]
(in (list (` ((~! syntax:) ((~ (code.local_identifier (maybe.else name alias))) [])
- (\ (~! meta.monad) (~' in)
+ (# (~! meta.monad) (~' in)
(list (` (.:as (~ (nilable_type fieldT)) (~ imported))))))))))
)))
diff --git a/stdlib/source/library/lux/ffi.scm.lux b/stdlib/source/library/lux/ffi.scm.lux
index ba47e81ca..651d89168 100644
--- a/stdlib/source/library/lux/ffi.scm.lux
+++ b/stdlib/source/library/lux/ffi.scm.lux
@@ -8,14 +8,14 @@
[control
["[0]" io]
["[0]" maybe]
- ["<>" parser ("[1]\[0]" monad)
+ ["<>" parser ("[1]#[0]" monad)
["<[0]>" code {"+" [Parser]}]]]
[data
["[0]" product]
["[0]" text
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" functor)]]]
+ ["[0]" list ("[1]#[0]" functor)]]]
[type
abstract]
[macro {"+" [with_identifiers]}
@@ -80,7 +80,7 @@
(def: constant
(Parser Field)
(<code>.form ($_ <>.and
- (<>\in true)
+ (<>#in true)
<code>.local_identifier
(<>.maybe ..alias)
..nilable)))
@@ -107,7 +107,7 @@
(def: input_variables
(-> (List Nilable) (List [Bit Code]))
(|>> list.enumeration
- (list\each (function (_ [idx [nilable? type]])
+ (list#each (function (_ [idx [nilable? type]])
[nilable? (|> idx %.nat code.local_identifier)]))))
(def: (nilable_type [nilable? type])
@@ -188,8 +188,8 @@
(-> Code Code Code (List Nilable) Bit Bit Nilable Code)
(let [g!inputs (input_variables inputsT)]
(` (def: ((~ g!method)
- [(~+ (list\each product.right g!inputs))])
- (-> [(~+ (list\each nilable_type inputsT))]
+ [(~+ (list#each product.right g!inputs))])
+ (-> [(~+ (list#each nilable_type inputsT))]
(~ (|> (nilable_type outputT)
(try_type try?)
(io_type io?))))
@@ -199,7 +199,7 @@
(without_nil g!temp outputT)
(` ("scheme apply"
(:as ..Function (~ source))
- (~+ (list\each (with_nil g!temp) g!inputs)))))))))))
+ (~+ (list#each (with_nil g!temp) g!inputs)))))))))))
(syntax: .public (import: [import ..import])
(with_identifiers [g!temp]
@@ -217,6 +217,6 @@
{#Constant [_ name alias fieldT]}
(let [imported (` ("scheme constant" (~ (code.text name))))]
(in (list (` ((~! syntax:) ((~ (code.local_identifier (maybe.else name alias))))
- (\ (~! meta.monad) (~' in)
+ (# (~! meta.monad) (~' in)
(list (` (.:as (~ (nilable_type fieldT)) (~ imported))))))))))
)))
diff --git a/stdlib/source/library/lux/locale.lux b/stdlib/source/library/lux/locale.lux
index 09c5e9add..104af190f 100644
--- a/stdlib/source/library/lux/locale.lux
+++ b/stdlib/source/library/lux/locale.lux
@@ -5,7 +5,7 @@
[equivalence {"+" [Equivalence]}]
["[0]" hash {"+" [Hash]}]]
[control
- ["[0]" maybe ("[1]\[0]" functor)]]
+ ["[0]" maybe ("[1]#[0]" functor)]]
[data
["[0]" text
["%" format {"+" [format]}]
@@ -26,10 +26,10 @@
(-> Language (Maybe Territory) (Maybe Encoding) Locale)
(:abstraction (format (language.code language)
(|> territory
- (maybe\each (|>> territory.long_code (format ..territory_separator)))
+ (maybe#each (|>> territory.long_code (format ..territory_separator)))
(maybe.else ""))
(|> encoding
- (maybe\each (|>> encoding.name (format ..encoding_separator)))
+ (maybe#each (|>> encoding.name (format ..encoding_separator)))
(maybe.else "")))))
(def: .public code
@@ -38,9 +38,9 @@
(def: .public hash
(Hash Locale)
- (\ hash.functor each ..code text.hash))
+ (# hash.functor each ..code text.hash))
(def: .public equivalence
(Equivalence Locale)
- (\ ..hash &equivalence))
+ (# ..hash &equivalence))
)
diff --git a/stdlib/source/library/lux/locale/language.lux b/stdlib/source/library/lux/locale/language.lux
index 7082755cd..1f9f9b591 100644
--- a/stdlib/source/library/lux/locale/language.lux
+++ b/stdlib/source/library/lux/locale/language.lux
@@ -570,5 +570,5 @@
(def: hash
(|>> ..code
- (\ text.hash hash))))
+ (# text.hash hash))))
)
diff --git a/stdlib/source/library/lux/locale/territory.lux b/stdlib/source/library/lux/locale/territory.lux
index 130565353..9e4542c2a 100644
--- a/stdlib/source/library/lux/locale/territory.lux
+++ b/stdlib/source/library/lux/locale/territory.lux
@@ -309,5 +309,5 @@
(def: hash
(|>> :representation
(value@ #long)
- (\ text.hash hash))))
+ (# text.hash hash))))
)
diff --git a/stdlib/source/library/lux/macro.lux b/stdlib/source/library/lux/macro.lux
index c1b8db599..a0b263646 100644
--- a/stdlib/source/library/lux/macro.lux
+++ b/stdlib/source/library/lux/macro.lux
@@ -4,10 +4,10 @@
[abstract
["[0]" monad {"+" [do]}]]
[data
- ["[0]" text ("[1]\[0]" monoid)]
- ["[0]" name ("[1]\[0]" codec)]
+ ["[0]" text ("[1]#[0]" monoid)]
+ ["[0]" name ("[1]#[0]" codec)]
[collection
- ["[0]" list ("[1]\[0]" monoid monad)]]]
+ ["[0]" list ("[1]#[0]" monoid monad)]]]
[macro
["[0]" code]]
[math
@@ -29,10 +29,10 @@
((:as Macro' macro) args)
{.#None}
- (\ //.monad in (list syntax))))
+ (# //.monad in (list syntax))))
_
- (\ //.monad in (list syntax))))
+ (# //.monad in (list syntax))))
(def: .public (expansion syntax)
(-> Code (Meta (List Code)))
@@ -46,13 +46,13 @@
[top_level_expansion ((:as Macro' macro) args)]
(|> top_level_expansion
(monad.each //.monad expansion)
- (\ ! each list\conjoint)))
+ (# ! each list#conjoint)))
{.#None}
- (\ //.monad in (list syntax))))
+ (# //.monad in (list syntax))))
_
- (\ //.monad in (list syntax))))
+ (# //.monad in (list syntax))))
(def: .public (full_expansion syntax)
(-> Code (Meta (List Code)))
@@ -65,62 +65,62 @@
(do //.monad
[expansion ((:as Macro' macro) args)
expansion' (monad.each //.monad full_expansion expansion)]
- (in (list\conjoint expansion')))
+ (in (list#conjoint expansion')))
{.#None}
(do //.monad
[parts' (monad.each //.monad full_expansion (list& (code.identifier name) args))]
- (in (list (code.form (list\conjoint parts')))))))
+ (in (list (code.form (list#conjoint parts')))))))
[_ {.#Form {.#Item [harg targs]}}]
(do //.monad
[harg+ (full_expansion harg)
targs+ (monad.each //.monad full_expansion targs)]
- (in (list (code.form (list\composite harg+ (list\conjoint (: (List (List Code)) targs+)))))))
+ (in (list (code.form (list#composite harg+ (list#conjoint (: (List (List Code)) targs+)))))))
[_ {.#Variant members}]
(do //.monad
[members' (monad.each //.monad full_expansion members)]
- (in (list (code.variant (list\conjoint members')))))
+ (in (list (code.variant (list#conjoint members')))))
[_ {.#Tuple members}]
(do //.monad
[members' (monad.each //.monad full_expansion members)]
- (in (list (code.tuple (list\conjoint members')))))
+ (in (list (code.tuple (list#conjoint members')))))
_
- (\ //.monad in (list syntax))))
+ (# //.monad in (list syntax))))
(def: .public (identifier prefix)
(-> Text (Meta Code))
(do //.monad
[id //.seed]
(in (|> id
- (\ nat.decimal encoded)
- ($_ text\composite "__gensym__" prefix)
+ (# nat.decimal encoded)
+ ($_ text#composite "__gensym__" prefix)
[""] code.identifier))))
(def: (local_identifier ast)
(-> Code (Meta Text))
(case ast
[_ {.#Identifier [_ name]}]
- (\ //.monad in name)
+ (# //.monad in name)
_
- (//.failure (text\composite "Code is not a local identifier: " (code.format ast)))))
+ (//.failure (text#composite "Code is not a local identifier: " (code.format ast)))))
(def: .public wrong_syntax_error
(-> Name Text)
- (|>> name\encoded
- (text.prefix (text\composite "Wrong syntax for " text.\''))
- (text.suffix (text\composite text.\'' "."))))
+ (|>> name#encoded
+ (text.prefix (text#composite "Wrong syntax for " text.\''))
+ (text.suffix (text#composite text.\'' "."))))
(macro: .public (with_identifiers tokens)
(case tokens
(^ (list [_ {.#Tuple identifiers}] body))
(do [! //.monad]
[identifier_names (monad.each ! ..local_identifier identifiers)
- .let [identifier_defs (list\conjoint (list\each (: (-> Text (List Code))
+ .let [identifier_defs (list#conjoint (list#each (: (-> Text (List Code))
(function (_ name) (list (code.identifier ["" name]) (` (..identifier (~ (code.text name)))))))
identifier_names))]]
(in (list (` ((~! do) (~! //.monad)
@@ -161,8 +161,8 @@
(do //.monad
[location //.location
output (<func> token)
- .let [_ ("lux io log" ($_ text\composite (name\encoded macro_name) " " (location.format location)))
- _ (list\each (|>> code.format "lux io log")
+ .let [_ ("lux io log" ($_ text#composite (name#encoded macro_name) " " (location.format location)))
+ _ (list#each (|>> code.format "lux io log")
output)
_ ("lux io log" "")]]
(in (if omit?
diff --git a/stdlib/source/library/lux/macro/code.lux b/stdlib/source/library/lux/macro/code.lux
index b7c709482..2d5ffb59a 100644
--- a/stdlib/source/library/lux/macro/code.lux
+++ b/stdlib/source/library/lux/macro/code.lux
@@ -7,9 +7,9 @@
["[0]" product]
["[0]" bit]
["[0]" name]
- ["[0]" text ("[1]\[0]" monoid equivalence)]
+ ["[0]" text ("[1]#[0]" monoid equivalence)]
[collection
- ["[0]" list ("[1]\[0]" functor mix)]]]
+ ["[0]" list ("[1]#[0]" functor mix)]]]
[math
[number
["[0]" nat]
@@ -65,7 +65,7 @@
(case [x y]
(^template [<tag> <eq>]
[[[_ {<tag> x'}] [_ {<tag> y'}]]
- (\ <eq> = x' y')])
+ (# <eq> = x' y')])
([.#Bit bit.equivalence]
[.#Nat nat.equivalence]
[.#Int int.equivalence]
@@ -76,7 +76,7 @@
(^template [<tag>]
[[[_ {<tag> xs'}] [_ {<tag> ys'}]]
- (\ (list.equivalence =) = xs' ys')])
+ (# (list.equivalence =) = xs' ys')])
([.#Form]
[.#Variant]
[.#Tuple])
@@ -89,7 +89,7 @@
(case ast
(^template [<tag> <struct>]
[[_ {<tag> value}]
- (\ <struct> encoded value)])
+ (# <struct> encoded value)])
([.#Bit bit.codec]
[.#Nat nat.decimal]
[.#Int int.decimal]
@@ -102,13 +102,13 @@
(^template [<tag> <open> <close>]
[[_ {<tag> members}]
- ($_ text\composite
+ ($_ text#composite
<open>
- (list\mix (function (_ next prev)
+ (list#mix (function (_ next prev)
(let [next (format next)]
- (if (text\= "" prev)
+ (if (text#= "" prev)
next
- ($_ text\composite prev " " next))))
+ ($_ text#composite prev " " next))))
""
members)
<close>)])
@@ -119,12 +119,12 @@
(def: .public (replaced original substitute ast)
(-> Code Code Code Code)
- (if (\ ..equivalence = original ast)
+ (if (# ..equivalence = original ast)
substitute
(case ast
(^template [<tag>]
[[location {<tag> parts}]
- [location {<tag> (list\each (replaced original substitute) parts)}]])
+ [location {<tag> (list#each (replaced original substitute) parts)}]])
([.#Form]
[.#Variant]
[.#Tuple])
diff --git a/stdlib/source/library/lux/macro/local.lux b/stdlib/source/library/lux/macro/local.lux
index 7fd34c7b3..03bd0c70c 100644
--- a/stdlib/source/library/lux/macro/local.lux
+++ b/stdlib/source/library/lux/macro/local.lux
@@ -11,7 +11,7 @@
["[0]" product]
["[0]" text]
[collection
- ["[0]" list ("[1]\[0]" functor)]
+ ["[0]" list ("[1]#[0]" functor)]
[dictionary
["[0]" plist {"+" [PList]}]]]]]]
["[0]" //
@@ -103,5 +103,5 @@
seed meta.seed
g!pop (//.identifier "pop")
_ (let [g!pop (: Name ["" (//code.format g!pop)])]
- (..push_one [g!pop (..pop_all (list\each product.left macros) g!pop)]))]
+ (..push_one [g!pop (..pop_all (list#each product.left macros) g!pop)]))]
(in (` ((~ g!pop))))))
diff --git a/stdlib/source/library/lux/macro/syntax.lux b/stdlib/source/library/lux/macro/syntax.lux
index dcf042ead..7a00f0bc7 100644
--- a/stdlib/source/library/lux/macro/syntax.lux
+++ b/stdlib/source/library/lux/macro/syntax.lux
@@ -11,9 +11,9 @@
["<>" parser
["</>" code {"+" [Parser]}]]]
[data
- ["[0]" text ("[1]\[0]" monoid)]
+ ["[0]" text ("[1]#[0]" monoid)]
[collection
- ["[0]" list ("[1]\[0]" functor)]]]
+ ["[0]" list]]]
[math
[number
["[0]" nat]
@@ -33,7 +33,7 @@
{try.#Success [tokens output]}
{try.#Failure error}
- {try.#Failure ($_ text\composite
+ {try.#Failure ($_ text#composite
"Failed to parse: " (code.format binding) text.new_line
error)})))
diff --git a/stdlib/source/library/lux/macro/syntax/declaration.lux b/stdlib/source/library/lux/macro/syntax/declaration.lux
index bb7abe7b0..706fc6fdb 100644
--- a/stdlib/source/library/lux/macro/syntax/declaration.lux
+++ b/stdlib/source/library/lux/macro/syntax/declaration.lux
@@ -4,13 +4,13 @@
[abstract
[equivalence {"+" [Equivalence]}]]
[control
- ["<>" parser ("[1]\[0]" monad)
+ ["<>" parser ("[1]#[0]" monad)
["<[0]>" code {"+" [Parser]}]]]
[data
["[0]" product]
["[0]" text]
[collection
- ["[0]" list ("[1]\[0]" functor)]]]
+ ["[0]" list ("[1]#[0]" functor)]]]
[macro
["[0]" code]]]])
@@ -29,7 +29,7 @@
(def: .public parser
(Parser Declaration)
(<>.either (<>.and <code>.local_identifier
- (<>\in (list)))
+ (<>#in (list)))
(<code>.form (<>.and <code>.local_identifier
(<>.some <code>.local_identifier)))))
@@ -41,4 +41,4 @@
g!name
arguments
- (` ((~ g!name) (~+ (list\each code.local_identifier arguments)))))))
+ (` ((~ g!name) (~+ (list#each code.local_identifier arguments)))))))
diff --git a/stdlib/source/library/lux/macro/syntax/export.lux b/stdlib/source/library/lux/macro/syntax/export.lux
index 6fe7afd4b..e7f89cd42 100644
--- a/stdlib/source/library/lux/macro/syntax/export.lux
+++ b/stdlib/source/library/lux/macro/syntax/export.lux
@@ -4,7 +4,7 @@
[abstract
[monad {"+" [do]}]]
[control
- ["<>" parser ("[1]\[0]" monad)
+ ["<>" parser
["<[0]>" code {"+" [Parser]}]]]]])
(def: .public default_policy
diff --git a/stdlib/source/library/lux/macro/syntax/input.lux b/stdlib/source/library/lux/macro/syntax/input.lux
index 51aa4b5fe..006cb0418 100644
--- a/stdlib/source/library/lux/macro/syntax/input.lux
+++ b/stdlib/source/library/lux/macro/syntax/input.lux
@@ -9,7 +9,7 @@
[data
["[0]" product]
[collection
- ["[0]" list ("[1]\[0]" monad)]]]
+ ["[0]" list ("[1]#[0]" monad)]]]
[macro
["[0]" code]]]])
@@ -27,10 +27,10 @@
(def: .public format
(-> (List Input) Code)
- (|>> (list\each (function (_ value)
+ (|>> (list#each (function (_ value)
(list (value@ #binding value)
(value@ #type value))))
- list\conjoint
+ list#conjoint
code.tuple))
(def: .public parser
diff --git a/stdlib/source/library/lux/macro/template.lux b/stdlib/source/library/lux/macro/template.lux
index 6a5136d15..1476d0f58 100644
--- a/stdlib/source/library/lux/macro/template.lux
+++ b/stdlib/source/library/lux/macro/template.lux
@@ -7,20 +7,20 @@
[control
["[0]" try {"+" [Try]}]
["[0]" exception {"+" [exception:]}]
- ["<>" parser ("[1]\[0]" functor)
+ ["<>" parser ("[1]#[0]" functor)
["<[0]>" code {"+" [Parser]}]]]
[data
- ["[0]" bit ("[1]\[0]" codec)]
+ ["[0]" bit ("[1]#[0]" codec)]
["[0]" text]
[collection
- ["[0]" list ("[1]\[0]" monad)]
+ ["[0]" list ("[1]#[0]" monad)]
["[0]" dictionary {"+" [Dictionary]}]]]
[math
[number
- ["[0]" nat ("[1]\[0]" decimal)]
- ["[0]" int ("[1]\[0]" decimal)]
- ["[0]" rev ("[1]\[0]" decimal)]
- ["[0]" frac ("[1]\[0]" decimal)]]]]]
+ ["[0]" nat ("[1]#[0]" decimal)]
+ ["[0]" int ("[1]#[0]" decimal)]
+ ["[0]" rev ("[1]#[0]" decimal)]
+ ["[0]" frac ("[1]#[0]" decimal)]]]]]
["[0]" //
[syntax {"+" [syntax:]}]
["[0]" code]
@@ -36,12 +36,12 @@
body <code>.any])
(do [! meta.monad]
[g!locals (|> locals
- (list\each //.identifier)
+ (list#each //.identifier)
(monad.all !))]
(in (list (` (.with_expansions [(~+ (|> (list.zipped/2 locals g!locals)
- (list\each (function (_ [name identifier])
+ (list#each (function (_ [name identifier])
(list (code.local_identifier name) (as_is identifier))))
- list\conjoint))]
+ list#conjoint))]
(~ body)))))))
(def: (name_side module_side? parser)
@@ -63,11 +63,11 @@
full_identifier
(<>.either <code>.local_identifier
full_identifier))
- (<>\each bit\encoded <code>.bit)
- (<>\each nat\encoded <code>.nat)
- (<>\each int\encoded <code>.int)
- (<>\each rev\encoded <code>.rev)
- (<>\each frac\encoded <code>.frac)
+ (<>#each bit#encoded <code>.bit)
+ (<>#each nat#encoded <code>.nat)
+ (<>#each int#encoded <code>.int)
+ (<>#each rev#encoded <code>.rev)
+ (<>#each frac#encoded <code>.frac)
)))
(def: (part module_side?)
@@ -107,7 +107,7 @@
(^template [<tag>]
[[meta {<tag> elems}]
- [meta {<tag> (list\each (applied env) elems)}]])
+ [meta {<tag> (list#each (applied env) elems)}]])
([.#Form]
[.#Variant]
[.#Tuple])
@@ -124,8 +124,8 @@
(exception: .public (irregular_arguments [expected Nat
actual Nat])
(exception.report
- ["Expected" (\ nat.decimal encoded expected)]
- ["Actual" (\ nat.decimal encoded actual)]))
+ ["Expected" (# nat.decimal encoded expected)]
+ ["Actual" (# nat.decimal encoded actual)]))
(def: (macro (^slots [#parameters #template]))
(-> Local Macro)
@@ -137,7 +137,7 @@
(.let [environment (: Environment
(|> (list.zipped/2 #parameters inputs)
(dictionary.of_list text.hash)))]
- {.#Right [compiler (list\each (..applied environment) #template)]})
+ {.#Right [compiler (list#each (..applied environment) #template)]})
(exception.except ..irregular_arguments [parameters_amount inputs_amount]))))))
(def: local
@@ -162,7 +162,7 @@
{.#Some _}
true)]}))
- g!pop (local.push (list\each (function (_ local)
+ g!pop (local.push (list#each (function (_ local)
[[here_name (value@ #name local)]
(..macro local)])
locals))]
diff --git a/stdlib/source/library/lux/math/infix.lux b/stdlib/source/library/lux/math/infix.lux
index 36dd132d6..1983f9228 100644
--- a/stdlib/source/library/lux/math/infix.lux
+++ b/stdlib/source/library/lux/math/infix.lux
@@ -4,12 +4,12 @@
[abstract
[monad {"+" [do]}]]
[control
- ["<>" parser ("[1]\[0]" functor)
+ ["<>" parser ("[1]#[0]" functor)
["<[0]>" code {"+" [Parser]}]]]
[data
["[0]" product]
[collection
- ["[0]" list ("[1]\[0]" mix)]]]
+ ["[0]" list ("[1]#[0]" mix)]]]
[macro
[syntax {"+" [syntax:]}]
["[0]" code]]
@@ -29,13 +29,13 @@
(def: literal
(Parser Code)
($_ <>.either
- (<>\each code.bit <code>.bit)
- (<>\each code.nat <code>.nat)
- (<>\each code.int <code>.int)
- (<>\each code.rev <code>.rev)
- (<>\each code.frac <code>.frac)
- (<>\each code.text <code>.text)
- (<>\each code.identifier <code>.identifier)))
+ (<>#each code.bit <code>.bit)
+ (<>#each code.nat <code>.nat)
+ (<>#each code.int <code>.int)
+ (<>#each code.rev <code>.rev)
+ (<>#each code.frac <code>.frac)
+ (<>#each code.text <code>.text)
+ (<>#each code.identifier <code>.identifier)))
(def: expression
(Parser Infix)
@@ -49,7 +49,7 @@
init_op <code>.any
init_param expression
steps (<>.some (<>.and <code>.any expression))]
- (in (list\mix (function (_ [op param] [_subject _op _param])
+ (in (list#mix (function (_ [op param] [_subject _op _param])
[{#Binary _subject _op _param} op param])
[init_subject init_op init_param]
steps))))
diff --git a/stdlib/source/library/lux/math/logic/continuous.lux b/stdlib/source/library/lux/math/logic/continuous.lux
index 26d77139c..51a915d43 100644
--- a/stdlib/source/library/lux/math/logic/continuous.lux
+++ b/stdlib/source/library/lux/math/logic/continuous.lux
@@ -6,10 +6,10 @@
[monoid {"+" [Monoid]}]]
[math
[number
- ["/" rev ("[1]\[0]" interval)]]]]])
+ ["/" rev ("[1]#[0]" interval)]]]]])
-(def: .public false Rev /\bottom)
-(def: .public true Rev /\top)
+(def: .public false Rev /#bottom)
+(def: .public true Rev /#top)
(template [<name> <chooser> <monoid> <identity>]
[(def: .public <name>
diff --git a/stdlib/source/library/lux/math/modular.lux b/stdlib/source/library/lux/math/modular.lux
index 19d08eb66..711281162 100644
--- a/stdlib/source/library/lux/math/modular.lux
+++ b/stdlib/source/library/lux/math/modular.lux
@@ -15,13 +15,13 @@
["<[0]>" code]]]
[data
["[0]" product]
- ["[0]" text ("[1]\[0]" monoid)]]
+ ["[0]" text ("[1]#[0]" monoid)]]
[macro
[syntax {"+" [syntax:]}]
["[0]" code]]
[math
[number
- ["i" int ("[1]\[0]" decimal)]]]
+ ["i" int ("[1]#[0]" decimal)]]]
[type
abstract]]]
["[0]" // "_"
@@ -49,8 +49,8 @@
(exception: .public [%] (incorrect_modulus [modulus (Modulus %)
parsed Int])
(exception.report
- ["Expected" (i\encoded (//.divisor modulus))]
- ["Actual" (i\encoded parsed)]))
+ ["Expected" (i#encoded (//.divisor modulus))]
+ ["Actual" (i#encoded parsed)]))
(def: separator
" mod ")
@@ -65,10 +65,10 @@
(def: (encoded modular)
(let [[_ value] (:representation modular)]
- ($_ text\composite
- (i\encoded value)
+ ($_ text#composite
+ (i#encoded value)
..separator
- (i\encoded (//.divisor expected)))))
+ (i#encoded (//.divisor expected)))))
(def: decoded
(<text>.result
@@ -143,8 +143,8 @@
(exception: .public [r% s%] (moduli_are_not_equal [reference (Modulus r%)
subject (Modulus s%)])
(exception.report
- ["Reference" (i\encoded (//.divisor reference))]
- ["Subject" (i\encoded (//.divisor subject))]))
+ ["Reference" (i#encoded (//.divisor reference))]
+ ["Subject" (i#encoded (//.divisor subject))]))
(def: .public (adapter reference subject)
(All (_ r% s%)
diff --git a/stdlib/source/library/lux/math/number.lux b/stdlib/source/library/lux/math/number.lux
index b525754f2..81f38d91b 100644
--- a/stdlib/source/library/lux/math/number.lux
+++ b/stdlib/source/library/lux/math/number.lux
@@ -36,22 +36,22 @@
(if (..separator_prefixed? repr')
{try.#Failure <error>}
(let [repr (..without_separators repr')]
- (case (\ <nat> decoded repr)
+ (case (# <nat> decoded repr)
{try.#Success value}
{try.#Success [state (list [meta {.#Nat value}])]}
(^multi {try.#Failure _}
- [(\ <int> decoded repr)
+ [(# <int> decoded repr)
{try.#Success value}])
{try.#Success [state (list [meta {.#Int value}])]}
(^multi {try.#Failure _}
- [(\ <rev> decoded repr)
+ [(# <rev> decoded repr)
{try.#Success value}])
{try.#Success [state (list [meta {.#Rev value}])]}
(^multi {try.#Failure _}
- [(\ <frac> decoded repr)
+ [(# <frac> decoded repr)
{try.#Success value}])
{try.#Success [state (list [meta {.#Frac value}])]}
diff --git a/stdlib/source/library/lux/math/number/complex.lux b/stdlib/source/library/lux/math/number/complex.lux
index e6b447d69..3a785bc9e 100644
--- a/stdlib/source/library/lux/math/number/complex.lux
+++ b/stdlib/source/library/lux/math/number/complex.lux
@@ -12,7 +12,7 @@
["<[0]>" code {"+" [Parser]}]]]
[data
[collection
- ["[0]" list ("[1]\[0]" functor)]]]
+ ["[0]" list ("[1]#[0]" functor)]]]
[macro
[syntax {"+" [syntax:]}]
["[0]" code]]
@@ -297,7 +297,7 @@
nth_phi (|> input ..argument (f./ r_nth))
slice (|> math.pi (f.* +2.0) (f./ r_nth))]
(|> (list.indices nth)
- (list\each (function (_ nth')
+ (list#each (function (_ nth')
(let [inner (|> nth' .int int.frac
(f.* slice)
(f.+ nth_phi))
diff --git a/stdlib/source/library/lux/math/number/frac.lux b/stdlib/source/library/lux/math/number/frac.lux
index 892274c28..44e09abc9 100644
--- a/stdlib/source/library/lux/math/number/frac.lux
+++ b/stdlib/source/library/lux/math/number/frac.lux
@@ -222,7 +222,7 @@
(template [<cast> <hex> <name>]
[(def: <name>
(|> <hex>
- (\ //nat.hex decoded)
+ (# //nat.hex decoded)
try.trusted
<cast>))]
@@ -352,7 +352,7 @@
after_length (//nat.- after_offset ("lux text size" representation))]
exponent (|> representation
("lux text clip" after_offset after_length)
- (\ codec decoded))]
+ (# codec decoded))]
(in [("lux text clip" 0 split_index representation)
(//int.* <factor> (.int exponent))]))])
([+1 (^or [{.#Some split_index} {.#None} {.#None} {.#None}]
@@ -377,9 +377,9 @@
1 "-"
0 "+"
_ (undefined))
- (\ <nat> encoded (.nat mantissa))
+ (# <nat> encoded (.nat mantissa))
".0E"
- (\ <int> encoded exponent))))
+ (# <int> encoded exponent))))
(def: (decoded representation)
(let [negative? (text.starts_with? "-" representation)
@@ -394,16 +394,16 @@
after_length (//nat.- after_offset ("lux text size" mantissa))]
decimal (|> mantissa
("lux text clip" after_offset after_length)
- (\ <nat> decoded))]
+ (# <nat> decoded))]
(in [("lux text clip" 0 split_index mantissa)
decimal]))
{.#None}
{try.#Failure ("lux text concat" <error> representation)})
.let [whole ("lux text clip" 1 (-- ("lux text size" whole)) whole)]
- mantissa (\ <nat> decoded (case decimal
+ mantissa (# <nat> decoded (case decimal
0 whole
- _ ("lux text concat" whole (\ <nat> encoded decimal))))
+ _ ("lux text concat" whole (# <nat> encoded decimal))))
.let [sign (if negative? 1 0)]]
(in (..of_bits
($_ //i64.or
diff --git a/stdlib/source/library/lux/math/number/i16.lux b/stdlib/source/library/lux/math/number/i16.lux
index b191de971..9323c14ce 100644
--- a/stdlib/source/library/lux/math/number/i16.lux
+++ b/stdlib/source/library/lux/math/number/i16.lux
@@ -20,7 +20,7 @@
(I64 size)))
-(def: .public equivalence (Equivalence I16) (\ ..sub &equivalence))
-(def: .public width Nat (\ ..sub bits))
-(def: .public i16 (-> I64 I16) (\ ..sub narrow))
-(def: .public i64 (-> I16 I64) (\ ..sub wide))
+(def: .public equivalence (Equivalence I16) (# ..sub &equivalence))
+(def: .public width Nat (# ..sub bits))
+(def: .public i16 (-> I64 I16) (# ..sub narrow))
+(def: .public i64 (-> I16 I64) (# ..sub wide))
diff --git a/stdlib/source/library/lux/math/number/i32.lux b/stdlib/source/library/lux/math/number/i32.lux
index 8d0e7e2b3..3f10bf254 100644
--- a/stdlib/source/library/lux/math/number/i32.lux
+++ b/stdlib/source/library/lux/math/number/i32.lux
@@ -20,7 +20,7 @@
(I64 size)))
-(def: .public equivalence (Equivalence I32) (\ ..sub &equivalence))
-(def: .public width Nat (\ ..sub bits))
-(def: .public i32 (-> I64 I32) (\ ..sub narrow))
-(def: .public i64 (-> I32 I64) (\ ..sub wide))
+(def: .public equivalence (Equivalence I32) (# ..sub &equivalence))
+(def: .public width Nat (# ..sub bits))
+(def: .public i32 (-> I64 I32) (# ..sub narrow))
+(def: .public i64 (-> I32 I64) (# ..sub wide))
diff --git a/stdlib/source/library/lux/math/number/i64.lux b/stdlib/source/library/lux/math/number/i64.lux
index cc36ed7c5..ea2e0c4f9 100644
--- a/stdlib/source/library/lux/math/number/i64.lux
+++ b/stdlib/source/library/lux/math/number/i64.lux
@@ -159,7 +159,7 @@
(repetitions size "1")
(repetitions size "0")))
- high (try.trusted (\ n.binary decoded pattern))
+ high (try.trusted (# n.binary decoded pattern))
low (..right_rotated size high)]
(function (_ value)
(..or (..right_shifted size (..and high value))
diff --git a/stdlib/source/library/lux/math/number/i8.lux b/stdlib/source/library/lux/math/number/i8.lux
index 4f6695535..c33aca004 100644
--- a/stdlib/source/library/lux/math/number/i8.lux
+++ b/stdlib/source/library/lux/math/number/i8.lux
@@ -20,7 +20,7 @@
(I64 size)))
-(def: .public equivalence (Equivalence I8) (\ ..sub &equivalence))
-(def: .public width Nat (\ ..sub bits))
-(def: .public i8 (-> I64 I8) (\ ..sub narrow))
-(def: .public i64 (-> I8 I64) (\ ..sub wide))
+(def: .public equivalence (Equivalence I8) (# ..sub &equivalence))
+(def: .public width Nat (# ..sub bits))
+(def: .public i8 (-> I64 I8) (# ..sub narrow))
+(def: .public i64 (-> I8 I64) (# ..sub wide))
diff --git a/stdlib/source/library/lux/math/number/int.lux b/stdlib/source/library/lux/math/number/int.lux
index 9c91fa83b..be36680d2 100644
--- a/stdlib/source/library/lux/math/number/int.lux
+++ b/stdlib/source/library/lux/math/number/int.lux
@@ -196,8 +196,8 @@
[addition ..+ +0]
[multiplication ..* +1]
- [maximum ..max (\ ..interval bottom)]
- [minimum ..min (\ ..interval top)]
+ [maximum ..max (# ..interval bottom)]
+ [minimum ..min (# ..interval top)]
)
(def: -sign "-")
@@ -209,8 +209,8 @@
(def: (encoded value)
(if (..< +0 value)
- (|> value ++ ..opposite .nat ++ (\ <codec> encoded) ("lux text concat" ..-sign))
- (|> value .nat (\ <codec> encoded) ("lux text concat" ..+sign))))
+ (|> value ++ ..opposite .nat ++ (# <codec> encoded) ("lux text concat" ..-sign))
+ (|> value .nat (# <codec> encoded) ("lux text concat" ..+sign))))
(def: (decoded repr)
(let [input_size ("lux text size" repr)]
@@ -219,14 +219,14 @@
(^ (static ..+sign))
(|> repr
("lux text clip" 1 (-- input_size))
- (\ <codec> decoded)
- (\ try.functor each .int))
+ (# <codec> decoded)
+ (# try.functor each .int))
(^ (static ..-sign))
(|> repr
("lux text clip" 1 (-- input_size))
- (\ <codec> decoded)
- (\ try.functor each (|>> -- .int ..opposite --)))
+ (# <codec> decoded)
+ (# try.functor each (|>> -- .int ..opposite --)))
_
{try.#Failure <error>})
diff --git a/stdlib/source/library/lux/math/number/nat.lux b/stdlib/source/library/lux/math/number/nat.lux
index 428b8a68e..4eccc7d13 100644
--- a/stdlib/source/library/lux/math/number/nat.lux
+++ b/stdlib/source/library/lux/math/number/nat.lux
@@ -177,8 +177,8 @@
[addition ..+ 0]
[multiplication ..* 1]
- [minimum ..min (\ ..interval top)]
- [maximum ..max (\ ..interval bottom)]
+ [minimum ..min (# ..interval top)]
+ [maximum ..max (# ..interval bottom)]
)
(def: (binary_character value)
diff --git a/stdlib/source/library/lux/math/number/ratio.lux b/stdlib/source/library/lux/math/number/ratio.lux
index b7ef79ccb..cabd33b4b 100644
--- a/stdlib/source/library/lux/math/number/ratio.lux
+++ b/stdlib/source/library/lux/math/number/ratio.lux
@@ -15,12 +15,12 @@
["<[0]>" code {"+" [Parser]}]]]
[data
["[0]" product]
- ["[0]" text ("[1]\[0]" monoid)]]
+ ["[0]" text ("[1]#[0]" monoid)]]
[macro
[syntax {"+" [syntax:]}]
["[0]" code]]]]
[//
- ["n" nat ("[1]\[0]" decimal)]])
+ ["n" nat ("[1]#[0]" decimal)]])
(type: .public Ratio
(Record
@@ -132,19 +132,19 @@
(Codec Text Ratio)
(def: (encoded (^slots [#numerator #denominator]))
- ($_ text\composite (n\encoded #numerator) ..separator (n\encoded #denominator)))
+ ($_ text#composite (n#encoded #numerator) ..separator (n#encoded #denominator)))
(def: (decoded input)
(case (text.split_by ..separator input)
{.#Some [num denom]}
(do try.monad
- [numerator (n\decoded num)
- denominator (n\decoded denom)]
+ [numerator (n#decoded num)
+ denominator (n#decoded denom)]
(in (normal [#numerator numerator
#denominator denominator])))
{.#None}
- {.#Left (text\composite "Invalid syntax for ratio: " input)})))
+ {.#Left (text#composite "Invalid syntax for ratio: " input)})))
(template [<identity> <composite> <name>]
[(implementation: .public <name>
diff --git a/stdlib/source/library/lux/math/number/rev.lux b/stdlib/source/library/lux/math/number/rev.lux
index 9228d6a65..5acce7f5b 100644
--- a/stdlib/source/library/lux/math/number/rev.lux
+++ b/stdlib/source/library/lux/math/number/rev.lux
@@ -212,7 +212,7 @@
[(implementation: .public <name>
(Monoid Rev)
- (def: identity (\ interval <identity>))
+ (def: identity (# interval <identity>))
(def: composite <composite>))]
[addition ..+ bottom]
@@ -230,7 +230,7 @@
(Codec Text Rev)
(def: (encoded value)
- (let [raw_output (\ <codec> encoded (.nat value))
+ (let [raw_output (# <codec> encoded (.nat value))
max_num_chars (//nat.+ (//nat./ <char_bit_size> //i64.width)
(case (//nat.% <char_bit_size> //i64.width)
0 0
@@ -252,7 +252,7 @@
(if (//nat.> 1 repr_size)
(case ("lux text char" 0 repr)
(^ (char "."))
- (case (\ <codec> decoded (..decimals repr))
+ (case (# <codec> decoded (..decimals repr))
{try.#Success output}
{try.#Success (.rev output)}
@@ -291,11 +291,11 @@
(array.read! idx)
(maybe.else 0)))
-(def: digits\put!
+(def: digits#put!
(-> Nat Nat Digits Digits)
array.write!)
-(def: (digits\times_5! idx output)
+(def: (digits#times_5! idx output)
(-> Nat Digits Digits)
(loop [idx idx
carry 0
@@ -307,17 +307,17 @@
(//nat.+ carry))]
(recur (-- idx)
(//nat./ 10 raw)
- (digits\put! idx (//nat.% 10 raw) output))))))
+ (digits#put! idx (//nat.% 10 raw) output))))))
(def: (power_digits power)
(-> Nat Digits)
(loop [times power
output (|> (..digits [])
- (digits\put! power 1))]
+ (digits#put! power 1))]
(if (//int.< +0 (.int times))
output
(recur (-- times)
- (digits\times_5! power output)))))
+ (digits#times_5! power output)))))
(def: (format digits)
(-> Digits Text)
@@ -335,10 +335,10 @@
(recur (-- idx)
false
("lux text concat"
- (\ //nat.decimal encoded digit)
+ (# //nat.decimal encoded digit)
output)))))))
-(def: (digits\+! param subject)
+(def: (digits#+! param subject)
(-> Digits Digits Digits)
(loop [idx (-- //i64.width)
carry 0
@@ -351,7 +351,7 @@
(..digit idx subject))]
(recur (-- idx)
(//nat./ 10 raw)
- (digits\put! idx (//nat.% 10 raw) output))))))
+ (digits#put! idx (//nat.% 10 raw) output))))))
(def: (text_digits input)
(-> Text (Maybe Digits))
@@ -367,10 +367,10 @@
{.#Some digit}
(recur (++ idx)
- (digits\put! idx digit output)))
+ (digits#put! idx digit output)))
{.#Some output})))))
-(def: (digits\< param subject)
+(def: (digits#< param subject)
(-> Digits Digits Bit)
(loop [idx 0]
(and (//nat.< //i64.width idx)
@@ -380,7 +380,7 @@
(recur (++ idx))
(//nat.< pd sd))))))
-(def: (digits\-!' idx param subject)
+(def: (digits#-!' idx param subject)
(-> Nat Nat Digits Digits)
(let [sd (..digit idx subject)]
(if (//nat.< param sd)
@@ -388,18 +388,18 @@
(//nat.+ 10)
(//nat.- param))]
(|> subject
- (digits\put! idx diff)
- (digits\-!' (-- idx) 1)))
- (digits\put! idx (//nat.- param sd) subject))))
+ (digits#put! idx diff)
+ (digits#-!' (-- idx) 1)))
+ (digits#put! idx (//nat.- param sd) subject))))
-(def: (digits\-! param subject)
+(def: (digits#-! param subject)
(-> Digits Digits Digits)
(loop [idx (-- //i64.width)
output subject]
(if (//int.< +0 (.int idx))
output
(recur (-- idx)
- (digits\-!' idx (..digit idx param) output)))))
+ (digits#-!' idx (..digit idx param) output)))))
(implementation: .public decimal
(Codec Text Rev)
@@ -416,7 +416,7 @@
(if (//int.< +0 (.int idx))
("lux text concat" "." (..format digits))
(if (//i64.one? idx input)
- (let [digits' (digits\+! (power_digits (//nat.- idx last_idx))
+ (let [digits' (digits#+! (power_digits (//nat.- idx last_idx))
digits)]
(recur (-- idx)
digits'))
@@ -441,10 +441,10 @@
output 0]
(if (//nat.< //i64.width idx)
(let [power (power_digits idx)]
- (if (digits\< power digits)
+ (if (digits#< power digits)
... Skip power
(recur digits (++ idx) output)
- (recur (digits\-! power digits)
+ (recur (digits#-! power digits)
(++ idx)
(//i64.one (//nat.- idx (-- //i64.width)) output))))
{try.#Success (.rev output)}))
diff --git a/stdlib/source/library/lux/math/random.lux b/stdlib/source/library/lux/math/random.lux
index 6db4dc53f..47c83ad6c 100644
--- a/stdlib/source/library/lux/math/random.lux
+++ b/stdlib/source/library/lux/math/random.lux
@@ -7,11 +7,11 @@
[apply {"+" [Apply]}]
["[0]" monad {"+" [Monad do]}]]
[data
- ["[0]" text {"+" [Char]} ("[1]\[0]" monoid)
+ ["[0]" text {"+" [Char]} ("[1]#[0]" monoid)
["[0]" unicode "_"
["[1]" set]]]
[collection
- ["[0]" list ("[1]\[0]" mix)]
+ ["[0]" list ("[1]#[0]" mix)]
["[0]" array {"+" [Array]}]
["[0]" dictionary {"+" [Dictionary]}]
["[0]" queue {"+" [Queue]}]
@@ -126,7 +126,7 @@
(template [<name> <type> <cast>]
[(def: .public <name>
(Random <type>)
- (\ ..monad each <cast> ..i64))]
+ (# ..monad each <cast> ..i64))]
[nat Nat .nat]
[int Int .int]
@@ -135,13 +135,13 @@
(def: .public frac
(Random Frac)
- (\ ..monad each (|>> .i64 f.of_bits) ..nat))
+ (# ..monad each (|>> .i64 f.of_bits) ..nat))
(def: .public safe_frac
(Random Frac)
(let [mantissa_range (.int (i64.left_shifted 53 1))
mantissa_max (i.frac (-- mantissa_range))]
- (\ ..monad each
+ (# ..monad each
(|>> (i.% mantissa_range)
i.frac
(f./ mantissa_max))
@@ -155,17 +155,17 @@
in_range (: (-> Char Char)
(|>> (n.% size) (n.+ start)))]
(|> ..nat
- (\ ..monad each in_range)
+ (# ..monad each in_range)
(..only (unicode.member? set)))))
(def: .public (text char_gen size)
(-> (Random Char) Nat (Random Text))
(if (n.= 0 size)
- (\ ..monad in "")
+ (# ..monad in "")
(do ..monad
[x char_gen
xs (text char_gen (-- size))]
- (in (text\composite (text.of_char x) xs)))))
+ (in (text#composite (text.of_char x) xs)))))
(template [<name> <set>]
[(def: .public <name>
@@ -243,7 +243,7 @@
[x value_gen
xs (list (-- size) value_gen)]
(in {.#Item x xs}))
- (\ ..monad in (.list))))
+ (# ..monad in (.list))))
(def: .public (row size value_gen)
(All (_ a) (-> Nat (Random a) (Random (Row a))))
@@ -252,7 +252,7 @@
[x value_gen
xs (row (-- size) value_gen)]
(in (row.suffix x xs)))
- (\ ..monad in row.empty)))
+ (# ..monad in row.empty)))
(template [<name> <type> <ctor>]
[(def: .public (<name> size value_gen)
@@ -263,7 +263,7 @@
[array Array array.of_list]
[queue Queue queue.of_list]
- [stack Stack (list\mix stack.top stack.empty)]
+ [stack Stack (list#mix stack.top stack.empty)]
)
(def: .public (set hash size value_gen)
@@ -278,7 +278,7 @@
(if (n.= size (set.size xs+))
(in xs+)
(recur [])))))
- (\ ..monad in (set.empty hash))))
+ (# ..monad in (set.empty hash))))
(def: .public (dictionary hash size key_gen value_gen)
(All (_ k v) (-> (Hash k) Nat (Random k) (Random v) (Random (Dictionary k v))))
@@ -293,50 +293,50 @@
(if (n.= size (dictionary.size kv+))
(in kv+)
(recur [])))))
- (\ ..monad in (dictionary.empty hash))))
+ (# ..monad in (dictionary.empty hash))))
(def: .public instant
(Random Instant)
- (\ ..monad each instant.of_millis ..int))
+ (# ..monad each instant.of_millis ..int))
(def: .public date
(Random Date)
- (\ ..monad each instant.date ..instant))
+ (# ..monad each instant.date ..instant))
(def: .public time
(Random Time)
- (\ ..monad each instant.time ..instant))
+ (# ..monad each instant.time ..instant))
(def: .public duration
(Random Duration)
- (\ ..monad each duration.of_millis ..int))
+ (# ..monad each duration.of_millis ..int))
(def: .public month
(Random Month)
- (let [(^open "\[0]") ..monad]
- (..either (..either (..either (\in {month.#January})
- (..either (\in {month.#February})
- (\in {month.#March})))
- (..either (\in {month.#April})
- (..either (\in {month.#May})
- (\in {month.#June}))))
- (..either (..either (\in {month.#July})
- (..either (\in {month.#August})
- (\in {month.#September})))
- (..either (\in {month.#October})
- (..either (\in {month.#November})
- (\in {month.#December})))))))
+ (let [(^open "_#[0]") ..monad]
+ (..either (..either (..either (_#in {month.#January})
+ (..either (_#in {month.#February})
+ (_#in {month.#March})))
+ (..either (_#in {month.#April})
+ (..either (_#in {month.#May})
+ (_#in {month.#June}))))
+ (..either (..either (_#in {month.#July})
+ (..either (_#in {month.#August})
+ (_#in {month.#September})))
+ (..either (_#in {month.#October})
+ (..either (_#in {month.#November})
+ (_#in {month.#December})))))))
(def: .public day
(Random Day)
- (let [(^open "\[0]") ..monad]
- (..either (..either (\in {day.#Sunday})
- (..either (\in {day.#Monday})
- (\in {day.#Tuesday})))
- (..either (..either (\in {day.#Wednesday})
- (\in {day.#Thursday}))
- (..either (\in {day.#Friday})
- (\in {day.#Saturday}))))))
+ (let [(^open "_#[0]") ..monad]
+ (..either (..either (_#in {day.#Sunday})
+ (..either (_#in {day.#Monday})
+ (_#in {day.#Tuesday})))
+ (..either (..either (_#in {day.#Wednesday})
+ (_#in {day.#Thursday}))
+ (..either (_#in {day.#Friday})
+ (_#in {day.#Saturday}))))))
(def: .public (result prng calc)
(All (_ a) (-> PRNG (Random a) [PRNG a]))
diff --git a/stdlib/source/library/lux/meta.lux b/stdlib/source/library/lux/meta.lux
index dbd7924ce..796cabca8 100644
--- a/stdlib/source/library/lux/meta.lux
+++ b/stdlib/source/library/lux/meta.lux
@@ -10,10 +10,10 @@
["[0]" try {"+" [Try]}]]
[data
["[0]" product]
- ["[0]" text ("[1]\[0]" monoid order)]
- ["[0]" name ("[1]\[0]" codec equivalence)]
+ ["[0]" text ("[1]#[0]" monoid order)]
+ ["[0]" name ("[1]#[0]" codec equivalence)]
[collection
- ["[0]" list ("[1]\[0]" monoid monad)]
+ ["[0]" list ("[1]#[0]" monoid monad)]
[dictionary
["[0]" plist]]]]
[macro
@@ -121,7 +121,7 @@
{try.#Success [lux module]}
_
- {try.#Failure ($_ text\composite "Unknown module: " name)})))
+ {try.#Failure ($_ text#composite "Unknown module: " name)})))
(def: .public current_module_name
(Meta Text)
@@ -135,10 +135,10 @@
(def: .public current_module
(Meta Module)
- (let [(^open "\[0]") ..monad]
+ (let [(^open "#[0]") ..monad]
(|> ..current_module_name
- (\each ..module)
- \conjoint)))
+ (#each ..module)
+ #conjoint)))
(def: (macro_type? type)
(-> Type Bit)
@@ -158,7 +158,7 @@
(in [module_name name]))
_
- (\ ..monad in name)))
+ (# ..monad in name)))
(def: .public (macro full_name)
(-> Name (Meta (Maybe Macro)))
@@ -249,13 +249,13 @@
{try.#Success [lux type']}))
_
- (\ ..monad in type)))
+ (# ..monad in type)))
(def: .public (var_type name)
(-> Text (Meta Type))
(function (_ lux)
(let [test (: (-> [Text [Type Any]] Bit)
- (|>> product.left (text\= name)))]
+ (|>> product.left (text#= name)))]
(case (do maybe.monad
[scope (list.example (function (_ env)
(or (list.any? test (: (List [Text [Type Any]])
@@ -273,7 +273,7 @@
((clean_type var_type) lux)
{.#None}
- {try.#Failure ($_ text\composite "Unknown variable: " name)}))))
+ {try.#Failure ($_ text#composite "Unknown variable: " name)}))))
(def: without_lux_runtime
(-> (List Text) (List Text))
@@ -283,12 +283,12 @@
(def: listing_separator
Text
- ($_ text\composite text.new_line " "))
+ ($_ text#composite text.new_line " "))
(def: module_listing
(-> (List Text) Text)
(|>> ..without_lux_runtime
- (list.sorted text\<)
+ (list.sorted text#<)
(text.interposed ..listing_separator)))
(def: .public (definition name)
@@ -310,16 +310,16 @@
(let [current_module (|> lux (value@ .#current_module) (maybe.else "???"))
all_known_modules (|> lux
(value@ .#modules)
- (list\each product.left)
+ (list#each product.left)
..module_listing)]
- {try.#Failure ($_ text\composite
- "Unknown definition: " (name\encoded name) text.new_line
+ {try.#Failure ($_ text#composite
+ "Unknown definition: " (name#encoded name) text.new_line
" Current module: " current_module text.new_line
(case (plist.value current_module (value@ .#modules lux))
{.#Some this_module}
(let [candidates (|> lux
(value@ .#modules)
- (list\each (function (_ [module_name module])
+ (list#each (function (_ [module_name module])
(|> module
(value@ .#definitions)
(list.all (function (_ [def_name global])
@@ -327,8 +327,8 @@
(^or {.#Definition [exported? _]}
{.#Type [exported? _]})
(if (and exported?
- (text\= normal_short def_name))
- {.#Some (name\encoded [module_name def_name])}
+ (text#= normal_short def_name))
+ {.#Some (name#encoded [module_name def_name])}
{.#None})
{.#Alias _}
@@ -340,17 +340,17 @@
{.#Slot _}
{.#None}))))))
list.together
- (list.sorted text\<)
+ (list.sorted text#<)
(text.interposed ..listing_separator))
imports (|> this_module
(value@ .#imports)
..module_listing)
aliases (|> this_module
(value@ .#module_aliases)
- (list\each (function (_ [alias real]) ($_ text\composite alias " => " real)))
- (list.sorted text\<)
+ (list#each (function (_ [alias real]) ($_ text#composite alias " => " real)))
+ (list.sorted text#<)
(text.interposed ..listing_separator))]
- ($_ text\composite
+ ($_ text#composite
" Candidates: " candidates text.new_line
" Imports: " imports text.new_line
" Aliases: " aliases text.new_line))
@@ -368,27 +368,27 @@
(let [[exported? def_type def_value] definition]
(if exported?
(in definition)
- (failure ($_ text\composite "Definition is not an export: " (name\encoded name)))))
+ (failure ($_ text#composite "Definition is not an export: " (name#encoded name)))))
{.#Type [exported? type labels]}
(if exported?
(in [exported? .Type type])
- (failure ($_ text\composite "Type is not an export: " (name\encoded name))))
+ (failure ($_ text#composite "Type is not an export: " (name#encoded name))))
{.#Alias de_aliased}
- (failure ($_ text\composite
+ (failure ($_ text#composite
"Aliases are not considered exports: "
- (name\encoded name)))
+ (name#encoded name)))
{.#Label _}
- (failure ($_ text\composite
+ (failure ($_ text#composite
"Tags are not considered exports: "
- (name\encoded name)))
+ (name#encoded name)))
{.#Slot _}
- (failure ($_ text\composite
+ (failure ($_ text#composite
"Slots are not considered exports: "
- (name\encoded name))))))
+ (name#encoded name))))))
(def: .public (definition_type name)
(-> Name (Meta Type))
@@ -405,14 +405,14 @@
(in .Type)
{.#Label _}
- (failure ($_ text\composite
+ (failure ($_ text#composite
"Tags have no type: "
- (name\encoded name)))
+ (name#encoded name)))
{.#Slot _}
- (failure ($_ text\composite
+ (failure ($_ text#composite
"Slots have no type: "
- (name\encoded name))))))
+ (name#encoded name))))))
(def: .public (type name)
(-> Name (Meta Type))
@@ -435,34 +435,34 @@
{.#Definition [exported? def_type def_value]}
(let [type_code (`` ("lux in-module" (~~ (static .prelude_module)) .type_code))]
(if (or (same? .Type def_type)
- (\ code.equivalence =
+ (# code.equivalence =
(type_code .Type)
(type_code def_type)))
(in (:as Type def_value))
- (..failure ($_ text\composite "Definition is not a type: " (name\encoded name)))))
+ (..failure ($_ text#composite "Definition is not a type: " (name#encoded name)))))
{.#Type [exported? type labels]}
(in type)
{.#Label _}
- (..failure ($_ text\composite "Tag is not a type: " (name\encoded name)))
+ (..failure ($_ text#composite "Tag is not a type: " (name#encoded name)))
{.#Slot _}
- (..failure ($_ text\composite "Slot is not a type: " (name\encoded name))))))
+ (..failure ($_ text#composite "Slot is not a type: " (name#encoded name))))))
(def: .public (globals module)
(-> Text (Meta (List [Text Global])))
(function (_ lux)
(case (plist.value module (value@ .#modules lux))
{.#None}
- {try.#Failure ($_ text\composite "Unknown module: " module)}
+ {try.#Failure ($_ text#composite "Unknown module: " module)}
{.#Some module}
{try.#Success [lux (value@ .#definitions module)]})))
(def: .public (definitions module)
(-> Text (Meta (List [Text Definition])))
- (\ ..monad each
+ (# ..monad each
(list.all (function (_ [name global])
(case global
{.#Alias de_aliased}
@@ -509,7 +509,7 @@
(case labels
(^or {.#Left labels}
{.#Right labels})
- (in {.#Some (list\each (|>> [module_name])
+ (in {.#Some (list#each (|>> [module_name])
{.#Item labels})}))
_
@@ -540,12 +540,12 @@
(-> Text Text (Meta Bit))
(do ..monad
[(^slots [.#imports]) (..module module)]
- (in (list.any? (text\= import) #imports))))
+ (in (list.any? (text#= import) #imports))))
(def: .public (imported? import)
(-> Text (Meta Bit))
- (\ ..functor each
- (|>> (value@ .#imports) (list.any? (text\= import)))
+ (# ..functor each
+ (|>> (value@ .#imports) (list.any? (text#= import)))
..current_module))
(template [<name> <tag> <description>]
@@ -557,14 +557,14 @@
this_module_name ..current_module_name]
(case (plist.value name (value@ .#definitions =module))
{.#Some {<tag> [exported? type group idx]}}
- (if (or (text\= this_module_name module)
+ (if (or (text#= this_module_name module)
exported?)
- (in [idx (list\each (|>> [module]) group) type])
- (..failure ($_ text\composite "Cannot access " <description> ": " (name\encoded tag_name) " from module " this_module_name)))
+ (in [idx (list#each (|>> [module]) group) type])
+ (..failure ($_ text#composite "Cannot access " <description> ": " (name#encoded tag_name) " from module " this_module_name)))
_
- (..failure ($_ text\composite
- "Unknown " <description> ": " (name\encoded tag_name))))))]
+ (..failure ($_ text#composite
+ "Unknown " <description> ": " (name#encoded tag_name))))))]
[tag .#Label "tag"]
[slot .#Slot "slot"]
@@ -579,8 +579,8 @@
(case global
{.#Type [exported? type labels]}
(if (or exported?
- (text\= this_module_name module))
- {.#Some [(list\each (|>> [module])
+ (text#= this_module_name module))
+ {.#Some [(list#each (|>> [module])
(case labels
{.#Left tags}
{.#Item tags}
@@ -603,8 +603,8 @@
{.#Some scopes}
{try.#Success [lux
- (list\each (|>> (value@ [.#locals .#mappings])
- (list\each (function (_ [name [type _]])
+ (list#each (|>> (value@ [.#locals .#mappings])
+ (list#each (function (_ [name [type _]])
[name type])))
scopes)]})))
@@ -642,7 +642,7 @@
(All (_ a) (-> (Try a) (Meta a)))
(case result
{try.#Success output}
- (\ ..monad in output)
+ (# ..monad in output)
{try.#Failure error}
(..failure error)))
@@ -650,7 +650,7 @@
(def: .public (eval type code)
(-> Type Code (Meta Any))
(do [! ..monad]
- [eval (\ ! each (value@ .#eval)
+ [eval (# ! each (value@ .#eval)
..compiler_state)]
(eval type code)))
diff --git a/stdlib/source/library/lux/meta/location.lux b/stdlib/source/library/lux/meta/location.lux
index 963c65712..cab265419 100644
--- a/stdlib/source/library/lux/meta/location.lux
+++ b/stdlib/source/library/lux/meta/location.lux
@@ -37,9 +37,9 @@
[file line column] it]
($_ "lux text concat"
"@"
- (`` (("lux in-module" (~~ (static .prelude_module)) .text\encoded) file)) separator
- (`` (("lux in-module" (~~ (static .prelude_module)) .nat\encoded) line)) separator
- (`` (("lux in-module" (~~ (static .prelude_module)) .nat\encoded) column)))))
+ (`` (("lux in-module" (~~ (static .prelude_module)) .text#encoded) file)) separator
+ (`` (("lux in-module" (~~ (static .prelude_module)) .nat#encoded) line)) separator
+ (`` (("lux in-module" (~~ (static .prelude_module)) .nat#encoded) column)))))
(def: \n
("lux i64 char" +10))
diff --git a/stdlib/source/library/lux/program.lux b/stdlib/source/library/lux/program.lux
index f78141b02..372f88fd2 100644
--- a/stdlib/source/library/lux/program.lux
+++ b/stdlib/source/library/lux/program.lux
@@ -11,10 +11,6 @@
["<>" parser
["<[0]>" code]
["<[0]>" cli]]]
- [data
- ["[0]" text]
- [collection
- ["[0]" list ("[1]\[0]" monad)]]]
[macro {"+" [with_identifiers]}
[syntax {"+" [syntax:]}]
["[0]" code]]]])
diff --git a/stdlib/source/library/lux/static.lux b/stdlib/source/library/lux/static.lux
index 83bc9358e..b895838db 100644
--- a/stdlib/source/library/lux/static.lux
+++ b/stdlib/source/library/lux/static.lux
@@ -16,7 +16,7 @@
(template [<name> <type> <format>]
[(syntax: .public (<name> [expression <code>.any])
- (\ meta.monad each
+ (# meta.monad each
(|>> (:as <type>) <format> list)
(meta.eval <type> expression)))]
diff --git a/stdlib/source/library/lux/target/common_lisp.lux b/stdlib/source/library/lux/target/common_lisp.lux
index 77270308d..95f2f30dc 100644
--- a/stdlib/source/library/lux/target/common_lisp.lux
+++ b/stdlib/source/library/lux/target/common_lisp.lux
@@ -7,7 +7,7 @@
["[0]" text
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" monad monoid)]]]
+ ["[0]" list ("[1]#[0]" monad monoid)]]]
[macro
["[0]" template]]
[math
@@ -145,7 +145,7 @@
(def: .public args
(-> (List Var/1) Var/*)
- (|>> (list\each ..code)
+ (|>> (list#each ..code)
(text.interposed " ")
..as_form
:abstraction))
@@ -158,7 +158,7 @@
{.#Item _}
(|> singles
- (list\each ..code)
+ (list#each ..code)
(text.interposed " ")
(text.suffix " ")))
(format "&rest " (:representation rest))
@@ -167,7 +167,7 @@
(def: form
(-> (List (Expression Any)) Expression)
- (|>> (list\each ..code)
+ (|>> (list#each ..code)
(text.interposed " ")
..as_form
:abstraction))
@@ -188,7 +188,7 @@
(def: .public (labels definitions body)
(-> (List [Var/1 Lambda]) (Expression Any) (Computation Any))
(..form (list (..var "labels")
- (..form (list\each (function (_ [def_name [def_args def_body]])
+ (..form (list#each (function (_ [def_name [def_args def_body]])
(..form (list def_name (:transmutation def_args) def_body)))
definitions))
body)))
@@ -348,7 +348,7 @@
(-> (List [Var/1 (Expression Any)]) (List (Expression Any)) (Computation Any))
(..form (list& (..var <host_name>)
(|> bindings
- (list\each (function (_ [name value])
+ (list#each (function (_ [name value])
(..form (list name value))))
..form)
body)))]
@@ -393,7 +393,7 @@
(-> (List Handler) (Expression Any) (Computation Any))
(..form (list& (..var "handler-case")
body
- (list\each (function (_ [type condition handler])
+ (list#each (function (_ [type condition handler])
(..form (list type
(:transmutation (..args (list condition)))
handler)))
@@ -412,7 +412,7 @@
_
(:abstraction
- (format <prefix> (|> conditions (list\each ..symbol)
+ (format <prefix> (|> conditions (list#each ..symbol)
(list& (..symbol "or")) ..form
:representation)
" " (:representation expression)))))]
@@ -439,7 +439,7 @@
(def: .public (cond clauses else)
(-> (List [(Expression Any) (Expression Any)]) (Expression Any) (Computation Any))
(..form (list& (..var "cond")
- (list\composite (list\each (function (_ [test then])
+ (list#composite (list#each (function (_ [test then])
(..form (list test then)))
clauses)
(list (..form (list (..bool true) else)))))))
diff --git a/stdlib/source/library/lux/target/js.lux b/stdlib/source/library/lux/target/js.lux
index 7f5d30f02..52e7b0e13 100644
--- a/stdlib/source/library/lux/target/js.lux
+++ b/stdlib/source/library/lux/target/js.lux
@@ -7,7 +7,7 @@
["[0]" text
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" functor mix)]]]
+ ["[0]" list ("[1]#[0]" functor mix)]]]
[macro
["[0]" template]]
[math
@@ -117,7 +117,7 @@
(def: .public array
(-> (List Expression) Computation)
- (|>> (list\each ..code)
+ (|>> (list#each ..code)
(text.interposed ..argument_separator)
..element
:abstraction))
@@ -137,7 +137,7 @@
(def: .public (apply/* function inputs)
(-> Expression (List Expression) Computation)
(|> inputs
- (list\each ..code)
+ (list#each ..code)
(text.interposed ..argument_separator)
..expression
(format (:representation function))
@@ -149,7 +149,7 @@
(def: .public object
(-> (List [Text Expression]) Computation)
- (|>> (list\each (.function (_ [key val])
+ (|>> (list#each (.function (_ [key val])
(format (:representation (..string key)) ..field_separator (:representation val))))
(text.interposed ..argument_separator)
(text.enclosed ["{" "}"])
@@ -182,7 +182,7 @@
..block
(format "function " (:representation name)
(|> inputs
- (list\each ..code)
+ (list#each ..code)
(text.interposed ..argument_separator)
..expression)
" ")
@@ -201,7 +201,7 @@
..block
(format "function"
(|> inputs
- (list\each ..code)
+ (list#each ..code)
(text.interposed ..argument_separator)
..expression)
" ")
@@ -283,7 +283,7 @@
(-> Expression (List Expression) Computation)
(|> (format "new " (:representation constructor)
(|> inputs
- (list\each ..code)
+ (list#each ..code)
(text.interposed ..argument_separator)
..expression))
..expression
@@ -398,9 +398,9 @@
(-> Expression (List [(List Literal) Statement]) (Maybe Statement) Statement)
(:abstraction (format "switch (" (:representation input) ") "
(|> (format (|> cases
- (list\each (.function (_ [when then])
+ (list#each (.function (_ [when then])
(format (|> when
- (list\each (|>> :representation (text.enclosed ["case " ":"])))
+ (list#each (|>> :representation (text.enclosed ["case " ":"])))
(text.interposed text.new_line))
(..nested (:representation then)))))
(text.interposed text.new_line))
@@ -418,7 +418,7 @@
(def: .public (cond clauses else!)
(-> (List [Expression Statement]) Statement Statement)
- (list\mix (.function (_ [test then!] next!)
+ (list#mix (.function (_ [test then!] next!)
(..if test then! next!))
else!
(list.reversed clauses)))
diff --git a/stdlib/source/library/lux/target/jvm/attribute/code.lux b/stdlib/source/library/lux/target/jvm/attribute/code.lux
index e887537cc..80be8c567 100644
--- a/stdlib/source/library/lux/target/jvm/attribute/code.lux
+++ b/stdlib/source/library/lux/target/jvm/attribute/code.lux
@@ -7,9 +7,9 @@
["[0]" product]
["[0]" binary {"+" [Binary]}]
[format
- ["[0]F" binary {"+" [Writer]} ("[1]\[0]" monoid)]]
+ ["[0]F" binary {"+" [Writer]} ("[1]#[0]" monoid)]]
[collection
- ["[0]" row {"+" [Row]} ("[1]\[0]" functor mix)]]]
+ ["[0]" row {"+" [Row]} ("[1]#[0]" functor mix)]]]
[math
[number
["n" nat]]]]]
@@ -51,8 +51,8 @@
... attribute_info attributes[attributes_count];
(|> code
(value@ #attributes)
- (row\each length)
- (row\mix n.+ 0))))
+ (row#each length)
+ (row#mix n.+ 0))))
(def: .public (equivalence attribute_equivalence)
(All (_ attribute)
@@ -67,7 +67,7 @@
... https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.7.3
(def: .public (writer writer code)
(All (_ Attribute) (-> (Writer Attribute) (Writer (Code Attribute))))
- ($_ binaryF\composite
+ ($_ binaryF#composite
... u2 max_stack;
... u2 max_locals;
(///limit.writer (value@ #limit code))
diff --git a/stdlib/source/library/lux/target/jvm/bytecode.lux b/stdlib/source/library/lux/target/jvm/bytecode.lux
index daf475a97..b427b5b95 100644
--- a/stdlib/source/library/lux/target/jvm/bytecode.lux
+++ b/stdlib/source/library/lux/target/jvm/bytecode.lux
@@ -17,7 +17,7 @@
[text
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" functor mix)]
+ ["[0]" list ("[1]#[0]" functor mix)]
["[0]" dictionary {"+" [Dictionary]}]
["[0]" row {"+" [Row]}]]]
[macro
@@ -30,7 +30,7 @@
["[0]" / "_"
["[1][0]" address {"+" [Address]}]
["[1][0]" jump {"+" [Jump Big_Jump]}]
- ["_" instruction {"+" [Primitive_Array_Type Instruction Estimator]} ("[1]\[0]" monoid)]
+ ["_" instruction {"+" [Primitive_Array_Type Instruction Estimator]} ("[1]#[0]" monoid)]
["[1][0]" environment {"+" [Environment]}
[limit
["/[0]" registry {"+" [Register Registry]}]
@@ -97,8 +97,8 @@
(do try.monad
[[left_exceptions left_instruction] (left resolver)
[right_exceptions right_instruction] (right resolver)]
- (in [(\ row.monoid composite left_exceptions right_exceptions)
- (_\composite left_instruction right_instruction)]))))))
+ (in [(# row.monoid composite left_exceptions right_exceptions)
+ (_#composite left_instruction right_instruction)]))))))
(type: .public (Bytecode a)
(+State Try [Pool Environment Tracker] (Writer Relative a)))
@@ -585,7 +585,7 @@
(-> Nat (Bytecode Register))
(case (//unsigned.u1 id)
{try.#Success register}
- (\ ..monad in register)
+ (# ..monad in register)
{try.#Failure error}
(..except ..invalid_register [id])))
@@ -698,7 +698,7 @@
(def: (jump @from @to)
(-> Address Address (Try Any_Jump))
(do [! try.monad]
- [jump (\ ! each //signed.value
+ [jump (# ! each //signed.value
(/address.jump @from @to))]
(let [big? (n.> (//unsigned.value //unsigned.maximum/2)
(.nat (i.* (if (i.< +0 jump)
@@ -706,8 +706,8 @@
+1)
jump)))]
(if big?
- (\ ! each (|>> {.#Left}) (//signed.s4 jump))
- (\ ! each (|>> {.#Right}) (//signed.s2 jump))))))
+ (# ! each (|>> {.#Left}) (//signed.s4 jump))
+ (# ! each (|>> {.#Right}) (//signed.s2 jump))))))
(exception: .public (unset_label [label Label])
(exception.report
@@ -755,7 +755,7 @@
(do try.monad
[[expected @to] (..resolve_label label resolver)
_ (exception.assertion ..mismatched_environments [(name_of <instruction>) label @here expected actual]
- (\ /stack.equivalence = expected actual))
+ (# /stack.equivalence = expected actual))
jump (..jump @from @to)]
(case jump
{.#Left jump}
@@ -806,7 +806,7 @@
{.#Some [expected {.#Some @to}]}
(do try.monad
[_ (exception.assertion ..mismatched_environments [(name_of <instruction>) label @here expected actual]
- (\ /stack.equivalence = expected actual))
+ (# /stack.equivalence = expected actual))
jump (..jump @from @to)]
(case jump
{.#Left jump}
@@ -853,7 +853,7 @@
(in (let [@from (value@ #program_counter tracker)]
[[pool
environment'
- (|> (list\mix (..acknowledge_label actual) tracker (list& default at_minimum afterwards))
+ (|> (list#mix (..acknowledge_label actual) tracker (list& default at_minimum afterwards))
(with@ #program_counter program_counter'))]
[(function (_ resolver)
(let [get (: (-> Label (Maybe [Stack (Maybe Address)]))
@@ -868,9 +868,9 @@
(in [@default @at_minimum @afterwards]))
{.#Some [@default @at_minimum @afterwards]}
(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))
+ [>default (# ! each ..big_jump (..jump @from @default))
+ >at_minimum (# ! each ..big_jump (..jump @from @at_minimum))
+ >afterwards (monad.each ! (|>> (..jump @from) (# ! each ..big_jump))
@afterwards)]
(in [..no_exceptions (bytecode minimum >default [>at_minimum >afterwards])]))
@@ -896,7 +896,7 @@
(in (let [@from (value@ #program_counter tracker)]
[[pool
environment'
- (|> (list\mix (..acknowledge_label actual) tracker (list& default (list\each product.right cases)))
+ (|> (list#mix (..acknowledge_label actual) tracker (list& default (list#each product.right cases)))
(with@ #program_counter program_counter'))]
[(function (_ resolver)
(let [get (: (-> Label (Maybe [Stack (Maybe Address)]))
@@ -910,10 +910,10 @@
(in [@default @cases]))
{.#Some [@default @cases]}
(do [! try.monad]
- [>default (\ ! each ..big_jump (..jump @from @default))
+ [>default (# ! each ..big_jump (..jump @from @default))
>cases (|> @cases
- (monad.each ! (|>> (..jump @from) (\ ! each ..big_jump)))
- (\ ! each (|>> (list.zipped/2 (list\each product.left cases)))))]
+ (monad.each ! (|>> (..jump @from) (# ! each ..big_jump)))
+ (# ! each (|>> (list.zipped/2 (list#each product.left cases)))))]
(in [..no_exceptions (bytecode >default >cases)]))
{.#None}
@@ -980,8 +980,8 @@
[//constant/pool.#name method
//constant/pool.#descriptor (type.descriptor type)])
.let [consumption (|> inputs
- (list\each ..type_size)
- (list\mix n.+ (if <static?> 0 1))
+ (list#each ..type_size)
+ (list#mix n.+ (if <static?> 0 1))
//unsigned.u1
try.trusted)
production (|> output ..type_size //unsigned.u1 try.trusted)]]
diff --git a/stdlib/source/library/lux/target/jvm/bytecode/address.lux b/stdlib/source/library/lux/target/jvm/bytecode/address.lux
index 73239ffd2..a4dc3d5ce 100644
--- a/stdlib/source/library/lux/target/jvm/bytecode/address.lux
+++ b/stdlib/source/library/lux/target/jvm/bytecode/address.lux
@@ -38,7 +38,7 @@
(-> U2 (-> Address (Try Address)))
(|>> :representation
(///unsigned.+/2 distance)
- (\ try.functor each (|>> :abstraction))))
+ (# try.functor each (|>> :abstraction))))
(def: with_sign
(-> Address (Try S4))
@@ -60,7 +60,7 @@
(Equivalence Address)
(def: (= reference subject)
- (\ ///unsigned.equivalence =
+ (# ///unsigned.equivalence =
(:representation reference)
(:representation subject))))
diff --git a/stdlib/source/library/lux/target/jvm/bytecode/environment.lux b/stdlib/source/library/lux/target/jvm/bytecode/environment.lux
index 5583757a7..091c91798 100644
--- a/stdlib/source/library/lux/target/jvm/bytecode/environment.lux
+++ b/stdlib/source/library/lux/target/jvm/bytecode/environment.lux
@@ -74,7 +74,7 @@
(-> Stack Environment (Try [Stack Environment]))
(case (value@ ..#stack environment)
{.#Some actual}
- (if (\ /stack.equivalence = expected actual)
+ (if (# /stack.equivalence = expected actual)
{try.#Success [actual environment]}
(exception.except ..mismatched_stacks [expected actual]))
diff --git a/stdlib/source/library/lux/target/jvm/bytecode/environment/limit.lux b/stdlib/source/library/lux/target/jvm/bytecode/environment/limit.lux
index 131d968ef..f2f9407ab 100644
--- a/stdlib/source/library/lux/target/jvm/bytecode/environment/limit.lux
+++ b/stdlib/source/library/lux/target/jvm/bytecode/environment/limit.lux
@@ -9,7 +9,7 @@
[data
["[0]" product]
["[0]" format "_"
- ["[1]" binary {"+" [Writer]} ("[1]\[0]" monoid)]]]
+ ["[1]" binary {"+" [Writer]} ("[1]#[0]" monoid)]]]
[math
[number
["n" nat]]]]]
@@ -53,7 +53,7 @@
(def: .public (writer limit)
(Writer Limit)
- ($_ format\composite
+ ($_ format#composite
(/stack.writer (value@ #stack limit))
(/registry.writer (value@ #registry limit))
))
diff --git a/stdlib/source/library/lux/target/jvm/bytecode/environment/limit/registry.lux b/stdlib/source/library/lux/target/jvm/bytecode/environment/limit/registry.lux
index 506e041be..b3ba2cd9a 100644
--- a/stdlib/source/library/lux/target/jvm/bytecode/environment/limit/registry.lux
+++ b/stdlib/source/library/lux/target/jvm/bytecode/environment/limit/registry.lux
@@ -4,12 +4,12 @@
[abstract
["[0]" equivalence {"+" [Equivalence]}]]
[control
- ["[0]" try {"+" [Try]} ("[1]\[0]" functor)]]
+ ["[0]" try {"+" [Try]} ("[1]#[0]" functor)]]
[data
[format
[binary {"+" [Writer]}]]
[collection
- ["[0]" list ("[1]\[0]" functor mix)]]]
+ ["[0]" list ("[1]#[0]" functor mix)]]]
[math
[number
["n" nat]]]
@@ -39,12 +39,12 @@
(-> (Type Method) Nat)
(let [[type_variables inputs output exceptions] (/////type/parser.method type)]
(|> inputs
- (list\each (function (_ input)
+ (list#each (function (_ input)
(if (or (same? /////type.long input)
(same? /////type.double input))
..wide
..normal)))
- (list\mix n.+ 0))))
+ (list#mix n.+ 0))))
(template [<start> <name>]
[(def: .public <name>
@@ -52,7 +52,7 @@
(|>> ..minimal
(n.+ <start>)
/////unsigned.u2
- (try\each ..registry)))]
+ (try#each ..registry)))]
[0 static]
[1 virtual]
@@ -60,7 +60,7 @@
(def: .public equivalence
(Equivalence Registry)
- (\ equivalence.functor each
+ (# equivalence.functor each
(|>> :representation)
/////unsigned.equivalence))
diff --git a/stdlib/source/library/lux/target/jvm/bytecode/environment/limit/stack.lux b/stdlib/source/library/lux/target/jvm/bytecode/environment/limit/stack.lux
index c6c132a8c..32ca66e4f 100644
--- a/stdlib/source/library/lux/target/jvm/bytecode/environment/limit/stack.lux
+++ b/stdlib/source/library/lux/target/jvm/bytecode/environment/limit/stack.lux
@@ -31,7 +31,7 @@
(def: .public equivalence
(Equivalence Stack)
- (\ equivalence.functor each
+ (# equivalence.functor each
(|>> :representation)
/////unsigned.equivalence))
@@ -48,7 +48,7 @@
(-> U2 (-> Stack (Try Stack)))
(|>> :representation
(<op> amount)
- (\ try.functor each ..stack)))]
+ (# try.functor each ..stack)))]
[/////unsigned.+/2 push]
[/////unsigned.-/2 pop]
diff --git a/stdlib/source/library/lux/target/jvm/bytecode/instruction.lux b/stdlib/source/library/lux/target/jvm/bytecode/instruction.lux
index 85f97d48f..e2c89d203 100644
--- a/stdlib/source/library/lux/target/jvm/bytecode/instruction.lux
+++ b/stdlib/source/library/lux/target/jvm/bytecode/instruction.lux
@@ -609,7 +609,7 @@
tableswitch_size (try.trusted
(do [! try.monad]
[size (///unsigned.u2 size)]
- (\ ! each (|>> estimator ///unsigned.value)
+ (# ! each (|>> estimator ///unsigned.value)
(//address.move size //address.start))))
tableswitch_mutation (: Mutation
(function (_ [offset binary])
@@ -673,7 +673,7 @@
lookupswitch_size (try.trusted
(do [! try.monad]
[size (///unsigned.u2 size)]
- (\ ! each (|>> estimator ///unsigned.value)
+ (# ! each (|>> estimator ///unsigned.value)
(//address.move size //address.start))))
lookupswitch_mutation (: Mutation
(function (_ [offset binary])
diff --git a/stdlib/source/library/lux/target/jvm/class.lux b/stdlib/source/library/lux/target/jvm/class.lux
index 4d4333238..f3d6bfae5 100644
--- a/stdlib/source/library/lux/target/jvm/class.lux
+++ b/stdlib/source/library/lux/target/jvm/class.lux
@@ -10,7 +10,7 @@
[data
["[0]" product]
[format
- ["[0]F" binary {"+" [Writer]} ("[1]\[0]" monoid)]]
+ ["[0]F" binary {"+" [Writer]} ("[1]#[0]" monoid)]]
[collection
["[0]" row {"+" [Row]}]]]]]
["[0]" // "_"
@@ -114,7 +114,7 @@
(def: .public (writer class)
(Writer Class)
- (`` ($_ binaryF\composite
+ (`` ($_ binaryF#composite
(~~ (template [<writer> <slot>]
[(<writer> (value@ <slot> class))]
diff --git a/stdlib/source/library/lux/target/jvm/constant.lux b/stdlib/source/library/lux/target/jvm/constant.lux
index 51517ff74..d4841fd43 100644
--- a/stdlib/source/library/lux/target/jvm/constant.lux
+++ b/stdlib/source/library/lux/target/jvm/constant.lux
@@ -11,7 +11,7 @@
["[0]" product]
["[0]" text]
[format
- ["[0]F" binary {"+" [Writer]} ("[1]\[0]" monoid)]]
+ ["[0]F" binary {"+" [Writer]} ("[1]#[0]" monoid)]]
[collection
["[0]" row {"+" [Row]}]]]
[macro
@@ -54,7 +54,7 @@
(def: .public class_equivalence
(Equivalence Class)
- (\ equivalence.functor each
+ (# equivalence.functor each
..index
//index.equivalence))
@@ -94,7 +94,7 @@
(All (_ kind)
(-> (Equivalence kind)
(Equivalence (Value kind))))
- (\ equivalence.functor each
+ (# equivalence.functor each
(|>> :representation)
Equivalence<kind>))
@@ -187,7 +187,7 @@
(case [reference sample]
(^template [<tag> <equivalence>]
[[{<tag> reference} {<tag> sample}]
- (\ <equivalence> = reference sample)])
+ (# <equivalence> = reference sample)])
([#UTF8 text.equivalence]
[#Integer (..value_equivalence i32.equivalence)]
[#Long (..value_equivalence int.equivalence)]
@@ -245,7 +245,7 @@
(case value
(^template [<case> <tag> <writer>]
[{<case> value}
- (binaryF\composite (/tag.writer <tag>)
+ (binaryF#composite (/tag.writer <tag>)
(<writer> value))])
(<constants>)
))))
diff --git a/stdlib/source/library/lux/target/jvm/constant/pool.lux b/stdlib/source/library/lux/target/jvm/constant/pool.lux
index dc60b3c55..f3cab4463 100644
--- a/stdlib/source/library/lux/target/jvm/constant/pool.lux
+++ b/stdlib/source/library/lux/target/jvm/constant/pool.lux
@@ -12,9 +12,9 @@
["[0]" product]
["[0]" text]
["[0]" format "_"
- ["[1]" binary {"+" [Writer]} ("specification\[0]" monoid)]]
+ ["[1]" binary {"+" [Writer]} ("specification#[0]" monoid)]]
[collection
- ["[0]" row {"+" [Row]} ("[1]\[0]" mix)]]]
+ ["[0]" row {"+" [Row]} ("[1]#[0]" mix)]]]
[macro
["[0]" template]]
[math
@@ -60,7 +60,7 @@
{try.#Success entry}
(case entry
[index {<tag> reference}]
- (if (\ <equivalence> = reference <value>')
+ (if (# <equivalence> = reference <value>')
{try.#Success [[current pool]
index]}
<try_again>)
@@ -76,7 +76,7 @@
(|> current
//index.value
(//unsigned.+/2 @new)
- (\ ! each //index.index)))]
+ (# ! each //index.index)))]
(in [[next
(row.suffix [current new] pool)]
current]))))))))])
@@ -149,8 +149,8 @@
(def: .public writer
(Writer Pool)
(function (_ [next pool])
- (row\mix (function (_ [_index post] pre)
- (specification\composite pre (//.writer post)))
+ (row#mix (function (_ [_index post] pre)
+ (specification#composite pre (//.writer post)))
(format.bits/16 (!index next))
pool)))
diff --git a/stdlib/source/library/lux/target/jvm/field.lux b/stdlib/source/library/lux/target/jvm/field.lux
index 9dcc7abe9..9ec1ef046 100644
--- a/stdlib/source/library/lux/target/jvm/field.lux
+++ b/stdlib/source/library/lux/target/jvm/field.lux
@@ -7,7 +7,7 @@
[data
["[0]" product]
[format
- ["[0]F" binary {"+" [Writer]} ("[1]\[0]" monoid)]]
+ ["[0]F" binary {"+" [Writer]} ("[1]#[0]" monoid)]]
[collection
["[0]" row {"+" [Row]}]]]]]
["[0]" // "_"
@@ -50,7 +50,7 @@
(def: .public (writer field)
(Writer Field)
- (`` ($_ binaryF\composite
+ (`` ($_ binaryF#composite
(~~ (template [<writer> <slot>]
[(<writer> (value@ <slot> field))]
diff --git a/stdlib/source/library/lux/target/jvm/index.lux b/stdlib/source/library/lux/target/jvm/index.lux
index 361514578..13b965aa5 100644
--- a/stdlib/source/library/lux/target/jvm/index.lux
+++ b/stdlib/source/library/lux/target/jvm/index.lux
@@ -28,7 +28,7 @@
(def: .public equivalence
(All (_ kind) (Equivalence (Index kind)))
- (\ equivalence.functor each
+ (# equivalence.functor each
..value
//unsigned.equivalence))
diff --git a/stdlib/source/library/lux/target/jvm/method.lux b/stdlib/source/library/lux/target/jvm/method.lux
index 25338a20a..66f3d9f7d 100644
--- a/stdlib/source/library/lux/target/jvm/method.lux
+++ b/stdlib/source/library/lux/target/jvm/method.lux
@@ -9,7 +9,7 @@
[data
["[0]" product]
["[0]" format "_"
- ["[1]" binary {"+" [Writer]} ("[1]\[0]" monoid)]]
+ ["[1]" binary {"+" [Writer]} ("[1]#[0]" monoid)]]
[collection
["[0]" row {"+" [Row]}]]]]]
["[0]" // "_"
@@ -57,7 +57,7 @@
@descriptor (//constant/pool.descriptor (//type.descriptor type))
attributes (|> attributes
(monad.all !)
- (\ ! each row.of_list))
+ (# ! each row.of_list))
attributes (case code
{.#Some code}
(do !
@@ -95,7 +95,7 @@
(def: .public (writer field)
(Writer Method)
- (`` ($_ format\composite
+ (`` ($_ format#composite
(~~ (template [<writer> <slot>]
[(<writer> (value@ <slot> field))]
diff --git a/stdlib/source/library/lux/target/jvm/modifier.lux b/stdlib/source/library/lux/target/jvm/modifier.lux
index c37bb039b..31306b4bb 100644
--- a/stdlib/source/library/lux/target/jvm/modifier.lux
+++ b/stdlib/source/library/lux/target/jvm/modifier.lux
@@ -34,7 +34,7 @@
(All (_ of) (Equivalence (Modifier of)))
(def: (= reference sample)
- (\ //unsigned.equivalence =
+ (# //unsigned.equivalence =
(:representation reference)
(:representation sample))))
@@ -54,7 +54,7 @@
(let [sub (!unwrap sub)]
(|> (!unwrap super)
(i64.and sub)
- (\ i64.equivalence = sub))))
+ (# i64.equivalence = sub))))
(implementation: .public monoid
(All (_ of) (Monoid (Modifier of)))
@@ -67,7 +67,7 @@
(def: .public empty
Modifier
- (\ ..monoid identity))
+ (# ..monoid identity))
(def: .public writer
(All (_ of) (Writer (Modifier of)))
diff --git a/stdlib/source/library/lux/target/jvm/reflection.lux b/stdlib/source/library/lux/target/jvm/reflection.lux
index 6c4467ae7..bad48f5ee 100644
--- a/stdlib/source/library/lux/target/jvm/reflection.lux
+++ b/stdlib/source/library/lux/target/jvm/reflection.lux
@@ -11,10 +11,10 @@
[parser
["<t>" text]]]
[data
- ["[0]" text ("[1]\[0]" equivalence)
+ ["[0]" text ("[1]#[0]" equivalence)
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" mix functor)]
+ ["[0]" list ("[1]#[0]" mix functor)]
["[0]" array]
["[0]" dictionary]]]
[math
@@ -151,7 +151,7 @@
(:as (java/lang/Class java/lang/Object))
java/lang/Class::getName)]
(`` (if (or (~~ (template [<reflection>]
- [(text\= (/reflection.reflection <reflection>)
+ [(text#= (/reflection.reflection <reflection>)
class_name)]
[/reflection.boolean]
@@ -208,7 +208,7 @@
{try.#Success /.wildcard}
_
- (\ try.monad each <kind> (..class' parameter bound)))])
+ (# try.monad each <kind> (..class' parameter bound)))])
([[_ {.#Some bound}] /.upper]
[[{.#Some bound} _] /.lower])
@@ -230,7 +230,7 @@
(:as (java/lang/Class java/lang/Object))
java/lang/Class::getName)]
(`` (cond (~~ (template [<reflection> <type>]
- [(text\= (/reflection.reflection <reflection>)
+ [(text#= (/reflection.reflection <reflection>)
class_name)
{try.#Success <type>}]
@@ -251,7 +251,7 @@
(|> reflection
java/lang/reflect/GenericArrayType::getGenericComponentType
type
- (\ try.monad each /.array))
+ (# try.monad each /.array))
_)
... else
(..parameter reflection)))
@@ -264,7 +264,7 @@
(let [class_name (|> reflection
(:as (java/lang/Class java/lang/Object))
java/lang/Class::getName)]
- (if (text\= (/reflection.reflection /reflection.void)
+ (if (text#= (/reflection.reflection /reflection.void)
class_name)
{try.#Success /.void}
<else>))
@@ -300,12 +300,12 @@
class_params (array.list {.#None} (java/lang/Class::getTypeParameters class))
num_class_params (list.size class_params)
num_type_params (list.size params)]
- (if (text\= class_name name)
+ (if (text#= class_name name)
(if (n.= num_class_params num_type_params)
(|> params
- (list.zipped/2 (list\each (|>> java/lang/reflect/TypeVariable::getName)
+ (list.zipped/2 (list#each (|>> java/lang/reflect/TypeVariable::getName)
class_params))
- (list\mix (function (_ [name paramT] mapping)
+ (list#mix (function (_ [name paramT] mapping)
(dictionary.has name paramT mapping))
/lux.fresh)
{try.#Success})
@@ -375,7 +375,7 @@
<then?> (|> fieldJ
java/lang/reflect/Field::getGenericType
..type
- (\ ! each (|>> [(java/lang/reflect/Modifier::isFinal modifiers)
+ (# ! each (|>> [(java/lang/reflect/Modifier::isFinal modifiers)
(..deprecated? (java/lang/reflect/Field::getDeclaredAnnotations fieldJ))])))
<else?> (exception.except <exception> [field class]))))]
diff --git a/stdlib/source/library/lux/target/jvm/type.lux b/stdlib/source/library/lux/target/jvm/type.lux
index 9042ebb03..737d7e878 100644
--- a/stdlib/source/library/lux/target/jvm/type.lux
+++ b/stdlib/source/library/lux/target/jvm/type.lux
@@ -10,7 +10,7 @@
["[0]" text
["%" format {"+" [Format]}]]
[collection
- ["[0]" list ("[1]\[0]" functor)]]]
+ ["[0]" list ("[1]#[0]" functor)]]]
[math
[number
["n" nat]]]
@@ -85,14 +85,14 @@
(def: .public (class name parameters)
(-> External (List (Type Parameter)) (Type Class))
(:abstraction
- [(/signature.class name (list\each ..signature parameters))
+ [(/signature.class name (list#each ..signature parameters))
(/descriptor.class name)
(/reflection.class name)]))
(def: .public (declaration name variables)
(-> External (List (Type Var)) (Type Declaration))
(:abstraction
- [(/signature.declaration name (list\each ..signature variables))
+ [(/signature.declaration name (list#each ..signature variables))
(/descriptor.declaration name)
(/reflection.declaration name)]))
@@ -141,11 +141,11 @@
(List (Type Class))]
(Type Method))
(:abstraction
- [(/signature.method [(list\each ..signature type_variables)
- (list\each ..signature inputs)
+ [(/signature.method [(list#each ..signature type_variables)
+ (list#each ..signature inputs)
(..signature output)
- (list\each ..signature exceptions)])
- (/descriptor.method [(list\each ..descriptor inputs)
+ (list#each ..signature exceptions)])
+ (/descriptor.method [(list#each ..descriptor inputs)
(..descriptor output)])
(:expected ..void)]))
@@ -153,7 +153,7 @@
(All (_ category) (Equivalence (Type category)))
(def: (= parameter subject)
- (\ /signature.equivalence =
+ (# /signature.equivalence =
(..signature parameter)
(..signature subject))))
@@ -161,13 +161,13 @@
(All (_ category) (Hash (Type category)))
(def: &equivalence ..equivalence)
- (def: hash (|>> ..signature (\ /signature.hash hash))))
+ (def: hash (|>> ..signature (# /signature.hash hash))))
(def: .public (primitive? type)
(-> (Type Value) (Either (Type Object)
(Type Primitive)))
(if (`` (or (~~ (template [<type>]
- [(\ ..equivalence = (: (Type Value) <type>) type)]
+ [(# ..equivalence = (: (Type Value) <type>) type)]
[..boolean]
[..byte]
@@ -184,7 +184,7 @@
(-> (Type Return) (Either (Type Value)
(Type Void)))
(if (`` (or (~~ (template [<type>]
- [(\ ..equivalence = (: (Type Return) <type>) type)]
+ [(# ..equivalence = (: (Type Return) <type>) type)]
[..void]))))
(|> type (:as (Type Void)) {.#Right})
@@ -203,7 +203,7 @@
(n.- suffix_size))]
(|> repr
(text.clip prefix_size name_size)
- (\ maybe.monad each (|>> //name.internal //name.external))))
+ (# maybe.monad each (|>> //name.internal //name.external))))
{.#None})))
(def: .public format
diff --git a/stdlib/source/library/lux/target/jvm/type/alias.lux b/stdlib/source/library/lux/target/jvm/type/alias.lux
index c624f5751..ff6d9174f 100644
--- a/stdlib/source/library/lux/target/jvm/type/alias.lux
+++ b/stdlib/source/library/lux/target/jvm/type/alias.lux
@@ -56,7 +56,7 @@
[(def: <name>
(-> (Parser (Type Class)) (Parser (Type Parameter)))
(|>> (<>.after (<text>.this <prefix>))
- (\ <>.monad each <bound>)))]
+ (# <>.monad each <bound>)))]
[lower //signature.lower_prefix //.lower ..Lower]
[upper //signature.upper_prefix //.upper ..Upper]
@@ -112,7 +112,7 @@
(def: (bound_type_var aliasing)
(-> Aliasing (Parser (Type Var)))
(|> //parser.var_name
- (\ <>.monad each //.var)
+ (# <>.monad each //.var)
(<>.before (<>.many (..bound aliasing)))))
(def: .public (method aliasing)
diff --git a/stdlib/source/library/lux/target/jvm/type/descriptor.lux b/stdlib/source/library/lux/target/jvm/type/descriptor.lux
index 677c7b801..6dbdd800c 100644
--- a/stdlib/source/library/lux/target/jvm/type/descriptor.lux
+++ b/stdlib/source/library/lux/target/jvm/type/descriptor.lux
@@ -6,10 +6,10 @@
[control
["[0]" maybe]]
[data
- ["[0]" text ("[1]\[0]" equivalence)
+ ["[0]" text ("[1]#[0]" equivalence)
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" functor)]]]
+ ["[0]" list ("[1]#[0]" functor)]]]
[math
[number
["n" nat]]]
@@ -95,7 +95,7 @@
(Descriptor Method))
(:abstraction
(format (|> inputs
- (list\each ..descriptor)
+ (list#each ..descriptor)
text.together
(text.enclosed ["(" ")"]))
(:representation output))))
@@ -104,7 +104,7 @@
(All (_ category) (Equivalence (Descriptor category)))
(def: (= parameter subject)
- (text\= (:representation parameter) (:representation subject))))
+ (text#= (:representation parameter) (:representation subject))))
(def: .public class_name
(-> (Descriptor Object) Internal)
@@ -119,6 +119,6 @@
(|> (text.size repr)
(n.- prefix_size)
(n.- suffix_size)))
- (\ maybe.monad each ///name.internal)
+ (# maybe.monad each ///name.internal)
maybe.trusted))))))
)
diff --git a/stdlib/source/library/lux/target/jvm/type/lux.lux b/stdlib/source/library/lux/target/jvm/type/lux.lux
index 7aeeea7d9..ab0c0e76d 100644
--- a/stdlib/source/library/lux/target/jvm/type/lux.lux
+++ b/stdlib/source/library/lux/target/jvm/type/lux.lux
@@ -6,18 +6,18 @@
[control
["[0]" try]
["[0]" exception {"+" [exception:]}]
- ["<>" parser ("[1]\[0]" monad)
+ ["<>" parser ("[1]#[0]" monad)
["<[0]>" text {"+" [Parser]}]]]
[data
["[0]" product]
- ["[0]" text ("[1]\[0]" equivalence)
+ ["[0]" text ("[1]#[0]" equivalence)
["%" format {"+" [format]}]]
[collection
["[0]" array]
["[0]" dictionary {"+" [Dictionary]}]]]
[type
abstract
- ["[0]" check {"+" [Check]} ("[1]\[0]" monad)]]]]
+ ["[0]" check {"+" [Check]} ("[1]#[0]" monad)]]]]
["[0]" //
[category {"+" [Void Value Return Method Primitive Object Class Array Var Parameter]}]
["[1][0]" descriptor]
@@ -49,13 +49,13 @@
(def: void
(Parser (Check Type))
(<>.after //parser.void
- (<>\in (check\in .Any))))
+ (<>#in (check#in .Any))))
(template [<name> <parser> <reflection>]
[(def: <name>
(Parser (Check Type))
(<>.after <parser>
- (<>\in (check\in {.#Primitive (//reflection.reflection <reflection>) {.#End}}))))]
+ (<>#in (check#in {.#Primitive (//reflection.reflection <reflection>) {.#End}}))))]
[boolean //parser.boolean //reflection.boolean]
[byte //parser.byte //reflection.byte]
@@ -71,7 +71,7 @@
[(def: <name>
(Parser (Check Type))
(<>.after <parser>
- (<>\in (check\in {.#Primitive <box> {.#End}}))))]
+ (<>#in (check#in {.#Primitive <box> {.#End}}))))]
[boxed_boolean //parser.boolean //box.boolean]
[boxed_byte //parser.byte //box.byte]
@@ -112,7 +112,7 @@
(def: wildcard
(Parser (Check Type))
(<>.after //parser.wildcard
- (<>\in (check\each product.right
+ (<>#in (check#each product.right
check.existential))))
(def: (var mapping)
@@ -124,7 +124,7 @@
(check.except ..unknown_var [var])
{.#Some type}
- (check\in type)))))
+ (check#in type)))))
(def: (class' parameter)
(-> (Parser (Check Type)) (Parser (Check Type)))
@@ -145,7 +145,7 @@
(-> (Parser (Check Type)) (Parser (Check Type)))
(|> (<>.after (<text>.this <prefix>))
... TODO: Re-enable Lower and Upper, instead of using the simplified limit.
- ... (<>\each (check\each (|>> <ctor> .type)))
+ ... (<>#each (check#each (|>> <ctor> .type)))
))]
[lower //signature.lower_prefix ..Lower]
@@ -171,11 +171,11 @@
(def: array
(-> (Parser (Check Type)) (Parser (Check Type)))
- (|>> (<>\each (check\each (function (_ elementT)
+ (|>> (<>#each (check#each (function (_ elementT)
(case elementT
{.#Primitive name {.#End}}
(if (`` (or (~~ (template [<reflection>]
- [(text\= (//reflection.reflection <reflection>) name)]
+ [(text#= (//reflection.reflection <reflection>) name)]
[//reflection.boolean]
[//reflection.byte]
diff --git a/stdlib/source/library/lux/target/jvm/type/parser.lux b/stdlib/source/library/lux/target/jvm/type/parser.lux
index f9d79bb16..c2d058c65 100644
--- a/stdlib/source/library/lux/target/jvm/type/parser.lux
+++ b/stdlib/source/library/lux/target/jvm/type/parser.lux
@@ -6,7 +6,7 @@
[control
["[0]" try]
["[0]" function]
- ["<>" parser ("[1]\[0]" monad)
+ ["<>" parser ("[1]#[0]" monad)
["<[0]>" text {"+" [Parser]}]]]
[data
["[0]" product]
@@ -26,7 +26,7 @@
[(def: .public <name>
(Parser (Type <category>))
(<>.after (<text>.this (//signature.signature <signature>))
- (<>\in <type>)))]
+ (<>#in <type>)))]
[Void void //signature.void //.void]
[Primitive boolean //signature.boolean //.boolean]
@@ -68,7 +68,7 @@
(template [<type> <name> <head> <tail> <adapter>]
[(def: .public <name>
(Parser <type>)
- (\ <>.functor each <adapter>
+ (# <>.functor each <adapter>
(<text>.slice (<text>.and! (<text>.one_of! <head>)
(<text>.some! (<text>.one_of! <tail>))))))]
@@ -84,7 +84,7 @@
(def: .public var
(Parser (Type Var))
- (<>\each //.var ..var'))
+ (<>#each //.var ..var'))
(def: .public var?
(-> (Type Value) (Maybe Text))
@@ -104,7 +104,7 @@
[(def: <name>
(-> (Parser (Type Class)) (Parser (Type Parameter)))
(|>> (<>.after (<text>.this <prefix>))
- (<>\each <constructor>)))]
+ (<>#each <constructor>)))]
[lower //signature.lower_prefix //.lower]
[upper //signature.upper_prefix //.upper]
@@ -125,7 +125,7 @@
(def: class'
(-> (Parser (Type Parameter)) (Parser (Type Class)))
(|>> ..class''
- (\ <>.monad each (product.uncurried //.class))))
+ (# <>.monad each (product.uncurried //.class))))
(def: .public parameter
(Parser (Type Parameter))
@@ -143,7 +143,7 @@
(def: .public array'
(-> (Parser (Type Value)) (Parser (Type Array)))
(|>> (<>.after (<text>.this //descriptor.array_prefix))
- (<>\each //.array)))
+ (<>#each //.array)))
(def: .public class
(Parser (Type Class))
diff --git a/stdlib/source/library/lux/target/jvm/type/reflection.lux b/stdlib/source/library/lux/target/jvm/type/reflection.lux
index a3a101f12..8c7be4888 100644
--- a/stdlib/source/library/lux/target/jvm/type/reflection.lux
+++ b/stdlib/source/library/lux/target/jvm/type/reflection.lux
@@ -4,7 +4,7 @@
[abstract
[equivalence {"+" [Equivalence]}]]
[data
- ["[0]" text ("[1]\[0]" equivalence)
+ ["[0]" text ("[1]#[0]" equivalence)
["%" format {"+" [format]}]]]
[type
abstract]]]
@@ -26,7 +26,7 @@
(All (_ category) (Equivalence (Reflection category)))
(def: (= parameter subject)
- (text\= (:representation parameter) (:representation subject))))
+ (text#= (:representation parameter) (:representation subject))))
(template [<category> <name> <reflection>]
[(def: .public <name>
@@ -63,7 +63,7 @@
element'
(~~ (template [<primitive> <descriptor>]
- [(\ ..equivalence = <primitive> element)
+ [(# ..equivalence = <primitive> element)
(//descriptor.descriptor <descriptor>)]
[..boolean //descriptor.boolean]
diff --git a/stdlib/source/library/lux/target/jvm/type/signature.lux b/stdlib/source/library/lux/target/jvm/type/signature.lux
index e263d6c6a..7aca0ef5b 100644
--- a/stdlib/source/library/lux/target/jvm/type/signature.lux
+++ b/stdlib/source/library/lux/target/jvm/type/signature.lux
@@ -5,10 +5,10 @@
[equivalence {"+" [Equivalence]}]
[hash {"+" [Hash]}]]
[data
- ["[0]" text ("[1]\[0]" hash)
+ ["[0]" text ("[1]#[0]" hash)
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" functor)]]]
+ ["[0]" list ("[1]#[0]" functor)]]]
[type
abstract]]]
["[0]" // "_"
@@ -96,7 +96,7 @@
_
(format ..parameters_start
(|> parameters
- (list\each ..signature)
+ (list#each ..signature)
text.together)
..parameters_end))
//descriptor.class_suffix)))
@@ -131,31 +131,31 @@
""
_
(|> type_variables
- (list\each (|>> ..var_name
+ (list#each (|>> ..var_name
(text.suffix ..class_bound)))
text.together
(text.enclosed [..parameters_start
..parameters_end])))
(|> inputs
- (list\each ..signature)
+ (list#each ..signature)
text.together
(text.enclosed [..arguments_start
..arguments_end]))
(:representation output)
(|> exceptions
- (list\each (|>> :representation (format ..exception_prefix)))
+ (list#each (|>> :representation (format ..exception_prefix)))
text.together))))
(implementation: .public equivalence
(All (_ category) (Equivalence (Signature category)))
(def: (= parameter subject)
- (text\= (:representation parameter)
+ (text#= (:representation parameter)
(:representation subject))))
(implementation: .public hash
(All (_ category) (Hash (Signature category)))
(def: &equivalence ..equivalence)
- (def: hash (|>> :representation text\hash)))
+ (def: hash (|>> :representation text#hash)))
)
diff --git a/stdlib/source/library/lux/target/lua.lux b/stdlib/source/library/lux/target/lua.lux
index 6e1f1ee98..52ef6597f 100644
--- a/stdlib/source/library/lux/target/lua.lux
+++ b/stdlib/source/library/lux/target/lua.lux
@@ -14,7 +14,7 @@
["[0]" text
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" functor mix)]]]
+ ["[0]" list ("[1]#[0]" functor mix)]]]
[macro
[syntax {"+" [syntax:]}]
["[0]" template]
@@ -42,13 +42,13 @@
(All (_ brand) (Equivalence (Code brand)))
(def: (= reference subject)
- (\ text.equivalence = (:representation reference) (:representation subject))))
+ (# text.equivalence = (:representation reference) (:representation subject))))
(implementation: .public hash
(All (_ brand) (Hash (Code brand)))
(def: &equivalence ..equivalence)
- (def: hash (|>> :representation (\ text.hash hash))))
+ (def: hash (|>> :representation (# text.hash hash))))
(def: .public manual
(-> Text Code)
@@ -94,7 +94,7 @@
(-> Int Literal)
... Integers must be turned into hexadecimal to avoid quirks in how Lua parses integers.
... In particular, the number -9223372036854775808 will be incorrectly parsed as a float by Lua.
- (.let [to_hex (\ n.hex encoded)]
+ (.let [to_hex (# n.hex encoded)]
(|>> .nat
to_hex
(format "0x")
@@ -138,20 +138,20 @@
(def: .public multi
(-> (List Expression) Literal)
- (|>> (list\each ..code)
+ (|>> (list#each ..code)
(text.interposed ..input_separator)
:abstraction))
(def: .public array
(-> (List Expression) Literal)
- (|>> (list\each ..code)
+ (|>> (list#each ..code)
(text.interposed ..input_separator)
(text.enclosed ["{" "}"])
:abstraction))
(def: .public table
(-> (List [Text Expression]) Literal)
- (|>> (list\each (.function (_ [key value])
+ (|>> (list#each (.function (_ [key value])
(format key " = " (:representation value))))
(text.interposed ..input_separator)
(text.enclosed ["{" "}"])
@@ -174,7 +174,7 @@
(def: .public (apply/* args func)
(-> (List Expression) Expression Computation)
(|> args
- (list\each ..code)
+ (list#each ..code)
(text.interposed ..input_separator)
(text.enclosed ["(" ")"])
(format (:representation func))
@@ -183,7 +183,7 @@
(def: .public (do method args table)
(-> Text (List Expression) Expression Computation)
(|> args
- (list\each ..code)
+ (list#each ..code)
(text.interposed ..input_separator)
(text.enclosed ["(" ")"])
(format (:representation table) ":" method)
@@ -253,7 +253,7 @@
(def: locations
(-> (List Location) Text)
- (|>> (list\each ..code)
+ (|>> (list#each ..code)
(text.interposed ..input_separator)))
(def: .public (local vars)
@@ -303,7 +303,7 @@
(-> (List Var) Expression Statement Statement)
(:abstraction
(format "for " (|> vars
- (list\each ..code)
+ (list#each ..code)
(text.interposed ..input_separator))
" in " (:representation source) " do"
(..nested (:representation body!))
@@ -364,7 +364,7 @@
(def: .public (cond clauses else!)
(-> (List [Expression Statement]) Statement Statement)
- (list\mix (.function (_ [test then!] next!)
+ (list#mix (.function (_ [test then!] next!)
(..if test then! next!))
else!
(list.reversed clauses)))
@@ -374,7 +374,7 @@
0 (.list)
_ (|> (-- arity)
(enum.range n.enum 0)
- (list\each (|>> %.nat code.local_identifier))))))
+ (list#each (|>> %.nat code.local_identifier))))))
(syntax: (arity_types [arity <code>.nat])
(in (list.repeated arity (` ..Expression))))
diff --git a/stdlib/source/library/lux/target/php.lux b/stdlib/source/library/lux/target/php.lux
index 97fa1edf4..6f543e48f 100644
--- a/stdlib/source/library/lux/target/php.lux
+++ b/stdlib/source/library/lux/target/php.lux
@@ -14,7 +14,7 @@
["[0]" text
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" functor mix)]]]
+ ["[0]" list ("[1]#[0]" functor mix)]]]
[macro
[syntax {"+" [syntax:]}]
["[0]" template]
@@ -50,13 +50,13 @@
(All (_ brand) (Equivalence (Code brand)))
(def: (= reference subject)
- (\ text.equivalence = (:representation reference) (:representation subject))))
+ (# text.equivalence = (:representation reference) (:representation subject))))
(implementation: .public hash
(All (_ brand) (Hash (Code brand)))
(def: &equivalence ..equivalence)
- (def: hash (|>> :representation (\ text.hash hash))))
+ (def: hash (|>> :representation (# text.hash hash))))
(def: .public manual
(-> Text Code)
@@ -135,7 +135,7 @@
(def: .public int
(-> Int Literal)
- (.let [to_hex (\ n.hex encoded)]
+ (.let [to_hex (# n.hex encoded)]
(|>> .nat
to_hex
(format "0x")
@@ -182,7 +182,7 @@
(def: arguments
(-> (List Expression) Text)
- (|>> (list\each ..code) (text.interposed ..input_separator) ..group))
+ (|>> (list#each ..code) (text.interposed ..input_separator) ..group))
(def: .public (apply/* args func)
(-> (List Expression) Expression Computation)
@@ -196,7 +196,7 @@
(def: parameters
(-> (List Argument) Text)
- (|>> (list\each (function (_ [reference? var])
+ (|>> (list#each (function (_ [reference? var])
(.if reference?
(format "&" (:representation var))
(:representation var))))
@@ -231,7 +231,7 @@
0 (.list)
_ (|> (-- arity)
(enum.range n.enum 0)
- (list\each (|>> %.nat code.local_identifier))))))
+ (list#each (|>> %.nat code.local_identifier))))))
(syntax: (arity_types [arity <code>.nat])
(in (list.repeated arity (` ..Expression))))
@@ -308,7 +308,7 @@
(def: .public (array/* values)
(-> (List Expression) Literal)
(|> values
- (list\each ..code)
+ (list#each ..code)
(text.interposed ..input_separator)
..group
(format "array")
@@ -321,7 +321,7 @@
(def: .public (array/** kvs)
(-> (List [Expression Expression]) Literal)
(|> kvs
- (list\each (function (_ [key value])
+ (list#each (function (_ [key value])
(format (:representation key) " => " (:representation value))))
(text.interposed ..input_separator)
..group
@@ -492,7 +492,7 @@
(format "try " (..block (:representation body!))
text.new_line
(|> excepts
- (list\each catch)
+ (list#each catch)
(text.interposed text.new_line)))))
(template [<name> <keyword>]
@@ -537,7 +537,7 @@
(def: .public (cond clauses else!)
(-> (List [Expression Statement]) Statement Statement)
- (list\mix (function (_ [test then!] next!)
+ (list#mix (function (_ [test then!] next!)
(..if test then! next!))
else!
(list.reversed clauses)))
diff --git a/stdlib/source/library/lux/target/python.lux b/stdlib/source/library/lux/target/python.lux
index 8b2c5e6bb..901823f9b 100644
--- a/stdlib/source/library/lux/target/python.lux
+++ b/stdlib/source/library/lux/target/python.lux
@@ -15,7 +15,7 @@
["[0]" text
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" functor mix)]]]
+ ["[0]" list ("[1]#[0]" functor mix)]]]
[macro
[syntax {"+" [syntax:]}]
["[0]" template]
@@ -54,13 +54,13 @@
(All (_ brand) (Equivalence (Code brand)))
(def: (= reference subject)
- (\ text.equivalence = (:representation reference) (:representation subject))))
+ (# text.equivalence = (:representation reference) (:representation subject))))
(implementation: .public hash
(All (_ brand) (Hash (Code brand)))
(def: &equivalence ..equivalence)
- (def: hash (|>> :representation (\ text.hash hash))))
+ (def: hash (|>> :representation (# text.hash hash))))
(def: .public manual
(-> Text Code)
@@ -189,7 +189,7 @@
... ..expression
(format left_delimiter
(|> entries
- (list\each entry_serializer)
+ (list#each entry_serializer)
(text.interposed ", "))
right_delimiter))))
@@ -222,7 +222,7 @@
(-> (Expression Any) (List (Expression Any)) (Computation Any))
(<| :abstraction
... ..expression
- (format (:representation func) "(" (text.interposed ", " (list\each ..code args)) ")")))
+ (format (:representation func) "(" (text.interposed ", " (list#each ..code args)) ")")))
(template [<name> <brand> <prefix>]
[(def: (<name> var)
@@ -240,7 +240,7 @@
... ..expression
(format (:representation func)
(format "(" (|> args
- (list\each (function (_ arg) (format (:representation arg) ", ")))
+ (list#each (function (_ arg) (format (:representation arg) ", ")))
text.together)
(<splat> extra) ")"))))]
@@ -321,13 +321,13 @@
(-> (List (Var Any)) (Expression Any) (Computation Any))
(<| :abstraction
..expression
- (format "lambda " (|> arguments (list\each ..code) (text.interposed ", ")) ": "
+ (format "lambda " (|> arguments (list#each ..code) (text.interposed ", ")) ": "
(:representation body))))
(def: .public (set vars value)
(-> (List (Location Any)) (Expression Any) (Statement Any))
(:abstraction
- (format (|> vars (list\each ..code) (text.interposed ", "))
+ (format (|> vars (list#each ..code) (text.interposed ", "))
" = "
(:representation value))))
@@ -404,8 +404,8 @@
(format "try:"
(..nested (:representation body!))
(|> excepts
- (list\each (function (_ [classes exception catch!])
- (format text.new_line "except (" (text.interposed ", " (list\each ..code classes))
+ (list#each (function (_ [classes exception catch!])
+ (format text.new_line "except (" (text.interposed ", " (list#each ..code classes))
") as " (:representation exception) ":"
(..nested (:representation catch!)))))
text.together))))
@@ -436,7 +436,7 @@
(-> SVar (List (Ex (_ k) (Var k))) (Statement Any) (Statement Any))
(:abstraction
(format "def " (:representation name)
- "(" (|> args (list\each ..code) (text.interposed ", ")) "):"
+ "(" (|> args (list#each ..code) (text.interposed ", ")) "):"
(..nested (:representation body)))))
(def: .public (import module_name)
@@ -451,7 +451,7 @@
(def: .public (cond clauses else!)
(-> (List [(Expression Any) (Statement Any)]) (Statement Any) (Statement Any))
- (list\mix (.function (_ [test then!] next!)
+ (list#mix (.function (_ [test then!] next!)
(..if test then! next!))
else!
(list.reversed clauses)))
@@ -461,7 +461,7 @@
0 (.list)
_ (|> (-- arity)
(enum.range n.enum 0)
- (list\each (|>> %.nat code.local_identifier))))))
+ (list#each (|>> %.nat code.local_identifier))))))
(syntax: (arity_types [arity <code>.nat])
(in (list.repeated arity (` (Expression Any)))))
diff --git a/stdlib/source/library/lux/target/r.lux b/stdlib/source/library/lux/target/r.lux
index 4de9c2966..94a1ff243 100644
--- a/stdlib/source/library/lux/target/r.lux
+++ b/stdlib/source/library/lux/target/r.lux
@@ -4,14 +4,14 @@
[control
[pipe {"+" [case> cond> new>]}]
["[0]" function]
- ["[0]" maybe ("[1]\[0]" functor)]
+ ["[0]" maybe ("[1]#[0]" functor)]
[parser
["<[0]>" code]]]
[data
["[0]" text
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" functor mix)]]]
+ ["[0]" list ("[1]#[0]" functor mix)]]]
[macro
[syntax {"+" [syntax:]}]
["[0]" template]
@@ -172,7 +172,7 @@
(:abstraction
(format func "("
(|> args
- (list\each ..code)
+ (list#each ..code)
(text.interposed (format "," text.new_line))
..nested)
")"))))
@@ -188,7 +188,7 @@
(def: .public named_list
(-> (List [Text Expression]) Expression)
- (|>> (list\each (.function (_ [key value])
+ (|>> (list#each (.function (_ [key value])
(:abstraction (format key "=" (:representation value)))))
..list))
@@ -197,8 +197,8 @@
(..self_contained
(format (:representation func)
(format "("
- (text.interposed "," (list\each ..code args)) ","
- (text.interposed "," (list\each (.function (_ [key val])
+ (text.interposed "," (list#each ..code args)) ","
+ (text.interposed "," (list#each (.function (_ [key val])
(format key "=" (:representation val)))
kw_args))
")"))))
@@ -208,7 +208,7 @@
0 (.list)
_ (|> arity
list.indices
- (list\each (|>> %.nat code.local_identifier))))))
+ (list#each (|>> %.nat code.local_identifier))))))
(syntax: (arity_types [arity <code>.nat])
(in (list.repeated arity (` ..Expression))))
@@ -262,7 +262,7 @@
(def: .public (cond clauses else)
(-> (List [Expression Expression]) Expression Expression)
- (list\mix (.function (_ [test then] next)
+ (list#mix (.function (_ [test then] next)
(if test then next))
else
(list.reversed clauses)))
@@ -326,7 +326,7 @@
(def: .public (function inputs body)
(-> (List (Ex (_ k) (Var k))) Expression Expression)
- (let [args (|> inputs (list\each ..code) (text.interposed ", "))]
+ (let [args (|> inputs (list#each ..code) (text.interposed ", "))]
(..self_contained
(format "function(" args ") "
(.._block (:representation body))))))
@@ -336,7 +336,7 @@
(let [optional (: (-> Text (Maybe Expression) (-> Text Text) Text)
(.function (_ parameter value preparation)
(|> value
- (maybe\each (|>> :representation preparation (format ", " parameter " = ")))
+ (maybe#each (|>> :representation preparation (format ", " parameter " = ")))
(maybe.else ""))))]
(..self_contained
(format "tryCatch("
diff --git a/stdlib/source/library/lux/target/ruby.lux b/stdlib/source/library/lux/target/ruby.lux
index 8653d5203..8ba083e99 100644
--- a/stdlib/source/library/lux/target/ruby.lux
+++ b/stdlib/source/library/lux/target/ruby.lux
@@ -14,7 +14,7 @@
["[0]" text
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" functor mix)]]]
+ ["[0]" list ("[1]#[0]" functor mix)]]]
[macro
[syntax {"+" [syntax:]}]
["[0]" template]
@@ -42,13 +42,13 @@
(All (_ brand) (Equivalence (Code brand)))
(def: (= reference subject)
- (\ text.equivalence = (:representation reference) (:representation subject))))
+ (# text.equivalence = (:representation reference) (:representation subject))))
(implementation: .public code_hash
(All (_ brand) (Hash (Code brand)))
(def: &equivalence ..code_equivalence)
- (def: hash (|>> :representation (\ text.hash hash))))
+ (def: hash (|>> :representation (# text.hash hash))))
(def: .public manual
(-> Text Code)
@@ -198,14 +198,14 @@
(def: .public array
(-> (List Expression) Literal)
- (|>> (list\each (|>> :representation))
+ (|>> (list#each (|>> :representation))
(text.interposed ..input_separator)
(text.enclosed ["[" "]"])
:abstraction))
(def: .public hash
(-> (List [Expression Expression]) Literal)
- (|>> (list\each (.function (_ [k v])
+ (|>> (list#each (.function (_ [k v])
(format (:representation k) " => " (:representation v))))
(text.interposed ..input_separator)
(text.enclosed ["{" "}"])
@@ -214,7 +214,7 @@
(def: .public (apply/* args func)
(-> (List Expression) Expression Computation)
(|> args
- (list\each (|>> :representation))
+ (list#each (|>> :representation))
(text.interposed ..input_separator)
(text.enclosed ["(" ")"])
(format (:representation func))
@@ -223,7 +223,7 @@
(def: .public (apply_lambda/* args lambda)
(-> (List Expression) Expression Computation)
(|> args
- (list\each (|>> :representation))
+ (list#each (|>> :representation))
(text.interposed ..input_separator)
(text.enclosed ["[" "]"])
(format (:representation lambda))
@@ -265,7 +265,7 @@
(-> (List Location) Expression Statement)
(:abstraction
(format (|> vars
- (list\each (|>> :representation))
+ (list#each (|>> :representation))
(text.interposed ..input_separator))
" = " (:representation value) ..statement_suffix)))
@@ -316,7 +316,7 @@
..block
(format "begin" (..nested (:representation body!))
(|> rescues
- (list\each (.function (_ [classes exception rescue])
+ (list#each (.function (_ [classes exception rescue])
(format text.new_line "rescue " (text.interposed ..input_separator classes)
" => " (:representation exception)
(..nested (:representation rescue)))))
@@ -355,7 +355,7 @@
..block
(format "def " (:representation name)
(|> args
- (list\each (|>> :representation))
+ (list#each (|>> :representation))
(text.interposed ..input_separator)
(text.enclosed ["(" ")"]))
(..nested (:representation body!)))))
@@ -363,7 +363,7 @@
(def: .public (lambda name args body!)
(-> (Maybe LVar) (List Var) Statement Literal)
(let [proc (|> (format (|> args
- (list\each (|>> :representation))
+ (list#each (|>> :representation))
(text.interposed ..input_separator)
(text.enclosed' "|"))
(..nested (:representation body!)))
@@ -427,7 +427,7 @@
(def: .public (cond clauses else!)
(-> (List [Expression Statement]) Statement Statement)
- (list\mix (.function (_ [test then!] next!)
+ (list#mix (.function (_ [test then!] next!)
(..if test then! next!))
else!
(list.reversed clauses)))
@@ -437,7 +437,7 @@
0 (.list)
_ (|> (-- arity)
(enum.range n.enum 0)
- (list\each (|>> %.nat code.local_identifier))))))
+ (list#each (|>> %.nat code.local_identifier))))))
(syntax: (arity_types [arity <code>.nat])
(in (list.repeated arity (` ..Expression))))
diff --git a/stdlib/source/library/lux/target/scheme.lux b/stdlib/source/library/lux/target/scheme.lux
index 0e6dda75a..d17589342 100644
--- a/stdlib/source/library/lux/target/scheme.lux
+++ b/stdlib/source/library/lux/target/scheme.lux
@@ -11,7 +11,7 @@
["[0]" text
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" functor monoid)]]]
+ ["[0]" list ("[1]#[0]" functor monoid)]]]
[macro
["[0]" template]]
[math
@@ -33,13 +33,13 @@
(All (_ brand) (Equivalence (Code brand)))
(def: (= reference subject)
- (\ text.equivalence = (:representation reference) (:representation subject))))
+ (# text.equivalence = (:representation reference) (:representation subject))))
(implementation: .public hash
(All (_ brand) (Hash (Code brand)))
(def: &equivalence ..equivalence)
- (def: hash (|>> :representation (\ text.hash hash))))
+ (def: hash (|>> :representation (# text.hash hash))))
(template [<type> <brand> <super>+]
[(abstract: .public (<brand> brand) Any)
@@ -84,14 +84,14 @@
_
(|> (format " . " (:representation rest))
(format (|> mandatory
- (list\each ..code)
+ (list#each ..code)
(text.interposed " ")))
(text.enclosed ["(" ")"])
:abstraction))
{.#None}
(|> mandatory
- (list\each ..code)
+ (list#each ..code)
(text.interposed " ")
(text.enclosed ["(" ")"])
:abstraction)))
@@ -161,7 +161,7 @@
{.#Item head tail}
(|> tail
- (list\each (|>> :representation ..nested))
+ (list#each (|>> :representation ..nested))
{.#Item (:representation head)}
(text.interposed nested_new_line)
(text.enclosed ["(" ")"])
@@ -308,7 +308,7 @@
(-> (List [<var> Expression]) Expression Computation)
(..form (list (..var <scheme_name>)
(|> bindings
- (list\each (function (_ [binding/name binding/value])
+ (list#each (function (_ [binding/name binding/value])
(..form (list (|> binding/name <pre>)
binding/value))))
..form)
@@ -373,7 +373,7 @@
{.#Some else}
(list (..form (list (..var "else") else))))
- (list\composite (list\each (function (_ [when then])
+ (list#composite (list#each (function (_ [when then])
(..form (list when then)))
clauses))
(list& variable)))
diff --git a/stdlib/source/library/lux/test.lux b/stdlib/source/library/lux/test.lux
index ea228316a..c9f123598 100644
--- a/stdlib/source/library/lux/test.lux
+++ b/stdlib/source/library/lux/test.lux
@@ -13,7 +13,7 @@
["[0]" io]
[concurrency
["[0]" atom {"+" [Atom]}]
- ["[0]" async {"+" [Async]} ("[1]\[0]" monad)]]
+ ["[0]" async {"+" [Async]} ("[1]#[0]" monad)]]
["<>" parser
["<[0]>" code]]]
[data
@@ -22,7 +22,7 @@
["[0]" text
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" functor mix)]
+ ["[0]" list ("[1]#[0]" functor mix)]
["[0]" set {"+" [Set]}]
["[0]" dictionary "_"
["[1]" ordered {"+" [Dictionary]}]]]]
@@ -30,7 +30,7 @@
["[0]" instant]
["[0]" duration {"+" [Duration]}]]
[math
- ["[0]" random {"+" [Random]} ("[1]\[0]" monad)]
+ ["[0]" random {"+" [Random]} ("[1]#[0]" monad)]
[number {"+" [hex]}
["n" nat]
["f" frac]]]
@@ -99,17 +99,17 @@
(-> Test Test Test)
(do [! random.monad]
[left left]
- (\ ! each (..and' left) right)))
+ (# ! each (..and' left) right)))
(def: context_prefix
text.tab)
(def: .public (context description)
(-> Text Test Test)
- (random\each (async\each (function (_ [tally documentation])
+ (random#each (async#each (function (_ [tally documentation])
[tally (|> documentation
(text.all_split_by ..separator)
- (list\each (|>> (format context_prefix)))
+ (list#each (|>> (format context_prefix)))
(text.interposed ..separator)
(format description ..separator))]))))
@@ -120,23 +120,23 @@
(-> Text Test)
(|>> (format ..failure_prefix)
[..failure_tally]
- async\in
- random\in))
+ async#in
+ random#in))
(def: .public (assertion message condition)
(-> Text Bit Assertion)
- (<| async\in
+ (<| async#in
(if condition
[..success_tally (format ..success_prefix message)]
[..failure_tally (format ..failure_prefix message)])))
(def: .public (test message condition)
(-> Text Bit Test)
- (random\in (..assertion message condition)))
+ (random#in (..assertion message condition)))
(def: .public (lifted message random)
(-> Text (Random Bit) Test)
- (random\each (..assertion message) random))
+ (random#each (..assertion message) random))
(def: pcg_32_magic_inc
Nat
@@ -192,7 +192,7 @@
(value@ #actual_coverage tally))
report (: (-> (Set Name) Text)
(|>> set.list
- (list.sorted (\ name.order <))
+ (list.sorted (# name.order <))
(exception.listing %.name)))
expected_definitions_to_cover (set.size (value@ #expected_coverage tally))
unexpected_definitions_covered (set.size unexpected)
@@ -247,7 +247,7 @@
_ (debug.log! (format documentation text.new_line text.new_line
(..description duration tally)
text.new_line))]]
- (async.future (\ program.default exit
+ (async.future (# program.default exit
(case (value@ #failures tally)
0 ..success_exit_code
_ ..failure_exit_code)))))
@@ -255,26 +255,26 @@
(def: (|cover'| coverage condition)
(-> (List Name) Bit Assertion)
(let [message (|> coverage
- (list\each %.name)
+ (list#each %.name)
(text.interposed " & "))
coverage (set.of_list name.hash coverage)]
(|> (..assertion message condition)
- (async\each (function (_ [tally documentation])
+ (async#each (function (_ [tally documentation])
[(revised@ #actual_coverage (set.union coverage) tally)
documentation])))))
(def: (|cover| coverage condition)
(-> (List Name) Bit Test)
(|> (..|cover'| coverage condition)
- random\in))
+ random#in))
(def: (|for| coverage test)
(-> (List Name) Test Test)
(let [context (|> coverage
- (list\each %.name)
+ (list#each %.name)
(text.interposed " & "))
coverage (set.of_list name.hash coverage)]
- (random\each (async\each (function (_ [tally documentation])
+ (random#each (async#each (function (_ [tally documentation])
[(revised@ #actual_coverage (set.union coverage) tally)
documentation]))
(..context context test))))
@@ -295,7 +295,7 @@
(def: encoded_coverage
(-> (List Text) Text)
- (list\mix (function (_ short aggregate)
+ (list#mix (function (_ short aggregate)
(case aggregate
"" short
_ (format aggregate ..coverage_separator short)))
@@ -315,7 +315,7 @@
(template [<macro> <function>]
[(syntax: .public (<macro> [coverage (<code>.tuple (<>.many <code>.any))
condition <code>.any])
- (let [coverage (list\each (function (_ definition)
+ (let [coverage (list#each (function (_ definition)
(` ((~! ..reference) (~ definition))))
coverage)]
(in (list (` ((~! <function>)
@@ -329,7 +329,7 @@
(syntax: .public (for [coverage (<code>.tuple (<>.many <code>.any))
test <code>.any])
- (let [coverage (list\each (function (_ definition)
+ (let [coverage (list#each (function (_ definition)
(` ((~! ..reference) (~ definition))))
coverage)]
(in (list (` ((~! ..|for|)
@@ -341,7 +341,7 @@
(-> Text Text Test Test)
(let [coverage (..coverage module coverage)]
(|> (..context module test)
- (random\each (async\each (function (_ [tally documentation])
+ (random#each (async#each (function (_ [tally documentation])
[(revised@ #expected_coverage (set.union coverage) tally)
documentation]))))))
@@ -351,7 +351,7 @@
[.let [module (name.module module)]
definitions (meta.definitions module)
.let [coverage (|> definitions
- (list\mix (function (_ [short [exported? _]] aggregate)
+ (list#mix (function (_ [short [exported? _]] aggregate)
(if exported?
{.#Item short aggregate}
aggregate))
@@ -370,7 +370,7 @@
(-> (List Test) Test)
(case (list.size tests)
0
- (random\in (async\in [..start ""]))
+ (random#in (async#in [..start ""]))
expected_tests
(do random.monad
@@ -388,7 +388,7 @@
(..assertion (exception.error ..error_during_execution [error]) false))
io.io
async.future
- async\conjoint))
+ async#conjoint))
state (: (Atom (Dictionary Nat [Tally Text]))
(atom.atom (dictionary.empty n.order)))
[read! write!] (: [Assertion
@@ -402,12 +402,12 @@
(if (n.= expected_tests (dictionary.size results))
(let [assertions (|> results
dictionary.entries
- (list\each product.right))]
+ (list#each product.right))]
(write! [(|> assertions
- (list\each product.left)
- (list\mix ..total ..start))
+ (list#each product.left)
+ (list#mix ..total ..start))
(|> assertions
- (list\each product.right)
+ (list#each product.right)
(text.interposed ..separator))]))
(in []))))
(run! test)))
diff --git a/stdlib/source/library/lux/time.lux b/stdlib/source/library/lux/time.lux
index 6747215d7..f59090e4b 100644
--- a/stdlib/source/library/lux/time.lux
+++ b/stdlib/source/library/lux/time.lux
@@ -14,10 +14,10 @@
["<>" parser
["<[0]>" text {"+" [Parser]}]]]
[data
- ["[0]" text ("[1]\[0]" monoid)]]
+ ["[0]" text ("[1]#[0]" monoid)]]
[math
[number
- ["n" nat ("[1]\[0]" decimal)]]]
+ ["n" nat ("[1]#[0]" decimal)]]]
[type
abstract]]]
[/
@@ -40,8 +40,8 @@
(exception: .public (time_exceeds_a_day [time Nat])
(exception.report
- ["Time (in milli-seconds)" (n\encoded time)]
- ["Maximum (in milli-seconds)" (n\encoded (-- limit))]))
+ ["Time (in milli-seconds)" (n#encoded time)]
+ ["Maximum (in milli-seconds)" (n#encoded (-- limit))]))
(def: separator ":")
@@ -54,14 +54,14 @@
(<>.either (|> (<text>.at_most 3 <text>.decimal)
(<>.codec n.decimal)
(<>.after (<text>.this ".")))
- (\ <>.monad in 0)))
+ (# <>.monad in 0)))
(template [<maximum> <parser> <exception> <sub_parser>]
[(exception: .public (<exception> [value Nat])
(exception.report
- ["Value" (n\encoded value)]
- ["Minimum" (n\encoded 0)]
- ["Maximum" (n\encoded (-- <maximum>))]))
+ ["Value" (n#encoded value)]
+ ["Minimum" (n#encoded 0)]
+ ["Maximum" (n#encoded (-- <maximum>))]))
(def: <parser>
(Parser Nat)
@@ -148,8 +148,8 @@
(def: (padded value)
(-> Nat Text)
(if (n.< 10 value)
- (text\composite "0" (n\encoded value))
- (n\encoded value)))
+ (text#composite "0" (n#encoded value))
+ (n#encoded value)))
(def: (positive space duration)
(-> Duration Duration Duration)
@@ -160,10 +160,10 @@
(def: (millis_format millis)
(-> Nat Text)
(cond (n.= 0 millis) ""
- (n.< 10 millis) ($_ text\composite ".00" (n\encoded millis))
- (n.< 100 millis) ($_ text\composite ".0" (n\encoded millis))
+ (n.< 10 millis) ($_ text#composite ".00" (n#encoded millis))
+ (n.< 100 millis) ($_ text#composite ".0" (n#encoded millis))
... (n.< 1,000 millis)
- ($_ text\composite "." (n\encoded millis))))
+ ($_ text#composite "." (n#encoded millis))))
(type: .public Clock
(Record
@@ -200,7 +200,7 @@
(def: (format time)
(-> Time Text)
(let [(^slots [#hour #minute #second #milli_second]) (..clock time)]
- ($_ text\composite
+ ($_ text#composite
(..padded #hour)
..separator (..padded #minute)
..separator (..padded #second)
diff --git a/stdlib/source/library/lux/time/date.lux b/stdlib/source/library/lux/time/date.lux
index fa5af30dc..2b36ad8bc 100644
--- a/stdlib/source/library/lux/time/date.lux
+++ b/stdlib/source/library/lux/time/date.lux
@@ -14,13 +14,13 @@
["<>" parser
["<[0]>" text {"+" [Parser]}]]]
[data
- ["[0]" text ("[1]\[0]" monoid)]
+ ["[0]" text ("[1]#[0]" monoid)]
[collection
- ["[0]" list ("[1]\[0]" mix)]
+ ["[0]" list ("[1]#[0]" mix)]
["[0]" dictionary {"+" [Dictionary]}]]]
[math
[number
- ["n" nat ("[1]\[0]" decimal)]
+ ["n" nat ("[1]#[0]" decimal)]
["i" int]]]
[type
abstract]]]
@@ -30,7 +30,7 @@
(def: month_by_number
(Dictionary Nat Month)
- (list\mix (function (_ month mapping)
+ (list#mix (function (_ month mapping)
(dictionary.has (//month.number month) month mapping))
(dictionary.empty n.hash)
//month.year))
@@ -53,17 +53,17 @@
month Month
day Nat])
(exception.report
- ["Value" (n\encoded day)]
- ["Minimum" (n\encoded ..minimum_day)]
- ["Maximum" (n\encoded (..month_days year month))]
- ["Year" (\ //year.codec encoded year)]
- ["Month" (n\encoded (//month.number month))]))
+ ["Value" (n#encoded day)]
+ ["Minimum" (n#encoded ..minimum_day)]
+ ["Maximum" (n#encoded (..month_days year month))]
+ ["Year" (# //year.codec encoded year)]
+ ["Month" (n#encoded (//month.number month))]))
(def: (padded value)
(-> Nat Text)
- (let [digits (n\encoded value)]
+ (let [digits (n#encoded value)]
(if (n.< 10 value)
- (text\composite "0" digits)
+ (text#composite "0" digits)
digits)))
(def: separator
@@ -108,10 +108,10 @@
(def: (= reference sample)
(let [reference (:representation reference)
sample (:representation sample)]
- (and (\ //year.equivalence =
+ (and (# //year.equivalence =
(value@ #year reference)
(value@ #year sample))
- (\ //month.equivalence =
+ (# //month.equivalence =
(value@ #month reference)
(value@ #month sample))
(n.= (value@ #day reference)
@@ -125,16 +125,16 @@
(def: (< reference sample)
(let [reference (:representation reference)
sample (:representation sample)]
- (or (\ //year.order <
+ (or (# //year.order <
(value@ #year reference)
(value@ #year sample))
- (and (\ //year.equivalence =
+ (and (# //year.equivalence =
(value@ #year reference)
(value@ #year sample))
- (or (\ //month.order <
+ (or (# //month.order <
(value@ #month reference)
(value@ #month sample))
- (and (\ //month.order =
+ (and (# //month.order =
(value@ #month reference)
(value@ #month sample))
(n.< (value@ #day reference)
@@ -150,14 +150,14 @@
(<>.either (|> (<text>.at_most 3 <text>.decimal)
(<>.codec n.decimal)
(<>.after (<text>.this ".")))
- (\ <>.monad in 0)))
+ (# <>.monad in 0)))
(template [<minimum> <maximum> <parser> <exception>]
[(exception: .public (<exception> [value Nat])
(exception.report
- ["Value" (n\encoded value)]
- ["Minimum" (n\encoded <minimum>)]
- ["Maximum" (n\encoded <maximum>)]))
+ ["Value" (n#encoded value)]
+ ["Minimum" (n#encoded <minimum>)]
+ ["Maximum" (n#encoded <maximum>)]))
(def: <parser>
(Parser Nat)
@@ -184,8 +184,8 @@
(def: (format value)
(-> Date Text)
- ($_ text\composite
- (\ //year.codec encoded (..year value))
+ ($_ text#composite
+ (# //year.codec encoded (..year value))
..separator (..padded (|> value ..month //month.number))
..separator (..padded (..day_of_month value))))
diff --git a/stdlib/source/library/lux/time/day.lux b/stdlib/source/library/lux/time/day.lux
index 6bdbba5b2..86252a1e0 100644
--- a/stdlib/source/library/lux/time/day.lux
+++ b/stdlib/source/library/lux/time/day.lux
@@ -151,11 +151,11 @@
(exception: .public (invalid_day [number Nat])
(exception.report
- ["Number" (\ n.decimal encoded number)]
+ ["Number" (# n.decimal encoded number)]
["Valid range" ($_ "lux text concat"
- (\ n.decimal encoded (..number {#Sunday}))
+ (# n.decimal encoded (..number {#Sunday}))
" ~ "
- (\ n.decimal encoded (..number {#Saturday})))]))
+ (# n.decimal encoded (..number {#Saturday})))]))
(def: .public (by_number number)
(-> Nat (Try Day))
diff --git a/stdlib/source/library/lux/time/duration.lux b/stdlib/source/library/lux/time/duration.lux
index 94b73e791..f140a1284 100644
--- a/stdlib/source/library/lux/time/duration.lux
+++ b/stdlib/source/library/lux/time/duration.lux
@@ -13,11 +13,11 @@
["<>" parser
["<[0]>" text {"+" [Parser]}]]]
[data
- ["[0]" text ("[1]\[0]" monoid)]]
+ ["[0]" text ("[1]#[0]" monoid)]]
[math
[number
["i" int]
- ["[0]" nat ("[1]\[0]" decimal)]]]
+ ["[0]" nat ("[1]#[0]" decimal)]]]
[type
abstract]]]
["[0]" // "_"
@@ -126,10 +126,10 @@
)
(def: (encoded duration)
- (if (\ ..equivalence = ..empty duration)
- ($_ text\composite
+ (if (# ..equivalence = ..empty duration)
+ ($_ text#composite
..positive_sign
- (nat\encoded 0)
+ (nat#encoded 0)
..milli_second_suffix)
(let [signed? (negative? duration)
[days time_left] [(ticks day duration) (framed day duration)]
@@ -143,13 +143,13 @@
[minutes time_left] [(ticks minute time_left) (framed minute time_left)]
[seconds time_left] [(ticks second time_left) (framed second time_left)]
millis (..millis time_left)]
- ($_ text\composite
+ ($_ text#composite
(if signed? ..negative_sign ..positive_sign)
- (if (i.= +0 days) "" (text\composite (nat\encoded (.nat days)) ..day_suffix))
- (if (i.= +0 hours) "" (text\composite (nat\encoded (.nat hours)) ..hour_suffix))
- (if (i.= +0 minutes) "" (text\composite (nat\encoded (.nat minutes)) ..minute_suffix))
- (if (i.= +0 seconds) "" (text\composite (nat\encoded (.nat seconds)) ..second_suffix))
- (if (i.= +0 millis) "" (text\composite (nat\encoded (.nat millis)) ..milli_second_suffix))
+ (if (i.= +0 days) "" (text#composite (nat#encoded (.nat days)) ..day_suffix))
+ (if (i.= +0 hours) "" (text#composite (nat#encoded (.nat hours)) ..hour_suffix))
+ (if (i.= +0 minutes) "" (text#composite (nat#encoded (.nat minutes)) ..minute_suffix))
+ (if (i.= +0 seconds) "" (text#composite (nat#encoded (.nat seconds)) ..second_suffix))
+ (if (i.= +0 millis) "" (text#composite (nat#encoded (.nat millis)) ..milli_second_suffix))
))))
(def: parser
diff --git a/stdlib/source/library/lux/time/instant.lux b/stdlib/source/library/lux/time/instant.lux
index 5fb300424..f5e0f7540 100644
--- a/stdlib/source/library/lux/time/instant.lux
+++ b/stdlib/source/library/lux/time/instant.lux
@@ -16,7 +16,7 @@
["<>" parser
["<[0]>" text {"+" [Parser]}]]]
[data
- ["[0]" text ("[1]\[0]" monoid)]
+ ["[0]" text ("[1]#[0]" monoid)]
[collection
["[0]" row]]]
[math
@@ -63,14 +63,14 @@
(Equivalence Instant)
(def: (= param subject)
- (\ i.equivalence = (:representation param) (:representation subject))))
+ (# i.equivalence = (:representation param) (:representation subject))))
(implementation: .public order
(Order Instant)
(def: &equivalence ..equivalence)
(def: (< param subject)
- (\ i.order < (:representation param) (:representation subject))))
+ (# i.order < (:representation param) (:representation subject))))
(`` (implementation: .public enum
(Enum Instant)
@@ -78,7 +78,7 @@
(def: &order ..order)
(~~ (template [<name>]
[(def: <name>
- (|>> :representation (\ i.enum <name>) :abstraction))]
+ (|>> :representation (# i.enum <name>) :abstraction))]
[succ] [pred]
))))
@@ -113,7 +113,7 @@
(def: (clock_time duration)
(-> Duration Time)
- (|> (if (\ duration.order < duration.empty duration)
+ (|> (if (# duration.order < duration.empty duration)
(duration.merged duration.day duration)
duration)
duration.millis
@@ -125,16 +125,16 @@
(-> Instant Text)
(let [[date time] (..date_time instant)
time (..clock_time time)]
- ($_ text\composite
- (\ date.codec encoded date) ..date_suffix
- (\ //.codec encoded time) ..time_suffix)))
+ ($_ text#composite
+ (# date.codec encoded date) ..date_suffix
+ (# //.codec encoded time) ..time_suffix)))
(def: parser
(Parser Instant)
(do [! <>.monad]
- [days (\ ! each date.days date.parser)
+ [days (# ! each date.days date.parser)
_ (<text>.this ..date_suffix)
- time (\ ! each //.millis //.parser)
+ time (# ! each //.millis //.parser)
_ (<text>.this ..time_suffix)]
(in (|> (if (i.< +0 days)
(|> duration.day
diff --git a/stdlib/source/library/lux/time/month.lux b/stdlib/source/library/lux/time/month.lux
index 0717ed1b9..6bc2a0274 100644
--- a/stdlib/source/library/lux/time/month.lux
+++ b/stdlib/source/library/lux/time/month.lux
@@ -79,11 +79,11 @@
(exception: .public (invalid_month [number Nat])
(exception.report
- ["Number" (\ n.decimal encoded number)]
+ ["Number" (# n.decimal encoded number)]
["Valid range" ($_ "lux text concat"
- (\ n.decimal encoded (..number {#January}))
+ (# n.decimal encoded (..number {#January}))
" ~ "
- (\ n.decimal encoded (..number {#December})))]))
+ (# n.decimal encoded (..number {#December})))]))
(def: .public (by_number number)
(-> Nat (Try Month))
diff --git a/stdlib/source/library/lux/time/year.lux b/stdlib/source/library/lux/time/year.lux
index adc9c8f92..49d6bed0d 100644
--- a/stdlib/source/library/lux/time/year.lux
+++ b/stdlib/source/library/lux/time/year.lux
@@ -12,11 +12,11 @@
["<>" parser
["<[0]>" text {"+" [Parser]}]]]
[data
- ["[0]" text ("[1]\[0]" monoid)]]
+ ["[0]" text ("[1]#[0]" monoid)]]
[math
[number
- ["n" nat ("[1]\[0]" decimal)]
- ["i" int ("[1]\[0]" decimal)]]]
+ ["n" nat ("[1]#[0]" decimal)]
+ ["i" int ("[1]#[0]" decimal)]]]
[type
abstract]]])
@@ -108,15 +108,15 @@
(-> Year Text)
(let [year (..value year)]
(if (i.< +0 year)
- (i\encoded year)
- (n\encoded (.nat year)))))
+ (i#encoded year)
+ (n#encoded (.nat year)))))
(def: .public parser
(Parser Year)
(do [! <>.monad]
[sign (<>.or (<text>.this "-") (in []))
digits (<text>.many <text>.decimal)
- raw_year (<>.codec i.decimal (in (text\composite "+" digits)))]
+ raw_year (<>.codec i.decimal (in (text#composite "+" digits)))]
(<>.lifted (..year (case sign
{.#Left _} (i.* -1 raw_year)
{.#Right _} raw_year)))))
diff --git a/stdlib/source/library/lux/tool/compiler/default/init.lux b/stdlib/source/library/lux/tool/compiler/default/init.lux
index d583a072a..395d7dc73 100644
--- a/stdlib/source/library/lux/tool/compiler/default/init.lux
+++ b/stdlib/source/library/lux/tool/compiler/default/init.lux
@@ -10,13 +10,13 @@
[data
[binary {"+" [Binary]}]
["[0]" product]
- ["[0]" text ("[1]\[0]" hash)
+ ["[0]" text ("[1]#[0]" hash)
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" functor)]
+ ["[0]" list ("[1]#[0]" functor)]
["[0]" dictionary]
["[0]" set]
- ["[0]" row ("[1]\[0]" functor)]]]
+ ["[0]" row ("[1]#[0]" functor)]]]
["[0]" meta]
[world
["[0]" file]]]]
@@ -220,7 +220,7 @@
(def: (default_dependencies prelude input)
(-> Module ///.Input (List Module))
(list& archive.runtime_module
- (if (text\= prelude (value@ ///.#module input))
+ (if (text#= prelude (value@ ///.#module input))
(list)
(list prelude))))
@@ -238,7 +238,7 @@
[///.#dependencies dependencies
///.#process (function (_ state archive)
(do [! try.monad]
- [.let [hash (text\hash (value@ ///.#code input))]
+ [.let [hash (text#hash (value@ ///.#code input))]
[state [source buffer]] (<| (///phase.result' state)
(..begin dependencies hash input))
.let [module (value@ ///.#module input)]]
@@ -259,7 +259,7 @@
(in [state
{.#Right [descriptor
(document.write key analysis_module)
- (row\each (function (_ [artifact_id custom directive])
+ (row#each (function (_ [artifact_id custom directive])
[artifact_id custom (write_directive directive)])
final_buffer)]}]))
@@ -268,7 +268,7 @@
(in [state
{.#Left [///.#dependencies (|> requirements
(value@ ///directive.#imports)
- (list\each product.left))
+ (list#each product.left))
///.#process (function (_ state archive)
(recur (<| (///phase.result' state)
(do [! ///phase.monad]
diff --git a/stdlib/source/library/lux/tool/compiler/default/platform.lux b/stdlib/source/library/lux/tool/compiler/default/platform.lux
index eda9c6147..52396656b 100644
--- a/stdlib/source/library/lux/tool/compiler/default/platform.lux
+++ b/stdlib/source/library/lux/tool/compiler/default/platform.lux
@@ -9,22 +9,22 @@
[control
["[0]" function]
["[0]" maybe]
- ["[0]" try {"+" [Try]} ("[1]\[0]" monad)]
+ ["[0]" try {"+" [Try]} ("[1]#[0]" monad)]
["[0]" exception {"+" [exception:]}]
[concurrency
- ["[0]" async {"+" [Async Resolver]} ("[1]\[0]" monad)]
+ ["[0]" async {"+" [Async Resolver]} ("[1]#[0]" monad)]
["[0]" stm {"+" [Var STM]}]]]
[data
["[0]" binary {"+" [Binary]}]
["[0]" bit]
["[0]" product]
- ["[0]" text ("[1]\[0]" equivalence)
+ ["[0]" text ("[1]#[0]" equivalence)
["%" format {"+" [format]}]]
[collection
["[0]" dictionary {"+" [Dictionary]}]
- ["[0]" row {"+" [Row]} ("[1]\[0]" mix)]
+ ["[0]" row {"+" [Row]} ("[1]#[0]" mix)]
["[0]" set {"+" [Set]}]
- ["[0]" list ("[1]\[0]" monoid functor mix)]]
+ ["[0]" list ("[1]#[0]" monoid functor mix)]]
[format
["_" binary {"+" [Writer]}]]]
[world
@@ -110,7 +110,7 @@
row.list
(monad.each ..monad write_artifact!)
(: (Action (List Any)))))
- document (\ async.monad in
+ document (# async.monad in
(document.check $.key document))]
(ioW.cache system static module_id
(_.result ..writer [descriptor document])))))
@@ -191,7 +191,7 @@
_ (extension.with extender (:expected directives))]
(in [])))
(///phase.result' state)
- (\ try.monad each product.left)))
+ (# try.monad each product.left)))
(def: (phase_wrapper archive platform state)
(All (_ <type_vars>)
@@ -248,14 +248,14 @@
(-> <Platform> (Program expression directive) <State+>
(Async (Try [///phase.Wrapper <State+>]))))
(function (_ platform program state)
- (async\in
+ (async#in
(do try.monad
[[state phase_wrapper] (..phase_wrapper archive platform state)]
(|> state
(initialize_state (extender phase_wrapper)
(:expected (..complete_extensions host_directive_bundle phase_wrapper (:expected bundles)))
analysis_state)
- (try\each (|>> (//init.with_default_directives expander host_analysis program anchorT,expressionT,directiveT (extender phase_wrapper))
+ (try#each (|>> (//init.with_default_directives expander host_analysis program anchorT,expressionT,directiveT (extender phase_wrapper))
[phase_wrapper])))))))]]
(if (archive.archived? archive archive.runtime_module)
(do !
@@ -264,7 +264,7 @@
(do !
[[state [archive payload]] (|> (..process_runtime archive platform)
(///phase.result' state)
- async\in)
+ async#in)
_ (..cache_module static platform 0 payload)
[phase_wrapper state] (with_missing_extensions platform program state)]
@@ -281,7 +281,7 @@
///directive.#state
extension.#state
///generation.#log])
- (row\mix (function (_ right left)
+ (row#mix (function (_ right left)
(format left ..compilation_log_separator right))
module)))
@@ -331,7 +331,7 @@
(|> mapping
(dictionary.revised' source ..empty (set.has target))
(dictionary.revised source (set.union forward)))]
- (list\mix (function (_ previous)
+ (list#mix (function (_ previous)
(dictionary.revised' previous ..empty (set.has target)))
with_dependence+transitives
(set.list backward))))))]
@@ -375,7 +375,7 @@
(def: (verify_dependencies importer importee dependence)
(-> Module Module Dependence (Try Any))
- (cond (text\= importer importee)
+ (cond (text#= importer importee)
(exception.except ..module_cannot_import_itself [importer])
(..circular_dependency? importer importee dependence)
@@ -417,7 +417,7 @@
(:expected
(stm.commit!
(do [! stm.monad]
- [dependence (if (text\= archive.runtime_module importer)
+ [dependence (if (text#= archive.runtime_module importer)
(stm.read dependence)
(do !
[[_ dependence] (stm.update (..depend importer module) dependence)]
@@ -431,7 +431,7 @@
(do !
[[archive state] (stm.read current)]
(if (archive.archived? archive module)
- (in [(async\in {try.#Success [archive state]})
+ (in [(async#in {try.#Success [archive state]})
{.#None}])
(do !
[@pending (stm.read pending)]
@@ -462,7 +462,7 @@
signal]}]))
{try.#Failure error}
- (in [(async\in {try.#Failure error})
+ (in [(async#in {try.#Failure error})
{.#None}])))))))))))
_ (case signal
{.#None}
@@ -498,7 +498,7 @@
(in [module lux_module])))
(archive.archived archive))
.let [additions (|> modules
- (list\each product.left)
+ (list#each product.left)
(set.of_list text.hash))]]
(in (revised@ [extension.#state
///directive.#analysis
@@ -508,7 +508,7 @@
(|> analysis_state
(:as .Lux)
(revised@ .#modules (function (_ current)
- (list\composite (list.only (|>> product.left
+ (list#composite (list.only (|>> product.left
(set.member? additions)
not)
current)
@@ -563,9 +563,9 @@
... This currently assumes that all imports will be specified once in a single .module: form.
... This might not be the case in the future.
[all_dependencies duplicates _] (: [(Set Module) (Set Module) Bit]
- (list\mix (function (_ new [all duplicates seen_prelude?])
+ (list#mix (function (_ new [all duplicates seen_prelude?])
(if (set.member? all new)
- (if (text\= .prelude_module new)
+ (if (text#= .prelude_module new)
(if seen_prelude?
[all (set.has new duplicates) seen_prelude?]
[all duplicates true])
@@ -582,14 +582,14 @@
{.#Item _}
(do !
[archive,document+ (|> new_dependencies
- (list\each (import! module))
+ (list#each (import! module))
(monad.all ..monad))
.let [archive (|> archive,document+
- (list\each product.left)
- (list\mix archive.merged archive))]]
+ (list#each product.left)
+ (list#mix archive.merged archive))]]
(in [archive (try.trusted
(..updated_state archive state))])))
- (async\in (exception.except ..cannot_import_twice [module duplicates])))]
+ (async#in (exception.except ..cannot_import_twice [module duplicates])))]
(case ((value@ ///.#process compilation)
... TODO: The "///directive.set_current_module" below shouldn't be necessary. Remove it ASAP.
... TODO: The context shouldn't need to be re-set either.
@@ -614,11 +614,11 @@
(..with_reset_log state)])
{try.#Failure error}
- (async\in {try.#Failure error}))))
+ (async#in {try.#Failure error}))))
{try.#Failure error}
(do !
[_ (ioW.freeze (value@ #&file_system platform) static archive)]
- (async\in {try.#Failure error}))))))))]
+ (async#in {try.#Failure error}))))))))]
(compiler archive.runtime_module compilation_module)))
)))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux.lux b/stdlib/source/library/lux/tool/compiler/language/lux.lux
index 39714d1c0..e8029aedc 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux.lux
@@ -86,7 +86,7 @@
... #imports
(<b>.list <b>.text)
... #module_state
- (\ <>.monad in {.#Cached}))))
+ (# <>.monad in {.#Cached}))))
(def: .public key
(Key .Module)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/analysis.lux b/stdlib/source/library/lux/tool/compiler/language/lux/analysis.lux
index 1fd1fe2b4..eca75863c 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/analysis.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/analysis.lux
@@ -12,11 +12,11 @@
["[0]" exception {"+" [Exception]}]]
[data
["[0]" product]
- ["[0]" bit ("[1]\[0]" equivalence)]
- ["[0]" text ("[1]\[0]" equivalence)
+ ["[0]" bit ("[1]#[0]" equivalence)]
+ ["[0]" text ("[1]#[0]" equivalence)
["%" format {"+" [Format format]}]]
[collection
- ["[0]" list ("[1]\[0]" functor mix)]]]
+ ["[0]" list ("[1]#[0]" functor mix)]]]
[math
[number
["n" nat]
@@ -126,17 +126,17 @@
(^template [<tag> <=>]
[[{<tag> reference} {<tag> sample}]
(<=> reference sample)])
- ([#Bit bit\=]
+ ([#Bit bit#=]
[#Nat n.=]
[#Int i.=]
[#Rev r.=]
[#Frac f.=]
- [#Text text\=])
+ [#Text text#=])
_
false)))
-(implementation: .public (composite_equivalence (^open "/\[0]"))
+(implementation: .public (composite_equivalence (^open "/#[0]"))
(All (_ a) (-> (Equivalence a) (Equivalence (Composite a))))
(def: (= reference sample)
@@ -144,11 +144,11 @@
[{#Variant [reference_lefts reference_right? reference_value]}
{#Variant [sample_lefts sample_right? sample_value]}]
(and (n.= reference_lefts sample_lefts)
- (bit\= reference_right? sample_right?)
- (/\= reference_value sample_value))
+ (bit#= reference_right? sample_right?)
+ (/#= reference_value sample_value))
[{#Tuple reference} {#Tuple sample}]
- (\ (list.equivalence /\=) = reference sample)
+ (# (list.equivalence /#=) = reference sample)
_
false)))
@@ -157,19 +157,19 @@
(All (_ a) (-> (Hash a) (Hash (Composite a))))
(def: &equivalence
- (..composite_equivalence (\ super &equivalence)))
+ (..composite_equivalence (# super &equivalence)))
(def: (hash value)
(case value
{#Variant [lefts right? value]}
($_ n.* 2
- (\ n.hash hash lefts)
- (\ bit.hash hash right?)
- (\ super hash value))
+ (# n.hash hash lefts)
+ (# bit.hash hash right?)
+ (# super hash value))
{#Tuple members}
($_ n.* 3
- (\ (list.hash super) hash members))
+ (# (list.hash super) hash members))
)))
(implementation: pattern_equivalence
@@ -178,10 +178,10 @@
(def: (= reference sample)
(case [reference sample]
[{#Simple reference} {#Simple sample}]
- (\ primitive_equivalence = reference sample)
+ (# primitive_equivalence = reference sample)
[{#Complex reference} {#Complex sample}]
- (\ (composite_equivalence =) = reference sample)
+ (# (composite_equivalence =) = reference sample)
[{#Bind reference} {#Bind sample}]
(n.= reference sample)
@@ -193,8 +193,8 @@
(-> (Equivalence Analysis) (Equivalence Branch))
(def: (= [reference_pattern reference_body] [sample_pattern sample_body])
- (and (\ pattern_equivalence = reference_pattern sample_pattern)
- (\ equivalence = reference_body sample_body))))
+ (and (# pattern_equivalence = reference_pattern sample_pattern)
+ (# equivalence = reference_body sample_body))))
(implementation: .public equivalence
(Equivalence Analysis)
@@ -202,23 +202,23 @@
(def: (= reference sample)
(case [reference sample]
[{#Primitive reference} {#Primitive sample}]
- (\ primitive_equivalence = reference sample)
+ (# primitive_equivalence = reference sample)
[{#Structure reference} {#Structure sample}]
- (\ (composite_equivalence =) = reference sample)
+ (# (composite_equivalence =) = reference sample)
[{#Reference reference} {#Reference sample}]
- (\ reference.equivalence = reference sample)
+ (# reference.equivalence = reference sample)
[{#Case [reference_analysis reference_match]}
{#Case [sample_analysis sample_match]}]
(and (= reference_analysis sample_analysis)
- (\ (list.equivalence (branch_equivalence =)) = {.#Item reference_match} {.#Item sample_match}))
+ (# (list.equivalence (branch_equivalence =)) = {.#Item reference_match} {.#Item sample_match}))
[{#Function [reference_environment reference_analysis]}
{#Function [sample_environment sample_analysis]}]
(and (= reference_analysis sample_analysis)
- (\ (list.equivalence =) = reference_environment sample_environment))
+ (# (list.equivalence =) = reference_environment sample_environment))
[{#Apply [reference_input reference_abstraction]}
{#Apply [sample_input sample_abstraction]}]
@@ -226,7 +226,7 @@
(= reference_abstraction sample_abstraction))
[{#Extension reference} {#Extension sample}]
- (\ (extension.equivalence =) = reference sample)
+ (# (extension.equivalence =) = reference sample)
_
false)))
@@ -273,7 +273,7 @@
(def: .public (apply [abstraction inputs])
(-> (Application Analysis) Analysis)
- (list\mix (function (_ input abstraction')
+ (list#mix (function (_ input abstraction')
{#Apply input abstraction'})
abstraction
inputs))
@@ -365,7 +365,7 @@
{#Tuple members}
(|> members
- (list\each %analysis)
+ (list#each %analysis)
(text.interposed " ")
(text.enclosed ["[" "]"])))
@@ -379,7 +379,7 @@
(|> (%analysis body)
(format " ")
(format (|> environment
- (list\each %analysis)
+ (list#each %analysis)
(text.interposed " ")
(text.enclosed ["[" "]"])))
(text.enclosed ["(" ")"]))
@@ -388,13 +388,13 @@
(|> analysis
..application
{.#Item}
- (list\each %analysis)
+ (list#each %analysis)
(text.interposed " ")
(text.enclosed ["(" ")"]))
{#Extension name parameters}
(|> parameters
- (list\each %analysis)
+ (list#each %analysis)
(text.interposed " ")
(format (%.text name) " ")
(text.enclosed ["(" ")"]))))
@@ -473,7 +473,7 @@
(def: .public (with_location location action)
(All (_ a) (-> Location (Operation a) (Operation a)))
- (if (text\= "" (product.left location))
+ (if (text#= "" (product.left location))
action
(function (_ [bundle state])
(let [old_location (value@ .#location state)]
@@ -502,7 +502,7 @@
(def: .public (assertion exception parameters condition)
(All (_ e) (-> (Exception e) e Bit (Operation Any)))
(if condition
- (\ phase.monad in [])
+ (# phase.monad in [])
(..except exception parameters)))
(def: .public (failure' error)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/directive.lux b/stdlib/source/library/lux/tool/compiler/language/lux/directive.lux
index d11fa82cc..e2ccfa37d 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/directive.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/directive.lux
@@ -7,7 +7,7 @@
["[0]" try]]
[data
[collection
- ["[0]" list ("[1]\[0]" monoid)]]]]]
+ ["[0]" list ("[1]#[0]" monoid)]]]]]
[//
["[0]" analysis]
["[0]" synthesis]
@@ -51,8 +51,8 @@
(def: .public (merge_requirements left right)
(-> Requirements Requirements Requirements)
- [#imports (list\composite (value@ #imports left) (value@ #imports right))
- #referrals (list\composite (value@ #referrals left) (value@ #referrals right))])
+ [#imports (list#composite (value@ #imports left) (value@ #imports right))
+ #referrals (list#composite (value@ #referrals left) (value@ #referrals right))])
(template [<special> <general>]
[(type: .public (<special> anchor expression directive)
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 ab139fc04..ca66425c5 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/generation.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/generation.lux
@@ -11,11 +11,11 @@
[binary {"+" [Binary]}]
["[0]" product]
["[0]" name]
- ["[0]" text ("[1]\[0]" equivalence)
+ ["[0]" text ("[1]#[0]" equivalence)
["%" format {"+" [format]}]]
[collection
["[0]" row {"+" [Row]}]
- ["[0]" list ("[1]\[0]" functor)]]]
+ ["[0]" list ("[1]#[0]" functor)]]]
[math
[number
["n" nat]]]]]
@@ -180,7 +180,7 @@
(def: .public (identifier prefix)
(All (_ anchor expression directive)
(-> Text (Operation anchor expression directive Text)))
- (\ phase.monad each (|>> %.nat (format prefix)) ..next))
+ (# phase.monad each (|>> %.nat (format prefix)) ..next))
(def: .public (enter_module module)
(All (_ anchor expression directive)
@@ -196,7 +196,7 @@
(All (_ anchor expression directive)
(-> Context expression (Operation anchor expression directive Any)))
(function (_ (^@ state+ [bundle state]))
- (case (\ (value@ #host state) evaluate label code)
+ (case (# (value@ #host state) evaluate label code)
{try.#Success output}
{try.#Success [state+ output]}
@@ -207,7 +207,7 @@
(All (_ anchor expression directive)
(-> directive (Operation anchor expression directive Any)))
(function (_ (^@ state+ [bundle state]))
- (case (\ (value@ #host state) execute code)
+ (case (# (value@ #host state) execute code)
{try.#Success output}
{try.#Success [state+ output]}
@@ -218,7 +218,7 @@
(All (_ anchor expression directive)
(-> Context (Maybe Text) expression (Operation anchor expression directive [Text Any directive])))
(function (_ (^@ stateE [bundle state]))
- (case (\ (value@ #host state) define context custom code)
+ (case (# (value@ #host state) define context custom code)
{try.#Success output}
{try.#Success [stateE output]}
@@ -271,7 +271,7 @@
(let [[_module _name] name]
(do try.monad
[module_id (archive.id _module archive)
- registry (if (text\= (value@ #module state) _module)
+ registry (if (text#= (value@ #module state) _module)
{try.#Success (value@ #registry state)}
(do try.monad
[[descriptor document] (archive.find _module archive)]
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 5d6489898..99beefca5 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
@@ -13,7 +13,7 @@
[text
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" mix monoid monad)]]]
+ ["[0]" list ("[1]#[0]" mix monoid monad)]]]
[math
[number
["n" nat]]]
@@ -58,9 +58,9 @@
(exception.report
["Input" (%.code input)]
["Branches" (%.code (code.tuple (|> branches
- (list\each (function (_ [slot value])
+ (list#each (function (_ [slot value])
(list slot value)))
- list\conjoint)))]
+ list#conjoint)))]
["Coverage" (/coverage.%coverage coverage)]))
(exception: .public (cannot_have_empty_branches [message Text])
@@ -137,12 +137,12 @@
{.#Product _}
(|> caseT
type.flat_tuple
- (list\each (re_quantify envs))
+ (list#each (re_quantify envs))
type.tuple
- (\ ///.monad in))
+ (# ///.monad in))
_
- (\ ///.monad in (re_quantify envs caseT)))))
+ (# ///.monad in (re_quantify envs caseT)))))
(def: (analyse_primitive type inputT location output next)
(All (_ a) (-> Type Type Location Pattern (Operation a) (Operation [Pattern a])))
@@ -245,7 +245,7 @@
_
(undefined)))]
(do !
- [[memberP+ thenA] (list\mix (: (All (_ a)
+ [[memberP+ thenA] (list#mix (: (All (_ a)
(-> [Type Code] (Operation [(List Pattern) a])
(Operation [(List Pattern) a])))
(function (_ [memberT memberC] then)
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 813324061..70be9ca49 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
@@ -6,14 +6,14 @@
["[0]" monad {"+" [do]}]]
[control
["[0]" maybe]
- ["[0]" try {"+" [Try]} ("[1]\[0]" monad)]
+ ["[0]" try {"+" [Try]} ("[1]#[0]" monad)]
["[0]" exception {"+" [exception:]}]]
[data
- ["[0]" bit ("[1]\[0]" equivalence)]
+ ["[0]" bit ("[1]#[0]" equivalence)]
["[0]" text
["%" format {"+" [Format format]}]]
[collection
- ["[0]" list ("[1]\[0]" functor mix)]
+ ["[0]" list ("[1]#[0]" functor mix)]
["[0]" dictionary {"+" [Dictionary]}]]]
[math
[number
@@ -22,7 +22,7 @@
[//
["/" analysis {"+" [Pattern Variant Operation]}]
[///
- ["[1]" phase ("[1]\[0]" monad)]]]])
+ ["[1]" phase ("[1]#[0]" monad)]]]])
(exception: .public invalid_tuple_pattern
"Tuple size must be >= 2")
@@ -80,7 +80,7 @@
{#Variant ?max_cases cases}
(|> cases
dictionary.entries
- (list\each (function (_ [idx coverage])
+ (list#each (function (_ [idx coverage])
(format (%.nat idx) " " (%coverage coverage))))
(text.interposed " ")
(text.enclosed ["{" "}"])
@@ -101,13 +101,13 @@
(case pattern
(^or {/.#Simple {/.#Unit}}
{/.#Bind _})
- (////\in {#Exhaustive})
+ (////#in {#Exhaustive})
... Primitive patterns always have partial coverage because there
... are too many possibilities as far as values go.
(^template [<tag>]
[{/.#Simple {<tag> _}}
- (////\in {#Partial})])
+ (////#in {#Partial})])
([/.#Nat]
[/.#Int]
[/.#Rev]
@@ -118,7 +118,7 @@
... "#0", which means it is possible for bit
... pattern-matching to become exhaustive if complementary parts meet.
{/.#Simple {/.#Bit value}}
- (////\in {#Bit value})
+ (////#in {#Bit value})
... Tuple patterns can be exhaustive if there is exhaustiveness for all of
... their sub-patterns.
@@ -189,12 +189,12 @@
#1
[{#Bit sideR} {#Bit sideS}]
- (bit\= sideR sideS)
+ (bit#= sideR sideS)
[{#Variant allR casesR} {#Variant allS casesS}]
(and (n.= (cases allR)
(cases allS))
- (\ (dictionary.equivalence =) = casesR casesS))
+ (# (dictionary.equivalence =) = casesR casesS))
[{#Seq leftR rightR} {#Seq leftS rightS}]
(and (= leftR leftS)
@@ -227,12 +227,12 @@
(-> Coverage Coverage (Try Coverage))
(case [addition so_far]
[{#Partial} {#Partial}]
- (try\in {#Partial})
+ (try#in {#Partial})
... 2 bit coverages are exhaustive if they complement one another.
(^multi [{#Bit sideA} {#Bit sideSF}]
(xor sideA sideSF))
- (try\in {#Exhaustive})
+ (try#in {#Exhaustive})
[{#Variant allA casesA} {#Variant allSF casesSF}]
(let [addition_cases (cases allSF)
@@ -242,7 +242,7 @@
(not (n.= addition_cases so_far_cases)))
(exception.except ..variants_do_not_match [addition_cases so_far_cases])
- (\ (dictionary.equivalence ..equivalence) = casesSF casesA)
+ (# (dictionary.equivalence ..equivalence) = casesSF casesA)
(exception.except ..redundant_pattern [so_far addition])
... else
@@ -293,7 +293,7 @@
... The 2 sequences cannot possibly be merged.
[#0 #0]
- (try\in {#Alt so_far addition})
+ (try#in {#Alt so_far addition})
... There is nothing the addition adds to the coverage.
[#1 #1]
@@ -305,7 +305,7 @@
... The addition completes the coverage.
[{#Exhaustive} _]
- (try\in {#Exhaustive})
+ (try#in {#Exhaustive})
... The left part will always match, so the addition is redundant.
(^multi [{#Seq left right} single]
@@ -315,7 +315,7 @@
... The right part is not necessary, since it can always match the left.
(^multi [single {#Seq left right}]
(coverage/= left single))
- (try\in single)
+ (try#in single)
... When merging a new coverage against one based on Alt, it may be
... that one of the many coverages in the Alt is complementary to
@@ -364,7 +364,7 @@
{.#None}
(case (list.reversed possibilitiesSF)
{.#Item last prevs}
- (in (list\mix (function (_ left right) {#Alt left right})
+ (in (list#mix (function (_ left right) {#Alt left right})
last
prevs))
@@ -376,4 +376,4 @@
... The addition cannot possibly improve the coverage.
(exception.except ..redundant_pattern [so_far addition])
... There are now 2 alternative paths.
- (try\in {#Alt so_far addition}))))
+ (try#in {#Alt so_far addition}))))
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 ab080a2b8..3993d77d4 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
@@ -10,7 +10,7 @@
["[0]" text
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" monoid monad)]]]
+ ["[0]" list ("[1]#[0]" monoid monad)]]]
["[0]" type
["[0]" check]]
["[0]" meta]]]
@@ -43,7 +43,7 @@
["Function" (%.code functionC)]
["Arguments" (|> arguments
list.enumeration
- (list\each (.function (_ [idx argC])
+ (list#each (.function (_ [idx argC])
(format (%.nat idx) " " (%.code argC))))
(text.interposed text.new_line))]))
@@ -93,8 +93,8 @@
(in functionA))))
{.#Function inputT outputT}
- (<| (\ ! each (.function (_ [scope bodyA])
- {/.#Function (list\each (|>> /.variable)
+ (<| (# ! each (.function (_ [scope bodyA])
+ {/.#Function (list#each (|>> /.variable)
(//scope.environment scope))
bodyA}))
/.with_scope
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 e377fedb0..0ec812b80 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
@@ -10,7 +10,7 @@
["[0]" text
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" functor monoid)]]]
+ ["[0]" list ("[1]#[0]" functor monoid)]]]
[math
[number
["n" nat]]]
@@ -24,7 +24,7 @@
[//
["/" analysis {"+" [Tag Analysis Operation Phase]}]
[///
- ["[1]" phase ("[1]\[0]" monad)]
+ ["[1]" phase ("[1]#[0]" monad)]
[meta
[archive {"+" [Archive]}]]]]]])
@@ -67,7 +67,7 @@
(-> Nat Type Type Type)
(case type
{.#Primitive name params}
- {.#Primitive name (list\each (replace parameter_idx replacement) params)}
+ {.#Primitive name (list#each (replace parameter_idx replacement) params)}
(^template [<tag>]
[{<tag> left right}
@@ -86,7 +86,7 @@
(^template [<tag>]
[{<tag> env quantified}
- {<tag> (list\each (replace parameter_idx replacement) env)
+ {<tag> (list#each (replace parameter_idx replacement) env)
(replace (n.+ 2 parameter_idx) replacement quantified)}])
([.#UnivQ]
[.#ExQ])
@@ -190,7 +190,7 @@
(function (recur base)
(case base
{.#Primitive name parameters}
- {.#Primitive name (list\each recur parameters)}
+ {.#Primitive name (list#each recur parameters)}
(^template [<tag>]
[{<tag> left right}
@@ -204,7 +204,7 @@
(^template [<tag>]
[{<tag> environment quantified}
- {<tag> (list\each recur environment) quantified}])
+ {<tag> (list#each recur environment) quantified}])
([.#UnivQ] [.#ExQ])
_
@@ -235,8 +235,8 @@
{.#Product _}
(let [[lefts right] (list.split_at (-- record_size) (type.flat_tuple inferT))]
- (///\in (|> inferT
- (type.function (list\composite lefts (list (type.tuple right))))
+ (///#in (|> inferT
+ (type.function (list#composite lefts (list (type.tuple right))))
(substitute_bound target originalT))))
_
@@ -274,7 +274,7 @@
(n.< boundary tag)))
(case (list.item tag cases)
{.#Some caseT}
- (///\in (if (n.= 0 depth)
+ (///#in (if (n.= 0 depth)
(type.function (list caseT) currentT)
(let [replace' (replace (|> depth -- (n.* 2)) inferT)]
(type.function (list (replace' caseT))
@@ -288,7 +288,7 @@
(n.= boundary tag)
(let [caseT (type.variant (list.after boundary cases))]
- (///\in (if (n.= 0 depth)
+ (///#in (if (n.= 0 depth)
(type.function (list caseT) currentT)
(let [replace' (replace (|> depth -- (n.* 2)) inferT)]
(type.function (list (replace' caseT))
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 dde8eb173..0999bd516 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
@@ -8,10 +8,10 @@
["[0]" try]
["[0]" exception {"+" [exception:]}]]
[data
- ["[0]" text ("[1]\[0]" equivalence)
+ ["[0]" text ("[1]#[0]" equivalence)
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" mix functor)]
+ ["[0]" list ("[1]#[0]" mix functor)]
[dictionary
["[0]" plist]]]]
["[0]" meta]]]
@@ -84,7 +84,7 @@
(function (_ state)
{try.#Success [(revised@ .#modules
(plist.revised self_name (revised@ .#imports (function (_ current)
- (if (list.any? (text\= module)
+ (if (list.any? (text#= module)
current)
current
{.#Item module current}))))
@@ -214,7 +214,7 @@
_
(/.except ..cannot_declare_tags_for_unnamed_type [tags type]))
_ (///.assertion cannot_declare_tags_for_foreign_type [tags type]
- (text\= self_name type_module))]
+ (text#= self_name type_module))]
(monad.each ! (function (_ [index short])
(..define short
(if record?
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 05495f98d..f8f3aca6b 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
@@ -7,7 +7,7 @@
["[0]" exception {"+" [exception:]}]]
["[0]" meta]
[data
- ["[0]" text ("[1]\[0]" equivalence)
+ ["[0]" text ("[1]#[0]" equivalence)
["%" format {"+" [format]}]]]]]
["[0]" // "_"
["[1][0]" scope]
@@ -48,7 +48,7 @@
[_ (//type.infer actualT)
(^@ def_name [::module ::name]) (///extension.lifted (meta.normal def_name))
current (///extension.lifted meta.current_module_name)]
- (if (text\= current ::module)
+ (if (text#= current ::module)
<return>
(if exported?
(do !
@@ -63,7 +63,7 @@
[_ (//type.infer .Type)
(^@ def_name [::module ::name]) (///extension.lifted (meta.normal def_name))
current (///extension.lifted meta.current_module_name)]
- (if (text\= current ::module)
+ (if (text#= current ::module)
<return>
(if exported?
(do !
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/scope.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/scope.lux
index d14adf09f..ae2ff1ce7 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/scope.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/scope.lux
@@ -4,14 +4,14 @@
[abstract
monad]
[control
- ["[0]" maybe ("[1]\[0]" monad)]
+ ["[0]" maybe ("[1]#[0]" monad)]
["[0]" try]
["[0]" exception {"+" [exception:]}]]
[data
- ["[0]" text ("[1]\[0]" equivalence)]
+ ["[0]" text ("[1]#[0]" equivalence)]
["[0]" product]
[collection
- ["[0]" list ("[1]\[0]" functor mix monoid)]
+ ["[0]" list ("[1]#[0]" functor mix monoid)]
[dictionary
["[0]" plist]]]]]]
["[0]" /// "_"
@@ -40,7 +40,7 @@
(|> scope
(value@ [.#locals .#mappings])
(plist.value name)
- (maybe\each (function (_ [type value])
+ (maybe#each (function (_ [type value])
[type {variable.#Local value}]))))
(def: (captured? name scope)
@@ -55,7 +55,7 @@
mappings (value@ [.#captured .#mappings] scope)]
(case mappings
{.#Item [_name [_source_type _source_ref]] mappings'}
- (if (text\= name _name)
+ (if (text#= name _name)
{.#Some [_source_type {variable.#Foreign idx}]}
(recur (++ idx) mappings'))
@@ -90,7 +90,7 @@
{.#Item top_outer _}
(let [[ref_type init_ref] (maybe.else (undefined)
(..reference name top_outer))
- [ref inner'] (list\mix (: (-> Scope [Variable (List Scope)] [Variable (List Scope)])
+ [ref inner'] (list#mix (: (-> Scope [Variable (List Scope)] [Variable (List Scope)])
(function (_ scope ref+inner)
[{variable.#Foreign (value@ [.#captured .#counter] scope)}
{.#Item (revised@ .#captured
@@ -101,7 +101,7 @@
(product.right ref+inner)}]))
[init_ref {.#End}]
(list.reversed inner))
- scopes (list\composite inner' outer)]
+ scopes (list#composite inner' outer)]
{.#Right [(with@ .#scopes scopes state)
{.#Some [ref_type ref]}]})
)))))
@@ -205,4 +205,4 @@
(-> Scope (List Variable))
(|> scope
(value@ [.#captured .#mappings])
- (list\each (function (_ [_ [_ ref]]) (ref_variable ref)))))
+ (list#each (function (_ [_ [_ ref]]) (ref_variable ref)))))
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 188d8f7b8..27dd0dd72 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
@@ -15,7 +15,7 @@
[text
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" monad)]
+ ["[0]" list ("[1]#[0]" monad)]
["[0]" dictionary {"+" [Dictionary]}]]]
[macro
["[0]" code]]
@@ -78,9 +78,9 @@
(exception.report
["Tag" (%.code (code.tag key))]
["Record" (%.code (code.tuple (|> record
- (list\each (function (_ [keyI valC])
+ (list#each (function (_ [keyI valC])
(list (code.tag keyI) valC)))
- list\conjoint)))]))]
+ list#conjoint)))]))]
[cannot_repeat_tag]
)
@@ -100,9 +100,9 @@
["Actual" (%.nat actual)]
["Type" (%.type type)]
["Expression" (%.code (|> record
- (list\each (function (_ [keyI valueC])
+ (list#each (function (_ [keyI valueC])
(list (code.tag keyI) valueC)))
- list\conjoint
+ list#conjoint
code.tuple))]))
(def: .public (sum analyse lefts right? archive)
@@ -197,11 +197,11 @@
[{.#Item memberT {.#End}} _]
(//type.with_type memberT
- (\ ! each (|>> list) (analyse archive (code.tuple membersC+))))
+ (# ! each (|>> list) (analyse archive (code.tuple membersC+))))
[_ {.#Item memberC {.#End}}]
(//type.with_type (type.tuple membersT+)
- (\ ! each (|>> list) (analyse archive memberC)))
+ (# ! each (|>> list) (analyse archive memberC)))
[{.#Item memberT membersT+'} {.#Item memberC membersC+'}]
(do !
@@ -243,8 +243,8 @@
membersC)
_ (//type.with_env
(check.check expectedT
- (type.tuple (list\each product.left membersTA))))]
- (in (/.tuple (list\each product.right membersTA))))))
+ (type.tuple (list#each product.left membersTA))))]
+ (in (/.tuple (list#each product.right membersTA))))))
(^template [<tag> <instancer>]
[{<tag> _}
@@ -316,10 +316,10 @@
(recur tail {.#Item [slotH valueH] output}))
{.#End}
- (\ ///.monad in {.#Some output})
+ (# ///.monad in {.#Some output})
_
- (\ ///.monad in {.#None}))))
+ (# ///.monad in {.#None}))))
... Lux already possesses the means to analyse tuples, so
... re-implementing the same functionality for records makes no sense.
@@ -329,7 +329,7 @@
(case record
... empty_record = empty_tuple = unit/any = []
{.#End}
- (\ ///.monad in {.#Some [0 (list) Any]})
+ (# ///.monad in {.#Some [0 (list) Any]})
{.#Item [head_k head_v] _}
(do [! ///.monad]
@@ -362,7 +362,7 @@
(: (Dictionary Nat Code)
(dictionary.empty n.hash))
record)
- .let [ordered_tuple (list\each (function (_ idx)
+ .let [ordered_tuple (list#each (function (_ idx)
(maybe.trusted (dictionary.value idx idx->val)))
tuple_range)]]
(in {.#Some [size_ts ordered_tuple recordT]}))
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 0d95f2262..5622ab2dc 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
@@ -11,7 +11,7 @@
[text
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" mix monoid)]]]]]
+ ["[0]" list ("[1]#[0]" mix monoid)]]]]]
["[0]" // "_"
["[1][0]" extension]
["[1][0]" analysis
@@ -96,12 +96,12 @@
(case expansion
(^ (list& <lux_def_module> referrals))
(|> (recur archive <lux_def_module>)
- (\ ! each (revised@ /.#referrals (list\composite referrals))))
+ (# ! each (revised@ /.#referrals (list#composite referrals))))
_
(|> expansion
(monad.each ! (recur archive))
- (\ ! each (list\mix /.merge_requirements /.no_requirements)))))
+ (# ! each (list#mix /.merge_requirements /.no_requirements)))))
_
(//.except ..not_a_directive code)))))))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension.lux
index 7f3481817..19b2d94f9 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension.lux
@@ -11,7 +11,7 @@
["[0]" exception {"+" [exception:]}]]
[data
["[0]" product]
- ["[0]" text ("[1]\[0]" order)
+ ["[0]" text ("[1]#[0]" order)
["%" format {"+" [Format format]}]]
[collection
["[0]" list]
@@ -86,7 +86,7 @@
["Extension" (%.text name)]
["Available" (|> bundle
dictionary.keys
- (list.sorted text\<)
+ (list.sorted text#<)
(exception.listing %.text))]))
(type: .public (Extender s i o)
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 88b935e35..b19fc6e6e 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
@@ -8,17 +8,17 @@
[control
pipe
["[0]" maybe]
- ["[0]" try {"+" [Try]} ("[1]\[0]" monad)]
+ ["[0]" try {"+" [Try]} ("[1]#[0]" monad)]
["[0]" exception {"+" [exception:]}]
["<>" parser
["<[0]>" code {"+" [Parser]}]
["<[0]>" text]]]
[data
["[0]" product]
- ["[0]" text ("[1]\[0]" equivalence)
+ ["[0]" text ("[1]#[0]" equivalence)
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" mix monad monoid)]
+ ["[0]" list ("[1]#[0]" mix monad monoid)]
["[0]" array]
["[0]" dictionary {"+" [Dictionary]}]]]
[math
@@ -29,7 +29,7 @@
["[0]!" reflection]
[encoding
[name {"+" [External]}]]
- ["[1]" type {"+" [Type Argument Typed]} ("[1]\[0]" equivalence)
+ ["[1]" type {"+" [Type Argument Typed]} ("[1]#[0]" equivalence)
["[0]" category {"+" [Void Value' Value Return' Return Primitive Object Class Array Var Parameter Method]}]
["[0]" box]
["[0]" reflection]
@@ -39,7 +39,7 @@
["[1]_[0]" alias {"+" [Aliasing]}]
["[0]T" lux {"+" [Mapping]}]]]]
["[0]" type
- ["[0]" check {"+" [Check]} ("[1]\[0]" monad)]]]]
+ ["[0]" check {"+" [Check]} ("[1]#[0]" monad)]]]]
["[0]" // "_"
["[1][0]" lux {"+" [custom]}]
["/[1]" //
@@ -53,7 +53,7 @@
["[1][0]" analysis {"+" [Analysis Operation Phase Handler Bundle]}]
["[1][0]" synthesis]
[///
- ["[0]" phase ("[1]\[0]" monad)]
+ ["[0]" phase ("[1]#[0]" monad)]
[meta
[archive {"+" [Archive]}
[descriptor {"+" [Module]}]]]]]]]])
@@ -236,7 +236,7 @@
["Class" class]
["Method" method]
["Arguments" (exception.listing ..signature inputsJT)]
- ["Hints" (exception.listing %.type (list\each product.left hints))]))]
+ ["Hints" (exception.listing %.type (list#each product.left hints))]))]
[no_candidates]
[too_many_candidates]
@@ -367,14 +367,14 @@
(/////analysis.except ..non_jvm_type luxT))
(^ {.#Primitive (static array.type_name) (list elemT)})
- (phase\each jvm.array (jvm_type elemT))
+ (phase#each jvm.array (jvm_type elemT))
{.#Primitive class parametersT}
(case (dictionary.value class ..boxes)
{.#Some [_ primitive_type]}
(case parametersT
{.#End}
- (phase\in primitive_type)
+ (phase#in primitive_type)
_
(/////analysis.except ..primitives_cannot_have_type_parameters class))
@@ -396,7 +396,7 @@
(in (jvm.class class parametersJT))))
{.#Ex _}
- (phase\in (jvm.class ..object_class (list)))
+ (phase#in (jvm.class ..object_class (list)))
_
(/////analysis.except ..non_jvm_type luxT)))
@@ -490,7 +490,7 @@
{.#Primitive name parameters}
(`` (cond (or (~~ (template [<type>]
- [(text\= (..reflection <type>) name)]
+ [(text#= (..reflection <type>) name)]
[jvm.boolean]
[jvm.byte]
@@ -504,14 +504,14 @@
(/////analysis.except ..non_parameter objectT)
... else
- (phase\in (jvm.class name (list)))))
+ (phase#in (jvm.class name (list)))))
{.#Named name anonymous}
(check_parameter anonymous)
(^template [<tag>]
[{<tag> id}
- (phase\in (jvm.class ..object_class (list)))])
+ (phase#in (jvm.class ..object_class (list)))])
([.#Var]
[.#Ex])
@@ -537,8 +537,8 @@
(case objectT
{.#Primitive name {.#End}}
(`` (cond (~~ (template [<type>]
- [(text\= (..reflection <type>) name)
- (phase\in <type>)]
+ [(text#= (..reflection <type>) name)
+ (phase#in <type>)]
[jvm.boolean]
[jvm.byte]
@@ -550,8 +550,8 @@
[jvm.char]))
(~~ (template [<type>]
- [(text\= (..reflection (jvm.array <type>)) name)
- (phase\in (jvm.array <type>))]
+ [(text#= (..reflection (jvm.array <type>)) name)
+ (phase#in (jvm.array <type>))]
[jvm.boolean]
[jvm.byte]
@@ -564,22 +564,22 @@
(text.starts_with? descriptor.array_prefix name)
(let [[_ unprefixed] (maybe.trusted (text.split_by descriptor.array_prefix name))]
- (\ phase.monad each jvm.array
+ (# phase.monad each jvm.array
(check_jvm {.#Primitive unprefixed (list)})))
... else
- (phase\in (jvm.class name (list)))))
+ (phase#in (jvm.class name (list)))))
(^ {.#Primitive (static array.type_name)
(list elementT)})
(|> elementT
check_jvm
- (phase\each jvm.array))
+ (phase#each jvm.array))
{.#Primitive name parameters}
(do [! phase.monad]
[parameters (monad.each ! check_parameter parameters)]
- (phase\in (jvm.class name parameters)))
+ (phase#in (jvm.class name parameters)))
{.#Named name anonymous}
(check_jvm anonymous)
@@ -604,15 +604,15 @@
(def: (check_object objectT)
(-> .Type (Operation External))
(do [! phase.monad]
- [name (\ ! each ..reflection (check_jvm objectT))]
+ [name (# ! each ..reflection (check_jvm objectT))]
(if (dictionary.key? ..boxes name)
(/////analysis.except ..primitives_are_not_objects [name])
- (phase\in name))))
+ (phase#in name))))
(def: (check_return type)
(-> .Type (Operation (Type Return)))
(if (same? .Any type)
- (phase\in jvm.void)
+ (phase#in jvm.void)
(check_jvm type)))
(def: (read_primitive_array_handler lux_type jvm_type)
@@ -896,7 +896,7 @@
(monad.each phase.monad
(function (_ superT)
(do [! phase.monad]
- [super_name (\ ! each ..reflection (check_jvm superT))
+ [super_name (# ! each ..reflection (check_jvm superT))
super_class (phase.lifted (reflection!.load class_loader super_name))]
(in [[super_name superT]
(java/lang/Class::isAssignableFrom super_class target_class)])))
@@ -912,18 +912,18 @@
(^ (list fromC))
(do [! phase.monad]
[toT (///.lifted meta.expected_type)
- target_name (\ ! each ..reflection (check_jvm toT))
+ target_name (# ! each ..reflection (check_jvm toT))
[fromT fromA] (typeA.with_inference
(analyse archive fromC))
- source_name (\ ! each ..reflection (check_jvm fromT))
+ source_name (# ! each ..reflection (check_jvm fromT))
can_cast? (: (Operation Bit)
(`` (cond (~~ (template [<primitive> <object>]
[(let [=primitive (reflection.reflection <primitive>)]
- (or (and (text\= =primitive source_name)
- (or (text\= <object> target_name)
- (text\= =primitive target_name)))
- (and (text\= <object> source_name)
- (text\= =primitive target_name))))
+ (or (and (text#= =primitive source_name)
+ (or (text#= <object> target_name)
+ (text#= =primitive target_name)))
+ (and (text#= <object> source_name)
+ (text#= =primitive target_name))))
(in true)]
[reflection.boolean box.boolean]
@@ -942,23 +942,23 @@
_ (phase.assertion ..primitives_are_not_objects [target_name]
(not (dictionary.key? ..boxes target_name)))
target_class (phase.lifted (reflection!.load class_loader target_name))
- _ (if (text\= ..inheritance_relationship_type_name source_name)
+ _ (if (text#= ..inheritance_relationship_type_name source_name)
(in [])
(do !
[source_class (phase.lifted (reflection!.load class_loader source_name))]
(phase.assertion ..cannot_cast [fromT toT fromC]
(java/lang/Class::isAssignableFrom source_class target_class))))]
(loop [[current_name currentT] [source_name fromT]]
- (if (text\= target_name current_name)
+ (if (text#= target_name current_name)
(in true)
(do !
[candidate_parents (: (Operation (List [[Text .Type] Bit]))
- (if (text\= ..inheritance_relationship_type_name current_name)
+ (if (text#= ..inheritance_relationship_type_name current_name)
(inheritance_candidate_parents class_loader currentT target_class toT fromC)
(class_candidate_parents class_loader current_name currentT target_name target_class)))]
(case (|> candidate_parents
(list.only product.right)
- (list\each product.left))
+ (list#each product.left))
{.#Item [next_name nextT] _}
(recur [next_name nextT])
@@ -1102,7 +1102,7 @@
phase.lifted)
.let [modifiers (java/lang/reflect/Method::getModifiers method)
correct_class? (java/lang/Object::equals class (java/lang/reflect/Method::getDeclaringClass method))
- correct_method? (text\= method_name (java/lang/reflect/Method::getName method))
+ correct_method? (text#= method_name (java/lang/reflect/Method::getName method))
static_matches? (case method_style
{#Static}
(java/lang/reflect/Modifier::isStatic modifiers)
@@ -1118,9 +1118,9 @@
true)
arity_matches? (n.= (list.size inputsJT) (list.size parameters))
inputs_match? (and arity_matches?
- (list\mix (function (_ [expectedJC actualJC] prev)
+ (list#mix (function (_ [expectedJC actualJC] prev)
(and prev
- (jvm\= expectedJC (: (Type Value)
+ (jvm#= expectedJC (: (Type Value)
(case (jvm_parser.var? actualJC)
{.#Some name}
(|> aliasing
@@ -1149,7 +1149,7 @@
(in (and (java/lang/Object::equals class (java/lang/reflect/Constructor::getDeclaringClass constructor))
(n.= (list.size inputsJT) (list.size parameters))
(list.every? (function (_ [expectedJC actualJC])
- (jvm\= expectedJC (: (Type Value)
+ (jvm#= expectedJC (: (Type Value)
(case (jvm_parser.var? actualJC)
{.#Some name}
(|> aliasing
@@ -1167,15 +1167,15 @@
(def: (jvm_type_var_mapping owner_tvars method_tvars)
(-> (List Text) (List Text) [(List .Type) Mapping])
- (let [jvm_tvars (list\composite owner_tvars method_tvars)
+ (let [jvm_tvars (list#composite owner_tvars method_tvars)
lux_tvars (|> jvm_tvars
list.reversed
list.enumeration
- (list\each (function (_ [idx name])
+ (list#each (function (_ [idx name])
[name (index_parameter idx)]))
list.reversed)
num_owner_tvars (list.size owner_tvars)
- owner_tvarsT (|> lux_tvars (list.first num_owner_tvars) (list\each product.right))
+ owner_tvarsT (|> lux_tvars (list.first num_owner_tvars) (list#each product.right))
mapping (dictionary.of_list text.hash lux_tvars)]
[owner_tvarsT mapping]))
@@ -1189,28 +1189,28 @@
_
(|> (java/lang/Class::getTypeParameters owner)
(array.list {.#None})
- (list\each (|>> java/lang/reflect/TypeVariable::getName))))
+ (list#each (|>> java/lang/reflect/TypeVariable::getName))))
method_tvars (|> (java/lang/reflect/Method::getTypeParameters method)
(array.list {.#None})
- (list\each (|>> java/lang/reflect/TypeVariable::getName)))
+ (list#each (|>> java/lang/reflect/TypeVariable::getName)))
[owner_tvarsT mapping] (jvm_type_var_mapping owner_tvars method_tvars)]
(do [! phase.monad]
[inputsT (|> (java/lang/reflect/Method::getGenericParameterTypes method)
(array.list {.#None})
(monad.each ! (|>> reflection!.type phase.lifted))
- (phase\each (monad.each ! (..reflection_type mapping)))
- phase\conjoint)
+ (phase#each (monad.each ! (..reflection_type mapping)))
+ phase#conjoint)
outputT (|> method
java/lang/reflect/Method::getGenericReturnType
reflection!.return
phase.lifted
- (phase\each (..reflection_return mapping))
- phase\conjoint)
+ (phase#each (..reflection_return mapping))
+ phase#conjoint)
exceptionsT (|> (java/lang/reflect/Method::getGenericExceptionTypes method)
(array.list {.#None})
(monad.each ! (|>> reflection!.type phase.lifted))
- (phase\each (monad.each ! (..reflection_type mapping)))
- phase\conjoint)
+ (phase#each (monad.each ! (..reflection_type mapping)))
+ phase#conjoint)
.let [methodT (<| (type.univ_q (dictionary.size mapping))
(type.function (case method_style
{#Static}
@@ -1229,22 +1229,22 @@
(let [owner (java/lang/reflect/Constructor::getDeclaringClass constructor)
owner_tvars (|> (java/lang/Class::getTypeParameters owner)
(array.list {.#None})
- (list\each (|>> java/lang/reflect/TypeVariable::getName)))
+ (list#each (|>> java/lang/reflect/TypeVariable::getName)))
method_tvars (|> (java/lang/reflect/Constructor::getTypeParameters constructor)
(array.list {.#None})
- (list\each (|>> java/lang/reflect/TypeVariable::getName)))
+ (list#each (|>> java/lang/reflect/TypeVariable::getName)))
[owner_tvarsT mapping] (jvm_type_var_mapping owner_tvars method_tvars)]
(do [! phase.monad]
[inputsT (|> (java/lang/reflect/Constructor::getGenericParameterTypes constructor)
(array.list {.#None})
(monad.each ! (|>> reflection!.type phase.lifted))
- (phase\each (monad.each ! (reflection_type mapping)))
- phase\conjoint)
+ (phase#each (monad.each ! (reflection_type mapping)))
+ phase#conjoint)
exceptionsT (|> (java/lang/reflect/Constructor::getGenericExceptionTypes constructor)
(array.list {.#None})
(monad.each ! (|>> reflection!.type phase.lifted))
- (phase\each (monad.each ! (reflection_type mapping)))
- phase\conjoint)
+ (phase#each (monad.each ! (reflection_type mapping)))
+ phase#conjoint)
.let [objectT {.#Primitive (java/lang/Class::getName owner) owner_tvarsT}
constructorT (<| (type.univ_q (dictionary.size mapping))
(type.function inputsT)
@@ -1276,7 +1276,7 @@
(-> <type> (List (Type Var)))
(|>> <method>
(array.list {.#None})
- (list\each (|>> java/lang/reflect/TypeVariable::getName jvm.var))))]
+ (list#each (|>> java/lang/reflect/TypeVariable::getName jvm.var))))]
[class_type_variables (java/lang/Class java/lang/Object) java/lang/Class::getTypeParameters]
[constructor_type_variables (java/lang/reflect/Constructor java/lang/Object) java/lang/reflect/Constructor::getTypeParameters]
@@ -1285,8 +1285,8 @@
(def: (aliasing expected actual)
(-> (List (Type Var)) (List (Type Var)) Aliasing)
- (|> (list.zipped/2 (list\each jvm_parser.name actual)
- (list\each jvm_parser.name expected))
+ (|> (list.zipped/2 (list#each jvm_parser.name actual)
+ (list#each jvm_parser.name expected))
(dictionary.of_list text.hash)))
(def: (method_candidate class_loader actual_class_tvars class_name actual_method_tvars method_name method_style inputsJT)
@@ -1297,7 +1297,7 @@
candidates (|> class
java/lang/Class::getDeclaredMethods
(array.list {.#None})
- (list.only (|>> java/lang/reflect/Method::getName (text\= method_name)))
+ (list.only (|>> java/lang/reflect/Method::getName (text#= method_name)))
(monad.each ! (: (-> java/lang/reflect/Method (Operation Evaluation))
(function (_ method)
(do !
@@ -1305,7 +1305,7 @@
aliasing (dictionary.merged (..aliasing expected_class_tvars actual_class_tvars)
(..aliasing expected_method_tvars actual_method_tvars))]
passes? (check_method aliasing class method_name method_style inputsJT method)]
- (\ ! each (if passes?
+ (# ! each (if passes?
(|>> {#Pass})
(|>> {#Hint}))
(method_signature method_style method)))))))]
@@ -1336,7 +1336,7 @@
aliasing (dictionary.merged (..aliasing expected_class_tvars actual_class_tvars)
(..aliasing expected_method_tvars actual_method_tvars))]
passes? (check_constructor aliasing class inputsJT constructor)]
- (\ ! each
+ (# ! each
(if passes?
(|>> {#Pass})
(|>> {#Hint}))
@@ -1369,8 +1369,8 @@
(def: (decorate_inputs typesT inputsA)
(-> (List (Type Value)) (List Analysis) (List Analysis))
(|> inputsA
- (list.zipped/2 (list\each (|>> ..signature /////analysis.text) typesT))
- (list\each (function (_ [type value])
+ (list.zipped/2 (list#each (|>> ..signature /////analysis.text) typesT))
+ (list#each (function (_ [type value])
(/////analysis.tuple (list type value))))))
(def: type_vars
@@ -1383,11 +1383,11 @@
(function (_ extension_name analyse archive [class_tvars [class method] method_tvars argsTC])
(do phase.monad
[_ (..ensure_fresh_class! class_loader class)
- .let [argsT (list\each product.left argsTC)]
+ .let [argsT (list#each product.left argsTC)]
[methodT deprecated? exceptionsT] (..method_candidate class_loader class_tvars class method_tvars method {#Static} argsT)
_ (phase.assertion ..deprecated_method [class method methodT]
(not deprecated?))
- [outputT argsA] (inferenceA.general archive analyse methodT (list\each product.right argsTC))
+ [outputT argsA] (inferenceA.general archive analyse methodT (list#each product.right argsTC))
outputJT (check_return outputT)]
(in {/////analysis.#Extension extension_name (list& (/////analysis.text (..signature (jvm.class class (list))))
(/////analysis.text method)
@@ -1401,11 +1401,11 @@
(function (_ extension_name analyse archive [class_tvars [class method] method_tvars objectC argsTC])
(do phase.monad
[_ (..ensure_fresh_class! class_loader class)
- .let [argsT (list\each product.left argsTC)]
+ .let [argsT (list#each product.left argsTC)]
[methodT deprecated? exceptionsT] (..method_candidate class_loader class_tvars class method_tvars method {#Virtual} argsT)
_ (phase.assertion ..deprecated_method [class method methodT]
(not deprecated?))
- [outputT allA] (inferenceA.general archive analyse methodT (list& objectC (list\each product.right argsTC)))
+ [outputT allA] (inferenceA.general archive analyse methodT (list& objectC (list#each product.right argsTC)))
.let [[objectA argsA] (case allA
{.#Item objectA argsA}
[objectA argsA]
@@ -1426,11 +1426,11 @@
(function (_ extension_name analyse archive [class_tvars [class method] method_tvars objectC argsTC])
(do phase.monad
[_ (..ensure_fresh_class! class_loader class)
- .let [argsT (list\each product.left argsTC)]
+ .let [argsT (list#each product.left argsTC)]
[methodT deprecated? exceptionsT] (..method_candidate class_loader class_tvars class method_tvars method {#Special} argsT)
_ (phase.assertion ..deprecated_method [class method methodT]
(not deprecated?))
- [outputT argsA] (inferenceA.general archive analyse methodT (list& objectC (list\each product.right argsTC)))
+ [outputT argsA] (inferenceA.general archive analyse methodT (list& objectC (list#each product.right argsTC)))
outputJT (check_return outputT)]
(in {/////analysis.#Extension extension_name (list& (/////analysis.text (..signature (jvm.class class (list))))
(/////analysis.text method)
@@ -1444,14 +1444,14 @@
(function (_ extension_name analyse archive [class_tvars [class_name method] method_tvars objectC argsTC])
(do phase.monad
[_ (..ensure_fresh_class! class_loader class_name)
- .let [argsT (list\each product.left argsTC)]
+ .let [argsT (list#each product.left argsTC)]
class (phase.lifted (reflection!.load class_loader class_name))
_ (phase.assertion non_interface class_name
(java/lang/reflect/Modifier::isInterface (java/lang/Class::getModifiers class)))
[methodT deprecated? exceptionsT] (..method_candidate class_loader class_tvars class_name method_tvars method {#Interface} argsT)
_ (phase.assertion ..deprecated_method [class_name method methodT]
(not deprecated?))
- [outputT allA] (inferenceA.general archive analyse methodT (list& objectC (list\each product.right argsTC)))
+ [outputT allA] (inferenceA.general archive analyse methodT (list& objectC (list#each product.right argsTC)))
.let [[objectA argsA] (case allA
{.#Item objectA argsA}
[objectA argsA]
@@ -1473,11 +1473,11 @@
(function (_ extension_name analyse archive [class_tvars class method_tvars argsTC])
(do phase.monad
[_ (..ensure_fresh_class! class_loader class)
- .let [argsT (list\each product.left argsTC)]
+ .let [argsT (list#each product.left argsTC)]
[methodT deprecated? exceptionsT] (..constructor_candidate class_loader class_tvars class method_tvars argsT)
_ (phase.assertion ..deprecated_method [class ..constructor_method methodT]
(not deprecated?))
- [outputT argsA] (inferenceA.general archive analyse methodT (list\each product.right argsTC))]
+ [outputT argsA] (inferenceA.general archive analyse methodT (list#each product.right argsTC))]
(in {/////analysis.#Extension extension_name (list& (/////analysis.text (..signature (jvm.class class (list))))
(decorate_inputs argsT argsA))})))]))
@@ -1528,7 +1528,7 @@
(def: (annotation_analysis [name parameters])
(-> (Annotation Analysis) Analysis)
(/////analysis.tuple (list& (/////analysis.text name)
- (list\each annotation_parameter_analysis parameters))))
+ (list#each annotation_parameter_analysis parameters))))
(template [<name> <category>]
[(def: <name>
@@ -1563,7 +1563,7 @@
(do [! try.monad]
[.let [type_variables (|> (java/lang/reflect/Method::getTypeParameters method)
(array.list {.#None})
- (list\each (|>> java/lang/reflect/TypeVariable::getName
+ (list#each (|>> java/lang/reflect/TypeVariable::getName
jvm.var)))]
inputs (|> (java/lang/reflect/Method::getGenericParameterTypes method)
(array.list {.#None})
@@ -1587,9 +1587,9 @@
[(def: (<name> class_loader)
(-> java/lang/ClassLoader (List (Type Class)) (Try (List [Text (Type Method)])))
(|>> (monad.each try.monad (|>> ..reflection (reflection!.load class_loader)))
- (try\each (monad.each try.monad <methods>))
- try\conjoint
- (try\each list\conjoint)))]
+ (try#each (monad.each try.monad <methods>))
+ try#conjoint
+ (try#each list#conjoint)))]
[all_abstract_methods ..abstract_methods]
[all_methods ..methods]
@@ -1697,20 +1697,20 @@
[scope bodyA] (|> arguments'
{.#Item [self_name selfT]}
list.reversed
- (list\mix scope.with_local (analyse archive body))
+ (list#mix scope.with_local (analyse archive body))
(typeA.with_type .Any)
/////analysis.with_scope)]
(in (/////analysis.tuple (list (/////analysis.text ..constructor_tag)
(visibility_analysis visibility)
(/////analysis.bit strict_fp?)
- (/////analysis.tuple (list\each annotation_analysis annotationsA))
- (/////analysis.tuple (list\each var_analysis vars))
+ (/////analysis.tuple (list#each annotation_analysis annotationsA))
+ (/////analysis.tuple (list#each var_analysis vars))
(/////analysis.text self_name)
- (/////analysis.tuple (list\each ..argument_analysis arguments))
- (/////analysis.tuple (list\each class_analysis exceptions))
- (/////analysis.tuple (list\each typed_analysis super_arguments))
+ (/////analysis.tuple (list#each ..argument_analysis arguments))
+ (/////analysis.tuple (list#each class_analysis exceptions))
+ (/////analysis.tuple (list#each typed_analysis super_arguments))
{/////analysis.#Function
- (list\each (|>> /////analysis.variable)
+ (list#each (|>> /////analysis.variable)
(scope.environment scope))
(/////analysis.tuple (list bodyA))}
))))))
@@ -1773,7 +1773,7 @@
[scope bodyA] (|> arguments'
{.#Item [self_name selfT]}
list.reversed
- (list\mix scope.with_local (analyse archive body))
+ (list#mix scope.with_local (analyse archive body))
(typeA.with_type returnT)
/////analysis.with_scope)]
(in (/////analysis.tuple (list (/////analysis.text ..virtual_tag)
@@ -1781,14 +1781,14 @@
(visibility_analysis visibility)
(/////analysis.bit final?)
(/////analysis.bit strict_fp?)
- (/////analysis.tuple (list\each annotation_analysis annotationsA))
- (/////analysis.tuple (list\each var_analysis vars))
+ (/////analysis.tuple (list#each annotation_analysis annotationsA))
+ (/////analysis.tuple (list#each var_analysis vars))
(/////analysis.text self_name)
- (/////analysis.tuple (list\each ..argument_analysis arguments))
+ (/////analysis.tuple (list#each ..argument_analysis arguments))
(return_analysis return)
- (/////analysis.tuple (list\each class_analysis exceptions))
+ (/////analysis.tuple (list#each class_analysis exceptions))
{/////analysis.#Function
- (list\each (|>> /////analysis.variable)
+ (list#each (|>> /////analysis.variable)
(scope.environment scope))
(/////analysis.tuple (list bodyA))}
))))))
@@ -1846,21 +1846,21 @@
arguments)
[scope bodyA] (|> arguments'
list.reversed
- (list\mix scope.with_local (analyse archive body))
+ (list#mix scope.with_local (analyse archive body))
(typeA.with_type returnT)
/////analysis.with_scope)]
(in (/////analysis.tuple (list (/////analysis.text ..static_tag)
(/////analysis.text method_name)
(visibility_analysis visibility)
(/////analysis.bit strict_fp?)
- (/////analysis.tuple (list\each annotation_analysis annotationsA))
- (/////analysis.tuple (list\each var_analysis vars))
- (/////analysis.tuple (list\each ..argument_analysis arguments))
+ (/////analysis.tuple (list#each annotation_analysis annotationsA))
+ (/////analysis.tuple (list#each var_analysis vars))
+ (/////analysis.tuple (list#each ..argument_analysis arguments))
(return_analysis return)
- (/////analysis.tuple (list\each class_analysis
+ (/////analysis.tuple (list#each class_analysis
exceptions))
{/////analysis.#Function
- (list\each (|>> /////analysis.variable)
+ (list#each (|>> /////analysis.variable)
(scope.environment scope))
(/////analysis.tuple (list bodyA))}
))))))
@@ -1915,7 +1915,7 @@
(let [[parent_name parent_parameters] (jvm_parser.read_class parent_type)]
(case (list.one (function (_ super)
(let [[super_name super_parameters] (jvm_parser.read_class super)]
- (if (text\= parent_name super_name)
+ (if (text#= parent_name super_name)
{.#Some super_parameters}
{.#None})))
supers)
@@ -1930,7 +1930,7 @@
phase.lifted)]
(|> super_parameters
(monad.each ! (..reflection_type mapping))
- (\ ! each (|>> (list.zipped/2 parent_parameters)))))
+ (# ! each (|>> (list.zipped/2 parent_parameters)))))
(phase.lifted (exception.except ..mismatched_super_parameters [parent_name expected_count actual_count]))))
{.#None}
@@ -1945,7 +1945,7 @@
check.existential)]
(in [var exT])))
vars)]
- (in (list\mix (function (_ [varJ varT] mapping)
+ (in (list#mix (function (_ [varJ varT] mapping)
(dictionary.has (jvm_parser.name varJ) varT mapping))
mapping
pairings))))
@@ -1954,7 +1954,7 @@
(-> (List (Type Class)) (Type Class) Mapping (Operation Mapping))
(do phase.monad
[override_mapping (..override_mapping mapping supers parent_type)]
- (in (list\mix (function (_ [super_var bound_type] mapping)
+ (in (list#mix (function (_ [super_var bound_type] mapping)
(dictionary.has super_var bound_type mapping))
mapping
override_mapping))))
@@ -1982,7 +1982,7 @@
{/////analysis.#Complex
{/////analysis.#Tuple (|> arity
list.indices
- (list\each (|>> (n.+ 2) {/////analysis.#Bind})))}}
+ (list#each (|>> (n.+ 2) {/////analysis.#Bind})))}}
/////analysis.#then
bodyA]
@@ -2016,22 +2016,22 @@
[scope bodyA] (|> arguments'
{.#Item [self_name selfT]}
list.reversed
- (list\mix scope.with_local (analyse archive body))
+ (list#mix scope.with_local (analyse archive body))
(typeA.with_type returnT)
/////analysis.with_scope)]
(in (/////analysis.tuple (list (/////analysis.text ..overriden_tag)
(class_analysis parent_type)
(/////analysis.text method_name)
(/////analysis.bit strict_fp?)
- (/////analysis.tuple (list\each annotation_analysis annotationsA))
- (/////analysis.tuple (list\each var_analysis vars))
+ (/////analysis.tuple (list#each annotation_analysis annotationsA))
+ (/////analysis.tuple (list#each var_analysis vars))
(/////analysis.text self_name)
- (/////analysis.tuple (list\each ..argument_analysis arguments))
+ (/////analysis.tuple (list#each ..argument_analysis arguments))
(return_analysis return)
- (/////analysis.tuple (list\each class_analysis
+ (/////analysis.tuple (list#each class_analysis
exceptions))
{/////analysis.#Function
- (list\each (|>> /////analysis.variable)
+ (list#each (|>> /////analysis.variable)
(scope.environment scope))
(..hide_method_body (list.size arguments) bodyA)}
))))))
@@ -2055,8 +2055,8 @@
(list.only (function (_ [sub_name subJT])
(|> super_set
(list.only (function (_ [super_name superJT])
- (and (text\= super_name sub_name)
- (jvm\= superJT subJT))))
+ (and (text#= super_name sub_name)
+ (jvm#= superJT subJT))))
list.size
(n.= 1)
not))
@@ -2077,12 +2077,12 @@
class (phase.lifted (reflection!.load class_loader name))
.let [expected_parameters (|> (java/lang/Class::getTypeParameters class)
(array.list {.#None})
- (list\each (|>> java/lang/reflect/TypeVariable::getName)))]
+ (list#each (|>> java/lang/reflect/TypeVariable::getName)))]
_ (phase.assertion ..class_parameter_mismatch [expected_parameters actual_parameters]
(n.= (list.size expected_parameters)
(list.size actual_parameters)))]
(in (|> (list.zipped/2 expected_parameters actual_parameters)
- (list\mix (function (_ [expected actual] mapping)
+ (list#mix (function (_ [expected actual] mapping)
(case (jvm_parser.var? actual)
{.#Some actual}
(dictionary.has actual expected mapping)
@@ -2109,7 +2109,7 @@
(do !
[aliasing (super_aliasing class_loader parent_type)]
(in [method_name (|> (jvm.method [type_vars
- (list\each product.right arguments)
+ (list#each product.right arguments)
return
exceptions])
(jvm_alias.method aliasing))])))
@@ -2141,7 +2141,7 @@
_ (monad.each ! (|>> ..reflection (..ensure_fresh_class! class_loader)) super_interfaces)
parameters (typeA.with_env
(..parameter_types parameters))
- .let [mapping (list\mix (function (_ [parameterJ parameterT] mapping)
+ .let [mapping (list#mix (function (_ [parameterJ parameterT] mapping)
(dictionary.has (jvm_parser.name parameterJ)
parameterT
mapping))
@@ -2172,8 +2172,8 @@
methodsA (monad.each ! (analyse_overriden_method analyse archive selfT mapping supers) methods)]
(in {/////analysis.#Extension extension_name
(list (class_analysis super_class)
- (/////analysis.tuple (list\each class_analysis super_interfaces))
- (/////analysis.tuple (list\each typed_analysis constructor_argsA+))
+ (/////analysis.tuple (list#each class_analysis super_interfaces))
+ (/////analysis.tuple (list#each typed_analysis constructor_argsA+))
(/////analysis.tuple methodsA))})))]))
(def: (bundle::class class_loader)
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 e1c23ed0d..4b58b0bc1 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
@@ -13,7 +13,7 @@
["[0]" text
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" functor)]
+ ["[0]" list ("[1]#[0]" functor)]
["[0]" dictionary {"+" [Dictionary]}]]]
[math
[number
@@ -114,9 +114,9 @@
else (typeA.with_type expectedT
(phase archive else))]
(in (|> conditionals
- (list\each (function (_ [cases branch])
+ (list#each (function (_ [cases branch])
(////analysis.tuple
- (list (////analysis.tuple (list\each (|>> ////analysis.nat) cases))
+ (list (////analysis.tuple (list#each (|>> ////analysis.nat) cases))
branch))))
(list& input else)
{////analysis.#Extension extension_name}))))])))
@@ -164,7 +164,7 @@
(case args
(^ (list typeC valueC))
(do [! ////.monad]
- [actualT (\ ! each (|>> (:as Type))
+ [actualT (# ! each (|>> (:as Type))
(eval archive Type typeC))
_ (typeA.infer actualT)]
(typeA.with_type actualT
@@ -179,7 +179,7 @@
(case args
(^ (list typeC valueC))
(do [! ////.monad]
- [actualT (\ ! each (|>> (:as Type))
+ [actualT (# ! each (|>> (:as Type))
(eval archive Type typeC))
_ (typeA.infer actualT)
[valueT valueA] (typeA.with_inference
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/bundle.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/bundle.lux
index b8c30a7bb..49950f455 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/bundle.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/bundle.lux
@@ -7,7 +7,7 @@
["[0]" text
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" functor)]
+ ["[0]" list ("[1]#[0]" functor)]
["[0]" dictionary {"+" [Dictionary]}]]]]]
[// {"+" [Handler Bundle]}])
@@ -25,5 +25,5 @@
(All (_ s i o)
(-> Text (-> (Bundle s i o) (Bundle s i o))))
(|>> dictionary.entries
- (list\each (function (_ [key val]) [(format prefix " " key) val]))
+ (list#each (function (_ [key val]) [(format prefix " " key) val]))
(dictionary.of_list text.hash)))
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 a4c026cb4..c51113913 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
@@ -6,7 +6,7 @@
["[0]" monad {"+" [do]}]]
[control
[pipe {"+" [case>]}]
- ["<>" parser ("[1]\[0]" monad)
+ ["<>" parser ("[1]#[0]" monad)
["<c>" code {"+" [Parser]}]
["<t>" text]]]
[data
@@ -14,7 +14,7 @@
[text
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" functor mix)]
+ ["[0]" list ("[1]#[0]" functor mix)]
["[0]" dictionary]
["[0]" row]]]
[macro
@@ -25,7 +25,7 @@
[target
[jvm
["_" bytecode {"+" [Bytecode]}]
- ["[0]" modifier {"+" [Modifier]} ("[1]\[0]" monoid)]
+ ["[0]" modifier {"+" [Modifier]} ("[1]#[0]" monoid)]
["[0]" attribute]
["[0]" field]
["[0]" version]
@@ -77,7 +77,7 @@
(Parser (Modifier field.Field))
(`` ($_ <>.either
(~~ (template [<label> <modifier>]
- [(<>.after (<c>.text! <label>) (<>\in <modifier>))]
+ [(<>.after (<c>.text! <label>) (<>#in <modifier>))]
["public" field.public]
["private" field.private]
@@ -88,7 +88,7 @@
(Parser (Modifier class.Class))
(`` ($_ <>.either
(~~ (template [<label> <modifier>]
- [(<>.after (<c>.text! <label>) (<>\in <modifier>))]
+ [(<>.after (<c>.text! <label>) (<>#in <modifier>))]
["final" class.final]
["abstract" class.abstract]
@@ -98,7 +98,7 @@
(Parser (Modifier field.Field))
(`` ($_ <>.either
(~~ (template [<label> <modifier>]
- [(<>.after (<c>.text! <label>) (<>\in <modifier>))]
+ [(<>.after (<c>.text! <label>) (<>#in <modifier>))]
["volatile" field.volatile]
["final" field.final]
@@ -177,7 +177,7 @@
(def: constant::modifier
(Modifier field.Field)
- ($_ modifier\composite
+ ($_ modifier#composite
field.public
field.static
field.final))
@@ -211,7 +211,7 @@
... TODO: Handle annotations.
{#Variable [name visibility state annotations type]}
- (field.field (modifier\composite visibility state)
+ (field.field (modifier#composite visibility state)
name type (row.row))))
(def: (method_definition [mapping selfT] [analyse synthesize generate])
@@ -263,7 +263,7 @@
[parameters (directive.lifted_analysis
(typeA.with_env
(jvm.parameter_types parameters)))
- .let [mapping (list\mix (function (_ [parameterJ parameterT] mapping)
+ .let [mapping (list#mix (function (_ [parameterJ parameterT] mapping)
(dictionary.has (parser.name parameterJ) parameterT mapping))
luxT.fresh
parameters)]
@@ -275,7 +275,7 @@
(monad.each check.monad
(|>> ..signature (luxT.check (luxT.class mapping)))
super_interfaces)))
- .let [selfT (jvm.inheritance_relationship_type {.#Primitive name (list\each product.right parameters)}
+ .let [selfT (jvm.inheritance_relationship_type {.#Primitive name (list#each product.right parameters)}
super_classT
super_interfaceT+)]
state (extension.lifted phase.get_state)
@@ -288,10 +288,10 @@
... (generation.save! true ["" name]
... [name
... (class.class version.v6_0
- ... (modifier\composite class.public inheritance)
- ... (name.internal name) (list\each (|>> product.left parser.name ..constraint) parameters)
+ ... (modifier#composite class.public inheritance)
+ ... (name.internal name) (list#each (|>> product.left parser.name ..constraint) parameters)
... super_class super_interfaces
- ... (list\each ..field_definition fields)
+ ... (list#each ..field_definition fields)
... (list) ... TODO: Add methods
... (row.row))]))
_ (directive.lifted_generation
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 aec90687b..44ed473ca 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
@@ -15,7 +15,7 @@
[collection
["[0]" dictionary]
["[0]" set]
- ["[0]" list ("[1]\[0]" functor mix)]]]
+ ["[0]" list ("[1]#[0]" functor mix)]]]
[math
[number
["f" frac]]]
@@ -64,18 +64,18 @@
... <s>.any))))
... (function (_ extension_name phase archive [input else conditionals])
... (do [! /////.monad]
-... [@input (\ ! each _.var (generation.identifier "input"))
+... [@input (# ! each _.var (generation.identifier "input"))
... inputG (phase archive input)
... elseG (phase archive else)
... conditionalsG (: (Operation (List [Expression Expression]))
... (monad.each ! (function (_ [chars branch])
... (do !
... [branchG (phase archive branch)]
-... (in [(|> chars (list\each (|>> .int _.int (_.=/2 @input))) _.or)
+... (in [(|> chars (list#each (|>> .int _.int (_.=/2 @input))) _.or)
... branchG])))
... conditionals))]
... (in (_.let (list [@input inputG])
-... (list (list\mix (function (_ [test then] else)
+... (list (list#mix (function (_ [test then] else)
... (_.if test then else))
... elseG
... conditionalsG))))))]))
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 de36c0766..036d12593 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
@@ -10,7 +10,7 @@
[data
["[0]" product]
[collection
- ["[0]" list ("[1]\[0]" functor)]
+ ["[0]" list ("[1]#[0]" functor)]
["[0]" dictionary]]]
[math
[number
@@ -36,7 +36,7 @@
[analysis {"+" []}]
["[0]" synthesis {"+" [%synthesis]}]
[///
- ["[1]" phase ("[1]\[0]" monad)]]]]])
+ ["[1]" phase ("[1]#[0]" monad)]]]]])
(def: .public (custom [parser handler])
(All (_ s)
@@ -108,7 +108,7 @@
(^template [<tag>]
[(^ (<tag> value))
- (/////\each _.return (expression archive synthesis))])
+ (/////#each _.return (expression archive synthesis))])
([synthesis.bit]
[synthesis.i64]
[synthesis.f64]
@@ -120,7 +120,7 @@
(^template [<tag>]
[(^ {<tag> value})
- (/////\each _.return (expression archive synthesis))])
+ (/////#each _.return (expression archive synthesis))])
([synthesis.#Reference]
[synthesis.#Extension])
@@ -140,7 +140,7 @@
(//loop.recur! statement expression archive updates)
(^ (synthesis.function/abstraction abstraction))
- (/////\each _.return (//function.function statement expression archive abstraction))
+ (/////#each _.return (//function.function statement expression archive abstraction))
))
... TODO: Get rid of this ASAP
@@ -160,7 +160,7 @@
(monad.each ! (function (_ [chars branch])
(do !
[branch! (..statement phase archive branch)]
- (in [(list\each (|>> .int _.int) chars)
+ (in [(list#each (|>> .int _.int) chars)
branch!])))
conditionals))]
... (in (_.apply/* (_.closure (list)
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 49d99437e..8b587eb9d 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
@@ -115,7 +115,7 @@
(custom
[<s>.text
(function (_ extension phase archive name)
- (\ ////////phase.monad in (_.var name)))]))
+ (# ////////phase.monad in (_.var name)))]))
(def: js::apply
(custom
@@ -134,7 +134,7 @@
[abstractionG (phase archive abstractionS)
.let [variable (: (-> Text (Operation Var))
(|>> generation.identifier
- (\ ! each _.var)))]
+ (# ! each _.var)))]
g!inputs (monad.each ! (function (_ _) (variable "input"))
(list.repeated (.nat arity) []))
g!abstraction (variable "abstraction")]
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 cb63e2a33..c6116caa9 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
@@ -14,11 +14,11 @@
["[0]" i32]
["f" frac]]
[collection
- ["[0]" list ("[1]\[0]" monad)]
+ ["[0]" list ("[1]#[0]" monad)]
["[0]" dictionary]]]
[target
[jvm
- ["_" bytecode {"+" [Label Bytecode]} ("[1]\[0]" monad)]
+ ["_" bytecode {"+" [Label Bytecode]} ("[1]#[0]" monad)]
[encoding
["[0]" signed {"+" [S4]}]]
["[0]" type {"+" [Type]}
@@ -115,7 +115,7 @@
(do !
[branchG (phase archive branch)
@branch ///runtime.forge_label]
- (in [(list\each (function (_ char)
+ (in [(list#each (function (_ char)
[(try.trusted (signed.s4 (.int char))) @branch])
chars)
($_ _.composite
@@ -124,10 +124,10 @@
(_.goto @end))])))
conditionalsS))
.let [table (|> conditionalsG+
- (list\each product.left)
- list\conjoint)
+ (list#each product.left)
+ list#conjoint)
conditionalsG (|> conditionalsG+
- (list\each product.right)
+ (list#each product.right)
(monad.all _.monad))]]
(in (do _.monad
[@else _.new_label]
@@ -307,7 +307,7 @@
(_.invokevirtual ..$String "length" (type.method [(list) type.int (list)]))
..lux_int))
-(def: no_op (Bytecode Any) (_\in []))
+(def: no_op (Bytecode Any) (_#in []))
(template [<name> <pre_subject> <pre_param> <op> <post>]
[(def: (<name> [paramG subjectG])
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 8784ae034..6d55a284b 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
@@ -12,12 +12,12 @@
["<s>" synthesis {"+" [Parser]}]]]
[data
["[0]" product]
- ["[0]" text ("[1]\[0]" equivalence)
+ ["[0]" text ("[1]#[0]" equivalence)
["%" format {"+" [format]}]]
[number
["[0]" i32]]
[collection
- ["[0]" list ("[1]\[0]" monad)]
+ ["[0]" list ("[1]#[0]" monad)]
["[0]" dictionary {"+" [Dictionary]}]
["[0]" set]
["[0]" row]]
@@ -26,14 +26,14 @@
[target
[jvm
["[0]" version]
- ["[0]" modifier ("[1]\[0]" monoid)]
+ ["[0]" modifier ("[1]#[0]" monoid)]
["[0]" method {"+" [Method]}]
["[0]" class {"+" [Class]}]
[constant
[pool {"+" [Resource]}]]
[encoding
["[0]" name]]
- ["_" bytecode {"+" [Label Bytecode]} ("[1]\[0]" monad)
+ ["_" bytecode {"+" [Label Bytecode]} ("[1]#[0]" monad)
["__" instruction {"+" [Primitive_Array_Type]}]]
["[0]" type {"+" [Type Typed Argument]}
["[0]" category {"+" [Void Value' Value Return' Return Primitive Object Array Var Parameter]}]
@@ -581,18 +581,18 @@
(do //////.monad
[valueG (generate archive valueS)]
(in (`` (cond (~~ (template [<object> <type> <unwrap>]
- [(and (text\= (..reflection <type>)
+ [(and (text#= (..reflection <type>)
from)
- (text\= <object>
+ (text#= <object>
to))
(let [$<object> (type.class <object> (list))]
($_ _.composite
valueG
(_.invokestatic $<object> "valueOf" (type.method [(list <type>) $<object> (list)]))))
- (and (text\= <object>
+ (and (text#= <object>
from)
- (text\= (..reflection <type>)
+ (text#= (..reflection <type>)
to))
(let [$<object> (type.class <object> (list))]
($_ _.composite
@@ -744,7 +744,7 @@
..unitG
{.#Left outputT}
- (\ _.monad in [])))
+ (# _.monad in [])))
(def: invoke::static
Handler
@@ -755,7 +755,7 @@
[inputsTG (monad.each ! (generate_input generate archive) inputsTS)]
(in ($_ _.composite
(monad.each _.monad product.right inputsTG)
- (_.invokestatic class method (type.method [(list\each product.left inputsTG) outputT (list)]))
+ (_.invokestatic class method (type.method [(list#each product.left inputsTG) outputT (list)]))
(prepare_output outputT)))))]))
(template [<name> <invoke>]
@@ -771,7 +771,7 @@
objectG
(_.checkcast class)
(monad.each _.monad product.right inputsTG)
- (<invoke> class method (type.method [(list\each product.left inputsTG) outputT (list)]))
+ (<invoke> class method (type.method [(list#each product.left inputsTG) outputT (list)]))
(prepare_output outputT)))))]))]
[invoke::virtual _.invokevirtual]
@@ -790,7 +790,7 @@
(_.new class)
_.dup
(monad.each _.monad product.right inputsTG)
- (_.invokespecial class "<init>" (type.method [(list\each product.left inputsTG) type.void (list)]))))))]))
+ (_.invokespecial class "<init>" (type.method [(list#each product.left inputsTG) type.void (list)]))))))]))
(def: bundle::member
Bundle
@@ -884,7 +884,7 @@
(//////synthesis.variant [lefts right? (recur sub)])
(^ (//////synthesis.tuple members))
- (//////synthesis.tuple (list\each recur members))
+ (//////synthesis.tuple (list#each recur members))
(^ (//////synthesis.variable var))
(|> mapping
@@ -905,13 +905,13 @@
(//////synthesis.branch/get [path (recur recordS)])
(^ (//////synthesis.loop/scope [offset initsS+ bodyS]))
- (//////synthesis.loop/scope [offset (list\each recur initsS+) (recur bodyS)])
+ (//////synthesis.loop/scope [offset (list#each recur initsS+) (recur bodyS)])
(^ (//////synthesis.loop/recur updatesS+))
- (//////synthesis.loop/recur (list\each recur updatesS+))
+ (//////synthesis.loop/recur (list#each recur updatesS+))
(^ (//////synthesis.function/abstraction [environment arity bodyS]))
- (//////synthesis.function/abstraction [(list\each (function (_ local)
+ (//////synthesis.function/abstraction [(list#each (function (_ local)
(case local
(^ (//////synthesis.variable local))
(|> mapping
@@ -926,10 +926,10 @@
bodyS])
(^ (//////synthesis.function/apply [functionS inputsS+]))
- (//////synthesis.function/apply [(recur functionS) (list\each recur inputsS+)])
+ (//////synthesis.function/apply [(recur functionS) (list#each recur inputsS+)])
{//////synthesis.#Extension [name inputsS+]}
- {//////synthesis.#Extension [name (list\each recur inputsS+)]})))
+ {//////synthesis.#Extension [name (list#each recur inputsS+)]})))
(def: $Object
(type.class "java.lang.Object" (list)))
@@ -955,7 +955,7 @@
{.#Some ($_ _.composite
(_.aload 0)
(monad.each _.monad product.right inputsTG)
- (_.invokespecial super_class "<init>" (type.method [(list\each product.left inputsTG) type.void (list)]))
+ (_.invokespecial super_class "<init>" (type.method [(list#each product.left inputsTG) type.void (list)]))
store_capturedG
_.return)})))
@@ -983,20 +983,20 @@
_.areturn)
{.#Right returnT}
- (cond (or (\ type.equivalence = type.boolean returnT)
- (\ type.equivalence = type.byte returnT)
- (\ type.equivalence = type.short returnT)
- (\ type.equivalence = type.int returnT)
- (\ type.equivalence = type.char returnT))
+ (cond (or (# type.equivalence = type.boolean returnT)
+ (# type.equivalence = type.byte returnT)
+ (# type.equivalence = type.short returnT)
+ (# type.equivalence = type.int returnT)
+ (# type.equivalence = type.char returnT))
_.ireturn
- (\ type.equivalence = type.long returnT)
+ (# type.equivalence = type.long returnT)
_.lreturn
- (\ type.equivalence = type.float returnT)
+ (# type.equivalence = type.float returnT)
_.freturn
- ... (\ type.equivalence = type.double returnT)
+ ... (# type.equivalence = type.double returnT)
_.dreturn))))
(def: class::anonymous
@@ -1017,26 +1017,26 @@
class (type.class anonymous_class_name (list))
total_environment (|> overriden_methods
... Get all the environments.
- (list\each product.left)
+ (list#each product.left)
... Combine them.
- list\conjoint
+ list#conjoint
... Remove duplicates.
(set.from_list //////synthesis.hash)
set.list)
global_mapping (|> total_environment
... Give them names as "foreign" variables.
list.enumeration
- (list\each (function (_ [id capture])
+ (list#each (function (_ [id capture])
[capture {//////variable.#Foreign id}]))
(dictionary.from_list //////variable.hash))
- normalized_methods (list\each (function (_ [environment
+ normalized_methods (list#each (function (_ [environment
[ownerT name
strict_fp? annotations vars
self_name arguments returnT exceptionsT
body]])
(let [local_mapping (|> environment
list.enumeration
- (list\each (function (_ [foreign_id capture])
+ (list#each (function (_ [foreign_id capture])
[{//////variable.#Foreign foreign_id}
(|> global_mapping
(dictionary.value capture)
@@ -1055,14 +1055,14 @@
(do !
[bodyG (//////generation.with_context artifact_id
(generate archive bodyS))]
- (in (method.method ($_ modifier\composite
+ (in (method.method ($_ modifier#composite
method.public
method.final
(if strict_fp?
method.strict
- modifier\identity))
+ modifier#identity))
name
- (type.method [(list\each product.right arguments)
+ (type.method [(list#each product.right arguments)
returnT
exceptionsT])
(list)
@@ -1070,12 +1070,12 @@
bodyG
(returnG returnT))}))))
normalized_methods)
- bytecode (<| (\ ! each (format.result class.writer))
+ bytecode (<| (# ! each (format.result class.writer))
//////.lifted
- (class.class version.v6_0 ($_ modifier\composite class.public class.final)
+ (class.class version.v6_0 ($_ modifier#composite class.public class.final)
(name.internal anonymous_class_name)
(name.internal (..reflection super_class))
- (list\each (|>> ..reflection name.internal) super_interfaces)
+ (list#each (|>> ..reflection name.internal) super_interfaces)
(foreign.variables total_environment)
(list& (..with_anonymous_init class total_environment super_class inputsTI)
method_definitions)
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 1de9c4057..005a2e7b9 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
@@ -14,7 +14,7 @@
["%" format {"+" [format]}]]
[collection
["[0]" dictionary]
- ["[0]" list ("[1]\[0]" functor mix)]]]
+ ["[0]" list ("[1]#[0]" functor mix)]]]
[math
[number
["f" frac]]]
@@ -39,7 +39,7 @@
["[0]" synthesis {"+" [%synthesis]}]
["[0]" generation]
[///
- ["[1]" phase ("[1]\[0]" monad)]]]]])
+ ["[1]" phase ("[1]#[0]" monad)]]]]])
(def: .public (custom [parser handler])
(All (_ s)
@@ -68,7 +68,7 @@
(^template [<tag>]
[(^ (<tag> value))
- (/////\each _.return (expression archive synthesis))])
+ (/////#each _.return (expression archive synthesis))])
([synthesis.bit]
[synthesis.i64]
[synthesis.f64]
@@ -80,7 +80,7 @@
(^template [<tag>]
[(^ {<tag> value})
- (/////\each _.return (expression archive synthesis))])
+ (/////#each _.return (expression archive synthesis))])
([synthesis.#Reference]
[synthesis.#Extension])
@@ -102,7 +102,7 @@
(//loop.recur! statement expression archive updates)
(^ (synthesis.function/abstraction abstraction))
- (/////\each _.return (//function.function statement expression archive abstraction))
+ (/////#each _.return (//function.function statement expression archive abstraction))
))
... TODO: Get rid of this ASAP
@@ -117,14 +117,14 @@
(do [! /////.monad]
[inputG (phase archive input)
else! (..statement phase archive else)
- @input (\ ! each _.var (generation.identifier "input"))
+ @input (# ! each _.var (generation.identifier "input"))
conditionals! (: (Operation (List [Expression Statement]))
(monad.each ! (function (_ [chars branch])
(do !
[branch! (..statement phase archive branch)]
(in [(|> chars
- (list\each (|>> .int _.int (_.= @input)))
- (list\mix (function (_ clause total)
+ (list#each (|>> .int _.int (_.= @input)))
+ (list#mix (function (_ clause total)
(if (same? _.nil total)
clause
(_.or clause total)))
@@ -132,7 +132,7 @@
branch!])))
conditionals))
... .let [closure (_.closure (list @input)
- ... (list\mix (function (_ [test then] else)
+ ... (list#mix (function (_ [test then] else)
... (_.if test (_.return then) else))
... (_.return elseG)
... conditionalsG))]
@@ -142,7 +142,7 @@
(: Statement)
($_ _.then
(_.set (list @input) inputG)
- (list\mix (function (_ [test then!] else!)
+ (list#mix (function (_ [test then!] else!)
(_.if test then! else!))
else!
conditionals!))))))]))
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 4cbfa5401..d23cb3fc4 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
@@ -137,7 +137,7 @@
(custom
[<s>.text
(function (_ extension phase archive name)
- (\ ////////phase.monad in (_.var name)))]))
+ (# ////////phase.monad in (_.var name)))]))
(def: lua::apply
(custom
@@ -161,7 +161,7 @@
(custom
[<s>.text
(function (_ extension phase archive module)
- (\ ////////phase.monad in
+ (# ////////phase.monad in
(_.require/1 (_.string module))))]))
(def: lua::function
@@ -172,7 +172,7 @@
[abstractionG (phase archive abstractionS)
.let [variable (: (-> Text (Operation Var))
(|>> generation.identifier
- (\ ! each _.var)))]
+ (# ! each _.var)))]
g!inputs (monad.each ! (function (_ _)
(variable "input"))
(list.repeated (.nat arity) []))]
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 131f8e57e..78f042591 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
@@ -15,7 +15,7 @@
[collection
["[0]" dictionary]
["[0]" set]
- ["[0]" list ("[1]\[0]" functor mix)]]]
+ ["[0]" list ("[1]#[0]" functor mix)]]]
[math
[number
["f" frac]]]
@@ -67,14 +67,14 @@
[inputG (phase archive input)
[[context_module context_artifact] elseG] (generation.with_new_context archive
(phase archive else))
- @input (\ ! each _.var (generation.identifier "input"))
+ @input (# ! each _.var (generation.identifier "input"))
conditionalsG (: (Operation (List [Expression Expression]))
(monad.each ! (function (_ [chars branch])
(do !
[branchG (phase archive branch)]
(in [(|> chars
- (list\each (|>> .int _.int (_.=== @input)))
- (list\mix (function (_ clause total)
+ (list#each (|>> .int _.int (_.=== @input)))
+ (list#mix (function (_ clause total)
(if (same? _.null total)
clause
(_.or clause total)))
@@ -82,14 +82,14 @@
branchG])))
conditionals))
.let [foreigns (|> conditionals
- (list\each (|>> product.right synthesis.path/then //case.dependencies))
+ (list#each (|>> product.right synthesis.path/then //case.dependencies))
(list& (//case.dependencies (synthesis.path/then else)))
list.together
(set.of_list _.hash)
set.list)
@expression (_.constant (reference.artifact [context_module context_artifact]))
- directive (_.define_function @expression (list& (_.parameter @input) (list\each _.reference foreigns))
- (list\mix (function (_ [test then] else)
+ directive (_.define_function @expression (list& (_.parameter @input) (list#each _.reference foreigns))
+ (list#mix (function (_ [test then] else)
(_.if test (_.return then) else))
(_.return elseG)
conditionalsG))]
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 c13c86c19..a73f7edf1 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
@@ -109,7 +109,7 @@
(custom
[<s>.text
(function (_ extension phase archive name)
- (\ ////////phase.monad in (_.constant name)))]))
+ (# ////////phase.monad in (_.constant name)))]))
(def: php::apply
(custom
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 d06f428a6..977ba36ee 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
@@ -14,7 +14,7 @@
["%" format {"+" [format]}]]
[collection
["[0]" dictionary]
- ["[0]" list ("[1]\[0]" functor mix)]]]
+ ["[0]" list ("[1]#[0]" functor mix)]]]
[math
[number
["f" frac]]]
@@ -41,7 +41,7 @@
["[0]" synthesis {"+" [%synthesis]}]
["[0]" generation]
[///
- ["[1]" phase ("[1]\[0]" monad)]]]]])
+ ["[1]" phase ("[1]#[0]" monad)]]]]])
(def: .public (statement expression archive synthesis)
Phase!
@@ -54,7 +54,7 @@
(^template [<tag>]
[(^ (<tag> value))
- (/////\each _.return (expression archive synthesis))])
+ (/////#each _.return (expression archive synthesis))])
([synthesis.bit]
[synthesis.i64]
[synthesis.f64]
@@ -66,7 +66,7 @@
(^template [<tag>]
[(^ {<tag> value})
- (/////\each _.return (expression archive synthesis))])
+ (/////#each _.return (expression archive synthesis))])
([synthesis.#Reference]
[synthesis.#Extension])
@@ -82,7 +82,7 @@
[synthesis.loop/recur //loop.recur!])
(^ (synthesis.function/abstraction abstraction))
- (/////\each _.return (//function.function statement expression archive abstraction))
+ (/////#each _.return (//function.function statement expression archive abstraction))
))
(def: .public (custom [parser handler])
@@ -110,33 +110,33 @@
(do [! /////.monad]
[inputG (phase archive input)
else! (..statement phase archive else)
- @input (\ ! each _.var (generation.identifier "input"))
+ @input (# ! each _.var (generation.identifier "input"))
conditionals! (: (Operation (List [(Expression Any)
(Statement Any)]))
(monad.each ! (function (_ [chars branch])
(do !
[branch! (..statement phase archive branch)]
(in [(|> chars
- (list\each (|>> .int _.int (_.= @input)))
- (list\mix (function (_ clause total)
+ (list#each (|>> .int _.int (_.= @input)))
+ (list#mix (function (_ clause total)
(if (same? _.none total)
clause
(_.or clause total)))
_.none))
branch!])))
conditionals))
- ... .let [dependencies (//case.dependencies (list\mix (function (_ right left)
+ ... .let [dependencies (//case.dependencies (list#mix (function (_ right left)
... (synthesis.path/seq left right))
... (synthesis.path/then input)
... {.#Item (synthesis.path/then else)
- ... (list\each (|>> product.right
+ ... (list#each (|>> product.right
... synthesis.path/then)
... conditionals)}))
... @closure (_.var (reference.artifact artifact_id))
... closure (_.def @closure dependencies
... ($_ _.then
... (_.set (list @input) inputG)
- ... (list\mix (function (_ [test then!] else!)
+ ... (list#mix (function (_ [test then!] else!)
... (_.if test then! else!))
... else!
... conditionals!)))]
@@ -148,7 +148,7 @@
(: (Statement Any))
($_ _.then
(_.set (list @input) inputG)
- (list\mix (function (_ [test then!] else!)
+ (list#mix (function (_ [test then!] else!)
(_.if test then! else!))
else!
conditionals!))))))]))
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 422a21b47..8ad99da86 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
@@ -132,7 +132,7 @@
[abstractionG (phase archive abstractionS)
.let [variable (: (-> Text (Operation SVar))
(|>> generation.identifier
- (\ ! each _.var)))]
+ (# ! each _.var)))]
g!inputs (monad.each ! (function (_ _) (variable "input"))
(list.repeated (.nat arity) []))]
(in (_.lambda g!inputs
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 1db4fb268..5e882b8a2 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
@@ -15,7 +15,7 @@
[collection
["[0]" dictionary]
["[0]" set]
- ["[0]" list ("[1]\[0]" functor mix)]]]
+ ["[0]" list ("[1]#[0]" functor mix)]]]
[math
[number
["f" frac]]]
@@ -64,18 +64,18 @@
... ... <s>.any))))
... ... (function (_ extension_name phase archive [input else conditionals])
... ... (do [! /////.monad]
-... ... [@input (\ ! each _.var (generation.identifier "input"))
+... ... [@input (# ! each _.var (generation.identifier "input"))
... ... inputG (phase archive input)
... ... elseG (phase archive else)
... ... conditionalsG (: (Operation (List [Expression Expression]))
... ... (monad.each ! (function (_ [chars branch])
... ... (do !
... ... [branchG (phase archive branch)]
-... ... (in [(|> chars (list\each (|>> .int _.int (_.=/2 @input))) _.or)
+... ... (in [(|> chars (list#each (|>> .int _.int (_.=/2 @input))) _.or)
... ... branchG])))
... ... conditionals))]
... ... (in (_.let (list [@input inputG])
-... ... (list (list\mix (function (_ [test then] else)
+... ... (list (list#mix (function (_ [test then] else)
... ... (_.if test then else))
... ... elseG
... ... conditionalsG))))))]))
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 f057e6e10..29291e8b8 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
@@ -14,7 +14,7 @@
["%" format {"+" [format]}]]
[collection
["[0]" dictionary]
- ["[0]" list ("[1]\[0]" functor mix)]]]
+ ["[0]" list ("[1]#[0]" functor mix)]]]
[math
[number
["f" frac]]]
@@ -39,7 +39,7 @@
["[0]" synthesis {"+" [%synthesis]}]
["[0]" generation]
[///
- ["[1]" phase ("[1]\[0]" monad)]]]]])
+ ["[1]" phase ("[1]#[0]" monad)]]]]])
(def: .public (custom [parser handler])
(All (_ s)
@@ -66,7 +66,7 @@
(^template [<tag>]
[(^ (<tag> value))
- (/////\each _.return (expression archive synthesis))])
+ (/////#each _.return (expression archive synthesis))])
([synthesis.bit]
[synthesis.i64]
[synthesis.f64]
@@ -78,7 +78,7 @@
(^template [<tag>]
[(^ {<tag> value})
- (/////\each _.return (expression archive synthesis))])
+ (/////#each _.return (expression archive synthesis))])
([synthesis.#Reference]
[synthesis.#Extension])
@@ -94,7 +94,7 @@
[synthesis.loop/recur //loop.recur!])
(^ (synthesis.function/abstraction abstraction))
- (/////\each _.return (//function.function statement expression archive abstraction))
+ (/////#each _.return (//function.function statement expression archive abstraction))
))
... TODO: Get rid of this ASAP
@@ -109,14 +109,14 @@
(do [! /////.monad]
[inputG (phase archive input)
else! (statement phase archive else)
- @input (\ ! each _.local (generation.identifier "input"))
+ @input (# ! each _.local (generation.identifier "input"))
conditionals! (: (Operation (List [Expression Statement]))
(monad.each ! (function (_ [chars branch])
(do !
[branch! (statement phase archive branch)]
(in [(|> chars
- (list\each (|>> .int _.int (_.= @input)))
- (list\mix (function (_ clause total)
+ (list#each (|>> .int _.int (_.= @input)))
+ (list#mix (function (_ clause total)
(if (same? _.nil total)
clause
(_.or clause total)))
@@ -124,7 +124,7 @@
branch!])))
conditionals))
... .let [closure (_.lambda {.#None} (list @input)
- ... (list\mix (function (_ [test then] else)
+ ... (list#mix (function (_ [test then] else)
... (_.if test (_.return then) else))
... (_.return else!)
... conditionals!))]
@@ -134,7 +134,7 @@
(: Statement)
($_ _.then
(_.set (list @input) inputG)
- (list\mix (function (_ [test then!] else!)
+ (list#mix (function (_ [test then!] else!)
(_.if test then! else!))
else!
conditionals!))))))]))
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 f44831709..21be2a847 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
@@ -104,7 +104,7 @@
(custom
[<s>.text
(function (_ extension phase archive name)
- (\ ////////phase.monad in (_.local name)))]))
+ (# ////////phase.monad in (_.local name)))]))
(def: ruby::apply
(custom
@@ -119,7 +119,7 @@
(custom
[<s>.text
(function (_ extension phase archive module)
- (\ ////////phase.monad in
+ (# ////////phase.monad in
(_.require/1 (_.string module))))]))
(def: .public bundle
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 e786087d1..a8f4f1bb7 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
@@ -15,7 +15,7 @@
[collection
["[0]" dictionary]
["[0]" set]
- ["[0]" list ("[1]\[0]" functor mix)]]]
+ ["[0]" list ("[1]#[0]" functor mix)]]]
[math
[number
["f" frac]]]
@@ -64,18 +64,18 @@
<s>.any))))
(function (_ extension_name phase archive [input else conditionals])
(do [! /////.monad]
- [@input (\ ! each _.var (generation.identifier "input"))
+ [@input (# ! each _.var (generation.identifier "input"))
inputG (phase archive input)
elseG (phase archive else)
conditionalsG (: (Operation (List [Expression Expression]))
(monad.each ! (function (_ [chars branch])
(do !
[branchG (phase archive branch)]
- (in [(|> chars (list\each (|>> .int _.int (_.=/2 @input))) _.or)
+ (in [(|> chars (list#each (|>> .int _.int (_.=/2 @input))) _.or)
branchG])))
conditionals))]
(in (_.let (list [@input inputG])
- (list\mix (function (_ [test then] else)
+ (list#mix (function (_ [test then] else)
(_.if test then else))
elseG
conditionalsG)))))]))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp.lux
index dca5d6673..f8ed7195d 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp.lux
@@ -19,7 +19,7 @@
[analysis {"+" []}]
["[1][0]" synthesis]
["//[1]" /// "_"
- ["[1][0]" phase ("[1]\[0]" monad)]
+ ["[1][0]" phase ("[1]#[0]" monad)]
[reference {"+" []}
[variable {"+" []}]]]]]]])
@@ -28,7 +28,7 @@
(case synthesis
(^template [<tag> <generator>]
[(^ (<tag> value))
- (//////phase\in (<generator> value))])
+ (//////phase#in (<generator> value))])
([////synthesis.bit /primitive.bit]
[////synthesis.i64 /primitive.i64]
[////synthesis.f64 /primitive.f64]
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 ed9bd19a0..28bcf92fa 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
@@ -9,7 +9,7 @@
["[0]" text
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" functor mix monoid)]
+ ["[0]" list ("[1]#[0]" functor mix monoid)]
["[0]" set]]]
[math
[number
@@ -31,7 +31,7 @@
["//[1]" /// "_"
[reference
["[1][0]" variable {"+" [Register]}]]
- ["[1][0]" phase ("[1]\[0]" monad)]
+ ["[1][0]" phase ("[1]#[0]" monad)]
[meta
[archive {"+" [Archive]}]]]]]]])
@@ -63,7 +63,7 @@
(Generator [(List Member) Synthesis])
(do ///////phase.monad
[valueG (expression archive valueS)]
- (in (list\mix (function (_ side source)
+ (in (list#mix (function (_ side source)
(.let [method (.case side
(^template [<side> <accessor>]
[(<side> lefts)
@@ -129,7 +129,7 @@
(def: (alternation @otherwise pre! post!)
(-> _.Tag (Expression Any) (Expression Any) (Expression Any))
- (_.tagbody ($_ list\composite
+ (_.tagbody ($_ list#composite
(list ..save!
pre!
@otherwise)
@@ -141,17 +141,17 @@
(function (recur [$output @done @fail pathP])
(.case pathP
(^ (/////synthesis.path/then bodyS))
- (\ ///////phase.monad each
+ (# ///////phase.monad each
(function (_ outputV)
(_.progn (list (_.setq $output outputV)
(_.go @done))))
(expression archive bodyS))
{/////synthesis.#Pop}
- (///////phase\in ..pop!)
+ (///////phase#in ..pop!)
{/////synthesis.#Bind register}
- (///////phase\in (_.setq (..register register) ..peek))
+ (///////phase#in (_.setq (..register register) ..peek))
{/////synthesis.#Bit_Fork when thenP elseP}
(do [! ///////phase.monad]
@@ -180,7 +180,7 @@
..peek])
then!])))
{.#Item item})]
- (in (list\mix (function (_ [when then] else)
+ (in (list#mix (function (_ [when then] else)
(_.if when then else))
(_.go @fail)
clauses)))])
@@ -190,21 +190,21 @@
(^template [<complex> <simple> <choice>]
[(^ (<complex> idx))
- (///////phase\in (<choice> @fail false idx {.#None}))
+ (///////phase#in (<choice> @fail false idx {.#None}))
(^ (<simple> idx nextP))
(|> nextP
[$output @done @fail] recur
- (\ ///////phase.monad each (|>> {.#Some} (<choice> @fail true idx))))])
+ (# ///////phase.monad each (|>> {.#Some} (<choice> @fail true idx))))])
([/////synthesis.side/left /////synthesis.simple_left_side ..left_choice]
[/////synthesis.side/right /////synthesis.simple_right_side ..right_choice])
(^ (/////synthesis.member/left 0))
- (///////phase\in (..push! (_.elt/2 [..peek (_.int +0)])))
+ (///////phase#in (..push! (_.elt/2 [..peek (_.int +0)])))
(^template [<pm> <getter>]
[(^ (<pm> lefts))
- (///////phase\in (|> ..peek (<getter> (_.int (.int lefts))) ..push!))])
+ (///////phase#in (|> ..peek (<getter> (_.int (.int lefts))) ..push!))])
([/////synthesis.member/left //runtime.tuple//left]
[/////synthesis.member/right //runtime.tuple//right])
@@ -212,12 +212,12 @@
(.let [[extra_pops nextP'] (////synthesis/case.count_pops nextP)]
(do ///////phase.monad
[next! (recur [$output @done @fail nextP'])]
- (///////phase\in (_.progn (list (..multi_pop! (n.+ 2 extra_pops))
+ (///////phase#in (_.progn (list (..multi_pop! (n.+ 2 extra_pops))
next!)))))
(^ (/////synthesis.path/alt preP postP))
(do [! ///////phase.monad]
- [@otherwise (\ ! each (|>> %.nat (format "lux_case_otherwise") _.tag) /////generation.next)
+ [@otherwise (# ! each (|>> %.nat (format "lux_case_otherwise") _.tag) /////generation.next)
pre! (recur [$output @done @otherwise preP])
post! (recur [$output @done @fail postP])]
(in (..alternation @otherwise pre! post!)))
@@ -231,8 +231,8 @@
(def: (pattern_matching $output expression archive pathP)
(-> Var/1 (Generator Path))
(do [! ///////phase.monad]
- [@done (\ ! each (|>> %.nat (format "lux_case_done") _.tag) /////generation.next)
- @fail (\ ! each (|>> %.nat (format "lux_case_fail") _.tag) /////generation.next)
+ [@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])]
(in (_.tagbody
(list pattern_matching!
@@ -244,13 +244,13 @@
(Generator [Synthesis Path])
(do [! ///////phase.monad]
[initG (expression archive valueS)
- $output (\ ! each (|>> %.nat (format "lux_case_output") _.var) /////generation.next)
+ $output (# ! each (|>> %.nat (format "lux_case_output") _.var) /////generation.next)
pattern_matching! (pattern_matching $output expression archive pathP)
.let [storage (|> pathP
////synthesis/case.storage
(value@ ////synthesis/case.#bindings)
set.list
- (list\each (function (_ register)
+ (list#each (function (_ register)
[(..register register)
_.nil])))]]
(in (_.let (list& [@cursor (_.list/* (list initG))]
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 3130f0121..23c245a1e 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
@@ -10,7 +10,7 @@
[text
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" functor)]]]
+ ["[0]" list ("[1]#[0]" functor)]]]
[target
["_" common_lisp {"+" [Expression Var/1]}]]]]
["[0]" // "_"
@@ -25,7 +25,7 @@
["[1][0]" generation {"+" [Context]}]
["//[1]" /// "_"
[arity {"+" [Arity]}]
- ["[1][0]" phase ("[1]\[0]" monad)]
+ ["[1][0]" phase ("[1]#[0]" monad)]
[reference
[variable {"+" [Register Variable]}]]]]]])
@@ -44,13 +44,13 @@
(-> (List (Expression Any)) (Expression Any) (Operation (Expression Any)))
(case inits
{.#End}
- (\ ///////phase.monad in function_definition)
+ (# ///////phase.monad in function_definition)
_
(do [! ///////phase.monad]
- [@closure (\ ! each _.var (/////generation.identifier "closure"))]
+ [@closure (# ! each _.var (/////generation.identifier "closure"))]
(in (_.labels (list [@closure [(|> (list.enumeration inits)
- (list\each (|>> product.left ..capture))
+ (list#each (|>> product.left ..capture))
_.args)
function_definition]])
(_.funcall/+ [(_.function/1 @closure) inits]))))))
@@ -61,8 +61,8 @@
(def: .public (function expression archive [environment arity bodyS])
(Generator (Abstraction Synthesis))
(do [! ///////phase.monad]
- [@scope (\ ! each (|>> %.nat (format "function_scope") _.tag) /////generation.next)
- @output (\ ! each (|>> %.nat (format "loop_output") _.var) /////generation.next)
+ [@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
(/////generation.with_anchor [@scope 1]
(expression archive bodyS)))
@@ -74,7 +74,7 @@
@self (_.var (///reference.artifact function_name))
initialize_self! [(//case.register 0) (_.function/1 @self)]
initialize! [(|> (list.indices arity)
- (list\each ..input)
+ (list#each ..input)
_.args)
@curried]]]
(with_closure closureG+
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 18bbc788e..d6c8ac457 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
@@ -8,7 +8,7 @@
[text
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" functor)]]]
+ ["[0]" list ("[1]#[0]" functor)]]]
[math
[number
["n" nat]]]
@@ -42,14 +42,14 @@
... true loop
_
(do [! ///////phase.monad]
- [@scope (\ ! each (|>> %.nat (format "loop_scope") _.tag) /////generation.next)
- @output (\ ! each (|>> %.nat (format "loop_output") _.var) /////generation.next)
+ [@scope (# ! each (|>> %.nat (format "loop_scope") _.tag) /////generation.next)
+ @output (# ! each (|>> %.nat (format "loop_output") _.var) /////generation.next)
initsG+ (monad.each ! (expression archive) initsS+)
bodyG (/////generation.with_anchor [@scope start]
(expression archive bodyS))]
(in (_.let (|> initsG+
list.enumeration
- (list\each (function (_ [idx init])
+ (list#each (function (_ [idx init])
[(|> idx (n.+ start) //case.register)
init]))
(list& [@output _.nil]))
@@ -64,7 +64,7 @@
argsO+ (monad.each ! (expression archive) argsS+)
.let [bindings (|> argsO+
list.enumeration
- (list\each (|>> product.left (n.+ offset) //case.register))
+ (list#each (|>> product.left (n.+ offset) //case.register))
_.args)]]
(in (_.progn (list (_.multiple_value_setq bindings (_.values/* argsO+))
(_.go tag))))))
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 2cee2de25..2699124bd 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
@@ -10,11 +10,11 @@
["<[0]>" code]]]
[data
["[0]" product]
- ["[0]" text ("[1]\[0]" hash)
+ ["[0]" text ("[1]#[0]" hash)
["%" format {"+" [format]}]
["[0]" encoding]]
[collection
- ["[0]" list ("[1]\[0]" functor monoid)]
+ ["[0]" list ("[1]#[0]" functor monoid)]
["[0]" row]]]
["[0]" macro
[syntax {"+" [syntax:]}]
@@ -93,7 +93,7 @@
[ids (monad.all ! (list.repeated (list.size vars) meta.seed))]
(in (list (` (let [(~+ (|> vars
(list.zipped/2 ids)
- (list\each (function (_ [id var])
+ (list#each (function (_ [id var])
(list (code.local_identifier var)
(` (_.var (~ (code.text (format "v" (%.nat id)))))))))
list.together))]
@@ -124,8 +124,8 @@
(let [g!name (code.local_identifier name)
code_nameC (code.local_identifier (format "@" name))
- inputsC (list\each code.local_identifier inputs)
- inputs_typesC (list\each (function.constant (` (_.Expression Any)))
+ inputsC (list#each code.local_identifier inputs)
+ inputs_typesC (list#each (function.constant (` (_.Expression Any)))
inputs)]
(in (list (` (def: .public ((~ g!name) (~+ inputsC))
(-> (~+ inputs_typesC) (_.Computation Any))
@@ -272,7 +272,7 @@
(list @io//exit))
(def: runtime
- (_.progn ($_ list\composite
+ (_.progn ($_ list#composite
runtime//adt
runtime//lux
runtime//i64
@@ -290,4 +290,4 @@
(row.row [(%.nat ..module_id)
(|> ..runtime
_.code
- (\ encoding.utf8 encoded))])])))
+ (# encoding.utf8 encoded))])])))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/structure.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/structure.lux
index 22ed7a7c6..36d5ad914 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/structure.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/structure.lux
@@ -12,13 +12,13 @@
[analysis {"+" [Variant Tuple]}]
["[1][0]" synthesis {"+" [Synthesis]}]
["//[1]" /// "_"
- ["[1][0]" phase ("[1]\[0]" monad)]]]])
+ ["[1][0]" phase ("[1]#[0]" monad)]]]])
(def: .public (tuple expression archive elemsS+)
(Generator (Tuple Synthesis))
(case elemsS+
{.#End}
- (///////phase\in (//primitive.text /////synthesis.unit))
+ (///////phase#in (//primitive.text /////synthesis.unit))
{.#Item singletonS {.#End}}
(expression archive singletonS)
@@ -26,12 +26,12 @@
_
(|> elemsS+
(monad.each ///////phase.monad (expression archive))
- (///////phase\each _.vector/*))))
+ (///////phase#each _.vector/*))))
(def: .public (variant expression archive [lefts right? valueS])
(Generator (Variant Synthesis))
(let [tag (if right?
(++ lefts)
lefts)]
- (///////phase\each (|>> [tag right?] //runtime.variant)
+ (///////phase#each (|>> [tag right?] //runtime.variant)
(expression archive valueS))))
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 962323b3d..b08634e0c 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
@@ -8,7 +8,7 @@
["<[0]>" code]]]
[data
[collection
- ["[0]" list ("[1]\[0]" functor)]]]
+ ["[0]" list ("[1]#[0]" functor)]]]
["[0]" meta]
["[0]" macro {"+" [with_identifiers]}
["[0]" code]
@@ -46,7 +46,7 @@
(^ (list (~+ g!input+)))
(do ///.monad
[(~+ (|> g!input+
- (list\each (function (_ g!input)
+ (list#each (function (_ g!input)
(list g!input (` ((~ g!phase) (~ g!archive) (~ g!input))))))
list.together))]
((~' in) ((~ g!extension) [(~+ g!input+)])))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js.lux
index 24db5395a..1656d87a1 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js.lux
@@ -26,7 +26,7 @@
[analysis {"+" []}]
["[0]" synthesis]
["//[1]" /// "_"
- ["[1][0]" phase ("[1]\[0]" monad)]
+ ["[1][0]" phase ("[1]#[0]" monad)]
[reference {"+" []}
[variable {"+" []}]]]]]]])
@@ -37,7 +37,7 @@
(case synthesis
(^template [<tag> <generator>]
[(^ (<tag> value))
- (//////phase\in (<generator> value))])
+ (//////phase#in (<generator> value))])
([synthesis.bit /primitive.bit]
[synthesis.i64 /primitive.i64]
[synthesis.f64 /primitive.f64]
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 246bcb54d..e778a040e 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
@@ -8,7 +8,7 @@
[data
["[0]" text]
[collection
- ["[0]" list ("[1]\[0]" functor mix)]]]
+ ["[0]" list ("[1]#[0]" functor mix)]]]
[math
[number
["n" nat]]]
@@ -28,7 +28,7 @@
["//[1]" /// "_"
[reference
[variable {"+" [Register]}]]
- ["[1][0]" phase ("[1]\[0]" monad)]
+ ["[1][0]" phase ("[1]#[0]" monad)]
[meta
[archive {"+" [Archive]}]]]]]]])
@@ -77,7 +77,7 @@
(Generator [(List Member) Synthesis])
(do ///////phase.monad
[valueO (expression archive valueS)]
- (in (list\mix (function (_ side source)
+ (in (list#mix (function (_ side source)
(.let [method (.case side
(^template [<side> <accessor>]
[(<side> lefts)
@@ -166,12 +166,12 @@
[(^ (<simple> idx nextP))
(|> nextP
recur
- (\ ///////phase.monad each (|>> (_.then (<choice> true idx)) {.#Some})))])
+ (# ///////phase.monad each (|>> (_.then (<choice> true idx)) {.#Some})))])
([/////synthesis.simple_left_side ..left_choice]
[/////synthesis.simple_right_side ..right_choice])
(^ (/////synthesis.member/left 0))
- (///////phase\in {.#Some (push_cursor! (_.at (_.i32 +0) ..peek_cursor))})
+ (///////phase#in {.#Some (push_cursor! (_.at (_.i32 +0) ..peek_cursor))})
... Extra optimization
(^ (/////synthesis.path/seq
@@ -212,7 +212,7 @@
next!)})))
_
- (///////phase\in {.#None})))
+ (///////phase#in {.#None})))
(def: (pattern_matching' statement expression archive)
(-> Phase! Phase Archive
@@ -230,10 +230,10 @@
(statement expression archive bodyS)
{/////synthesis.#Pop}
- (///////phase\in pop_cursor!)
+ (///////phase#in pop_cursor!)
{/////synthesis.#Bind register}
- (///////phase\in (_.define (..register register) ..peek_cursor))
+ (///////phase#in (_.define (..register register) ..peek_cursor))
{/////synthesis.#Bit_Fork when thenP elseP}
(do [! ///////phase.monad]
@@ -267,7 +267,7 @@
[{<tag> item}
(do [! ///////phase.monad]
[cases (monad.each ! (function (_ [match then])
- (\ ! each (|>> [(list (<format> match))]) (recur then)))
+ (# ! each (|>> [(list (<format> match))]) (recur then)))
{.#Item item})]
(in (_.switch ..peek_cursor
cases
@@ -277,13 +277,13 @@
(^template [<complex> <choice>]
[(^ (<complex> idx))
- (///////phase\in (<choice> false idx))])
+ (///////phase#in (<choice> false idx))])
([/////synthesis.side/left ..left_choice]
[/////synthesis.side/right ..right_choice])
(^template [<pm> <getter>]
[(^ (<pm> lefts))
- (///////phase\in (push_cursor! (<getter> (_.i32 (.int lefts)) ..peek_cursor)))])
+ (///////phase#in (push_cursor! (<getter> (_.i32 (.int lefts)) ..peek_cursor)))])
([/////synthesis.member/left //runtime.tuple//left]
[/////synthesis.member/right //runtime.tuple//right])
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 57083f023..6e6ec5f9f 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
@@ -8,7 +8,7 @@
[text
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" functor mix)]]]
+ ["[0]" list ("[1]#[0]" functor mix)]]]
[target
["_" js {"+" [Expression Computation Var Statement]}]]]]
["[0]" // "_"
@@ -23,7 +23,7 @@
["[1][0]" generation {"+" [Context]}]
["//[1]" /// "_"
[arity {"+" [Arity]}]
- ["[1][0]" phase ("[1]\[0]" monad)]
+ ["[1][0]" phase ("[1]#[0]" monad)]
[reference
[variable {"+" [Register Variable]}]]]]]])
@@ -48,7 +48,7 @@
_
[(_.function! @self
(|> (list.enumeration inits)
- (list\each (|>> product.left ..capture)))
+ (list#each (|>> product.left ..capture)))
(_.return (_.function @self (list) body!)))
(_.apply/* @self inits)]))
@@ -70,7 +70,7 @@
(do [! ///////phase.monad]
[[function_name body!] (/////generation.with_new_context archive
(do !
- [scope (\ ! each ..@scope
+ [scope (# ! each ..@scope
(/////generation.context archive))]
(/////generation.with_anchor [1 scope]
(statement expression archive bodyS))))
@@ -81,7 +81,7 @@
apply_poly (.function (_ args func)
(|> func (_.do "apply" (list _.null args))))
initialize_self! (_.define (//case.register 0) @self)
- initialize! (list\mix (.function (_ post pre!)
+ initialize! (list#mix (.function (_ post pre!)
($_ _.then
pre!
(_.define (..input post) (_.at (_.i32 (.int post)) @@arguments))))
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 cde2c64a7..ab90d7193 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
@@ -8,7 +8,7 @@
["[0]" text
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" functor mix)]]]
+ ["[0]" list ("[1]#[0]" functor mix)]]]
[math
[number
["n" nat]]]
@@ -33,13 +33,13 @@
(-> Bit Register (List Expression) Statement Statement)
(|> bindings
list.enumeration
- (list\each (function (_ [register value])
+ (list#each (function (_ [register value])
(let [variable (//case.register (n.+ offset register))]
(if initial?
(_.define variable value)
(_.set variable value)))))
list.reversed
- (list\mix _.then body)))
+ (list#mix _.then body)))
(def: .public (scope! statement expression archive [start initsS+ bodyS])
(Generator! (Scope Synthesis))
@@ -51,7 +51,7 @@
... true loop
_
(do [! ///////phase.monad]
- [@scope (\ ! each ..@scope /////generation.next)
+ [@scope (# ! each ..@scope /////generation.next)
initsO+ (monad.each ! (expression archive) initsS+)
body! (/////generation.with_anchor [start @scope]
(statement expression archive bodyS))]
@@ -86,6 +86,6 @@
(..setup false offset
(|> argsO+
list.enumeration
- (list\each (function (_ [idx _])
+ (list#each (function (_ [idx _])
(_.at (_.i32 (.int idx)) @temp))))
(_.continue_at (_.label @scope)))))))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/runtime.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/runtime.lux
index b83068e2b..b1ad89c64 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
@@ -10,12 +10,12 @@
["<[0]>" code]]]
[data
["[0]" product]
- ["[0]" text ("[1]\[0]" hash)
+ ["[0]" text ("[1]#[0]" hash)
["%" format {"+" [format]}]
[encoding
["[0]" utf8]]]
[collection
- ["[0]" list ("[1]\[0]" functor)]
+ ["[0]" list ("[1]#[0]" functor)]
["[0]" row]]]
["[0]" macro
[syntax {"+" [syntax:]}]
@@ -91,7 +91,7 @@
[ids (monad.all ! (list.repeated (list.size vars) meta.seed))]
(in (list (` (let [(~+ (|> vars
(list.zipped/2 ids)
- (list\each (function (_ [id var])
+ (list#each (function (_ [id var])
(list (code.local_identifier var)
(` (_.var (~ (code.text (format "v" (%.nat id)))))))))
list.together))]
@@ -118,8 +118,8 @@
{.#Right [name inputs]}
(let [g!name (code.local_identifier name)
- inputsC (list\each code.local_identifier inputs)
- inputs_typesC (list\each (function.constant (` _.Expression)) inputs)]
+ inputsC (list#each code.local_identifier inputs)
+ inputs_typesC (list#each (function.constant (` _.Expression)) inputs)]
(in (list (` (def: .public ((~ g!name) (~+ inputsC))
(-> (~+ inputs_typesC) Computation)
(_.apply/* (~ runtime_name) (list (~+ inputsC)))))
@@ -783,4 +783,4 @@
{.#None}
(|> ..runtime
_.code
- (\ utf8.codec encoded))])])))
+ (# utf8.codec encoded))])])))
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 d5838b04b..dc13bc56c 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
@@ -12,13 +12,13 @@
[analysis {"+" [Variant Tuple]}]
["[1][0]" synthesis {"+" [Synthesis]}]
["//[1]" ///
- ["[1][0]" phase ("[1]\[0]" monad)]]]])
+ ["[1][0]" phase ("[1]#[0]" monad)]]]])
(def: .public (tuple generate archive elemsS+)
(Generator (Tuple Synthesis))
(case elemsS+
{.#End}
- (///////phase\in //runtime.unit)
+ (///////phase#in //runtime.unit)
{.#Item singletonS {.#End}}
(generate archive singletonS)
@@ -33,6 +33,6 @@
(let [tag (if right?
(++ lefts)
lefts)]
- (///////phase\each (//runtime.variant (_.i32 (.int tag))
+ (///////phase#each (//runtime.variant (_.i32 (.int tag))
(//runtime.flag right?))
(generate archive valueS))))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm.lux
index 738700655..638ba9d80 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm.lux
@@ -17,14 +17,14 @@
["[0]" synthesis]
[///
["[0]" reference]
- ["[1]" phase ("[1]\[0]" monad)]]]]])
+ ["[1]" phase ("[1]#[0]" monad)]]]]])
(def: .public (generate archive synthesis)
Phase
(case synthesis
(^template [<tag> <generator>]
[(^ (<tag> value))
- (///\in (<generator> value))])
+ (///#in (<generator> value))])
([synthesis.bit /primitive.bit]
[synthesis.i64 /primitive.i64]
[synthesis.f64 /primitive.f64]
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/case.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/case.lux
index 3493c8140..ff82db88e 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/case.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/case.lux
@@ -10,10 +10,10 @@
["[0]" i32]
["n" nat]]
[collection
- ["[0]" list ("[1]\[0]" mix)]]]
+ ["[0]" list ("[1]#[0]" mix)]]]
[target
[jvm
- ["_" bytecode {"+" [Label Bytecode]} ("[1]\[0]" monad)]
+ ["_" bytecode {"+" [Label Bytecode]} ("[1]#[0]" monad)]
["[0]" type {"+" [Type]}
[category {"+" [Method]}]]]]]]
["[0]" // "_"
@@ -25,7 +25,7 @@
["[0]" synthesis {"+" [Path Synthesis]}]
["[0]" generation]
[///
- ["[0]" phase ("operation\[0]" monad)]
+ ["[0]" phase ("operation#[0]" monad)]
[reference
[variable {"+" [Register]}]]]]])
@@ -38,7 +38,7 @@
(def: (pop_alt stack_depth)
(-> Nat (Bytecode Any))
(.case stack_depth
- 0 (_\in [])
+ 0 (_#in [])
1 _.pop
2 _.pop2
_ ... (n.> 2)
@@ -93,10 +93,10 @@
(-> Nat Label Label (Generator Path))
(.case path
{synthesis.#Pop}
- (operation\in ..pop)
+ (operation#in ..pop)
{synthesis.#Bind register}
- (operation\in ($_ _.composite
+ (operation#in ($_ _.composite
..peek
(_.astore register)))
@@ -110,7 +110,7 @@
(^template [<pattern> <right?>]
[(^ (<pattern> lefts))
- (operation\in
+ (operation#in
(do _.monad
[@success _.new_label
@fail _.new_label]
@@ -133,7 +133,7 @@
(^template [<pattern> <projection>]
[(^ (<pattern> lefts))
- (operation\in ($_ _.composite
+ (operation#in ($_ _.composite
..peek
(<projection> lefts)
//runtime.push))])
@@ -241,7 +241,7 @@
(Generator [(List synthesis.Member) Synthesis])
(do phase.monad
[recordG (phase archive recordS)]
- (in (list\mix (function (_ step so_far)
+ (in (list#mix (function (_ step so_far)
(.let [next (.case step
{.#Left lefts}
(..left_projection lefts)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/debug.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/debug.lux
index c0ab7b58d..9e6328388 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/debug.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/debug.lux
@@ -22,7 +22,7 @@
[outcome (do (try.with @)
[file (: (IO (Try (File IO)))
(file.get_file io.monad file.default file_path))]
- (\ file over_write bytecode))]
+ (# file over_write bytecode))]
(in (case outcome
{try.#Success definition}
file_path
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 b046e78b8..f7556b075 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
@@ -8,17 +8,17 @@
["[0]" i32]
["n" nat]]
[collection
- ["[0]" list ("[1]\[0]" monoid functor)]
+ ["[0]" list ("[1]#[0]" monoid functor)]
["[0]" row]]
["[0]" format "_"
["[1]" binary]]]
[target
[jvm
["[0]" version]
- ["[0]" modifier {"+" [Modifier]} ("[1]\[0]" monoid)]
+ ["[0]" modifier {"+" [Modifier]} ("[1]#[0]" monoid)]
["[0]" field {"+" [Field]}]
["[0]" method {"+" [Method]}]
- ["_" bytecode {"+" [Label Bytecode]} ("[1]\[0]" monad)]
+ ["_" bytecode {"+" [Label Bytecode]} ("[1]#[0]" monad)]
["[0]" class {"+" [Class]}]
["[0]" type {"+" [Type]}
[category {"+" [Return' Value']}]
@@ -66,7 +66,7 @@
(let [classT (type.class class (list))
fields (: (List (Resource Field))
(list& /arity.constant
- (list\composite (/foreign.variables environment)
+ (list#composite (/foreign.variables environment)
(/partial.variables arity))))
methods (: (List (Resource Method))
(list& (/init.method classT environment arity)
@@ -74,7 +74,7 @@
(if (arity.multiary? arity)
(|> (n.min arity /arity.maximum)
list.indices
- (list\each (|>> ++ (/apply.method classT environment arity @begin body)))
+ (list#each (|>> ++ (/apply.method classT environment arity @begin body)))
(list& (/implementation.method arity @begin body)))
(list (/implementation.method' //runtime.apply::name arity @begin body)))))]
(do phase.monad
@@ -83,7 +83,7 @@
(def: modifier
(Modifier Class)
- ($_ modifier\composite
+ ($_ modifier#composite
class.public
class.final))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/field/constant.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/field/constant.lux
index 510e77552..f902f8b83 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/field/constant.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/field/constant.lux
@@ -7,7 +7,7 @@
[target
[jvm
["[0]" field {"+" [Field]}]
- ["[0]" modifier {"+" [Modifier]} ("[1]\[0]" monoid)]
+ ["[0]" modifier {"+" [Modifier]} ("[1]#[0]" monoid)]
[type {"+" [Type]}
[category {"+" [Value]}]]
[constant
@@ -15,7 +15,7 @@
(def: modifier
(Modifier Field)
- ($_ modifier\composite
+ ($_ modifier#composite
field.public
field.static
field.final
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/field/variable.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/field/variable.lux
index d62a1f5d3..7f5969f7b 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/field/variable.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/field/variable.lux
@@ -3,11 +3,11 @@
[lux {"-" [Type type]}
[data
[collection
- ["[0]" list ("[1]\[0]" functor)]
+ ["[0]" list ("[1]#[0]" functor)]
["[0]" row]]]
[target
[jvm
- ["[0]" modifier {"+" [Modifier]} ("[1]\[0]" monoid)]
+ ["[0]" modifier {"+" [Modifier]} ("[1]#[0]" monoid)]
["[0]" field {"+" [Field]}]
["_" bytecode {"+" [Bytecode]}]
[type {"+" [Type]}
@@ -39,7 +39,7 @@
(def: modifier
(Modifier Field)
- ($_ modifier\composite
+ ($_ modifier#composite
field.private
field.final
))
@@ -52,5 +52,5 @@
(-> (-> Register Text) Nat (List (Resource Field)))
(|> amount
list.indices
- (list\each (function (_ register)
+ (list#each (function (_ register)
(..variable (naming register) ..type)))))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/field/variable/partial.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/field/variable/partial.lux
index e2bee647f..67adbe6fb 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/field/variable/partial.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/field/variable/partial.lux
@@ -7,12 +7,12 @@
[number
["n" nat]]
[collection
- ["[0]" list ("[1]\[0]" functor)]
+ ["[0]" list ("[1]#[0]" functor)]
["[0]" row]]]
[target
[jvm
["[0]" field {"+" [Field]}]
- ["_" bytecode {"+" [Label Bytecode]} ("[1]\[0]" monad)]
+ ["_" bytecode {"+" [Label Bytecode]} ("[1]#[0]" monad)]
[type {"+" [Type]}
[category {"+" [Class]}]]
[constant
@@ -36,7 +36,7 @@
(|> _.aconst_null
(list.repeated amount)
(monad.all _.monad))
- (_\in [])))
+ (_#in [])))
(def: .public (get class register)
(-> (Type Class) Register (Bytecode Any))
@@ -56,4 +56,4 @@
($_ _.composite
/count.initial
(initial (n.- ///arity.minimum arity)))
- (_\in [])))
+ (_#in [])))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/method.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/method.lux
index 1269972ec..fcf965365 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/method.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/method.lux
@@ -3,12 +3,12 @@
[lux "*"
[target
[jvm
- ["[0]" modifier {"+" [Modifier]} ("[1]\[0]" monoid)]
+ ["[0]" modifier {"+" [Modifier]} ("[1]#[0]" monoid)]
["[0]" method {"+" [Method]}]]]]])
(def: .public modifier
(Modifier Method)
- ($_ modifier\composite
+ ($_ modifier#composite
method.public
method.strict
))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/method/apply.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/method/apply.lux
index d9f9427a2..de389d38f 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/method/apply.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/method/apply.lux
@@ -11,10 +11,10 @@
["i" int]
["[0]" i32]]
[collection
- ["[0]" list ("[1]\[0]" monoid functor)]]]
+ ["[0]" list ("[1]#[0]" monoid functor)]]]
[target
[jvm
- ["_" bytecode {"+" [Label Bytecode]} ("[1]\[0]" monad)]
+ ["_" bytecode {"+" [Label Bytecode]} ("[1]#[0]" monad)]
["[0]" method {"+" [Method]}]
[constant
[pool {"+" [Resource]}]]
@@ -59,7 +59,7 @@
(|> amount
list.indices
(monad.each _.monad (|>> (n.+ offset) _.aload)))
- (_\in [])
+ (_#in [])
))
(def: (apply offset amount)
@@ -72,7 +72,7 @@
(if (n.> ///arity.maximum amount)
(apply (n.+ ///arity.maximum offset)
(n.- ///arity.maximum amount))
- (_\in []))
+ (_#in []))
)))
(def: this_offset 1)
@@ -97,12 +97,12 @@
@labelsT (|> _.new_label
(list.repeated (-- num_partials))
(monad.all _.monad))
- .let [cases (|> (list\composite {.#Item [@labelsH @labelsT]}
+ .let [cases (|> (list#composite {.#Item [@labelsH @labelsT]}
(list @default))
list.enumeration
- (list\each (function (_ [stage @case])
+ (list#each (function (_ [stage @case])
(let [current_partials (|> (list.indices stage)
- (list\each (///partial.get class))
+ (list#each (///partial.get class))
(monad.all _.monad))
already_partial? (n.> 0 stage)
exact_match? (i.= over_extent (.int stage))
@@ -114,7 +114,7 @@
////reference.this
(if already_partial?
(_.invokevirtual class //reset.name (//reset.type class))
- (_\in []))
+ (_#in []))
current_partials
(..inputs ..this_offset apply_arity)
(_.invokevirtual class //implementation.name (//implementation.type function_arity))
@@ -134,7 +134,7 @@
... (i.< over_extent (.int stage))
(let [current_environment (|> (list.indices (list.size environment))
- (list\each (///foreign.get class))
+ (list#each (///foreign.get class))
(monad.all _.monad))
missing_partials (|> _.aconst_null
(list.repeated (|> num_partials (n.- apply_arity) (n.- stage)))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/method/init.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/method/init.lux
index ecddbaf46..b5164fca9 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/method/init.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/method/init.lux
@@ -9,7 +9,7 @@
[number
["n" nat]]
[collection
- ["[0]" list ("[1]\[0]" monoid functor)]]]
+ ["[0]" list ("[1]#[0]" monoid functor)]]]
[target
[jvm
["_" bytecode {"+" [Bytecode]}]
@@ -49,7 +49,7 @@
(def: .public (type environment arity)
(-> (Environment Synthesis) Arity (Type category.Method))
- (type.method [(list\composite (///foreign.closure environment)
+ (type.method [(list#composite (///foreign.closure environment)
(if (arity.multiary? arity)
(list& ///arity.type (..partials arity))
(list)))
@@ -77,7 +77,7 @@
(-> Register Register)
(Bytecode Any))
(|> (list.indices amount)
- (list\each (function (_ register)
+ (list#each (function (_ register)
(put register
(_.aload (offset register)))))
(monad.all _.monad)))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/method/reset.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/method/reset.lux
index 791bca2f5..d70718d0a 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/method/reset.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/method/reset.lux
@@ -3,7 +3,7 @@
[lux {"-" [Type type]}
[data
[collection
- ["[0]" list ("[1]\[0]" functor)]]]
+ ["[0]" list ("[1]#[0]" functor)]]]
[target
[jvm
["[0]" method {"+" [Method]}]
@@ -36,7 +36,7 @@
(-> (Type Class) (Environment Synthesis) (List (Bytecode Any)))
(|>> list.size
list.indices
- (list\each (///foreign.get class))))
+ (list#each (///foreign.get class))))
(def: .public (method class environment arity)
(-> (Type Class) (Environment Synthesis) Arity (Resource Method))
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 e6db5b72c..bc812c85b 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
@@ -14,7 +14,7 @@
[data
[binary {"+" [Binary]}]
["[0]" product]
- ["[0]" text ("[1]\[0]" hash)
+ ["[0]" text ("[1]#[0]" hash)
["%" format {"+" [format]}]]
[collection
["[0]" array]
@@ -26,7 +26,7 @@
[jvm
["[0]" loader {"+" [Library]}]
["_" bytecode {"+" [Bytecode]}]
- ["[0]" modifier {"+" [Modifier]} ("[1]\[0]" monoid)]
+ ["[0]" modifier {"+" [Modifier]} ("[1]#[0]" monoid)]
["[0]" field {"+" [Field]}]
["[0]" method {"+" [Method]}]
["[0]" version]
@@ -55,10 +55,10 @@
(def: value::field "value")
(def: value::type (type.class "java.lang.Object" (list)))
-(def: value::modifier ($_ modifier\composite field.public field.final field.static))
+(def: value::modifier ($_ modifier#composite field.public field.final field.static))
(def: init::type (type.method [(list) type.void (list)]))
-(def: init::modifier ($_ modifier\composite method.public method.static method.strict))
+(def: init::modifier ($_ modifier#composite method.public method.static method.strict))
(exception: .public (cannot_load [class Text
error Text])
@@ -117,11 +117,11 @@
_.return)}))
(row.row))]
(io.run! (do [! (try.with io.monad)]
- [bytecode (\ ! each (format.result class.writer)
+ [bytecode (# ! each (format.result class.writer)
(io.io bytecode))
_ (loader.store eval_class bytecode library)
class (loader.load eval_class loader)
- value (\ io.monad in (class_value eval_class class))]
+ value (# io.monad in (class_value eval_class class))]
(in [value
[eval_class bytecode]])))))
@@ -129,7 +129,7 @@
(-> Library java/lang/ClassLoader Text Definition (Try Any))
(io.run! (do (try.with io.monad)
[existing_class? (|> (atom.read! library)
- (\ io.monad each (function (_ library)
+ (# io.monad each (function (_ library)
(dictionary.key? library class_name)))
(try.lifted io.monad)
(: (IO (Try Bit))))
@@ -142,7 +142,7 @@
(-> Library java/lang/ClassLoader Name (Bytecode Any) (Try [Text Any Definition]))
(let [class_name (format (text.replaced .module_separator class_path_separator module)
class_path_separator (name.normal name)
- "___" (%.nat (text\hash name)))]
+ "___" (%.nat (text#hash name)))]
(do try.monad
[[value definition] (evaluate! library loader class_name valueG)]
(in [class_name value definition]))))
@@ -155,7 +155,7 @@
(implementation
(def: (evaluate! temp_label valueG)
(let [eval_class (|> temp_label name.normal (text.replaced " " "$"))]
- (\ try.monad each product.left
+ (# try.monad each product.left
(..evaluate! library loader eval_class valueG))))
(def: execute!
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 c98f530a2..7491bcb1f 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
@@ -10,10 +10,10 @@
[number
["n" nat]]
[collection
- ["[0]" list ("[1]\[0]" functor)]]]
+ ["[0]" list ("[1]#[0]" functor)]]]
[target
[jvm
- ["_" bytecode {"+" [Label Bytecode]} ("[1]\[0]" monad)]]]]]
+ ["_" bytecode {"+" [Label Bytecode]} ("[1]#[0]" monad)]]]]]
["[0]" // "_"
["[1][0]" runtime {"+" [Operation Phase Generator]}]
["[1][0]" value]
@@ -35,7 +35,7 @@
false))
(def: no_op
- (_\in []))
+ (_#in []))
(def: .public (recur translate archive updatesS)
(Generator (List Synthesis))
@@ -43,7 +43,7 @@
[[@begin offset] generation.anchor
updatesG (|> updatesS
list.enumeration
- (list\each (function (_ [index updateS])
+ (list#each (function (_ [index updateS])
[(n.+ offset index) updateS]))
(monad.each ! (function (_ [register updateS])
(if (invariant? register updateS)
@@ -63,11 +63,11 @@
... will refer to the new value of X, instead of the old value, as
... should be the case.
(|> updatesG
- (list\each product.left)
+ (list#each product.left)
(monad.all _.monad))
(|> updatesG
list.reversed
- (list\each product.right)
+ (list#each product.right)
(monad.all _.monad))
(_.goto @begin)))))
@@ -79,7 +79,7 @@
iterationG (generation.with_anchor [@begin offset]
(translate archive iterationS))
.let [initializationG (|> (list.enumeration initsI+)
- (list\each (function (_ [index initG])
+ (list#each (function (_ [index initG])
($_ _.composite
initG
(_.astore (n.+ offset index)))))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/program.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/program.lux
index cb5f99c33..da666b3d6 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/program.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/program.lux
@@ -13,7 +13,7 @@
[target
[jvm
["_" bytecode {"+" [Bytecode]}]
- ["[0]" modifier {"+" [Modifier]} ("[1]\[0]" monoid)]
+ ["[0]" modifier {"+" [Modifier]} ("[1]#[0]" monoid)]
["[0]" method {"+" [Method]}]
["[0]" version]
["[0]" class {"+" [Class]}]
@@ -41,7 +41,7 @@
(def: main::modifier
(Modifier Method)
- ($_ modifier\composite
+ ($_ modifier#composite
method.public
method.static
method.strict
@@ -49,12 +49,13 @@
(def: program::modifier
(Modifier Class)
- ($_ modifier\composite
+ ($_ modifier#composite
class.public
class.final
))
-(def: nil //runtime.none_injection)
+(def: nil
+ //runtime.none_injection)
(def: amount_of_inputs
(Bytecode Any)
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 c61f58336..42434a35d 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
@@ -20,7 +20,7 @@
[//
["[0]" generation]
[///
- ["[1]" phase ("operation\[0]" monad)]
+ ["[1]" phase ("operation#[0]" monad)]
[reference
["[0]" variable {"+" [Register Variable]}]]
[meta
@@ -42,7 +42,7 @@
(def: (foreign archive variable)
(-> Archive Register (Operation (Bytecode Any)))
(do [! ////.monad]
- [bytecode_name (\ ! each //runtime.class_name
+ [bytecode_name (# ! each //runtime.class_name
(generation.context archive))]
(in ($_ _.composite
..this
@@ -54,7 +54,7 @@
(-> Archive Variable (Operation (Bytecode Any)))
(case variable
{variable.#Local variable}
- (operation\in (_.aload variable))
+ (operation#in (_.aload variable))
{variable.#Foreign variable}
(..foreign archive variable)))
@@ -62,6 +62,6 @@
(def: .public (constant archive name)
(-> Archive Name (Operation (Bytecode Any)))
(do [! ////.monad]
- [bytecode_name (\ ! each //runtime.class_name
+ [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/runtime.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/runtime.lux
index eba8c2f00..d3eb4af34 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/runtime.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/runtime.lux
@@ -9,7 +9,7 @@
[data
[binary {"+" [Binary]}]
[collection
- ["[0]" list ("[1]\[0]" functor)]
+ ["[0]" list ("[1]#[0]" functor)]
["[0]" row]]
["[0]" format "_"
["[1]" binary]]
@@ -23,7 +23,7 @@
[target
["[0]" jvm "_"
["_" bytecode {"+" [Label Bytecode]}]
- ["[0]" modifier {"+" [Modifier]} ("[1]\[0]" monoid)]
+ ["[0]" modifier {"+" [Modifier]} ("[1]#[0]" monoid)]
["[0]" field {"+" [Field]}]
["[0]" method {"+" [Method]}]
["[1]/[0]" version]
@@ -103,7 +103,7 @@
(def: modifier
(Modifier Method)
- ($_ modifier\composite
+ ($_ modifier#composite
method.public
method.static
method.strict
@@ -514,7 +514,7 @@
(Operation Any)
(let [class (..reflection ..class)
modifier (: (Modifier Class)
- ($_ modifier\composite
+ ($_ modifier#composite
class.public
class.final))
bytecode (<| (format.result class.writer)
@@ -546,7 +546,7 @@
(let [apply::method+ (|> (enum.range n.enum
(++ //function/arity.minimum)
//function/arity.maximum)
- (list\each (function (_ arity)
+ (list#each (function (_ arity)
(method.method method.public ..apply::name (..apply::type arity)
(list)
{.#Some
@@ -560,7 +560,7 @@
(_.aload arity)
(_.invokevirtual //function.class ..apply::name (..apply::type //function/arity.minimum))
_.areturn))})))
- (list& (method.method (modifier\composite method.public method.abstract)
+ (list& (method.method (modifier#composite method.public method.abstract)
..apply::name (..apply::type //function/arity.minimum)
(list)
{.#None})))
@@ -576,12 +576,12 @@
(_.putfield //function.class //function/count.field //function/count.type)
_.return))})
modifier (: (Modifier Class)
- ($_ modifier\composite
+ ($_ modifier#composite
class.public
class.abstract))
class (..reflection //function.class)
partial_count (: (Resource Field)
- (field.field (modifier\composite field.public field.final)
+ (field.field (modifier#composite field.public field.final)
//function/count.field
//function/count.type
(row.row)))
@@ -610,4 +610,4 @@
... This shift is done to avoid the possibility of forged labels
... to be in the range of the labels that are generated automatically
... during the evaluation of Bytecode expressions.
- (\ ////.monad each (i64.left_shifted shift) generation.next)))
+ (# ////.monad each (i64.left_shifted shift) generation.next)))
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 7455a3d3b..867142e35 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
@@ -30,7 +30,7 @@
(Generator (Tuple Synthesis))
(case membersS
{.#End}
- (\ phase.monad in //runtime.unit)
+ (# phase.monad in //runtime.unit)
{.#Item singletonS {.#End}}
(generate archive singletonS)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/value.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/value.lux
index cec3d3b97..780261e43 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/value.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/value.lux
@@ -4,7 +4,7 @@
[target
[jvm
["_" bytecode {"+" [Bytecode]}]
- ["[0]" type {"+" [Type]} ("[1]\[0]" equivalence)
+ ["[0]" type {"+" [Type]} ("[1]#[0]" equivalence)
[category {"+" [Primitive]}]
["[0]" box]]]]]])
@@ -14,7 +14,7 @@
[(def: (<name> type)
(-> (Type Primitive) Text)
(`` (cond (~~ (template [<type> <output>]
- [(type\= <type> type) <output>]
+ [(type#= <type> type) <output>]
[type.boolean <boolean>]
[type.byte <byte>]
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua.lux
index 44b40b6e9..2a6a5da82 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua.lux
@@ -26,7 +26,7 @@
[analysis {"+" []}]
["[0]" synthesis]
["//[1]" /// "_"
- ["[1][0]" phase ("[1]\[0]" monad)]
+ ["[1][0]" phase ("[1]#[0]" monad)]
[reference {"+" []}
[variable {"+" []}]]]]]]])
@@ -37,7 +37,7 @@
(case synthesis
(^template [<tag> <generator>]
[(^ (<tag> value))
- (//////phase\in (<generator> value))])
+ (//////phase#in (<generator> value))])
([synthesis.bit /primitive.bit]
[synthesis.i64 /primitive.i64]
[synthesis.f64 /primitive.f64]
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 90f2f3f3a..ff367f923 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
@@ -7,7 +7,7 @@
["[0]" text
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" functor mix)]
+ ["[0]" list ("[1]#[0]" functor mix)]
["[0]" set]]]
[target
["_" lua {"+" [Expression Var Statement]}]]]]
@@ -26,7 +26,7 @@
["//[1]" /// "_"
[reference
["[1][0]" variable {"+" [Register]}]]
- ["[1][0]" phase ("[1]\[0]" monad)]
+ ["[1][0]" phase ("[1]#[0]" monad)]
[meta
[archive {"+" [Archive]}]]]]]]])
@@ -62,7 +62,7 @@
(Generator [(List Member) Synthesis])
(do ///////phase.monad
[valueO (expression archive valueS)]
- (in (list\mix (function (_ side source)
+ (in (list#mix (function (_ side source)
(.let [method (.case side
(^template [<side> <accessor>]
[(<side> lefts)
@@ -167,10 +167,10 @@
(statement expression archive bodyS)
{/////synthesis.#Pop}
- (///////phase\in ..pop!)
+ (///////phase#in ..pop!)
{/////synthesis.#Bind register}
- (///////phase\in (_.local/1 (..register register) ..peek))
+ (///////phase#in (_.local/1 (..register register) ..peek))
{/////synthesis.#Bit_Fork when thenP elseP}
(do [! ///////phase.monad]
@@ -206,26 +206,26 @@
(^template [<complex> <simple> <choice>]
[(^ (<complex> idx))
- (///////phase\in (<choice> false idx))
+ (///////phase#in (<choice> false idx))
(^ (<simple> idx nextP))
- (///////phase\each (_.then (<choice> true idx)) (recur nextP))])
+ (///////phase#each (_.then (<choice> true idx)) (recur nextP))])
([/////synthesis.side/left /////synthesis.simple_left_side ..left_choice]
[/////synthesis.side/right /////synthesis.simple_right_side ..right_choice])
(^ (/////synthesis.member/left 0))
- (///////phase\in (|> ..peek (_.item (_.int +1)) ..push!))
+ (///////phase#in (|> ..peek (_.item (_.int +1)) ..push!))
(^template [<pm> <getter>]
[(^ (<pm> lefts))
- (///////phase\in (|> ..peek (<getter> (_.int (.int lefts))) ..push!))])
+ (///////phase#in (|> ..peek (<getter> (_.int (.int lefts))) ..push!))])
([/////synthesis.member/left //runtime.tuple//left]
[/////synthesis.member/right //runtime.tuple//right])
(^ (/////synthesis.!bind_top register thenP))
(do ///////phase.monad
[then! (recur thenP)]
- (///////phase\in ($_ _.then
+ (///////phase#in ($_ _.then
(_.local/1 (..register register) ..peek_and_pop)
then!)))
@@ -252,7 +252,7 @@
(|>> ////synthesis/case.storage
(value@ ////synthesis/case.#dependencies)
set.list
- (list\each (function (_ variable)
+ (list#each (function (_ variable)
(.case variable
{///////variable.#Local register}
(..register register)
@@ -275,6 +275,6 @@
(-> Phase! (Generator [Synthesis Path]))
(|> [valueS pathP]
(..case! statement expression archive)
- (\ ///////phase.monad each
+ (# ///////phase.monad each
(|>> (_.closure (list))
(_.apply/* (list))))))
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 e395e1b19..cfe9454bf 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
@@ -10,7 +10,7 @@
[text
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" functor mix)]]]
+ ["[0]" list ("[1]#[0]" functor mix)]]]
[target
["_" lua {"+" [Var Expression Label Statement]}]]]]
["[0]" // "_"
@@ -25,7 +25,7 @@
["[1][0]" generation {"+" [Context]}]
["//[1]" /// "_"
[arity {"+" [Arity]}]
- ["[1][0]" phase ("[1]\[0]" monad)]
+ ["[1][0]" phase ("[1]#[0]" monad)]
[reference
[variable {"+" [Register Variable]}]]]]]])
@@ -49,7 +49,7 @@
_
(let [@inits (|> (list.enumeration inits)
- (list\each (|>> product.left ..capture)))]
+ (list#each (|>> product.left ..capture)))]
[(_.function @self @inits
($_ _.then
(_.local_function @self @args body!)
@@ -68,7 +68,7 @@
(do [! ///////phase.monad]
[[function_name body!] (/////generation.with_new_context archive
(do !
- [@scope (\ ! each ..@scope
+ [@scope (# ! each ..@scope
(/////generation.context archive))]
(/////generation.with_anchor [1 @scope]
(statement expression archive bodyS))))
@@ -79,7 +79,7 @@
@scope (..@scope function_name)
@self (_.var (///reference.artifact function_name))
initialize_self! (_.local/1 (//case.register 0) @self)
- initialize! (list\mix (.function (_ post pre!)
+ initialize! (list#mix (.function (_ post pre!)
($_ _.then
pre!
(_.local/1 (..input post) (_.item (|> post ++ .int _.int) @curried))))
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 bee7ac538..34bd663c7 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
@@ -8,7 +8,7 @@
[text
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" functor)]
+ ["[0]" list ("[1]#[0]" functor)]
["[0]" set]]]
[math
[number
@@ -38,7 +38,7 @@
(-> Bit Register (List Expression) Bit Statement Statement)
(let [variables (|> bindings
list.enumeration
- (list\each (|>> product.left (n.+ offset) //case.register)))]
+ (list#each (|>> product.left (n.+ offset) //case.register)))]
(if as_expression?
body
($_ _.then
@@ -56,12 +56,12 @@
{.#End}
(|> bodyS
(statement expression archive)
- (\ ///////phase.monad each (|>> [(list)])))
+ (# ///////phase.monad each (|>> [(list)])))
... true loop
_
(do [! ///////phase.monad]
- [@scope (\ ! each ..@scope /////generation.next)
+ [@scope (# ! each ..@scope /////generation.next)
initsO+ (monad.each ! (expression archive) initsS+)
body! (/////generation.with_anchor [start @scope]
(statement expression archive bodyS))]
@@ -86,7 +86,7 @@
.let [@loop (_.var (///reference.artifact [artifact_module artifact_id]))
locals (|> initsO+
list.enumeration
- (list\each (|>> product.left (n.+ start) //case.register)))
+ (list#each (|>> product.left (n.+ start) //case.register)))
[directive instantiation] (: [Statement Expression]
(case (|> (synthesis.path/then bodyS)
//case.dependencies
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 fa0a01ef7..2594b3cff 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
@@ -10,12 +10,12 @@
["<[0]>" code]]]
[data
["[0]" product]
- ["[0]" text ("[1]\[0]" hash)
+ ["[0]" text ("[1]#[0]" hash)
["%" format {"+" [format]}]
[encoding
["[0]" utf8]]]
[collection
- ["[0]" list ("[1]\[0]" functor)]
+ ["[0]" list ("[1]#[0]" functor)]
["[0]" row]]]
["[0]" macro
[syntax {"+" [syntax:]}]
@@ -108,7 +108,7 @@
[ids (monad.all ! (list.repeated (list.size vars) meta.seed))]
(in (list (` (let [(~+ (|> vars
(list.zipped/2 ids)
- (list\each (function (_ [id var])
+ (list#each (function (_ [id var])
(list (code.local_identifier var)
(` (_.var (~ (code.text (format "v" (%.nat id)))))))))
list.together))]
@@ -143,8 +143,8 @@
{.#Right [name inputs]}
(macro.with_identifiers [g!_]
(let [g!name (code.local_identifier name)
- inputsC (list\each code.local_identifier inputs)
- inputs_typesC (list\each (function.constant (` _.Expression))
+ inputsC (list#each code.local_identifier inputs)
+ inputs_typesC (list#each (function.constant (` _.Expression))
inputs)]
(in (list (` (def: .public ((~ g!name) (~+ inputsC))
(-> (~+ inputs_typesC) Computation)
@@ -430,4 +430,4 @@
{.#None}
(|> ..runtime
_.code
- (\ utf8.codec encoded))])])))
+ (# utf8.codec encoded))])])))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/structure.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/structure.lux
index c2bd264e0..84a223488 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/structure.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/structure.lux
@@ -12,13 +12,13 @@
[analysis {"+" [Variant Tuple]}]
["[1][0]" synthesis {"+" [Synthesis]}]
["//[1]" /// "_"
- ["[1][0]" phase ("[1]\[0]" monad)]]]])
+ ["[1][0]" phase ("[1]#[0]" monad)]]]])
(def: .public (tuple generate archive elemsS+)
(Generator (Tuple Synthesis))
(case elemsS+
{.#End}
- (///////phase\in (//primitive.text /////synthesis.unit))
+ (///////phase#in (//primitive.text /////synthesis.unit))
{.#Item singletonS {.#End}}
(generate archive singletonS)
@@ -26,12 +26,12 @@
_
(|> elemsS+
(monad.each ///////phase.monad (generate archive))
- (///////phase\each _.array))))
+ (///////phase#each _.array))))
(def: .public (variant generate archive [lefts right? valueS])
(Generator (Variant Synthesis))
(let [tag (if right?
(++ lefts)
lefts)]
- (///////phase\each (//runtime.variant tag right?)
+ (///////phase#each (//runtime.variant tag right?)
(generate archive valueS))))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php.lux
index e2fc2ba88..65ec8d957 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php.lux
@@ -23,7 +23,7 @@
[analysis {"+" []}]
["[1][0]" synthesis]
["//[1]" /// "_"
- ["[1][0]" phase ("[1]\[0]" monad)]
+ ["[1][0]" phase ("[1]#[0]" monad)]
[reference {"+" []}
[variable {"+" []}]]]]]]])
@@ -32,7 +32,7 @@
(case synthesis
(^template [<tag>]
[(^ (<tag> value))
- (//////phase\each _.return (expression archive synthesis))])
+ (//////phase#each _.return (expression archive synthesis))])
([////synthesis.bit]
[////synthesis.i64]
[////synthesis.f64]
@@ -44,7 +44,7 @@
(^template [<tag>]
[(^ {<tag> value})
- (//////phase\each _.return (expression archive synthesis))])
+ (//////phase#each _.return (expression archive synthesis))])
([////synthesis.#Reference]
[////synthesis.#Extension])
@@ -60,7 +60,7 @@
[////synthesis.loop/recur /loop.recur!])
(^ (////synthesis.function/abstraction abstraction))
- (//////phase\each _.return (/function.function statement expression archive abstraction))
+ (//////phase#each _.return (/function.function statement expression archive abstraction))
))
(exception: .public cannot_recur_as_an_expression)
@@ -70,7 +70,7 @@
(case synthesis
(^template [<tag> <generator>]
[(^ (<tag> value))
- (//////phase\in (<generator> value))])
+ (//////phase#in (<generator> value))])
([////synthesis.bit /primitive.bit]
[////synthesis.i64 /primitive.i64]
[////synthesis.f64 /primitive.f64]
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 d6e4ccb15..ea0937e06 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
@@ -8,7 +8,7 @@
["[0]" text
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" functor mix)]
+ ["[0]" list ("[1]#[0]" functor mix)]
["[0]" set]]]
[math
[number
@@ -30,7 +30,7 @@
["//[1]" /// "_"
[reference
["[1][0]" variable {"+" [Register]}]]
- ["[1][0]" phase ("[1]\[0]" monad)]
+ ["[1][0]" phase ("[1]#[0]" monad)]
[meta
[archive {"+" [Archive]}]]]]]]])
@@ -83,7 +83,7 @@
(Generator [(List Member) Synthesis])
(do ///////phase.monad
[valueG (expression archive valueS)]
- (in (list\mix (function (_ side source)
+ (in (list#mix (function (_ side source)
(.let [method (.case side
(^template [<side> <accessor>]
[(<side> lefts)
@@ -167,10 +167,10 @@
(statement expression archive bodyS)
{/////synthesis.#Pop}
- (///////phase\in ..pop!)
+ (///////phase#in ..pop!)
{/////synthesis.#Bind register}
- (///////phase\in (_.set! (..register register) ..peek))
+ (///////phase#in (_.set! (..register register) ..peek))
{/////synthesis.#Bit_Fork when thenP elseP}
(do [! ///////phase.monad]
@@ -206,28 +206,28 @@
(^template [<complex> <simple> <choice>]
[(^ (<complex> idx))
- (///////phase\in (<choice> false idx))
+ (///////phase#in (<choice> false idx))
(^ (<simple> idx nextP))
(|> nextP
recur
- (\ ///////phase.monad each (_.then (<choice> true idx))))])
+ (# ///////phase.monad each (_.then (<choice> true idx))))])
([/////synthesis.side/left /////synthesis.simple_left_side ..left_choice]
[/////synthesis.side/right /////synthesis.simple_right_side ..right_choice])
(^ (/////synthesis.member/left 0))
- (///////phase\in (|> ..peek (_.item (_.int +0)) ..push!))
+ (///////phase#in (|> ..peek (_.item (_.int +0)) ..push!))
(^template [<pm> <getter>]
[(^ (<pm> lefts))
- (///////phase\in (|> ..peek (<getter> (_.int (.int lefts))) ..push!))])
+ (///////phase#in (|> ..peek (<getter> (_.int (.int lefts))) ..push!))])
([/////synthesis.member/left //runtime.tuple//left]
[/////synthesis.member/right //runtime.tuple//right])
(^ (/////synthesis.!bind_top register thenP))
(do ///////phase.monad
[then! (recur thenP)]
- (///////phase\in ($_ _.then
+ (///////phase#in ($_ _.then
(_.set! (..register register) ..peek_and_pop)
then!)))
@@ -235,7 +235,7 @@
... (.let [[extra_pops nextP'] (////synthesis/case.count_pops nextP)]
... (do ///////phase.monad
... [next! (recur nextP')]
- ... (///////phase\in ($_ _.then
+ ... (///////phase#in ($_ _.then
... (..multi_pop! (n.+ 2 extra_pops))
... next!))))
@@ -262,7 +262,7 @@
(|>> ////synthesis/case.storage
(value@ ////synthesis/case.#dependencies)
set.list
- (list\each (function (_ variable)
+ (list#each (function (_ variable)
(.case variable
{///////variable.#Local register}
(..register register)
@@ -288,7 +288,7 @@
.let [@case (_.constant (///reference.artifact [case_module case_artifact]))
@dependencies+ (..dependencies (/////synthesis.path/seq (/////synthesis.path/then valueS)
pathP))
- directive (_.define_function @case (list\each _.parameter @dependencies+) case!)]
+ directive (_.define_function @case (list#each _.parameter @dependencies+) case!)]
_ (/////generation.execute! directive)
_ (/////generation.save! case_artifact directive)]
(in (_.apply/* @dependencies+ @case))))
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 83e16e834..2fc8b837e 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
@@ -10,7 +10,7 @@
["[0]" text
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" functor mix)]]]
+ ["[0]" list ("[1]#[0]" functor mix)]]]
[target
["_" php {"+" [Var Global Expression Argument Label Statement]}]]]]
["[0]" // "_"
@@ -25,7 +25,7 @@
["[1][0]" generation {"+" [Context]}]
["//[1]" /// "_"
[arity {"+" [Arity]}]
- ["[1][0]" phase ("[1]\[0]" monad)]
+ ["[1][0]" phase ("[1]#[0]" monad)]
[reference
[variable {"+" [Register Variable]}]]]]]])
@@ -58,10 +58,10 @@
_
(let [@inits (|> (list.enumeration inits)
- (list\each (|>> product.left ..capture)))]
- [(_.set! @selfG (_.closure (list) (list\each _.parameter @inits)
+ (list#each (|>> product.left ..capture)))]
+ [(_.set! @selfG (_.closure (list) (list#each _.parameter @inits)
($_ _.then
- (_.set! @selfL (_.closure (list& (_.reference @selfL) (list\each _.reference @inits))
+ (_.set! @selfL (_.closure (list& (_.reference @selfL) (list#each _.reference @inits))
(list)
body!))
(_.return @selfL))))
@@ -72,7 +72,7 @@
(do [! ///////phase.monad]
[[function_name body!] (/////generation.with_new_context archive
(do !
- [@scope (\ ! each ..@scope
+ [@scope (# ! each ..@scope
(/////generation.context archive))]
(/////generation.with_anchor [1 @scope]
(statement expression archive bodyS))))
@@ -84,7 +84,7 @@
@selfG (_.global (///reference.artifact function_name))
@selfL (_.var (///reference.artifact function_name))
initialize_self! (_.set! (//case.register 0) @selfL)
- initialize! (list\mix (.function (_ post pre!)
+ initialize! (list#mix (.function (_ post pre!)
($_ _.then
pre!
(_.set! (..input post) (_.item (|> post .int _.int) @curried))))
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 7ce83fe85..22e48c266 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
@@ -8,7 +8,7 @@
["[0]" text
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" functor mix)]
+ ["[0]" list ("[1]#[0]" functor mix)]
["[0]" set {"+" [Set]}]]]
[math
[number
@@ -41,11 +41,11 @@
(-> Register (List Expression) Statement Statement)
(|> bindings
list.enumeration
- (list\each (function (_ [register value])
+ (list#each (function (_ [register value])
(let [variable (//case.register (n.+ offset register))]
(_.set! variable value))))
list.reversed
- (list\mix _.then body)))
+ (list#mix _.then body)))
(def: .public (scope! statement expression archive [start initsS+ bodyS])
(Generator! (Scope Synthesis))
@@ -57,7 +57,7 @@
... true loop
_
(do [! ///////phase.monad]
- [@scope (\ ! each ..@scope /////generation.next)
+ [@scope (# ! each ..@scope /////generation.next)
initsO+ (monad.each ! (expression archive) initsS+)
body! (/////generation.with_anchor [start @scope]
(statement expression archive bodyS))]
@@ -80,16 +80,16 @@
(..scope! statement expression archive [start initsS+ bodyS]))
.let [locals (|> initsS+
list.enumeration
- (list\each (|>> product.left (n.+ start) //case.register _.parameter)))
+ (list#each (|>> product.left (n.+ start) //case.register _.parameter)))
@loop (_.constant (///reference.artifact [loop_module loop_artifact]))
- loop_variables (set.of_list _.hash (list\each product.right locals))
+ loop_variables (set.of_list _.hash (list#each product.right locals))
referenced_variables (: (-> Synthesis (Set Var))
(|>> synthesis.path/then
//case.dependencies
(set.of_list _.hash)))
[directive instantiation] (: [Statement Expression]
- (case (|> (list\each referenced_variables initsS+)
- (list\mix set.union (referenced_variables bodyS))
+ (case (|> (list#each referenced_variables initsS+)
+ (list#mix set.union (referenced_variables bodyS))
(set.difference loop_variables)
set.list)
{.#End}
@@ -97,8 +97,8 @@
@loop]
foreigns
- [(<| (_.define_function @loop (list\each _.parameter foreigns))
- (_.return (_.closure (list\each _.parameter foreigns) (list) scope!)))
+ [(<| (_.define_function @loop (list#each _.parameter foreigns))
+ (_.return (_.closure (list#each _.parameter foreigns) (list) scope!)))
(_.apply/* foreigns @loop)]))]
_ (/////generation.execute! directive)
_ (/////generation.save! loop_artifact directive)]
@@ -117,6 +117,6 @@
(..setup offset
(|> argsO+
list.enumeration
- (list\each (function (_ [idx _])
+ (list#each (function (_ [idx _])
(_.item (_.int (.int idx)) @temp))))
(_.go_to @scope))))))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/runtime.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/runtime.lux
index 81f608c20..822607732 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
@@ -10,12 +10,12 @@
["<[0]>" code]]]
[data
["[0]" product]
- ["[0]" text ("[1]\[0]" hash)
+ ["[0]" text ("[1]#[0]" hash)
["%" format {"+" [format]}]
[encoding
["[0]" utf8]]]
[collection
- ["[0]" list ("[1]\[0]" functor)]
+ ["[0]" list ("[1]#[0]" functor)]
["[0]" row]]]
["[0]" macro
[syntax {"+" [syntax:]}]
@@ -76,7 +76,7 @@
[ids (monad.all ! (list.repeated (list.size vars) meta.seed))]
(in (list (` (let [(~+ (|> vars
(list.zipped/2 ids)
- (list\each (function (_ [id var])
+ (list#each (function (_ [id var])
(list (code.local_identifier var)
(` (_.var (~ (code.text (format "v" (%.nat id)))))))))
list.together))]
@@ -111,8 +111,8 @@
{.#Right [name inputs]}
(macro.with_identifiers [g!_]
(let [g!name (code.local_identifier name)
- inputsC (list\each code.local_identifier inputs)
- inputs_typesC (list\each (function.constant (` _.Expression))
+ inputsC (list#each code.local_identifier inputs)
+ inputs_typesC (list#each (function.constant (` _.Expression))
inputs)]
(in (list (` (def: .public ((~ g!name) (~+ inputsC))
(-> (~+ inputs_typesC) Computation)
@@ -124,7 +124,7 @@
(function ((~ g!_) (~ g!_))
(..with_vars [(~+ inputsC)]
(_.define_function (~ g!_)
- (list (~+ (list\each (|>> (~) [false] (`)) inputsC)))
+ (list (~+ (list#each (|>> (~) [false] (`)) inputsC)))
(~ code))))))))))))))))
(runtime: (io//log! message)
@@ -607,4 +607,4 @@
(row.row [..module_id
(|> ..runtime
_.code
- (\ utf8.codec encoded))])])))
+ (# utf8.codec encoded))])])))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/structure.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/structure.lux
index 8e1a366a8..bcc64b14d 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/structure.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/structure.lux
@@ -15,13 +15,13 @@
[analysis {"+" [Variant Tuple]}]
["[1][0]" synthesis {"+" [Synthesis]}]
["//[1]" /// "_"
- ["[1][0]" phase ("[1]\[0]" monad)]]]])
+ ["[1][0]" phase ("[1]#[0]" monad)]]]])
(def: .public (tuple expression archive elemsS+)
(Generator (Tuple Synthesis))
(case elemsS+
{.#End}
- (///////phase\in (//primitive.text /////synthesis.unit))
+ (///////phase#in (//primitive.text /////synthesis.unit))
{.#Item singletonS {.#End}}
(expression archive singletonS)
@@ -30,7 +30,7 @@
(let [size (_.int (.int (list.size elemsS+)))]
(|> elemsS+
(monad.each ///////phase.monad (expression archive))
- (///////phase\each (|>> _.array/*
+ (///////phase#each (|>> _.array/*
(//runtime.tuple//make size)))))))
(def: .public (variant expression archive [lefts right? valueS])
@@ -38,5 +38,5 @@
(let [tag (if right?
(++ lefts)
lefts)]
- (///////phase\each (//runtime.variant tag right?)
+ (///////phase#each (//runtime.variant tag right?)
(expression archive valueS))))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python.lux
index deca2222f..a1235130d 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python.lux
@@ -26,7 +26,7 @@
[analysis {"+" []}]
["[1][0]" synthesis]
["//[1]" /// "_"
- ["[1][0]" phase ("[1]\[0]" monad)]
+ ["[1][0]" phase ("[1]#[0]" monad)]
[reference {"+" []}
[variable {"+" []}]]]]]]])
@@ -37,7 +37,7 @@
(case synthesis
(^template [<tag> <generator>]
[(^ (<tag> value))
- (//////phase\in (<generator> value))])
+ (//////phase#in (<generator> value))])
([////synthesis.bit /primitive.bit]
[////synthesis.i64 /primitive.i64]
[////synthesis.f64 /primitive.f64]
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 6b6e2ff74..04e0fdfba 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
@@ -7,7 +7,7 @@
["[0]" text
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" functor mix)]
+ ["[0]" list ("[1]#[0]" functor mix)]
["[0]" set]]]
[math
[number
@@ -30,13 +30,13 @@
["//[1]" /// "_"
[reference
["[1][0]" variable {"+" [Register]}]]
- ["[1][0]" phase ("[1]\[0]" monad)]
+ ["[1][0]" phase ("[1]#[0]" monad)]
[meta
[archive {"+" [Archive]}]]]]]]])
(def: .public (identifier prefix)
(-> Text (Operation SVar))
- (///////phase\each (|>> %.nat (format prefix) _.var)
+ (///////phase#each (|>> %.nat (format prefix) _.var)
/////generation.next))
(def: .public register
@@ -88,7 +88,7 @@
(Generator [(List Member) Synthesis])
(do ///////phase.monad
[valueO (expression archive valueS)]
- (in (list\mix (function (_ side source)
+ (in (list#mix (function (_ side source)
(.let [method (.case side
(^template [<side> <accessor>]
[(<side> lefts)
@@ -200,7 +200,7 @@
[{<tag> item}
(do [! ///////phase.monad]
[clauses (monad.each ! (function (_ [match then])
- (\ ! each
+ (# ! each
(|>> [(_.= (|> match <format>)
..peek)])
(recur then)))
@@ -212,7 +212,7 @@
[/////synthesis.#Text_Fork (<| //primitive.text)])
_
- (\ ///////phase.monad in {.#None})))
+ (# ///////phase.monad in {.#None})))
(def: (pattern_matching' in_closure? statement expression archive)
(-> Bit Phase! Phase Archive Path (Operation (Statement Any)))
@@ -229,35 +229,35 @@
(statement expression archive bodyS)
{/////synthesis.#Pop}
- (///////phase\in ..pop!)
+ (///////phase#in ..pop!)
{/////synthesis.#Bind register}
- (///////phase\in (_.set (list (..register register)) ..peek))
+ (///////phase#in (_.set (list (..register register)) ..peek))
(^template [<complex> <simple> <choice>]
[(^ (<complex> idx))
- (///////phase\in (<choice> false idx))
+ (///////phase#in (<choice> false idx))
(^ (<simple> idx nextP))
(|> nextP
recur
- (///////phase\each (_.then (<choice> true idx))))])
+ (///////phase#each (_.then (<choice> true idx))))])
([/////synthesis.side/left /////synthesis.simple_left_side ..left_choice]
[/////synthesis.side/right /////synthesis.simple_right_side ..right_choice])
(^ (/////synthesis.member/left 0))
- (///////phase\in (|> ..peek (_.item (_.int +0)) ..push!))
+ (///////phase#in (|> ..peek (_.item (_.int +0)) ..push!))
(^template [<pm> <getter>]
[(^ (<pm> lefts))
- (///////phase\in (|> ..peek (<getter> (_.int (.int lefts))) ..push!))])
+ (///////phase#in (|> ..peek (<getter> (_.int (.int lefts))) ..push!))])
([/////synthesis.member/left //runtime.tuple::left]
[/////synthesis.member/right //runtime.tuple::right])
(^ (/////synthesis.!bind_top register thenP))
(do !
[then! (recur thenP)]
- (///////phase\in ($_ _.then
+ (///////phase#in ($_ _.then
(_.set (list (..register register)) ..peek_and_pop)
then!)))
@@ -265,7 +265,7 @@
(.let [[extra_pops nextP'] (case.count_pops nextP)]
(do !
[next! (recur nextP')]
- (///////phase\in ($_ _.then
+ (///////phase#in ($_ _.then
(..multi_pop! (n.+ 2 extra_pops))
next!))))
@@ -300,7 +300,7 @@
(|>> case.storage
(value@ case.#dependencies)
set.list
- (list\each (function (_ variable)
+ (list#each (function (_ variable)
(.case variable
{///////variable.#Local register}
(..register register)
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 bbb9fbd00..00eb7732f 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
@@ -8,7 +8,7 @@
[text
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" functor mix)]]]
+ ["[0]" list ("[1]#[0]" functor mix)]]]
[target
["_" python {"+" [SVar Expression Statement]}]]]]
["[0]" // "_"
@@ -55,7 +55,7 @@
(do [! ///////phase.monad]
[.let [directive (_.def @function
(|> (list.enumeration inits)
- (list\each (|>> product.left ..capture)))
+ (list#each (|>> product.left ..capture)))
($_ _.then
function_definition
(_.return @function)))]
@@ -80,7 +80,7 @@
apply_poly (.function (_ args func)
(_.apply_poly (list) args func))
initialize_self! (_.set (list (//case.register 0)) @self)
- initialize! (list\mix (.function (_ post pre!)
+ initialize! (list#mix (.function (_ post pre!)
($_ _.then
pre!
(_.set (list (..input post)) (_.item (|> post .int _.int) @curried))))
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 066149a79..2eae48279 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
@@ -8,7 +8,7 @@
[text
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" functor mix)]
+ ["[0]" list ("[1]#[0]" functor mix)]
["[0]" set]]]
[math
[number
@@ -35,11 +35,11 @@
(-> Register (List (Expression Any)) (Statement Any) (Statement Any))
(|> bindings
list.enumeration
- (list\each (function (_ [register value])
+ (list#each (function (_ [register value])
(_.set (list (//case.register (n.+ offset register)))
value)))
list.reversed
- (list\mix _.then body)))
+ (list#mix _.then body)))
(def: .public (set_scope body!)
(-> (Statement Any) (Statement Any))
@@ -81,7 +81,7 @@
.let [@loop (_.var (///reference.artifact [loop_module loop_artifact]))
locals (|> initsS+
list.enumeration
- (list\each (|>> product.left (n.+ start) //case.register)))
+ (list#each (|>> product.left (n.+ start) //case.register)))
actual_loop (<| (_.def @loop locals)
..set_scope
body!)
@@ -114,7 +114,7 @@
argsO+ (monad.each ! (expression archive) argsS+)
.let [re_binds (|> argsO+
list.enumeration
- (list\each (function (_ [idx _])
+ (list#each (function (_ [idx _])
(_.item (_.int (.int idx)) @temp))))]]
(in ($_ _.then
(_.set (list @temp) (_.list argsO+))
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 e72faad54..a6b9decab 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
@@ -10,12 +10,12 @@
["<[0]>" code]]]
[data
["[0]" product]
- ["[0]" text ("[1]\[0]" hash)
+ ["[0]" text ("[1]#[0]" hash)
["%" format {"+" [format]}]
[encoding
["[0]" utf8]]]
[collection
- ["[0]" list ("[1]\[0]" functor)]
+ ["[0]" list ("[1]#[0]" functor)]
["[0]" row]]]
["[0]" macro
[syntax {"+" [syntax:]}]
@@ -102,7 +102,7 @@
(-> Text SVar)
(let [identifier (format ..prefix
"_" (%.nat $.version)
- "_" (%.nat (text\hash name)))]
+ "_" (%.nat (text#hash name)))]
(_.var identifier)))
(def: (feature name definition)
@@ -115,7 +115,7 @@
[ids (monad.all ! (list.repeated (list.size vars) meta.seed))]
(in (list (` (let [(~+ (|> vars
(list.zipped/2 ids)
- (list\each (function (_ [id var])
+ (list#each (function (_ [id var])
(list (code.local_identifier var)
(` (_.var (~ (code.text (format "v" (%.nat id)))))))))
list.together))]
@@ -143,8 +143,8 @@
(let [nameC (code.local_identifier name)
code_nameC (code.local_identifier (format "@" name))
runtime_nameC (` (runtime_name (~ (code.text name))))
- inputsC (list\each code.local_identifier inputs)
- inputs_typesC (list\each (function.constant (` (_.Expression Any)))
+ inputsC (list#each code.local_identifier inputs)
+ inputs_typesC (list#each (function.constant (` (_.Expression Any)))
inputs)]
(in (list (` (def: .public ((~ nameC) (~+ inputsC))
(-> (~+ inputs_typesC) (Computation Any))
@@ -457,4 +457,4 @@
{.#None}
(|> ..runtime
_.code
- (\ utf8.codec encoded))])])))
+ (# utf8.codec encoded))])])))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/structure.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/structure.lux
index 86c429347..86fe0b77c 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/structure.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/structure.lux
@@ -12,13 +12,13 @@
[analysis {"+" [Variant Tuple]}]
["[1][0]" synthesis {"+" [Synthesis]}]
["//[1]" /// "_"
- ["[1][0]" phase ("[1]\[0]" monad)]]]])
+ ["[1][0]" phase ("[1]#[0]" monad)]]]])
(def: .public (tuple generate archive elemsS+)
(Generator (Tuple Synthesis))
(case elemsS+
{.#End}
- (///////phase\in (//primitive.text /////synthesis.unit))
+ (///////phase#in (//primitive.text /////synthesis.unit))
{.#Item singletonS {.#End}}
(generate archive singletonS)
@@ -26,12 +26,12 @@
_
(|> elemsS+
(monad.each ///////phase.monad (generate archive))
- (///////phase\each _.list))))
+ (///////phase#each _.list))))
(def: .public (variant generate archive [lefts right? valueS])
(Generator (Variant Synthesis))
(let [tag (if right?
(++ lefts)
lefts)]
- (///////phase\each (//runtime.variant tag right?)
+ (///////phase#each (//runtime.variant tag right?)
(generate archive valueS))))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r.lux
index 5438a0266..8ef9f3f20 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r.lux
@@ -21,7 +21,7 @@
[analysis {"+" []}]
["[1][0]" synthesis]
["//[1]" /// "_"
- ["[1][0]" phase ("[1]\[0]" monad)]
+ ["[1][0]" phase ("[1]#[0]" monad)]
[reference {"+" []}
[variable {"+" []}]]]]]]])
@@ -30,7 +30,7 @@
(case synthesis
(^template [<tag> <generator>]
[(^ (<tag> value))
- (//////phase\in (<generator> value))])
+ (//////phase#in (<generator> value))])
([////synthesis.bit /primitive.bit]
[////synthesis.i64 /primitive.i64]
[////synthesis.f64 /primitive.f64]
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 e99973e60..7f711dc98 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
@@ -8,7 +8,7 @@
["[0]" text
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" functor mix)]
+ ["[0]" list ("[1]#[0]" functor mix)]
["[0]" set]]]
[macro
["[0]" template]]
@@ -32,7 +32,7 @@
["//[1]" /// "_"
[reference
["[1][0]" variable {"+" [Register]}]]
- ["[1][0]" phase ("[1]\[0]" monad)]
+ ["[1][0]" phase ("[1]#[0]" monad)]
[meta
[archive {"+" [Archive]}]]]]]]])
@@ -66,7 +66,7 @@
(Generator [(List Member) Synthesis])
(do ///////phase.monad
[valueO (expression archive valueS)]
- (in (list\mix (function (_ side source)
+ (in (list#mix (function (_ side source)
(.let [method (.case side
(^template [<side> <accessor>]
[(<side> lefts)
@@ -139,10 +139,10 @@
(expression archive bodyS)
{/////synthesis.#Pop}
- (///////phase\in ..pop_cursor!)
+ (///////phase#in ..pop_cursor!)
{/////synthesis.#Bind register}
- (///////phase\in (_.set! (..register register) ..peek))
+ (///////phase#in (_.set! (..register register) ..peek))
{/////synthesis.#Bit_Fork when thenP elseP}
(do [! ///////phase.monad]
@@ -171,7 +171,7 @@
..peek)
then!])))
{.#Item item})]
- (in (list\mix (function (_ [when then] else)
+ (in (list#mix (function (_ [when then] else)
(_.if when then else))
..fail!
clauses)))])
@@ -181,7 +181,7 @@
(^template [<pm> <flag> <prep>]
[(^ (<pm> idx))
- (///////phase\in ($_ _.then
+ (///////phase#in ($_ _.then
(_.set! $temp (|> idx <prep> .int _.int (//runtime.sum::get ..peek (//runtime.flag <flag>))))
(_.if (_.= _.null $temp)
..fail!
@@ -190,11 +190,11 @@
[/////synthesis.side/right true ++])
(^ (/////synthesis.member/left 0))
- (///////phase\in (_.item (_.int +1) ..peek))
+ (///////phase#in (_.item (_.int +1) ..peek))
(^template [<pm> <getter>]
[(^ (<pm> lefts))
- (///////phase\in (|> ..peek (<getter> (_.int (.int lefts))) ..push_cursor!))])
+ (///////phase#in (|> ..peek (<getter> (_.int (.int lefts))) ..push_cursor!))])
([/////synthesis.member/left //runtime.tuple::left]
[/////synthesis.member/right //runtime.tuple::right])
@@ -233,7 +233,7 @@
(Generator [Synthesis Path])
(do [! ///////phase.monad]
[valueO (expression archive valueS)]
- (<| (\ ! each (|>> ($_ _.then
+ (<| (# ! each (|>> ($_ _.then
(_.set! $cursor (_.list (list valueO)))
(_.set! $savepoint (_.list (list))))
_.block))
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 8d049ba86..662561521 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
@@ -10,7 +10,7 @@
["[0]" text
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" functor mix)]]]
+ ["[0]" list ("[1]#[0]" functor mix)]]]
[target
["_" r {"+" [Expression SVar]}]]]]
["[0]" // "_"
@@ -25,7 +25,7 @@
["[1][0]" generation {"+" [Context]}]
["//[1]" /// "_"
[arity {"+" [Arity]}]
- ["[1][0]" phase ("[1]\[0]" monad)]
+ ["[1][0]" phase ("[1]#[0]" monad)]
[reference
[variable {"+" [Register Variable]}]]
[meta
@@ -55,7 +55,7 @@
(_.function (|> inits
list.size
list.indices
- (list\each //case.capture))
+ (list#each //case.capture))
($_ _.then
function_definition
$function)))]
@@ -76,7 +76,7 @@
(do [! ///////phase.monad]
[[[function_module function_artifact] bodyO] (/////generation.with_new_context archive
(do !
- [$self (\ ! each (|>> ///reference.artifact _.var)
+ [$self (# ! each (|>> ///reference.artifact _.var)
(/////generation.context archive))]
(/////generation.with_anchor $self
(expression archive bodyS))))
@@ -96,8 +96,8 @@
(_.set! (//case.register 0) $self)
(|> arity
list.indices
- (list\each input_declaration)
- (list\mix _.then bodyO)))]
+ (list#each input_declaration)
+ (list#mix _.then bodyO)))]
[(|> $num_args (_.> arityO))
(let [arity_args (_.slice (_.int +1) arityO $curried)
output_func_args (_.slice (|> arityO (_.+ (_.int +1)))
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 d0cb917a6..d66028cb7 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
@@ -8,7 +8,7 @@
["[0]" text
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" functor)]
+ ["[0]" list ("[1]#[0]" functor)]
["[0]" set {"+" [Set]}]]]
[math
[number
@@ -43,7 +43,7 @@
... true loop
_
(do [! ///////phase.monad]
- [$scope (\ ! each _.var (/////generation.identifier "loop_scope"))
+ [$scope (# ! each _.var (/////generation.identifier "loop_scope"))
initsO+ (monad.each ! (expression archive) initsS+)
bodyO (/////generation.with_anchor $scope
(expression archive bodyS))]
@@ -53,7 +53,7 @@
(_.function (|> initsS+
list.size
list.indices
- (list\each (|>> (n.+ offset) //case.register)))
+ (list#each (|>> (n.+ offset) //case.register)))
bodyO))
(_.apply initsO+ $scope)))))))
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 01d69d81b..6611c77c4 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
@@ -10,12 +10,12 @@
["<[0]>" code]]]
[data
["[0]" product]
- ["[0]" text ("[1]\[0]" hash)
+ ["[0]" text ("[1]#[0]" hash)
["%" format {"+" [format]}]
[encoding
["[0]" utf8]]]
[collection
- ["[0]" list ("[1]\[0]" functor)]
+ ["[0]" list ("[1]#[0]" functor)]
["[0]" row]]]
["[0]" macro
[syntax {"+" [syntax:]}]
@@ -23,7 +23,7 @@
[math
[number {"+" [hex]}
["n" nat]
- ["i" int ("[1]\[0]" interval)]
+ ["i" int ("[1]#[0]" interval)]
["[0]" i64]]]
["@" target
["_" r {"+" [SVar Expression]}]]]]
@@ -82,7 +82,7 @@
[ids (monad.all ! (list.repeated (list.size vars) meta.seed))]
(in (list (` (let [(~+ (|> vars
(list.zipped/2 ids)
- (list\each (function (_ [id var])
+ (list#each (function (_ [id var])
(list (code.local_identifier var)
(` (_.var (~ (code.text (format "v" (%.nat id)))))))))
list.together))]
@@ -110,8 +110,8 @@
{.#Right [name inputs]}
(let [g!name (code.local_identifier name)
- inputsC (list\each code.local_identifier inputs)
- inputs_typesC (list\each (function.constant (` _.Expression))
+ inputsC (list#each code.local_identifier inputs)
+ inputs_typesC (list#each (function.constant (` _.Expression))
inputs)]
(in (list (` (def: .public ((~ g!name) (~+ inputsC))
(-> (~+ inputs_typesC) _.Expression)
@@ -223,8 +223,8 @@
[i64::zero +0]
[i64::one +1]
- [i64::min i\bottom]
- [i64::max i\top]
+ [i64::min i#bottom]
+ [i64::max i#top]
)
(def: .public i64_high (_.item (_.string ..i64_high_field)))
@@ -842,4 +842,4 @@
(row.row [(%.nat ..module_id)
(|> ..runtime
_.code
- (\ utf8.codec encoded))])])))
+ (# utf8.codec encoded))])])))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/structure.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/structure.lux
index bafd70383..d28a83f8d 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/structure.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/structure.lux
@@ -15,13 +15,13 @@
[analysis {"+" [Variant Tuple]}]
["[1][0]" synthesis {"+" [Synthesis]}]
["//[1]" /// "_"
- ["[1][0]" phase ("[1]\[0]" monad)]]]])
+ ["[1][0]" phase ("[1]#[0]" monad)]]]])
(def: .public (tuple expression archive elemsS+)
(Generator (Tuple Synthesis))
(case elemsS+
{.#End}
- (///////phase\in (//primitive.text /////synthesis.unit))
+ (///////phase#in (//primitive.text /////synthesis.unit))
{.#Item singletonS {.#End}}
(expression archive singletonS)
@@ -29,12 +29,12 @@
_
(|> elemsS+
(monad.each ///////phase.monad (expression archive))
- (///////phase\each _.list))))
+ (///////phase#each _.list))))
(def: .public (variant expression archive [lefts right? valueS])
(Generator (Variant Synthesis))
(let [tag (if right?
(++ lefts)
lefts)]
- (///////phase\each (|>> (//runtime.variant tag right?))
+ (///////phase#each (|>> (//runtime.variant tag right?))
(expression archive valueS))))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/reference.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/reference.lux
index 2a456eba4..dfb11895a 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/reference.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/reference.lux
@@ -11,7 +11,7 @@
["//[1]" /// "_"
["[0]" reference {"+" [Reference]}
["[0]" variable {"+" [Register Variable]}]]
- ["[0]" phase ("[1]\[0]" monad)]
+ ["[0]" phase ("[1]#[0]" monad)]
[meta
[archive {"+" [Archive]}]]]])
@@ -55,7 +55,7 @@
(All (_ anchor expression directive)
(-> (System expression) Archive Name
(////generation.Operation anchor expression directive expression)))
- (phase\each (|>> ..artifact (\ system constant))
+ (phase#each (|>> ..artifact (# system constant))
(////generation.remember archive name)))
(template [<sigil> <name>]
@@ -63,7 +63,7 @@
(All (_ expression)
(-> (System expression)
(-> Register expression)))
- (|>> %.nat (format <sigil>) (\ system variable)))]
+ (|>> %.nat (format <sigil>) (# system variable)))]
["f" foreign]
["l" local]
@@ -87,4 +87,4 @@
(..constant system archive value)
{reference.#Variable value}
- (phase\in (..variable system value))))
+ (phase#in (..variable system value))))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby.lux
index d2027e419..b8dd0c621 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby.lux
@@ -26,7 +26,7 @@
[analysis {"+" []}]
["[1][0]" synthesis]
["//[1]" /// "_"
- ["[1][0]" phase ("[1]\[0]" monad)]
+ ["[1][0]" phase ("[1]#[0]" monad)]
[reference {"+" []}
[variable {"+" []}]]]]]]])
@@ -37,7 +37,7 @@
(case synthesis
(^template [<tag> <generator>]
[(^ (<tag> value))
- (//////phase\in (<generator> value))])
+ (//////phase#in (<generator> value))])
([////synthesis.bit /primitive.bit]
[////synthesis.i64 /primitive.i64]
[////synthesis.f64 /primitive.f64]
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 31fd8da27..b37e129ae 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
@@ -9,7 +9,7 @@
["[0]" text
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" functor mix)]
+ ["[0]" list ("[1]#[0]" functor mix)]
["[0]" set]]]
[math
[number
@@ -32,13 +32,13 @@
["//[1]" /// "_"
[reference
["[1][0]" variable {"+" [Register]}]]
- ["[1][0]" phase ("[1]\[0]" monad)]
+ ["[1][0]" phase ("[1]#[0]" monad)]
[meta
[archive {"+" [Archive]}]]]]]]])
(def: .public (identifier prefix)
(-> Text (Operation LVar))
- (///////phase\each (|>> %.nat (format prefix) _.local) /////generation.next))
+ (///////phase#each (|>> %.nat (format prefix) _.local) /////generation.next))
(def: .public register
(-> Register LVar)
@@ -90,7 +90,7 @@
(Generator [(List Member) Synthesis])
(do ///////phase.monad
[valueO (expression archive valueS)]
- (in (list\mix (function (_ side source)
+ (in (list#mix (function (_ side source)
(.let [method (.case side
(^template [<side> <accessor>]
[{<side> lefts}
@@ -209,7 +209,7 @@
[{<tag> item}
(do [! ///////phase.monad]
[clauses (monad.each ! (function (_ [match then])
- (\ ! each
+ (# ! each
(|>> [(_.= (|> match <format>)
..peek)])
(recur then)))
@@ -221,7 +221,7 @@
[/////synthesis.#Text_Fork (<| //primitive.text)])
_
- (\ ///////phase.monad in {.#None})))
+ (# ///////phase.monad in {.#None})))
(def: (pattern_matching' in_closure? statement expression archive)
(-> Bit (Generator! Path))
@@ -238,10 +238,10 @@
(statement expression archive bodyS)
{/////synthesis.#Pop}
- (///////phase\in ..pop!)
+ (///////phase#in ..pop!)
{/////synthesis.#Bind register}
- (///////phase\in (_.set (list (..register register)) ..peek))
+ (///////phase#in (_.set (list (..register register)) ..peek))
{/////synthesis.#Bit_Fork when thenP elseP}
(do [! ///////phase.monad]
@@ -264,7 +264,7 @@
[{<tag> item}
(do [! ///////phase.monad]
[clauses (monad.each ! (function (_ [match then])
- (\ ! each
+ (# ! each
(|>> [(_.= (|> match <format>)
..peek)])
(recur then)))
@@ -277,28 +277,28 @@
(^template [<complex> <simple> <choice>]
[(^ (<complex> idx))
- (///////phase\in (<choice> false idx))
+ (///////phase#in (<choice> false idx))
(^ (<simple> idx nextP))
(|> nextP
recur
- (///////phase\each (_.then (<choice> true idx))))])
+ (///////phase#each (_.then (<choice> true idx))))])
([/////synthesis.side/left /////synthesis.simple_left_side ..left_choice]
[/////synthesis.side/right /////synthesis.simple_right_side ..right_choice])
(^ (/////synthesis.member/left 0))
- (///////phase\in (|> ..peek (_.item (_.int +0)) ..push!))
+ (///////phase#in (|> ..peek (_.item (_.int +0)) ..push!))
(^template [<pm> <getter>]
[(^ (<pm> lefts))
- (///////phase\in (|> ..peek (<getter> (_.int (.int lefts))) ..push!))])
+ (///////phase#in (|> ..peek (<getter> (_.int (.int lefts))) ..push!))])
([/////synthesis.member/left //runtime.tuple//left]
[/////synthesis.member/right //runtime.tuple//right])
(^ (/////synthesis.!bind_top register thenP))
(do ///////phase.monad
[then! (recur thenP)]
- (///////phase\in ($_ _.then
+ (///////phase#in ($_ _.then
(_.set (list (..register register)) ..peek_and_pop)
then!)))
@@ -306,7 +306,7 @@
(.let [[extra_pops nextP'] (case.count_pops nextP)]
(do ///////phase.monad
[next! (recur nextP')]
- (///////phase\in ($_ _.then
+ (///////phase#in ($_ _.then
(..multi_pop! (n.+ 2 extra_pops))
next!))))
@@ -352,6 +352,6 @@
(-> Phase! (Generator [Synthesis Path]))
(|> case
(case! true statement expression archive)
- (\ ///////phase.monad each
+ (# ///////phase.monad each
(|>> (_.lambda {.#None} (list))
(_.apply_lambda/* (list))))))
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 b067a3319..2fd93bdf3 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
@@ -8,7 +8,7 @@
[text
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" functor mix)]]]
+ ["[0]" list ("[1]#[0]" functor mix)]]]
[target
["_" ruby {"+" [LVar GVar Expression Statement]}]]]]
["[0]" // "_"
@@ -54,7 +54,7 @@
(let [@self (_.local self)]
[(_.function @self
(|> (list.enumeration inits)
- (list\each (|>> product.left ..capture)))
+ (list#each (|>> product.left ..capture)))
($_ _.then
(_.set (list @self) function_definition)
(_.return @self)))
@@ -77,7 +77,7 @@
@num_args (_.local "num_args")
@self (_.local function_name)
initialize_self! (_.set (list (//case.register 0)) @self)
- initialize! (list\mix (.function (_ post pre!)
+ initialize! (list#mix (.function (_ post pre!)
($_ _.then
pre!
(_.set (list (..input post)) (_.item (|> post .int _.int) @curried))))
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 b6be81745..91eb9d7aa 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
@@ -8,7 +8,7 @@
["[0]" text
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" functor mix)]
+ ["[0]" list ("[1]#[0]" functor mix)]
["[0]" set]]]
[math
[number
@@ -35,11 +35,11 @@
(-> Register (List Expression) Statement Statement)
(|> bindings
list.enumeration
- (list\each (function (_ [register value])
+ (list#each (function (_ [register value])
(_.set (list (//case.register (n.+ offset register)))
value)))
list.reversed
- (list\mix _.then body)))
+ (list#mix _.then body)))
(def: symbol
(_.symbol "lux_continue"))
@@ -88,7 +88,7 @@
argsO+ (monad.each ! (expression archive) argsS+)
.let [re_binds (|> argsO+
list.enumeration
- (list\each (function (_ [idx _])
+ (list#each (function (_ [idx _])
(_.item (_.int (.int idx)) @temp))))]]
(in ($_ _.then
(_.set (list @temp) (_.array argsO+))
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 c10550d39..9f28d622e 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
@@ -10,12 +10,12 @@
["<[0]>" code]]]
[data
["[0]" product]
- ["[0]" text ("[1]\[0]" hash)
+ ["[0]" text ("[1]#[0]" hash)
["%" format {"+" [format]}]
[encoding
["[0]" utf8]]]
[collection
- ["[0]" list ("[1]\[0]" functor)]
+ ["[0]" list ("[1]#[0]" functor)]
["[0]" row]]]
["[0]" macro
[syntax {"+" [syntax:]}]
@@ -77,7 +77,7 @@
[ids (monad.all ! (list.repeated (list.size vars) meta.seed))]
(in (list (` (let [(~+ (|> vars
(list.zipped/2 ids)
- (list\each (function (_ [id var])
+ (list#each (function (_ [id var])
(list (code.local_identifier var)
(` (_.local (~ (code.text (format "v" (%.nat id)))))))))
list.together))]
@@ -109,8 +109,8 @@
{.#Right [name inputs]}
(macro.with_identifiers [g!_]
(let [g!name (code.local_identifier name)
- inputsC (list\each code.local_identifier inputs)
- inputs_typesC (list\each (function.constant (` _.Expression))
+ inputsC (list#each code.local_identifier inputs)
+ inputs_typesC (list#each (function.constant (` _.Expression))
inputs)]
(in (list (` (def: .public ((~ g!name) (~+ inputsC))
(-> (~+ inputs_typesC) Computation)
@@ -401,4 +401,4 @@
{.#None}
(|> ..runtime
_.code
- (\ utf8.codec encoded))])])))
+ (# utf8.codec encoded))])])))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/structure.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/structure.lux
index e3f1e558a..cc645f541 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/structure.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/structure.lux
@@ -12,13 +12,13 @@
[analysis {"+" [Variant Tuple]}]
["[1][0]" synthesis {"+" [Synthesis]}]
["//[1]" /// "_"
- ["[1][0]" phase ("[1]\[0]" monad)]]]])
+ ["[1][0]" phase ("[1]#[0]" monad)]]]])
(def: .public (tuple generate archive elemsS+)
(Generator (Tuple Synthesis))
(case elemsS+
{.#End}
- (///////phase\in (//primitive.text /////synthesis.unit))
+ (///////phase#in (//primitive.text /////synthesis.unit))
{.#Item singletonS {.#End}}
(generate archive singletonS)
@@ -26,12 +26,12 @@
_
(|> elemsS+
(monad.each ///////phase.monad (generate archive))
- (///////phase\each _.array))))
+ (///////phase#each _.array))))
(def: .public (variant generate archive [lefts right? valueS])
(Generator (Variant Synthesis))
(let [tag (if right?
(++ lefts)
lefts)]
- (///////phase\each (//runtime.variant tag right?)
+ (///////phase#each (//runtime.variant tag right?)
(generate archive valueS))))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme.lux
index 26c13742e..48a923dd6 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme.lux
@@ -21,7 +21,7 @@
[analysis {"+" []}]
["[1][0]" synthesis]
["//[1]" /// "_"
- ["[1][0]" phase ("[1]\[0]" monad)]
+ ["[1][0]" phase ("[1]#[0]" monad)]
[reference {"+" []}
[variable {"+" []}]]]]]]])
@@ -30,7 +30,7 @@
(case synthesis
(^template [<tag> <generator>]
[(^ (<tag> value))
- (//////phase\in (<generator> value))])
+ (//////phase#in (<generator> value))])
([////synthesis.bit /primitive.bit]
[////synthesis.i64 /primitive.i64]
[////synthesis.f64 /primitive.f64]
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 e2bdad616..d603237c4 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
@@ -8,7 +8,7 @@
["[0]" text
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" functor mix)]
+ ["[0]" list ("[1]#[0]" functor mix)]
["[0]" set]]]
[macro
["[0]" template]]
@@ -32,7 +32,7 @@
["//[1]" /// "_"
[reference
["[1][0]" variable {"+" [Register]}]]
- ["[1][0]" phase ("[1]\[0]" monad)]
+ ["[1][0]" phase ("[1]#[0]" monad)]
[meta
[archive {"+" [Archive]}]]]]]]])
@@ -64,7 +64,7 @@
(Generator [(List Member) Synthesis])
(do ///////phase.monad
[valueO (expression archive valueS)]
- (in (list\mix (function (_ side source)
+ (in (list#mix (function (_ side source)
(.let [method (.case side
(^template [<side> <accessor>]
[(<side> lefts)
@@ -133,10 +133,10 @@
(expression archive bodyS)
{/////synthesis.#Pop}
- (///////phase\in pop_cursor!)
+ (///////phase#in pop_cursor!)
{/////synthesis.#Bind register}
- (///////phase\in (_.define_constant (..register register) ..peek))
+ (///////phase#in (_.define_constant (..register register) ..peek))
{/////synthesis.#Bit_Fork when thenP elseP}
(do [! ///////phase.monad]
@@ -165,7 +165,7 @@
..peek)
then!])))
{.#Item item})]
- (in (list\mix (function (_ [when then] else)
+ (in (list#mix (function (_ [when then] else)
(_.if when then else))
..fail!
clauses)))])
@@ -175,7 +175,7 @@
(^template [<pm> <flag> <prep>]
[(^ (<pm> idx))
- (///////phase\in (_.let (list [@temp (|> idx <prep> .int _.int (//runtime.sum//get ..peek (_.bool <flag>)))])
+ (///////phase#in (_.let (list [@temp (|> idx <prep> .int _.int (//runtime.sum//get ..peek (_.bool <flag>)))])
(_.if (_.null?/1 @temp)
..fail!
(push_cursor! @temp))))])
@@ -183,11 +183,11 @@
[/////synthesis.side/right true ++])
(^ (/////synthesis.member/left 0))
- (///////phase\in (..push_cursor! (_.vector_ref/2 ..peek (_.int +0))))
+ (///////phase#in (..push_cursor! (_.vector_ref/2 ..peek (_.int +0))))
(^template [<pm> <getter>]
[(^ (<pm> lefts))
- (///////phase\in (|> ..peek (<getter> (_.int (.int lefts))) ..push_cursor!))])
+ (///////phase#in (|> ..peek (<getter> (_.int (.int lefts))) ..push_cursor!))])
([/////synthesis.member/left //runtime.tuple//left]
[/////synthesis.member/right //runtime.tuple//right])
@@ -210,7 +210,7 @@
(def: (pattern_matching expression archive pathP)
(Generator Path)
- (\ ///////phase.monad each
+ (# ///////phase.monad each
(try_pm (_.raise/1 (_.string "Invalid expression for pattern-matching.")))
(pattern_matching' expression archive pathP)))
@@ -218,6 +218,6 @@
(Generator [Synthesis Path])
(do [! ///////phase.monad]
[valueO (expression archive valueS)]
- (<| (\ ! each (_.let (list [@cursor (_.list/* (list valueO))]
+ (<| (# ! each (_.let (list [@cursor (_.list/* (list valueO))]
[@savepoint (_.list/* (list))])))
(pattern_matching expression archive pathP))))
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 27ca252f9..63c916eae 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
@@ -13,7 +13,7 @@
[number {"+" [hex]}
["f" frac]]
[collection
- ["[0]" list ("[1]\[0]" functor)]
+ ["[0]" list ("[1]#[0]" functor)]
["dict" dictionary {"+" [Dictionary]}]]]
["[0]" macro {"+" [with_identifiers]}
["[0]" code]
@@ -51,7 +51,7 @@
(^ (list (~+ g!input+)))
(do /////.monad
[(~+ (|> g!input+
- (list\each (function (_ g!input)
+ (list#each (function (_ g!input)
(list g!input (` ((~ g!phase) (~ g!input))))))
list.together))]
((~' in) ((~ g!extension) [(~+ g!input+)])))
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 f45da0eaa..fb0127577 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
@@ -10,7 +10,7 @@
["[0]" text
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" functor)]]]
+ ["[0]" list ("[1]#[0]" functor)]]]
[target
["_" scheme {"+" [Expression Computation Var]}]]]]
["[0]" // "_"
@@ -25,7 +25,7 @@
["[1][0]" generation {"+" [Context]}]
["//[1]" /// "_"
[arity {"+" [Arity]}]
- ["[1][0]" phase ("[1]\[0]" monad)]
+ ["[1][0]" phase ("[1]#[0]" monad)]
[reference
[variable {"+" [Register Variable]}]]]]]])
@@ -42,7 +42,7 @@
(def: (with_closure inits function_definition)
(-> (List Expression) Computation (Operation Computation))
- (///////phase\in
+ (///////phase#in
(case inits
{.#End}
function_definition
@@ -50,7 +50,7 @@
_
(|> function_definition
(_.lambda [(|> (list.enumeration inits)
- (list\each (|>> product.left ..capture)))
+ (list#each (|>> product.left ..capture)))
{.#None}])
(_.apply/* inits)))))
@@ -65,7 +65,7 @@
(do [! ///////phase.monad]
[[function_name bodyO] (/////generation.with_new_context archive
(do !
- [@self (\ ! each (|>> ///reference.artifact _.var)
+ [@self (# ! each (|>> ///reference.artifact _.var)
(/////generation.context archive))]
(/////generation.with_anchor @self
(expression archive bodyS))))
@@ -81,7 +81,7 @@
(<| (_.if (|> @num_args (_.=/2 arityO))
(<| (_.let (list [(//case.register 0) @self]))
(_.let_values (list [[(|> (list.indices arity)
- (list\each ..input))
+ (list#each ..input))
{.#None}]
(_.apply/2 (_.var "apply") (_.var "values") @curried)]))
bodyO))
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 4718eca95..fbec9f534 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
@@ -8,7 +8,7 @@
["[0]" text
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" functor)]
+ ["[0]" list ("[1]#[0]" functor)]
["[0]" set {"+" [Set]}]]]
[math
[number
@@ -51,7 +51,7 @@
(expression archive bodyS))]
(in (_.letrec (list [@scope (_.lambda [(|> initsS+
list.enumeration
- (list\each (|>> product.left (n.+ start) //case.register)))
+ (list#each (|>> product.left (n.+ start) //case.register)))
{.#None}]
bodyO)])
(_.apply/* initsO+ @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 1d15137f9..2b0006269 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
@@ -10,12 +10,12 @@
["<[0]>" code]]]
[data
["[0]" product]
- ["[0]" text ("[1]\[0]" hash)
+ ["[0]" text ("[1]#[0]" hash)
["%" format {"+" [format]}]
[encoding
["[0]" utf8]]]
[collection
- ["[0]" list ("[1]\[0]" functor)]
+ ["[0]" list ("[1]#[0]" functor)]
["[0]" row]]]
["[0]" macro
[syntax {"+" [syntax:]}]
@@ -64,7 +64,7 @@
[ids (monad.all ! (list.repeated (list.size vars) meta.seed))]
(in (list (` (let [(~+ (|> vars
(list.zipped/2 ids)
- (list\each (function (_ [id var])
+ (list#each (function (_ [id var])
(list (code.local_identifier var)
(` (_.var (~ (code.text (format "v" (%.nat id)))))))))
list.together))]
@@ -92,8 +92,8 @@
{.#Right [name inputs]}
(let [g!name (code.local_identifier name)
- inputsC (list\each code.local_identifier inputs)
- inputs_typesC (list\each (function.constant (` _.Expression))
+ inputsC (list#each code.local_identifier inputs)
+ inputs_typesC (list#each (function.constant (` _.Expression))
inputs)]
(in (list (` (def: .public ((~ g!name) (~+ inputsC))
(-> (~+ inputs_typesC) _.Computation)
@@ -367,4 +367,4 @@
(row.row [(%.nat ..module_id)
(|> ..runtime
_.code
- (\ utf8.codec encoded))])])))
+ (# utf8.codec encoded))])])))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/structure.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/structure.lux
index d23bf422b..e06ff9743 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/structure.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/structure.lux
@@ -15,13 +15,13 @@
[analysis {"+" [Variant Tuple]}]
["[1][0]" synthesis {"+" [Synthesis]}]
["//[1]" /// "_"
- ["[1][0]" phase ("[1]\[0]" monad)]]]])
+ ["[1][0]" phase ("[1]#[0]" monad)]]]])
(def: .public (tuple expression archive elemsS+)
(Generator (Tuple Synthesis))
(case elemsS+
{.#End}
- (///////phase\in (//primitive.text /////synthesis.unit))
+ (///////phase#in (//primitive.text /////synthesis.unit))
{.#Item singletonS {.#End}}
(expression archive singletonS)
@@ -29,12 +29,12 @@
_
(|> elemsS+
(monad.each ///////phase.monad (expression archive))
- (///////phase\each _.vector/*))))
+ (///////phase#each _.vector/*))))
(def: .public (variant expression archive [lefts right? valueS])
(Generator (Variant Synthesis))
(let [tag (if right?
(++ lefts)
lefts)]
- (///////phase\each (|>> [tag right?] //runtime.variant)
+ (///////phase#each (|>> [tag right?] //runtime.variant)
(expression archive valueS))))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis.lux
index f7a4d8078..c3531d0fe 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis.lux
@@ -8,7 +8,7 @@
["[0]" try]]
[data
[collection
- ["[0]" list ("[1]\[0]" functor)]
+ ["[0]" list ("[1]#[0]" functor)]
["[0]" dictionary {"+" [Dictionary]}]]]]]
["[0]" / "_"
["[1][0]" function]
@@ -20,7 +20,7 @@
["[1][0]" analysis {"+" [Analysis]}]
["/" synthesis {"+" [Synthesis Phase]}]
[///
- ["[0]" phase ("[1]\[0]" monad)]
+ ["[0]" phase ("[1]#[0]" monad)]
[reference {"+" []}
[variable {"+" []}]]]]]])
@@ -49,10 +49,10 @@
(function (optimization' analysis)
(case analysis
{///analysis.#Primitive analysis'}
- (phase\in {/.#Primitive (..primitive analysis')})
+ (phase#in {/.#Primitive (..primitive analysis')})
{///analysis.#Reference reference}
- (phase\in {/.#Reference reference})
+ (phase#in {/.#Reference reference})
{///analysis.#Structure structure}
(/.with_currying? false
@@ -65,7 +65,7 @@
{///analysis.#Tuple tuple}
(|> tuple
(monad.each phase.monad optimization')
- (phase\each (|>> /.tuple)))))
+ (phase#each (|>> /.tuple)))))
{///analysis.#Case inputA branchesAB+}
(/.with_currying? false
@@ -92,7 +92,7 @@
{try.#Failure _}
(|> args
(monad.each phase.monad optimization')
- (phase\each (|>> [name] {/.#Extension}))
+ (phase#each (|>> [name] {/.#Extension}))
(phase.result' state))))))
)))
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 a2cb2403a..8beed67e5 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
@@ -8,22 +8,22 @@
[pipe {"+" [when> new> case>]}]]
[data
["[0]" product]
- ["[0]" bit ("[1]\[0]" equivalence)]
- ["[0]" text ("[1]\[0]" equivalence)]
+ ["[0]" bit ("[1]#[0]" equivalence)]
+ ["[0]" text ("[1]#[0]" equivalence)]
[collection
- ["[0]" list ("[1]\[0]" functor mix monoid)]
+ ["[0]" list ("[1]#[0]" functor mix monoid)]
["[0]" set {"+" [Set]}]]]
[math
[number
["n" nat]
["[0]" i64]
- ["[0]" frac ("[1]\[0]" equivalence)]]]]]
+ ["[0]" frac ("[1]#[0]" equivalence)]]]]]
["[0]" /// "_"
[//
["[1][0]" analysis {"+" [Pattern Match Analysis]}]
["/" synthesis {"+" [Path Synthesis Operation Phase]}]
[///
- ["[1]" phase ("[1]\[0]" monad)]
+ ["[1]" phase ("[1]#[0]" monad)]
["[1][0]" reference
["[1]/[0]" variable {"+" [Register Variable]}]]
[meta
@@ -42,13 +42,13 @@
thenC
{///analysis.#Bit when}
- (///\each (function (_ then)
+ (///#each (function (_ then)
{/.#Bit_Fork when then {.#None}})
thenC)
(^template [<from> <to> <conversion>]
[{<from> test}
- (///\each (function (_ then)
+ (///#each (function (_ then)
{<to> [(<conversion> test) then] (list)})
thenC)])
([///analysis.#Nat /.#I64_Fork .i64]
@@ -58,21 +58,21 @@
[///analysis.#Text /.#Text_Fork |>]))
{///analysis.#Bind register}
- (<| (\ ///.monad each (|>> {/.#Seq {/.#Bind register}}))
+ (<| (# ///.monad each (|>> {/.#Seq {/.#Bind register}}))
/.with_new_local
thenC)
{///analysis.#Complex {///analysis.#Variant [lefts right? value_pattern]}}
- (<| (///\each (|>> {/.#Seq {/.#Access {/.#Side (if right?
+ (<| (///#each (|>> {/.#Seq {/.#Access {/.#Side (if right?
{.#Right lefts}
{.#Left lefts})}}}))
(path' value_pattern end?)
- (when> [(new> (not end?) [])] [(///\each ..clean_up)])
+ (when> [(new> (not end?) [])] [(///#each ..clean_up)])
thenC)
{///analysis.#Complex {///analysis.#Tuple tuple}}
(let [tuple::last (-- (list.size tuple))]
- (list\mix (function (_ [tuple::lefts tuple::member] nextC)
+ (list#mix (function (_ [tuple::lefts tuple::member] nextC)
(.case tuple::member
{///analysis.#Simple {///analysis.#Unit}}
nextC
@@ -80,11 +80,11 @@
_
(let [right? (n.= tuple::last tuple::lefts)
end?' (and end? right?)]
- (<| (///\each (|>> {/.#Seq {/.#Access {/.#Member (if right?
+ (<| (///#each (|>> {/.#Seq {/.#Access {/.#Member (if right?
{.#Right (-- tuple::lefts)}
{.#Left tuple::lefts})}}}))
(path' tuple::member end?')
- (when> [(new> (not end?') [])] [(///\each ..clean_up)])
+ (when> [(new> (not end?') [])] [(///#each ..clean_up)])
nextC))))
thenC
(list.reversed (list.enumeration tuple))))
@@ -92,12 +92,12 @@
(def: (path archive synthesize pattern bodyA)
(-> Archive Phase Pattern Analysis (Operation Path))
- (path' pattern true (///\each (|>> {/.#Then}) (synthesize archive bodyA))))
+ (path' pattern true (///#each (|>> {/.#Then}) (synthesize archive bodyA))))
(def: (weave_branch weave equivalence [new_test new_then] [[old_test old_then] old_tail])
(All (_ a) (-> (-> Path Path Path) (Equivalence a) [a Path] (/.Fork a Path)
(/.Fork a Path)))
- (if (\ equivalence = new_test old_test)
+ (if (# equivalence = new_test old_test)
[[old_test (weave new_then old_then)] old_tail]
[[old_test old_then]
(case old_tail
@@ -110,7 +110,7 @@
(def: (weave_fork weave equivalence new_fork old_fork)
(All (_ a) (-> (-> Path Path Path) (Equivalence a) (/.Fork a Path) (/.Fork a Path)
(/.Fork a Path)))
- (list\mix (..weave_branch weave equivalence) old_fork {.#Item new_fork}))
+ (list#mix (..weave_branch weave equivalence) old_fork {.#Item new_fork}))
(def: (weave new old)
(-> Path Path Path)
@@ -135,7 +135,7 @@
[{/.#Bit_Fork new_when new_then new_else}
{/.#Bit_Fork old_when old_then old_else}]
- (if (bit\= new_when old_when)
+ (if (bit#= new_when old_when)
{/.#Bit_Fork old_when
(weave new_then old_then)
(case [new_else old_else]
@@ -228,7 +228,7 @@
(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+)]))))
+ (in (/.branch/case [input (list#mix weave headSP tailSP+)]))))
(template: (!masking <variable> <output>)
[[[{///analysis.#Bind <variable>}
@@ -245,7 +245,7 @@
(def: .public (synthesize_masking synthesize archive input @variable @output)
(-> Phase Archive Synthesis Register Register (Operation Synthesis))
(if (n.= @variable @output)
- (///\in input)
+ (///#in input)
(..synthesize_let synthesize archive input @variable {///analysis.#Reference (///reference.local @output)})))
(def: .public (synthesize_if synthesize archive test then else)
@@ -269,10 +269,10 @@
path
(case input
(^ (/.branch/get [sub_path sub_input]))
- (///\in (/.branch/get [(list\composite path sub_path) sub_input]))
+ (///#in (/.branch/get [(list#composite path sub_path) sub_input]))
_
- (///\in (/.branch/get [path input])))))
+ (///#in (/.branch/get [path input])))))
(def: .public (synthesize synthesize^ [headB tailB+] archive inputA)
(-> Phase Match Phase)
@@ -359,12 +359,12 @@
{/.#F64_Fork forks}
{/.#Text_Fork forks})
(|> {.#Item forks}
- (list\each product.right)
- (list\mix for_path path_storage))
+ (list#each product.right)
+ (list#mix for_path path_storage))
(^or (^ (/.path/seq left right))
(^ (/.path/alt left right)))
- (list\mix for_path path_storage (list left right))
+ (list#mix for_path path_storage (list left right))
(^ (/.path/then bodyS))
(loop for_synthesis
@@ -375,7 +375,7 @@
(for_synthesis valueS synthesis_storage)
(^ (/.tuple members))
- (list\mix for_synthesis synthesis_storage members)
+ (list#mix for_synthesis synthesis_storage members)
{/.#Reference {///reference.#Variable {///reference/variable.#Local register}}}
(if (set.member? (value@ #bindings synthesis_storage) register)
@@ -386,10 +386,10 @@
(revised@ #dependencies (set.has var) synthesis_storage)
(^ (/.function/apply [functionS argsS]))
- (list\mix for_synthesis synthesis_storage {.#Item functionS argsS})
+ (list#mix for_synthesis synthesis_storage {.#Item functionS argsS})
(^ (/.function/abstraction [environment arity bodyS]))
- (list\mix for_synthesis synthesis_storage environment)
+ (list#mix for_synthesis synthesis_storage environment)
(^ (/.branch/case [inputS pathS]))
(revised@ #dependencies
@@ -405,7 +405,7 @@
(for_synthesis inputS synthesis_storage))
(^ (/.branch/if [testS thenS elseS]))
- (list\mix for_synthesis synthesis_storage (list testS thenS elseS))
+ (list#mix for_synthesis synthesis_storage (list testS thenS elseS))
(^ (/.branch/get [access whole]))
(for_synthesis whole synthesis_storage)
@@ -415,17 +415,17 @@
(set.union (|> synthesis_storage
(revised@ #bindings (set.union (|> initsS+
list.enumeration
- (list\each (|>> product.left (n.+ start)))
+ (list#each (|>> product.left (n.+ start)))
(set.of_list n.hash))))
(for_synthesis iterationS)
(value@ #dependencies)))
- (list\mix for_synthesis synthesis_storage initsS+))
+ (list#mix for_synthesis synthesis_storage initsS+))
(^ (/.loop/recur replacementsS+))
- (list\mix for_synthesis synthesis_storage replacementsS+)
+ (list#mix for_synthesis synthesis_storage replacementsS+)
{/.#Extension [extension argsS]}
- (list\mix for_synthesis synthesis_storage argsS)
+ (list#mix for_synthesis synthesis_storage argsS)
_
synthesis_storage))
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 09725f153..347527c3d 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
@@ -6,13 +6,13 @@
["[0]" enum]]
[control
[pipe {"+" [case>]}]
- ["[0]" maybe ("[1]\[0]" functor)]
+ ["[0]" maybe ("[1]#[0]" functor)]
["[0]" exception {"+" [exception:]}]]
[data
["[0]" text
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" functor monoid)]]]
+ ["[0]" list ("[1]#[0]" functor monoid)]]]
[math
[number
["n" nat]]]]]
@@ -25,7 +25,7 @@
[arity {"+" [Arity]}]
["[1][0]" reference
["[1]/[0]" variable {"+" [Register Variable]}]]
- ["[0]" phase ("[1]\[0]" monad)]]]])
+ ["[0]" phase ("[1]#[0]" monad)]]]])
(exception: .public (cannot_find_foreign_variable_in_environment [foreign Register
environment (Environment Synthesis)])
@@ -37,7 +37,7 @@
(-> Arity (List Synthesis))
(|>> --
(enum.range n.enum 1)
- (list\each (|>> /.variable/local))))
+ (list#each (|>> /.variable/local))))
(template: .public (self_reference)
[(/.variable/local 0)])
@@ -62,7 +62,7 @@
[locals /.locals]
(in (|> functionS
(//loop.optimization true locals argsS)
- (maybe\each (: (-> [Nat (List Synthesis) Synthesis] Synthesis)
+ (maybe#each (: (-> [Nat (List Synthesis) Synthesis] Synthesis)
(function (_ [start inits iteration])
(case iteration
(^ (/.loop/scope [start' inits' output]))
@@ -77,7 +77,7 @@
(in <apply>))
(^ (/.function/apply [funcS' argsS']))
- (in (/.function/apply [funcS' (list\composite argsS' argsS)]))
+ (in (/.function/apply [funcS' (list#composite argsS' argsS)]))
_
(in <apply>)))))))
@@ -86,7 +86,7 @@
(-> (Environment Synthesis) Register (Operation Synthesis))
(case (list.item register environment)
{.#Some aliased}
- (phase\in aliased)
+ (phase#in aliased)
{.#None}
(phase.except ..cannot_find_foreign_variable_in_environment [register environment])))
@@ -95,7 +95,7 @@
(-> (-> Synthesis (Operation Synthesis)) Path (Operation Path))
(case path
{/.#Bind register}
- (phase\in {/.#Bind (++ register)})
+ (phase#in {/.#Bind (++ register)})
(^template [<tag>]
[{<tag> left right}
@@ -110,7 +110,7 @@
[then (grow_path grow then)
else (case else
{.#Some else}
- (\ ! each (|>> {.#Some}) (grow_path grow else))
+ (# ! each (|>> {.#Some}) (grow_path grow else))
{.#None}
(in {.#None}))]
@@ -133,10 +133,10 @@
{/.#Then thenS}
(|> thenS
grow
- (phase\each (|>> {/.#Then})))
+ (phase#each (|>> {/.#Then})))
_
- (phase\in path)))
+ (phase#in path)))
(def: (grow environment expression)
(-> (Environment Synthesis) Synthesis (Operation Synthesis))
@@ -146,28 +146,28 @@
{////analysis.#Variant [lefts right? subS]}
(|> subS
(grow environment)
- (phase\each (|>> [lefts right?] /.variant)))
+ (phase#each (|>> [lefts right?] /.variant)))
{////analysis.#Tuple membersS+}
(|> membersS+
(monad.each phase.monad (grow environment))
- (phase\each (|>> /.tuple))))
+ (phase#each (|>> /.tuple))))
(^ (..self_reference))
- (phase\in (/.function/apply [expression (list (/.variable/local 1))]))
+ (phase#in (/.function/apply [expression (list (/.variable/local 1))]))
{/.#Reference reference}
(case reference
{////reference.#Variable variable}
(case variable
{////reference/variable.#Local register}
- (phase\in (/.variable/local (++ register)))
+ (phase#in (/.variable/local (++ register)))
{////reference/variable.#Foreign register}
(..find_foreign environment register))
{////reference.#Constant constant}
- (phase\in expression))
+ (phase#in expression))
{/.#Control control}
(case control
@@ -208,7 +208,7 @@
{/.#Recur argumentsS+}
(|> argumentsS+
(monad.each phase.monad (grow environment))
- (phase\each (|>> /.loop/recur))))
+ (phase#each (|>> /.loop/recur))))
{/.#Function function}
(case function
@@ -230,7 +230,7 @@
(in (/.function/apply (case funcS
(^ (/.function/apply [(..self_reference) pre_argsS+]))
[(..self_reference)
- (list\composite pre_argsS+ argsS+)]
+ (list#composite pre_argsS+ argsS+)]
_
[funcS
@@ -239,10 +239,10 @@
{/.#Extension name argumentsS+}
(|> argumentsS+
(monad.each phase.monad (grow environment))
- (phase\each (|>> {/.#Extension name})))
+ (phase#each (|>> {/.#Extension name})))
{/.#Primitive _}
- (phase\in expression)))
+ (phase#in expression)))
(def: .public (abstraction phase environment archive bodyA)
(-> Phase (Environment Analysis) Phase)
@@ -257,7 +257,7 @@
(^ (/.function/abstraction [env' down_arity' bodyS']))
(|> bodyS'
(grow env')
- (\ ! each (function (_ body)
+ (# ! each (function (_ body)
[/.#environment environment
/.#arity (++ down_arity')
/.#body body])))
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 b994bd92e..eb8f7e4cb 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
@@ -4,7 +4,7 @@
[abstract
["[0]" monad {"+" [do]}]]
[control
- ["[0]" maybe ("[1]\[0]" monad)]]
+ ["[0]" maybe ("[1]#[0]" monad)]]
[data
[collection
["[0]" list]]]
@@ -46,7 +46,7 @@
[then (recur then)
else (case else
{.#Some else}
- (\ ! each (|>> {.#Some}) (recur else))
+ (# ! each (|>> {.#Some}) (recur else))
{.#None}
(in {.#None}))]
@@ -69,7 +69,7 @@
{/.#Then body}
(|> body
body_optimization
- (maybe\each (|>> {/.#Then})))
+ (maybe#each (|>> {/.#Then})))
_
{.#Some path})))
@@ -94,7 +94,7 @@
{analysis.#Tuple tuple}
(|> tuple
(monad.each maybe.monad (recur false))
- (maybe\each (|>> /.tuple))))
+ (maybe#each (|>> /.tuple))))
{/.#Reference reference}
(case reference
@@ -151,7 +151,7 @@
(^ (/.loop/recur args))
(|> args
(monad.each maybe.monad (recur false))
- (maybe\each (|>> /.loop/recur)))
+ (maybe#each (|>> /.loop/recur)))
(^ (/.function/abstraction [environment arity body]))
(do [! maybe.monad]
@@ -200,10 +200,10 @@
{/.#Extension [name args]}
(|> args
(monad.each maybe.monad (recur false))
- (maybe\each (|>> [name] {/.#Extension}))))))
+ (maybe#each (|>> [name] {/.#Extension}))))))
(def: .public (optimization true_loop? offset inits functionS)
(-> Bit Register (List Synthesis) Abstraction (Maybe [Register (List Synthesis) Synthesis]))
(|> (value@ /.#body functionS)
(body_optimization true_loop? offset (value@ /.#environment functionS) (value@ /.#arity functionS))
- (maybe\each (|>> [offset inits]))))
+ (maybe#each (|>> [offset inits]))))
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 75647203b..303671914 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
@@ -4,7 +4,7 @@
[abstract
["[0]" monad {"+" [do]}]]
[control
- ["[0]" maybe ("[1]\[0]" functor)]
+ ["[0]" maybe ("[1]#[0]" functor)]
["[0]" try {"+" [Try]}]
["[0]" exception {"+" [exception:]}]]
[data
@@ -13,7 +13,7 @@
["%" format]]
[collection
["[0]" dictionary {"+" [Dictionary]}]
- ["[0]" list ("[1]\[0]" functor mix)]
+ ["[0]" list ("[1]#[0]" functor mix)]
["[0]" set]]]
[math
[number
@@ -71,12 +71,12 @@
[/.#Alt])
{/.#Bit_Fork when then else}
- {/.#Bit_Fork when (recur then) (maybe\each recur else)}
+ {/.#Bit_Fork when (recur then) (maybe#each recur else)}
(^template [<tag>]
[{<tag> [[test then] tail]}
{<tag> [[test (recur then)]
- (list\each (function (_ [test' then'])
+ (list#each (function (_ [test' then'])
[test' (recur then')])
tail)]}])
([/.#I64_Fork]
@@ -116,7 +116,7 @@
{analysis.#Variant [lefts right (recur value)]}
{analysis.#Tuple tuple}
- {analysis.#Tuple (list\each recur tuple)})}
+ {analysis.#Tuple (list#each recur tuple)})}
{/.#Reference reference}
(case reference
@@ -148,24 +148,24 @@
{/.#Loop (case loop
{/.#Scope [start inits iteration]}
{/.#Scope [(..prune redundant start)
- (list\each recur inits)
+ (list#each recur inits)
(recur iteration)]}
{/.#Recur resets}
- {/.#Recur (list\each recur resets)})}
+ {/.#Recur (list#each recur resets)})}
{/.#Function function}
{/.#Function (case function
{/.#Abstraction [environment arity body]}
- {/.#Abstraction [(list\each recur environment)
+ {/.#Abstraction [(list#each recur environment)
arity
body]}
{/.#Apply abstraction inputs}
- {/.#Apply (recur abstraction) (list\each recur inputs)})})}
+ {/.#Apply (recur abstraction) (list#each recur inputs)})})}
{/.#Extension name inputs}
- {/.#Extension name (list\each recur inputs)})))
+ {/.#Extension name (list#each recur inputs)})))
(type: Redundancy
(Dictionary Register Bit))
@@ -179,9 +179,9 @@
(def: (extended offset amount redundancy)
(-> Register Nat Redundancy [(List Register) Redundancy])
- (let [extension (|> amount list.indices (list\each (n.+ offset)))]
+ (let [extension (|> amount list.indices (list#each (n.+ offset)))]
[extension
- (list\mix (function (_ register redundancy)
+ (list#mix (function (_ register redundancy)
(dictionary.has register ..necessary! redundancy))
redundancy
extension)]))
@@ -239,7 +239,7 @@
(%.Format Redundancy)
(|> redundancy
dictionary.entries
- (list\each (function (_ [register redundant?])
+ (list#each (function (_ [register redundant?])
(%.format (%.nat register) ": " (%.bit redundant?))))
(text.interposed ", ")))
@@ -257,7 +257,7 @@
[[redundancy then] (recur [redundancy then])
[redundancy else] (case else
{.#Some else}
- (\ ! each
+ (# ! each
(function (_ [redundancy else])
[redundancy {.#Some else}])
(recur [redundancy else]))
@@ -309,11 +309,11 @@
(list.only (function (_ [register redundant?])
(and (set.member? bindings register)
redundant?)))
- (list\each product.left))]]
- (in [(list\mix dictionary.lacks redundancy (set.list bindings))
+ (list#each product.left))]]
+ (in [(list#mix dictionary.lacks redundancy (set.list bindings))
(|> redundants
(list.sorted n.>)
- (list\mix (..remove_local_from_path ..remove_local) {/.#Seq pre post}))]))
+ (list#mix (..remove_local_from_path ..remove_local) {/.#Seq pre post}))]))
{/.#Then then}
(do try.monad
@@ -405,7 +405,7 @@
[[redundancy inits] (..list_optimization optimization' [redundancy inits])
.let [[extension redundancy] (..extended start (list.size inits) redundancy)]
[redundancy iteration] (optimization' [redundancy iteration])]
- (in [(list\mix dictionary.lacks redundancy extension)
+ (in [(list#mix dictionary.lacks redundancy extension)
{/.#Control {/.#Loop {/.#Scope [start inits iteration]}}}]))
{/.#Recur resets}
@@ -440,4 +440,4 @@
(-> Synthesis (Try Synthesis))
(|>> [..initial]
optimization'
- (\ try.monad each product.right)))
+ (# try.monad each product.right)))
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 cd3bb3f30..fc13a5999 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/program.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/program.lux
@@ -12,7 +12,7 @@
[text
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" functor)]]]]]
+ ["[0]" list ("[1]#[0]" functor)]]]]]
[//
[generation {"+" [Context]}]
[///
@@ -53,5 +53,5 @@
{.#None}
(|> registries
- (list\each (|>> product.left product.left))
+ (list#each (|>> product.left product.left))
(exception.except ..cannot_find_program)))))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/syntax.lux b/stdlib/source/library/lux/tool/compiler/language/lux/syntax.lux
index 68df640bf..340c71298 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/syntax.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/syntax.lux
@@ -336,7 +336,7 @@
[(case (|> <source_code>
(!clip <start> <end>)
(text.replaced ..digit_separator "")
- (\ <codec> decoded))
+ (# <codec> decoded))
{.#Right output}
{.#Right [[(let [[where::file where::line where::column] where]
[where::file where::line (!n/+ (!n/- <start> <end>) where::column)])
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/synthesis.lux b/stdlib/source/library/lux/tool/compiler/language/lux/synthesis.lux
index ad940f809..7888c15f3 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/synthesis.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/synthesis.lux
@@ -12,11 +12,11 @@
[data
["[0]" sum]
["[0]" product]
- ["[0]" bit ("[1]\[0]" equivalence)]
- ["[0]" text ("[1]\[0]" equivalence)
+ ["[0]" bit ("[1]#[0]" equivalence)]
+ ["[0]" text ("[1]#[0]" equivalence)
["%" format {"+" [Format format]}]]
[collection
- ["[0]" list ("[1]\[0]" functor)]
+ ["[0]" list ("[1]#[0]" functor)]
["[0]" dictionary {"+" [Dictionary]}]]]
[math
[number
@@ -292,7 +292,7 @@
(^template [<tag> <format>]
[{<tag> item}
(|> {.#Item item}
- (list\each (function (_ [test then])
+ (list#each (function (_ [test then])
(format (<format> test) " " (%path' %then then))))
(text.interposed " ")
(text.enclosed ["(? " ")"]))])
@@ -355,7 +355,7 @@
{analysis.#Tuple members}
(|> members
- (list\each %synthesis)
+ (list#each %synthesis)
(text.interposed " ")
(text.enclosed ["[" "]"])))
@@ -368,7 +368,7 @@
(case function
{#Abstraction [environment arity body]}
(let [environment' (|> environment
- (list\each %synthesis)
+ (list#each %synthesis)
(text.interposed " ")
(text.enclosed ["[" "]"]))]
(|> (format environment' " " (%.nat arity) " " (%synthesis body))
@@ -376,7 +376,7 @@
{#Apply func args}
(|> args
- (list\each %synthesis)
+ (list#each %synthesis)
(text.interposed " ")
(format (%synthesis func) " ")
(text.enclosed ["(" ")"])))
@@ -393,7 +393,7 @@
{#Get members record}
(|> (format (%.list (%path' %synthesis)
- (list\each (|>> {#Member} {#Access}) members))
+ (list#each (|>> {#Member} {#Access}) members))
" " (%synthesis record))
(text.enclosed ["{#get " "}"]))
@@ -406,7 +406,7 @@
{#Scope scope}
(|> (format (%.nat (value@ #start scope))
" " (|> (value@ #inits scope)
- (list\each %synthesis)
+ (list#each %synthesis)
(text.interposed " ")
(text.enclosed ["[" "]"]))
" " (%synthesis (value@ #iteration scope)))
@@ -414,12 +414,12 @@
{#Recur args}
(|> args
- (list\each %synthesis)
+ (list#each %synthesis)
(text.interposed " ")
(text.enclosed ["{#recur " "}"]))))
{#Extension [name args]}
- (|> (list\each %synthesis args)
+ (|> (list#each %synthesis args)
(text.interposed " ")
(format (%.text name) " ")
(text.enclosed ["(" ")"]))))
@@ -436,9 +436,9 @@
(^template [<tag> <eq> <format>]
[[{<tag> reference'} {<tag> sample'}]
(<eq> reference' sample')])
- ([#Bit bit\= %.bit]
+ ([#Bit bit#= %.bit]
[#F64 f.= %.frac]
- [#Text text\= %.text])
+ [#Text text#= %.text])
[{#I64 reference'} {#I64 sample'}]
(i.= (.int reference') (.int sample'))
@@ -454,7 +454,7 @@
(def: hash
(|>> (case> (^template [<tag> <hash>]
[{<tag> value'}
- (\ <hash> hash value')])
+ (# <hash> hash value')])
([#Bit bit.hash]
[#F64 f.hash]
[#Text text.hash]
@@ -479,7 +479,7 @@
(case [reference sample]
(^template [<tag> <equivalence>]
[[{<tag> reference} {<tag> sample}]
- (\ <equivalence> = reference sample)])
+ (# <equivalence> = reference sample)])
([#Side ..side_equivalence]
[#Member ..member_equivalence])
@@ -496,7 +496,7 @@
(case value
(^template [<tag>]
[{<tag> value}
- (\ sub_hash hash value)])
+ (# sub_hash hash value)])
([#Side]
[#Member])))))
@@ -510,14 +510,14 @@
[{#Bit_Fork reference_when reference_then reference_else}
{#Bit_Fork sample_when sample_then sample_else}]
- (and (bit\= reference_when sample_when)
+ (and (bit#= reference_when sample_when)
(= reference_then sample_then)
- (\ (maybe.equivalence =) = reference_else sample_else))
+ (# (maybe.equivalence =) = reference_else sample_else))
(^template [<tag> <equivalence>]
[[{<tag> reference_item}
{<tag> sample_item}]
- (\ (list.equivalence (product.equivalence <equivalence> =)) =
+ (# (list.equivalence (product.equivalence <equivalence> =)) =
{.#Item reference_item}
{.#Item sample_item})])
([#I64_Fork i64.equivalence]
@@ -526,7 +526,7 @@
(^template [<tag> <equivalence>]
[[{<tag> reference'} {<tag> sample'}]
- (\ <equivalence> = reference' sample')])
+ (# <equivalence> = reference' sample')])
([#Access ..access_equivalence]
[#Then equivalence])
@@ -547,7 +547,7 @@
(All (_ a) (-> (Hash a) (Hash (Path' a))))
(def: &equivalence
- (..path'_equivalence (\ super &equivalence)))
+ (..path'_equivalence (# super &equivalence)))
(def: (hash value)
(case value
@@ -555,23 +555,23 @@
2
{#Access access}
- (n.* 3 (\ ..access_hash hash access))
+ (n.* 3 (# ..access_hash hash access))
{#Bind register}
- (n.* 5 (\ n.hash hash register))
+ (n.* 5 (# n.hash hash register))
{#Bit_Fork when then else}
($_ n.* 7
- (\ bit.hash hash when)
+ (# bit.hash hash when)
(hash then)
- (\ (maybe.hash (path'_hash super)) hash else))
+ (# (maybe.hash (path'_hash super)) hash else))
(^template [<factor> <tag> <hash>]
[{<tag> item}
(let [case_hash (product.hash <hash>
(path'_hash super))
item_hash (product.hash case_hash (list.hash case_hash))]
- (n.* <factor> (\ item_hash hash item)))])
+ (n.* <factor> (# item_hash hash item)))])
([11 #I64_Fork i64.hash]
[13 #F64_Fork f.hash]
[17 #Text_Fork text.hash])
@@ -580,40 +580,40 @@
[{<tag> fork}
(let [recur_hash (path'_hash super)
fork_hash (product.hash recur_hash recur_hash)]
- (n.* <factor> (\ fork_hash hash fork)))])
+ (n.* <factor> (# fork_hash hash fork)))])
([19 #Alt]
[23 #Seq])
{#Then body}
- (n.* 29 (\ super hash body))
+ (n.* 29 (# super hash body))
)))
-(implementation: (branch_equivalence (^open "\[0]"))
+(implementation: (branch_equivalence (^open "#[0]"))
(All (_ a) (-> (Equivalence a) (Equivalence (Branch a))))
(def: (= reference sample)
(case [reference sample]
[{#Let [reference_input reference_register reference_body]}
{#Let [sample_input sample_register sample_body]}]
- (and (\= reference_input sample_input)
+ (and (#= reference_input sample_input)
(n.= reference_register sample_register)
- (\= reference_body sample_body))
+ (#= reference_body sample_body))
[{#If [reference_test reference_then reference_else]}
{#If [sample_test sample_then sample_else]}]
- (and (\= reference_test sample_test)
- (\= reference_then sample_then)
- (\= reference_else sample_else))
+ (and (#= reference_test sample_test)
+ (#= reference_then sample_then)
+ (#= reference_else sample_else))
[{#Get [reference_path reference_record]}
{#Get [sample_path sample_record]}]
- (and (\ (list.equivalence ..member_equivalence) = reference_path sample_path)
- (\= reference_record sample_record))
+ (and (# (list.equivalence ..member_equivalence) = reference_path sample_path)
+ (#= reference_record sample_record))
[{#Case [reference_input reference_path]}
{#Case [sample_input sample_path]}]
- (and (\= reference_input sample_input)
- (\ (path'_equivalence \=) = reference_path sample_path))
+ (and (#= reference_input sample_input)
+ (# (path'_equivalence #=) = reference_path sample_path))
_
false)))
@@ -622,34 +622,34 @@
(All (_ a) (-> (Hash a) (Hash (Branch a))))
(def: &equivalence
- (..branch_equivalence (\ super &equivalence)))
+ (..branch_equivalence (# super &equivalence)))
(def: (hash value)
(case value
{#Let [input register body]}
($_ n.* 2
- (\ super hash input)
- (\ n.hash hash register)
- (\ super hash body))
+ (# super hash input)
+ (# n.hash hash register)
+ (# super hash body))
{#If [test then else]}
($_ n.* 3
- (\ super hash test)
- (\ super hash then)
- (\ super hash else))
+ (# super hash test)
+ (# super hash then)
+ (# super hash else))
{#Get [path record]}
($_ n.* 5
- (\ (list.hash ..member_hash) hash path)
- (\ super hash record))
+ (# (list.hash ..member_hash) hash path)
+ (# super hash record))
{#Case [input path]}
($_ n.* 7
- (\ super hash input)
- (\ (..path'_hash super) hash path))
+ (# super hash input)
+ (# (..path'_hash super) hash path))
)))
-(implementation: (loop_equivalence (^open "\[0]"))
+(implementation: (loop_equivalence (^open "#[0]"))
(All (_ a) (-> (Equivalence a) (Equivalence (Loop a))))
(def: (= reference sample)
@@ -657,11 +657,11 @@
[{#Scope [reference_start reference_inits reference_iteration]}
{#Scope [sample_start sample_inits sample_iteration]}]
(and (n.= reference_start sample_start)
- (\ (list.equivalence \=) = reference_inits sample_inits)
- (\= reference_iteration sample_iteration))
+ (# (list.equivalence #=) = reference_inits sample_inits)
+ (#= reference_iteration sample_iteration))
[{#Recur reference} {#Recur sample}]
- (\ (list.equivalence \=) = reference sample)
+ (# (list.equivalence #=) = reference sample)
_
false)))
@@ -670,36 +670,36 @@
(All (_ a) (-> (Hash a) (Hash (Loop a))))
(def: &equivalence
- (..loop_equivalence (\ super &equivalence)))
+ (..loop_equivalence (# super &equivalence)))
(def: (hash value)
(case value
{#Scope [start inits iteration]}
($_ n.* 2
- (\ n.hash hash start)
- (\ (list.hash super) hash inits)
- (\ super hash iteration))
+ (# n.hash hash start)
+ (# (list.hash super) hash inits)
+ (# super hash iteration))
{#Recur resets}
($_ n.* 3
- (\ (list.hash super) hash resets))
+ (# (list.hash super) hash resets))
)))
-(implementation: (function_equivalence (^open "\[0]"))
+(implementation: (function_equivalence (^open "#[0]"))
(All (_ a) (-> (Equivalence a) (Equivalence (Function a))))
(def: (= reference sample)
(case [reference sample]
[{#Abstraction [reference_environment reference_arity reference_body]}
{#Abstraction [sample_environment sample_arity sample_body]}]
- (and (\ (list.equivalence \=) = reference_environment sample_environment)
+ (and (# (list.equivalence #=) = reference_environment sample_environment)
(n.= reference_arity sample_arity)
- (\= reference_body sample_body))
+ (#= reference_body sample_body))
[{#Apply [reference_abstraction reference_arguments]}
{#Apply [sample_abstraction sample_arguments]}]
- (and (\= reference_abstraction sample_abstraction)
- (\ (list.equivalence \=) = reference_arguments sample_arguments))
+ (and (#= reference_abstraction sample_abstraction)
+ (# (list.equivalence #=) = reference_arguments sample_arguments))
_
false)))
@@ -708,30 +708,30 @@
(All (_ a) (-> (Hash a) (Hash (Function a))))
(def: &equivalence
- (..function_equivalence (\ super &equivalence)))
+ (..function_equivalence (# super &equivalence)))
(def: (hash value)
(case value
{#Abstraction [environment arity body]}
($_ n.* 2
- (\ (list.hash super) hash environment)
- (\ n.hash hash arity)
- (\ super hash body))
+ (# (list.hash super) hash environment)
+ (# n.hash hash arity)
+ (# super hash body))
{#Apply [abstraction arguments]}
($_ n.* 3
- (\ super hash abstraction)
- (\ (list.hash super) hash arguments))
+ (# super hash abstraction)
+ (# (list.hash super) hash arguments))
)))
-(implementation: (control_equivalence (^open "\[0]"))
+(implementation: (control_equivalence (^open "#[0]"))
(All (_ a) (-> (Equivalence a) (Equivalence (Control a))))
(def: (= reference sample)
(case [reference sample]
(^template [<tag> <equivalence>]
[[{<tag> reference} {<tag> sample}]
- (\ (<equivalence> \=) = reference sample)])
+ (# (<equivalence> #=) = reference sample)])
([#Branch ..branch_equivalence]
[#Loop ..loop_equivalence]
[#Function ..function_equivalence])
@@ -743,13 +743,13 @@
(All (_ a) (-> (Hash a) (Hash (Control a))))
(def: &equivalence
- (..control_equivalence (\ super &equivalence)))
+ (..control_equivalence (# super &equivalence)))
(def: (hash value)
(case value
(^template [<factor> <tag> <hash>]
[{<tag> value}
- (n.* <factor> (\ (<hash> super) hash value))])
+ (n.* <factor> (# (<hash> super) hash value))])
([2 #Branch ..branch_hash]
[3 #Loop ..loop_hash]
[5 #Function ..function_hash])
@@ -762,7 +762,7 @@
(case [reference sample]
(^template [<tag> <equivalence>]
[[{<tag> reference'} {<tag> sample'}]
- (\ <equivalence> = reference' sample')])
+ (# <equivalence> = reference' sample')])
([#Primitive ..primitive_equivalence]
[#Structure (analysis.composite_equivalence =)]
[#Reference reference.equivalence]
@@ -786,7 +786,7 @@
(case value
(^template [<tag> <hash>]
[{<tag> value}
- (\ <hash> hash value)])
+ (# <hash> hash value)])
([#Primitive ..primitive_hash]
[#Structure (analysis.composite_hash recur_hash)]
[#Reference reference.hash]
diff --git a/stdlib/source/library/lux/tool/compiler/meta/archive.lux b/stdlib/source/library/lux/tool/compiler/meta/archive.lux
index 2c5b688a2..16486e75b 100644
--- a/stdlib/source/library/lux/tool/compiler/meta/archive.lux
+++ b/stdlib/source/library/lux/tool/compiler/meta/archive.lux
@@ -20,13 +20,13 @@
[format
["[0]" binary {"+" [Writer]}]]
[collection
- ["[0]" list ("[1]\[0]" functor mix)]
+ ["[0]" list ("[1]#[0]" functor mix)]
["[0]" dictionary {"+" [Dictionary]}]
["[0]" set]
["[0]" row {"+" [Row]}]]]
[math
[number
- ["n" nat ("[1]\[0]" equivalence)]]]
+ ["n" nat ("[1]#[0]" equivalence)]]]
[type
abstract]]]
[/
@@ -187,7 +187,7 @@
(|>> :representation
(value@ #resolver)
dictionary.entries
- (list\each (function (_ [module [id _]])
+ (list#each (function (_ [module [id _]])
[module id]))))
(def: .public (merged additions archive)
@@ -197,7 +197,7 @@
:representation
(revised@ #next (n.max +next))
(revised@ #resolver (function (_ resolver)
- (list\mix (function (_ [module [id entry]] resolver)
+ (list#mix (function (_ [module [id entry]] resolver)
(case entry
{.#Some _}
(dictionary.has module [id entry] resolver)
@@ -252,7 +252,7 @@
(-> (List Reservation) Bit)
(n.= (list.size reservations)
(|> reservations
- (list\each product.left)
+ (list#each product.left)
(set.of_list text.hash)
set.size)))
@@ -260,7 +260,7 @@
(-> (List Reservation) Bit)
(n.= (list.size reservations)
(|> reservations
- (list\each product.right)
+ (list#each product.right)
(set.of_list n.hash)
set.size)))
@@ -274,12 +274,12 @@
(do try.monad
[[actual next reservations] (<binary>.result ..reader binary)
_ (exception.assertion ..version_mismatch [expected actual]
- (n\= expected actual))
+ (n#= expected actual))
_ (exception.assertion ..corrupt_data []
(correct_reservations? reservations))]
(in (:abstraction
[#next next
- #resolver (list\mix (function (_ [module id] archive)
+ #resolver (list#mix (function (_ [module id] archive)
(dictionary.has module [id {.#None}] archive))
(value@ #resolver (:representation ..empty))
reservations)]))))
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 9681197b8..5295241d4 100644
--- a/stdlib/source/library/lux/tool/compiler/meta/archive/artifact.lux
+++ b/stdlib/source/library/lux/tool/compiler/meta/archive/artifact.lux
@@ -14,7 +14,7 @@
["%" format {"+" [format]}]]
[collection
["[0]" list]
- ["[0]" row {"+" [Row]} ("[1]\[0]" functor mix)]
+ ["[0]" row {"+" [Row]} ("[1]#[0]" functor mix)]
["[0]" dictionary {"+" [Dictionary]}]]
[format
["[0]" binary {"+" [Writer]}]]]
@@ -122,7 +122,7 @@
(binary.row/64 category))]
(|>> :representation
(value@ #artifacts)
- (row\each (value@ #category))
+ (row#each (value@ #category))
artifacts)))
(exception: .public (invalid_category [tag Nat])
@@ -137,7 +137,7 @@
(case tag
(^template [<nat> <tag> <parser>]
[<nat>
- (\ ! each (|>> {<tag>}) <parser>)])
+ (# ! each (|>> {<tag>}) <parser>)])
([0 #Anonymous <binary>.any]
[1 #Definition <binary>.text]
[2 #Analyser <binary>.text]
@@ -148,7 +148,7 @@
_ (<>.failure (exception.error ..invalid_category [tag])))))]
(|> (<binary>.row/64 category)
- (\ <>.monad each (row\mix (function (_ artifact registry)
+ (# <>.monad each (row#mix (function (_ artifact registry)
(product.right
(case artifact
{#Anonymous}
diff --git a/stdlib/source/library/lux/tool/compiler/meta/archive/descriptor.lux b/stdlib/source/library/lux/tool/compiler/meta/archive/descriptor.lux
index f1f68d434..622cf2d59 100644
--- a/stdlib/source/library/lux/tool/compiler/meta/archive/descriptor.lux
+++ b/stdlib/source/library/lux/tool/compiler/meta/archive/descriptor.lux
@@ -44,7 +44,7 @@
<b>.text
<b>.text
<b>.nat
- (\ <>.monad in {.#Cached})
+ (# <>.monad in {.#Cached})
(<b>.set text.hash <b>.text)
artifact.parser
))
diff --git a/stdlib/source/library/lux/tool/compiler/meta/archive/document.lux b/stdlib/source/library/lux/tool/compiler/meta/archive/document.lux
index 3207e7b8f..bbb14191a 100644
--- a/stdlib/source/library/lux/tool/compiler/meta/archive/document.lux
+++ b/stdlib/source/library/lux/tool/compiler/meta/archive/document.lux
@@ -34,7 +34,7 @@
(def: .public (read key document)
(All (_ d) (-> (Key d) (Document Any) (Try d)))
(let [[document//signature document//content] (:representation document)]
- (if (\ signature.equivalence =
+ (if (# signature.equivalence =
(key.signature key)
document//signature)
{try.#Success (:sharing [e]
@@ -70,5 +70,5 @@
(def: .public parser
(All (_ d) (-> (Parser d) (Parser (Document d))))
(|>> (<>.and signature.parser)
- (\ <>.monad each (|>> :abstraction))))
+ (# <>.monad each (|>> :abstraction))))
)
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 a7acc969b..a7bc82364 100644
--- a/stdlib/source/library/lux/tool/compiler/meta/cache/dependency.lux
+++ b/stdlib/source/library/lux/tool/compiler/meta/cache/dependency.lux
@@ -4,7 +4,7 @@
[abstract
["[0]" monad {"+" [do]}]]
[control
- ["[0]" maybe ("[1]\[0]" functor)]
+ ["[0]" maybe ("[1]#[0]" functor)]
["[0]" try {"+" [Try]}]
["[0]" state]
["[0]" function
@@ -13,7 +13,7 @@
["[0]" text
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" functor mix)]
+ ["[0]" list ("[1]#[0]" functor mix)]
["[0]" dictionary {"+" [Dictionary]}]
["[0]" set {"+" [Set]}]]]]]
[///
@@ -47,7 +47,7 @@
(def: .public graph
(-> (List Dependency) Graph)
- (list\mix (function (_ [module imports] graph)
+ (list#mix (function (_ [module imports] graph)
(dictionary.has module imports graph))
..empty))
@@ -63,9 +63,9 @@
{try.#Failure error}
..fresh)]
ancestors (monad.each ! recur (set.list parents))]
- (in (list\mix set.union parents ancestors)))))
+ (in (list#mix set.union parents ancestors)))))
ancestry (memo.open memo)]
- (list\mix (function (_ module memory)
+ (list#mix (function (_ module memory)
(if (dictionary.key? memory module)
memory
(let [[memory _] (ancestry [memory module])]
diff --git a/stdlib/source/library/lux/tool/compiler/meta/io.lux b/stdlib/source/library/lux/tool/compiler/meta/io.lux
index 0d7ab9698..0dc406820 100644
--- a/stdlib/source/library/lux/tool/compiler/meta/io.lux
+++ b/stdlib/source/library/lux/tool/compiler/meta/io.lux
@@ -14,7 +14,7 @@
(def: .public (safe system)
(All (_ m) (-> (System m) Text Text))
- (text.replaced "/" (\ system separator)))
+ (text.replaced "/" (# system separator)))
(def: .public lux_context
"lux")
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 a41580fd6..11b6414f6 100644
--- a/stdlib/source/library/lux/tool/compiler/meta/io/archive.lux
+++ b/stdlib/source/library/lux/tool/compiler/meta/io/archive.lux
@@ -10,16 +10,16 @@
["[0]" try {"+" [Try]}]
["[0]" exception {"+" [exception:]}]
[concurrency
- ["[0]" async {"+" [Async]} ("[1]\[0]" monad)]]
+ ["[0]" async {"+" [Async]} ("[1]#[0]" monad)]]
["<>" parser
["<[0]>" binary {"+" [Parser]}]]]
[data
[binary {"+" [Binary]}]
["[0]" product]
- ["[0]" text ("[1]\[0]" equivalence)
+ ["[0]" text ("[1]#[0]" equivalence)
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" functor mix)]
+ ["[0]" list ("[1]#[0]" functor mix)]
["[0]" dictionary {"+" [Dictionary]}]
["[0]" row {"+" [Row]}]
["[0]" set]]]
@@ -62,55 +62,55 @@
(def: (archive fs static)
(All (_ !) (-> (file.System !) Static file.Path))
(format (value@ static.#target static)
- (\ fs separator)
+ (# fs separator)
(value@ static.#host static)))
(def: (unversioned_lux_archive fs static)
(All (_ !) (-> (file.System !) Static file.Path))
(format (..archive fs static)
- (\ fs separator)
+ (# fs separator)
//.lux_context))
(def: (versioned_lux_archive fs static)
(All (_ !) (-> (file.System !) Static file.Path))
(format (..unversioned_lux_archive fs static)
- (\ fs separator)
+ (# fs separator)
(%.nat version.version)))
(def: (module fs static module_id)
(All (_ !) (-> (file.System !) Static archive.ID file.Path))
(format (..versioned_lux_archive fs static)
- (\ fs separator)
+ (# fs separator)
(%.nat module_id)))
(def: .public (artifact fs static module_id artifact_id)
(All (_ !) (-> (file.System !) Static archive.ID artifact.ID file.Path))
(format (..module fs static module_id)
- (\ fs separator)
+ (# fs separator)
(%.nat artifact_id)
(value@ static.#artifact_extension static)))
(def: (ensure_directory fs path)
(-> (file.System Async) file.Path (Async (Try Any)))
(do async.monad
- [? (\ fs directory? path)]
+ [? (# fs directory? path)]
(if ?
(in {try.#Success []})
- (\ fs make_directory path))))
+ (# fs make_directory path))))
(def: .public (prepare fs static module_id)
(-> (file.System Async) Static archive.ID (Async (Try Any)))
(do [! async.monad]
[.let [module (..module fs static module_id)]
- module_exists? (\ fs directory? module)]
+ module_exists? (# fs directory? module)]
(if module_exists?
(in {try.#Success []})
(do (try.with !)
[_ (ensure_directory fs (..unversioned_lux_archive fs static))
_ (ensure_directory fs (..versioned_lux_archive fs static))]
(|> module
- (\ fs make_directory)
- (\ ! each (|>> (case> {try.#Success output}
+ (# fs make_directory)
+ (# ! each (|>> (case> {try.#Success output}
{try.#Success []}
{try.#Failure error}
@@ -120,7 +120,7 @@
(def: .public (write fs static module_id artifact_id content)
(-> (file.System Async) Static archive.ID artifact.ID Binary (Async (Try Any)))
- (\ fs write content (..artifact fs static module_id artifact_id)))
+ (# fs write content (..artifact fs static module_id artifact_id)))
(def: .public (enable fs static)
(-> (file.System Async) Static (Async (Try Any)))
@@ -131,12 +131,12 @@
(def: (general_descriptor fs static)
(-> (file.System Async) Static file.Path)
(format (..archive fs static)
- (\ fs separator)
+ (# fs separator)
"general_descriptor"))
(def: .public (freeze fs static archive)
(-> (file.System Async) Static Archive (Async (Try Any)))
- (\ fs write (archive.export ///.version archive) (..general_descriptor fs static)))
+ (# fs write (archive.export ///.version archive) (..general_descriptor fs static)))
(def: module_descriptor_file
"module_descriptor")
@@ -144,16 +144,16 @@
(def: (module_descriptor fs static module_id)
(-> (file.System Async) Static archive.ID file.Path)
(format (..module fs static module_id)
- (\ fs separator)
+ (# fs separator)
..module_descriptor_file))
(def: .public (cache fs static module_id content)
(-> (file.System Async) Static archive.ID Binary (Async (Try Any)))
- (\ fs write content (..module_descriptor fs static module_id)))
+ (# fs write content (..module_descriptor fs static module_id)))
(def: (read_module_descriptor fs static module_id)
(-> (file.System Async) Static archive.ID (Async (Try Binary)))
- (\ fs read (..module_descriptor fs static module_id)))
+ (# fs read (..module_descriptor fs static module_id)))
(def: parser
(Parser [Descriptor (Document .Module)])
@@ -180,16 +180,16 @@
(-> (file.System Async) Static archive.ID (Async (Try (Dictionary Text Binary))))
(let [! (try.with async.monad)]
(|> (..module fs static module_id)
- (\ fs directory_files)
- (\ ! each (|>> (list\each (function (_ file)
+ (# fs directory_files)
+ (# ! each (|>> (list#each (function (_ file)
[(file.name fs file) file]))
- (list.only (|>> product.left (text\= ..module_descriptor_file) not))
+ (list.only (|>> product.left (text#= ..module_descriptor_file) not))
(monad.each ! (function (_ [name path])
(|> path
- (\ fs read)
- (\ ! each (|>> [name])))))
- (\ ! each (dictionary.of_list text.hash))))
- (\ ! conjoint))))
+ (# fs read)
+ (# ! each (|>> [name])))))
+ (# ! each (dictionary.of_list text.hash))))
+ (# ! conjoint))))
(type: Definitions (Dictionary Text Any))
(type: Analysers (Dictionary Text analysis.Handler))
@@ -227,12 +227,12 @@
(case (do !
[data (try.of_maybe (dictionary.value (format (%.nat artifact_id) extension) actual))
.let [context [module_id artifact_id]
- directive (\ host ingest context data)]]
+ directive (# host ingest context data)]]
(case artifact_category
{artifact.#Anonymous}
(do !
[.let [output (row.suffix [artifact_id .#None data] output)]
- _ (\ host re_learn context {.#None} directive)]
+ _ (# host re_learn context {.#None} directive)]
(in [definitions
[analysers
synthesizers
@@ -242,7 +242,7 @@
{artifact.#Definition name}
(let [output (row.suffix [artifact_id {.#None} data] output)]
- (if (text\= $/program.name name)
+ (if (text#= $/program.name name)
(in [definitions
[analysers
synthesizers
@@ -250,7 +250,7 @@
directives]
output])
(do !
- [value (\ host re_load context {.#None} directive)]
+ [value (# host re_load context {.#None} directive)]
(in [(dictionary.has name value definitions)
[analysers
synthesizers
@@ -261,7 +261,7 @@
{artifact.#Analyser extension}
(do !
[.let [output (row.suffix [artifact_id {.#None} data] output)]
- value (\ host re_load context {.#None} directive)]
+ value (# host re_load context {.#None} directive)]
(in [definitions
[(dictionary.has extension (:as analysis.Handler value) analysers)
synthesizers
@@ -272,7 +272,7 @@
{artifact.#Synthesizer extension}
(do !
[.let [output (row.suffix [artifact_id {.#None} data] output)]
- value (\ host re_load context {.#None} directive)]
+ value (# host re_load context {.#None} directive)]
(in [definitions
[analysers
(dictionary.has extension (:as synthesis.Handler value) synthesizers)
@@ -283,7 +283,7 @@
{artifact.#Generator extension}
(do !
[.let [output (row.suffix [artifact_id {.#None} data] output)]
- value (\ host re_load context {.#None} directive)]
+ value (# host re_load context {.#None} directive)]
(in [definitions
[analysers
synthesizers
@@ -294,7 +294,7 @@
{artifact.#Directive extension}
(do !
[.let [output (row.suffix [artifact_id {.#None} data] output)]
- value (\ host re_load context {.#None} directive)]
+ value (# host re_load context {.#None} directive)]
(in [definitions
[analysers
synthesizers
@@ -305,7 +305,7 @@
{artifact.#Custom name}
(do !
[.let [output (row.suffix [artifact_id {.#Some name} data] output)]
- _ (\ host re_learn context {.#Some name} directive)]
+ _ (# host re_learn context {.#Some name} directive)]
(in [definitions
[analysers
synthesizers
@@ -334,7 +334,7 @@
(|> definitions
(dictionary.value def_name)
try.of_maybe
- (\ ! each (|>> [exported? type]
+ (# ! each (|>> [exported? type]
{.#Definition}
[def_name])))
@@ -342,7 +342,7 @@
(|> definitions
(dictionary.value def_name)
try.of_maybe
- (\ ! each (function (_ def_value)
+ (# ! each (function (_ def_value)
[def_name {.#Type [exported? (:as .Type def_value) labels]}])))))
(value@ .#definitions content))]
(in [(document.write $.key (with@ .#definitions definitions content))
@@ -357,7 +357,7 @@
(do (try.with async.monad)
[actual (cached_artifacts fs static module_id)
.let [expected (|> descriptor (value@ descriptor.#registry) artifact.artifacts)]
- [document bundles output] (async\in (loaded_document (value@ static.#artifact_extension static) host_environment module_id expected actual document))]
+ [document bundles output] (async#in (loaded_document (value@ static.#artifact_extension static) host_environment module_id expected actual document))]
(in [[descriptor document output] bundles])))
(def: (purge! fs static [module_name module_id])
@@ -365,16 +365,16 @@
(do [! (try.with async.monad)]
[.let [cache (..module fs static module_id)]
_ (|> cache
- (\ fs directory_files)
- (\ ! each (monad.each ! (\ fs delete)))
- (\ ! conjoint))]
- (\ fs delete cache)))
+ (# fs directory_files)
+ (# ! each (monad.each ! (# fs delete)))
+ (# ! conjoint))]
+ (# fs delete cache)))
(def: (valid_cache? expected actual)
(-> Descriptor Input Bit)
- (and (text\= (value@ descriptor.#name expected)
+ (and (text#= (value@ descriptor.#name expected)
(value@ ////.#module actual))
- (text\= (value@ descriptor.#file expected)
+ (text#= (value@ descriptor.#file expected)
(value@ ////.#file actual))
(n.= (value@ descriptor.#hash expected)
(value@ ////.#hash actual))))
@@ -395,7 +395,7 @@
(-> (List [Bit [Module [archive.ID [Descriptor (Document .Module)]]]])
dependency.Order
Purge)
- (list\mix (function (_ [module_name [module_id [descriptor document]]] purge)
+ (list#mix (function (_ [module_name [module_id [descriptor document]]] purge)
(let [purged? (: (Predicate Module)
(dictionary.key? purge))]
(if (purged? module_name)
@@ -423,8 +423,8 @@
(monad.each ! (function (_ [module_name module_id])
(do !
[data (..read_module_descriptor fs static module_id)
- [descriptor document] (async\in (<binary>.result ..parser data))]
- (if (text\= archive.runtime_module module_name)
+ [descriptor document] (async#in (<binary>.result ..parser data))]
+ (if (text#= archive.runtime_module module_name)
(in [true
[module_name [module_id [descriptor document]]]])
(do !
@@ -432,14 +432,14 @@
(in [(..valid_cache? descriptor input)
[module_name [module_id [descriptor document]]]])))))))
load_order (|> pre_loaded_caches
- (list\each product.right)
+ (list#each product.right)
(monad.mix try.monad
(function (_ [module [module_id [descriptor document]]] archive)
(archive.has module [descriptor document (: Output row.empty)] archive))
archive)
- (\ try.monad each (dependency.load_order $.key))
- (\ try.monad conjoint)
- async\in)
+ (# try.monad each (dependency.load_order $.key))
+ (# try.monad conjoint)
+ async#in)
.let [purge (..full_purge pre_loaded_caches load_order)]
_ (|> purge
dictionary.entries
@@ -451,7 +451,7 @@
[[descriptor,document,output bundles] (..load_definitions fs static module_id host_environment descriptor document)]
(in [[module_name descriptor,document,output]
bundles])))))]
- (async\in
+ (async#in
(do [! try.monad]
[archive (monad.mix !
(function (_ [[module descriptor,document,output] _bundle] archive)
@@ -461,7 +461,7 @@
analysis_state (..analysis_state (value@ static.#host static) archive)]
(in [archive
analysis_state
- (list\mix (function (_ [_ [+analysers +synthesizers +generators +directives]]
+ (list#mix (function (_ [_ [+analysers +synthesizers +generators +directives]]
[analysers synthesizers generators directives])
[(dictionary.merged +analysers analysers)
(dictionary.merged +synthesizers synthesizers)
@@ -475,11 +475,11 @@
(-> (generation.Host expression directive) (file.System Async) Static Import (List Context)
(Async (Try [Archive .Lux Bundles]))))
(do async.monad
- [binary (\ fs read (..general_descriptor fs static))]
+ [binary (# fs read (..general_descriptor fs static))]
(case binary
{try.#Success binary}
(do (try.with async.monad)
- [archive (async\in (archive.import ///.version binary))]
+ [archive (async#in (archive.import ///.version binary))]
(..load_every_reserved_module host_environment fs static import contexts archive))
{try.#Failure error}
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 59d06a9fd..95a122edd 100644
--- a/stdlib/source/library/lux/tool/compiler/meta/io/context.lux
+++ b/stdlib/source/library/lux/tool/compiler/meta/io/context.lux
@@ -10,10 +10,10 @@
["[0]" try {"+" [Try]}]
["[0]" exception {"+" [exception:]}]
[concurrency
- ["[0]" async {"+" [Async]} ("[1]\[0]" monad)]]]
+ ["[0]" async {"+" [Async]} ("[1]#[0]" monad)]]]
[data
[binary {"+" [Binary]}]
- ["[0]" text ("[1]\[0]" hash)
+ ["[0]" text ("[1]#[0]" hash)
["%" format {"+" [format]}]
[encoding
["[0]" utf8]]]
@@ -52,19 +52,19 @@
(All (_ m) (-> (file.System m) Context Module file.Path))
(|> module
(//.safe fs)
- (format context (\ fs separator))))
+ (format context (# fs separator))))
(def: (find_source_file fs importer contexts module extension)
(-> (file.System Async) Module (List Context) Module Extension
(Async (Try file.Path)))
(case contexts
{.#End}
- (async\in (exception.except ..cannot_find_module [importer module]))
+ (async#in (exception.except ..cannot_find_module [importer module]))
{.#Item context contexts'}
(let [path (format (..path fs context module) extension)]
(do async.monad
- [? (\ fs file? path)]
+ [? (# fs file? path)]
(if ?
(in {try.#Success path})
(find_source_file fs importer contexts' module extension))))))
@@ -83,15 +83,15 @@
(case outcome
{try.#Success path}
(|> path
- (\ fs read)
- (\ (try.with !) each (|>> [path])))
+ (# fs read)
+ (# (try.with !) each (|>> [path])))
{try.#Failure _}
(do [! (try.with !)]
[path (..find_source_file fs importer contexts module ..lux_extension)]
(|> path
- (\ fs read)
- (\ ! each (|>> [path])))))))
+ (# fs read)
+ (# ! each (|>> [path])))))))
(def: (find_library_source_file importer import partial_host_extension module)
(-> Module Import Extension Module (Try [file.Path Binary]))
@@ -128,15 +128,15 @@
(Async (Try Input)))
(do (try.with async.monad)
[[path binary] (..find_any_source_file fs importer import contexts partial_host_extension module)]
- (case (\ utf8.codec decoded binary)
+ (case (# utf8.codec decoded binary)
{try.#Success code}
(in [////.#module module
////.#file path
- ////.#hash (text\hash code)
+ ////.#hash (text#hash code)
////.#code code])
{try.#Failure _}
- (async\in (exception.except ..cannot_read_module [module])))))
+ (async#in (exception.except ..cannot_read_module [module])))))
(type: .public Enumeration
(Dictionary file.Path Binary))
@@ -145,19 +145,19 @@
(-> (file.System Async) Context file.Path Enumeration (Async (Try Enumeration)))
(do [! (try.with async.monad)]
[enumeration (|> directory
- (\ fs directory_files)
- (\ ! each (monad.mix ! (function (_ file enumeration)
+ (# fs directory_files)
+ (# ! each (monad.mix ! (function (_ file enumeration)
(if (text.ends_with? ..lux_extension file)
(do !
- [source_code (\ fs read file)]
- (async\in (dictionary.has' (text.replaced context "" file) source_code enumeration)))
+ [source_code (# fs read file)]
+ (async#in (dictionary.has' (text.replaced context "" file) source_code enumeration)))
(in enumeration)))
enumeration))
- (\ ! conjoint))]
+ (# ! conjoint))]
(|> directory
- (\ fs sub_directories)
- (\ ! each (monad.mix ! (context_listing fs context) enumeration))
- (\ ! conjoint))))
+ (# fs sub_directories)
+ (# ! each (monad.mix ! (context_listing fs context) enumeration))
+ (# ! conjoint))))
(def: Action
(type (All (_ a) (Async (Try a)))))
@@ -165,7 +165,7 @@
(def: (canonical fs context)
(-> (file.System Async) Context (Action Context))
(do (try.with async.monad)
- [subs (\ fs sub_directories context)]
+ [subs (# fs sub_directories context)]
(in (|> subs
list.head
(maybe.else context)
@@ -181,7 +181,7 @@
(do !
[context (..canonical fs context)]
(..context_listing fs
- (format context (\ fs separator))
+ (format context (# fs separator))
context
enumeration)))
(: Enumeration
diff --git a/stdlib/source/library/lux/tool/compiler/meta/packager.lux b/stdlib/source/library/lux/tool/compiler/meta/packager.lux
index 73d919175..86e5af12b 100644
--- a/stdlib/source/library/lux/tool/compiler/meta/packager.lux
+++ b/stdlib/source/library/lux/tool/compiler/meta/packager.lux
@@ -8,7 +8,7 @@
[collection
[dictionary {"+" [Dictionary]}]
["[0]" row]
- ["[0]" list ("[1]\[0]" functor)]]]
+ ["[0]" list ("[1]#[0]" functor)]]]
[world
["[0]" file]]]]
[//
@@ -33,10 +33,10 @@
(def: .public order
(-> dependency.Order Order)
- (list\each (function (_ [module [module_id [descriptor document]]])
+ (list#each (function (_ [module [module_id [descriptor document]]])
(|> descriptor
(value@ descriptor.#registry)
artifact.artifacts
row.list
- (list\each (|>> (value@ artifact.#id)))
+ (list#each (|>> (value@ artifact.#id)))
[module_id]))))
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 9faeb3b47..10433ddf5 100644
--- a/stdlib/source/library/lux/tool/compiler/meta/packager/jvm.lux
+++ b/stdlib/source/library/lux/tool/compiler/meta/packager/jvm.lux
@@ -5,7 +5,7 @@
[abstract
["[0]" monad {"+" [Monad do]}]]
[control
- ["[0]" maybe ("[1]\[0]" functor)]
+ ["[0]" maybe ("[1]#[0]" functor)]
["[0]" try {"+" [Try]}]]
[data
["[0]" binary {"+" [Binary]}]
@@ -13,7 +13,7 @@
["%" format {"+" [format]}]]
[collection
["[0]" row]
- ["[0]" list ("[1]\[0]" functor)]
+ ["[0]" list ("[1]#[0]" functor)]
["[0]" dictionary]
["[0]" set {"+" [Set]}]]]
[math
@@ -141,7 +141,7 @@
(-> Static archive.ID artifact.ID (Maybe Text) Binary java/util/jar/JarOutputStream
(Try java/util/jar/JarOutputStream))
(let [class_path (|> custom
- (maybe\each (|>> name.internal name.read))
+ (maybe#each (|>> name.internal name.read))
(maybe.else (runtime.class_name [module artifact]))
(text.suffix (value@ static.#artifact_extension static)))]
(do try.monad
@@ -249,7 +249,7 @@
[order (dependency.load_order $.key archive)
.let [buffer (java/io/ByteArrayOutputStream::new (.int ..mebi_byte))]
sink (|> order
- (list\each (function (_ [module [module_id [descriptor document output]]])
+ (list#each (function (_ [module [module_id [descriptor document output]]])
[module_id output]))
(monad.mix ! (..write_module static)
(java/util/jar/JarOutputStream::new buffer (..manifest program))))
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 b5d364a3d..0b7857b58 100644
--- a/stdlib/source/library/lux/tool/compiler/meta/packager/scheme.lux
+++ b/stdlib/source/library/lux/tool/compiler/meta/packager/scheme.lux
@@ -14,7 +14,7 @@
["[0]" encoding]]
[collection
["[0]" row]
- ["[0]" list ("[1]\[0]" functor mix)]
+ ["[0]" list ("[1]#[0]" functor mix)]
["[0]" dictionary {"+" [Dictionary]}]
["[0]" set]]
[format
@@ -57,12 +57,12 @@
(def: bundle_module
(-> Output (Try _.Expression))
(|>> row.list
- (list\each product.right)
+ (list#each product.right)
(monad.mix try.monad
(function (_ content so_far)
(|> content
- (\ encoding.utf8 decoded)
- (\ try.monad each
+ (# encoding.utf8 decoded)
+ (# try.monad each
(|>> :expected
(:sharing [directive]
directive
@@ -107,11 +107,11 @@
(value@ descriptor.#references)
set.list
(list.all (function (_ module) (dictionary.value module mapping)))
- (list\each (|>> ..module_file _.string _.load_relative/1))
- (list\mix ..then bundle)
+ (list#each (|>> ..module_file _.string _.load_relative/1))
+ (list#mix ..then bundle)
(: _.Expression)
_.code
- (\ encoding.utf8 encoded)
+ (# encoding.utf8 encoded)
tar.content))
module_file (tar.path (..module_file module_id))]
(in {tar.#Normal [module_file now ..mode ..ownership entry_content]})))
@@ -122,7 +122,7 @@
(do [! try.monad]
[order (dependency.load_order $.key archive)
.let [mapping (|> order
- (list\each (function (_ [module [module_id [descriptor document output]]])
+ (list#each (function (_ [module [module_id [descriptor document output]]])
[module module_id]))
(dictionary.of_list text.hash)
(: (Dictionary Module archive.ID)))]
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 aa79bf5b5..8399ce409 100644
--- a/stdlib/source/library/lux/tool/compiler/meta/packager/script.lux
+++ b/stdlib/source/library/lux/tool/compiler/meta/packager/script.lux
@@ -15,7 +15,7 @@
["[0]" utf8]]]
[collection
["[0]" row]
- ["[0]" list ("[1]\[0]" functor)]]]]]
+ ["[0]" list ("[1]#[0]" functor)]]]]]
[program
[compositor
["[0]" static {"+" [Static]}]]]
@@ -39,12 +39,12 @@
(Try directive)))
(|> output
row.list
- (list\each (|>> product.right product.right))
+ (list#each (|>> product.right product.right))
(monad.mix try.monad
(function (_ content so_far)
(|> content
- (\ utf8.codec decoded)
- (\ try.monad each
+ (# utf8.codec decoded)
+ (# try.monad each
(|>> :expected
(:sharing [directive]
directive
@@ -65,7 +65,7 @@
(do [! try.monad]
[order (dependency.load_order $.key archive)]
(|> order
- (list\each (function (_ [module [module_id [descriptor document output]]])
+ (list#each (function (_ [module [module_id [descriptor document output]]])
[module_id output]))
(monad.mix ! (..write_module sequence) header)
- (\ ! each (|>> scope code (\ utf8.codec encoded)))))))
+ (# ! each (|>> scope code (# utf8.codec encoded)))))))
diff --git a/stdlib/source/library/lux/tool/compiler/phase.lux b/stdlib/source/library/lux/tool/compiler/phase.lux
index a54785eed..7140df44f 100644
--- a/stdlib/source/library/lux/tool/compiler/phase.lux
+++ b/stdlib/source/library/lux/tool/compiler/phase.lux
@@ -6,7 +6,7 @@
[monad {"+" [Monad do]}]]
[control
["[0]" state]
- ["[0]" try {"+" [Try]} ("[1]\[0]" functor)]
+ ["[0]" try {"+" [Try]} ("[1]#[0]" functor)]
["ex" exception {"+" [Exception exception:]}]
["[0]" io]
[parser
@@ -47,7 +47,7 @@
(-> s (Operation s o) (Try o)))
(|> state
operation
- (\ try.monad each product.right)))
+ (# try.monad each product.right)))
(def: .public get_state
(All (_ s o)
@@ -82,13 +82,13 @@
(def: .public (lifted error)
(All (_ s a) (-> (Try a) (Operation s a)))
(function (_ state)
- (try\each (|>> [state]) error)))
+ (try#each (|>> [state]) error)))
(syntax: .public (assertion [exception <code>.any
message <code>.any
test <code>.any])
(in (list (` (if (~ test)
- (\ ..monad (~' in) [])
+ (# ..monad (~' in) [])
(..except (~ exception) (~ message)))))))
(def: .public identity
diff --git a/stdlib/source/library/lux/tool/compiler/reference.lux b/stdlib/source/library/lux/tool/compiler/reference.lux
index e61fc7b99..91d80c4a7 100644
--- a/stdlib/source/library/lux/tool/compiler/reference.lux
+++ b/stdlib/source/library/lux/tool/compiler/reference.lux
@@ -31,7 +31,7 @@
(case [reference sample]
(^template [<tag> <equivalence>]
[[{<tag> reference} {<tag> sample}]
- (\ <equivalence> = reference sample)])
+ (# <equivalence> = reference sample)])
([#Variable /variable.equivalence]
[#Constant name.equivalence])
@@ -49,7 +49,7 @@
(^template [<factor> <tag> <hash>]
[{<tag> value}
(|> value
- (\ <hash> hash)
+ (# <hash> hash)
(n.* <factor>))])
([2 #Variable /variable.hash]
[3 #Constant name.hash])
diff --git a/stdlib/source/library/lux/tool/compiler/reference/variable.lux b/stdlib/source/library/lux/tool/compiler/reference/variable.lux
index e3c5ce5c2..99b9d0e9b 100644
--- a/stdlib/source/library/lux/tool/compiler/reference/variable.lux
+++ b/stdlib/source/library/lux/tool/compiler/reference/variable.lux
@@ -45,7 +45,7 @@
(|>> (case> (^template [<factor> <tag>]
[{<tag> register}
(|> register
- (\ n.hash hash)
+ (# n.hash hash)
(n.* <factor>))])
([2 #Local]
[3 #Foreign])))))
diff --git a/stdlib/source/library/lux/tool/interpreter.lux b/stdlib/source/library/lux/tool/interpreter.lux
index 323aa7ff4..a318dedfc 100644
--- a/stdlib/source/library/lux/tool/interpreter.lux
+++ b/stdlib/source/library/lux/tool/interpreter.lux
@@ -6,7 +6,7 @@
["[0]" try {"+" [Try]}]
["ex" exception {"+" [exception:]}]]
[data
- ["[0]" text ("[1]\[0]" equivalence)
+ ["[0]" text ("[1]#[0]" equivalence)
["%" format {"+" [format]}]]]
[type {"+" [:sharing]}
["[0]" check]]
@@ -82,9 +82,9 @@
.#info .#mode]
{.#Interpreter}
state))
- [state _] (\ (value@ platform.#file_system platform)
+ [state _] (# (value@ platform.#file_system platform)
lift (phase.result' state enter_module))
- _ (\ Console<!> write ..welcome_message)]
+ _ (# Console<!> write ..welcome_message)]
(in state)))
(with_expansions [<Interpretation> (as_is (Operation anchor expression directive [Type Any]))]
@@ -211,16 +211,16 @@
multi_line? #0]
(do !
[_ (if multi_line?
- (\ Console<!> write " ")
- (\ Console<!> write "> "))
- line (\ Console<!> read_line)]
+ (# Console<!> write " ")
+ (# Console<!> write "> "))
+ line (# Console<!> read_line)]
(if (and (not multi_line?)
- (text\= ..exit_command line))
- (\ Console<!> write ..farewell_message)
+ (text#= ..exit_command line))
+ (# Console<!> write ..farewell_message)
(case (read_eval_print (revised@ #source (add_line line) context))
{try.#Success [context' representation]}
(do !
- [_ (\ Console<!> write representation)]
+ [_ (# Console<!> write representation)]
(recur context' #0))
{try.#Failure error}
diff --git a/stdlib/source/library/lux/type.lux b/stdlib/source/library/lux/type.lux
index fb91a6a2b..ae9314628 100644
--- a/stdlib/source/library/lux/type.lux
+++ b/stdlib/source/library/lux/type.lux
@@ -13,17 +13,17 @@
["<[0]>" code {"+" [Parser]}]]]
[data
["[0]" product]
- ["[0]" text ("[1]\[0]" monoid equivalence)]
- ["[0]" name ("[1]\[0]" equivalence codec)]
+ ["[0]" text ("[1]#[0]" monoid equivalence)]
+ ["[0]" name ("[1]#[0]" equivalence codec)]
[collection
["[0]" array]
- ["[0]" list ("[1]\[0]" functor monoid mix)]]]
+ ["[0]" list ("[1]#[0]" functor monoid mix)]]]
["[0]" macro
[syntax {"+" [syntax:]}]
["[0]" code]]
[math
[number
- ["n" nat ("[1]\[0]" decimal)]]]
+ ["n" nat ("[1]#[0]" decimal)]]]
["[0]" meta
["[0]" location]]]])
@@ -58,7 +58,7 @@
(case type
{.#Apply arg func'}
(let [[func args] (flat_application func')]
- [func (list\composite args (list arg))])
+ [func (list#composite args (list arg))])
_
[type (list)]))
@@ -81,57 +81,57 @@
(-> Type Text)
(case type
{.#Primitive name params}
- ($_ text\composite
+ ($_ text#composite
"(primitive "
(text.enclosed' text.double_quote name)
(|> params
- (list\each (|>> format (text\composite " ")))
- (list\mix (function.flipped text\composite) ""))
+ (list#each (|>> format (text#composite " ")))
+ (list#mix (function.flipped text#composite) ""))
")")
(^template [<tag> <open> <close> <flat>]
[{<tag> _}
- ($_ text\composite <open>
+ ($_ text#composite <open>
(|> (<flat> type)
- (list\each format)
+ (list#each format)
list.reversed
(list.interposed " ")
- (list\mix text\composite ""))
+ (list#mix text#composite ""))
<close>)])
([.#Sum "(Or " ")" flat_variant]
[.#Product "[" "]" flat_tuple])
{.#Function input output}
(let [[ins out] (flat_function type)]
- ($_ text\composite "(-> "
+ ($_ text#composite "(-> "
(|> ins
- (list\each format)
+ (list#each format)
list.reversed
(list.interposed " ")
- (list\mix text\composite ""))
+ (list#mix text#composite ""))
" " (format out) ")"))
{.#Parameter idx}
- (n\encoded idx)
+ (n#encoded idx)
{.#Var id}
- ($_ text\composite "⌈v:" (n\encoded id) "⌋")
+ ($_ text#composite "⌈v:" (n#encoded id) "⌋")
{.#Ex id}
- ($_ text\composite "⟨e:" (n\encoded id) "⟩")
+ ($_ text#composite "⟨e:" (n#encoded id) "⟩")
{.#Apply param fun}
(let [[type_func type_args] (flat_application type)]
- ($_ text\composite "(" (format type_func) " " (|> type_args (list\each format) list.reversed (list.interposed " ") (list\mix text\composite "")) ")"))
+ ($_ text#composite "(" (format type_func) " " (|> type_args (list#each format) list.reversed (list.interposed " ") (list#mix text#composite "")) ")"))
(^template [<tag> <desc>]
[{<tag> env body}
- ($_ text\composite "(" <desc> " {" (|> env (list\each format) (text.interposed " ")) "} " (format body) ")")])
+ ($_ text#composite "(" <desc> " {" (|> env (list#each format) (text.interposed " ")) "} " (format body) ")")])
([.#UnivQ "All"]
[.#ExQ "Ex"])
{.#Named [module name] type}
- ($_ text\composite module "." name)
+ ($_ text#composite module "." name)
))
... https://en.wikipedia.org/wiki/Lambda_calculus#%CE%B2-reduction
@@ -139,7 +139,7 @@
(-> (List Type) Type Type)
(case type
{.#Primitive name params}
- {.#Primitive name (list\each (reduced env) params)}
+ {.#Primitive name (list#each (reduced env) params)}
(^template [<tag>]
[{<tag> left right}
@@ -154,21 +154,21 @@
{<tag> env def}
_
- {<tag> (list\each (reduced env) old_env) def})])
+ {<tag> (list#each (reduced env) old_env) def})])
([.#UnivQ]
[.#ExQ])
{.#Parameter idx}
- (maybe.else (panic! ($_ text\composite
+ (maybe.else (panic! ($_ text#composite
"Unknown type parameter" text.new_line
- " Index: " (n\encoded idx) text.new_line
+ " Index: " (n#encoded idx) text.new_line
"Environment: " (|> env
list.enumeration
- (list\each (.function (_ [index type])
- ($_ text\composite
- (n\encoded index)
+ (list#each (.function (_ [index type])
+ ($_ text#composite
+ (n#encoded index)
" " (..format type))))
- (text.interposed (text\composite text.new_line " ")))))
+ (text.interposed (text#composite text.new_line " ")))))
(list.item idx env))
_
@@ -184,9 +184,9 @@
(same? x y))
(case [x y]
[{.#Primitive xname xparams} {.#Primitive yname yparams}]
- (and (text\= xname yname)
+ (and (text#= xname yname)
(n.= (list.size yparams) (list.size xparams))
- (list\mix (.function (_ [x y] prev) (and prev (= x y)))
+ (list#mix (.function (_ [x y] prev) (and prev (= x y)))
#1
(list.zipped/2 xparams yparams)))
@@ -201,7 +201,7 @@
(= xright yright))
[{.#Named xname xtype} {.#Named yname ytype}]
- (and (name\= xname yname)
+ (and (name#= xname yname)
(= xtype ytype))
(^template [<tag>]
@@ -213,7 +213,7 @@
[{.#ExQ xenv xbody} {.#ExQ yenv ybody}])
(and (n.= (list.size yenv) (list.size xenv))
(= xbody ybody)
- (list\mix (.function (_ [x y] prev) (and prev (= x y)))
+ (list#mix (.function (_ [x y] prev) (and prev (= x y)))
#1
(list.zipped/2 xenv yenv)))
@@ -250,7 +250,7 @@
(case type
{.#Primitive name params}
(` {.#Primitive (~ (code.text name))
- (.list (~+ (list\each code params)))})
+ (.list (~+ (list#each code params)))})
(^template [<tag>]
[{<tag> idx}
@@ -268,7 +268,7 @@
(^template [<tag>]
[{<tag> env body}
- (` {<tag> (.list (~+ (list\each code env)))
+ (` {<tag> (.list (~+ (list#each code env)))
(~ (code body))})])
([.#UnivQ] [.#ExQ])
))
@@ -345,7 +345,7 @@
{.#Apply A F}
(|> (..applied (list A) F)
- (\ maybe.monad each quantified?)
+ (# maybe.monad each quantified?)
(maybe.else #0))
(^or {.#UnivQ _} {.#ExQ _})
@@ -367,7 +367,7 @@
(-> Type [Nat Type])
(case type
(^multi (^ {.#Primitive name (list element_type)})
- (text\= array.type_name name))
+ (text#= array.type_name name))
(let [[depth element_type] (flat_array element_type)]
[(++ depth) element_type])
@@ -396,14 +396,14 @@
[location meta.location
valueT (meta.type valueN)
.let [_ ("lux io log"
- ($_ text\composite
- (name\encoded (name_of ..:log!)) " " (location.format location) text.new_line
+ ($_ text#composite
+ (name#encoded (name_of ..:log!)) " " (location.format location) text.new_line
"Expression: " (case valueC
{.#Some valueC}
(code.format valueC)
{.#None}
- (name\encoded valueN))
+ (name#encoded valueN))
text.new_line
" Type: " (..format valueT)))]]
(in (list (code.identifier valueN))))
@@ -422,7 +422,7 @@
output <code>.any
value (<>.maybe <code>.any)])
(macro.with_identifiers [g!_]
- (let [casterC (` (: (All ((~ g!_) (~+ (list\each code.local_identifier type_vars)))
+ (let [casterC (` (: (All ((~ g!_) (~+ (list#each code.local_identifier type_vars)))
(-> (~ input) (~ output)))
(|>> :expected)))]
(case value
@@ -446,7 +446,7 @@
exemplar ..typed
computation ..typed])
(macro.with_identifiers [g!_]
- (let [typeC (` (All ((~ g!_) (~+ (list\each code.local_identifier type_vars)))
+ (let [typeC (` (All ((~ g!_) (~+ (list#each code.local_identifier type_vars)))
(-> (~ (value@ #type exemplar))
(~ (value@ #type computation)))))
shareC (` (: (~ typeC)
@@ -458,7 +458,7 @@
exemplar ..typed
extraction <code>.any])
(in (list (` (:of ((~! ..:sharing)
- [(~+ (list\each code.local_identifier type_vars))]
+ [(~+ (list#each code.local_identifier type_vars))]
(~ (value@ #type exemplar))
(~ (value@ #expression exemplar))
diff --git a/stdlib/source/library/lux/type/abstract.lux b/stdlib/source/library/lux/type/abstract.lux
index 9ce2ce24d..db929aa88 100644
--- a/stdlib/source/library/lux/type/abstract.lux
+++ b/stdlib/source/library/lux/type/abstract.lux
@@ -6,13 +6,13 @@
[monad {"+" [Monad do]}]]
[control
["[0]" exception {"+" [exception:]}]
- ["<>" parser ("[1]\[0]" monad)
+ ["<>" parser ("[1]#[0]" monad)
["<[0]>" code {"+" [Parser]}]]]
[data
- ["[0]" name ("[1]\[0]" codec)]
- ["[0]" text ("[1]\[0]" equivalence monoid)]
+ ["[0]" name ("[1]#[0]" codec)]
+ ["[0]" text ("[1]#[0]" equivalence monoid)]
[collection
- ["[0]" list ("[1]\[0]" functor monoid)]]]
+ ["[0]" list ("[1]#[0]" functor monoid)]]]
[macro
["[0]" code]
[syntax {"+" [syntax:]}
@@ -49,7 +49,7 @@
[(loop [entries <source>]
(case entries
{.#Item [head_name head] tail}
- (if (text\= <reference> head_name)
+ (if (text#= <reference> head_name)
<then>
(recur tail))
@@ -84,7 +84,7 @@
(case (case frame
{.#Some frame}
(list.example (function (_ [actual _])
- (text\= frame actual))
+ (text#= frame actual))
current_frames)
{.#None}
@@ -107,7 +107,7 @@
[(loop [entries <source>]
(case entries
{.#Item [head_name head] tail}
- (if (text\= <reference> head_name)
+ (if (text#= <reference> head_name)
{.#Item [head_name <then>]
tail}
{.#Item [head_name head]
@@ -180,7 +180,7 @@
(def: cast
(Parser [(Maybe Text) Code])
(<>.either (<>.and (<>.maybe <code>.local_identifier) <code>.any)
- (<>.and (<>\in {.#None}) <code>.any)))
+ (<>.and (<>#in {.#None}) <code>.any)))
(template [<name> <from> <to>]
[(syntax: .public (<name> [[frame value] ..cast])
@@ -195,18 +195,18 @@
(def: abstraction_type_name
(-> Name Text)
- name\encoded)
+ name#encoded)
(def: representation_definition_name
(-> Text Text)
- (|>> ($_ text\composite
- (name\encoded (name_of ..#Representation))
+ (|>> ($_ text#composite
+ (name#encoded (name_of ..#Representation))
" ")))
(def: declaration
(Parser [Text (List Text)])
(<>.either (<code>.form (<>.and <code>.local_identifier (<>.some <code>.local_identifier)))
- (<>.and <code>.local_identifier (\ <>.monad in (list)))))
+ (<>.and <code>.local_identifier (# <>.monad in (list)))))
(def: abstract
(Parser [Code [Text (List Text)] Code (List Code)])
@@ -223,7 +223,7 @@
..abstract])
(do meta.monad
[current_module meta.current_module_name
- .let [type_varsC (list\each code.local_identifier type_vars)
+ .let [type_varsC (list#each code.local_identifier type_vars)
abstraction_declaration (` ((~ (code.local_identifier name)) (~+ type_varsC)))
representation_declaration (` ((~ (code.local_identifier (representation_definition_name name)))
(~+ type_varsC)))]
@@ -236,7 +236,7 @@
[(~+ type_varsC)])))
(` (type: (~ representation_declaration)
(~ representation_type)))
- ($_ list\composite
+ ($_ list#composite
primitives
(list (` ((~! ..pop!)))))))))
diff --git a/stdlib/source/library/lux/type/check.lux b/stdlib/source/library/lux/type/check.lux
index 2fd8affb1..1af82bec0 100644
--- a/stdlib/source/library/lux/type/check.lux
+++ b/stdlib/source/library/lux/type/check.lux
@@ -12,28 +12,28 @@
["[0]" exception {"+" [Exception exception:]}]]
[data
["[0]" product]
- ["[0]" text ("[1]\[0]" monoid equivalence)]
+ ["[0]" text ("[1]#[0]" monoid equivalence)]
[collection
["[0]" list]
["[0]" set {"+" [Set]}]]]
[math
[number
- ["n" nat ("[1]\[0]" decimal)]]]]]
- ["[0]" // ("[1]\[0]" equivalence)])
+ ["n" nat ("[1]#[0]" decimal)]]]]]
+ ["[0]" // ("[1]#[0]" equivalence)])
-(template: (!n\= reference subject)
+(template: (!n#= reference subject)
[("lux i64 =" reference subject)])
-(template: (!text\= reference subject)
+(template: (!text#= reference subject)
[("lux text =" reference subject)])
(exception: .public (unknown_type_var [id Nat])
(exception.report
- ["ID" (n\encoded id)]))
+ ["ID" (n#encoded id)]))
(exception: .public (unbound_type_var [id Nat])
(exception.report
- ["ID" (n\encoded id)]))
+ ["ID" (n#encoded id)]))
(exception: .public (invalid_type_application [funcT Type
argT Type])
@@ -45,7 +45,7 @@
type Type
bound Type])
(exception.report
- ["Var" (n\encoded id)]
+ ["Var" (n#encoded id)]
["Wanted Type" (//.format type)]
["Current Type" (//.format bound)]))
@@ -128,7 +128,7 @@
)))
)
-(open: "check\[0]" ..monad)
+(open: "check#[0]" ..monad)
(def: (var::new id plist)
(-> Var Type_Vars Type_Vars)
@@ -139,7 +139,7 @@
(case plist
{.#Item [var_id var_type]
plist'}
- (if (!n\= id var_id)
+ (if (!n#= id var_id)
{.#Some var_type}
(var::get id plist'))
@@ -154,7 +154,7 @@
{.#Item [var_id var_type]
plist'}
- (if (!n\= id var_id)
+ (if (!n#= id var_id)
{.#Item [var_id value]
plist'}
{.#Item [var_id var_type]
@@ -290,7 +290,7 @@
_
(case (//.applied (list argT) funcT)
{.#Some output}
- (check\in output)
+ (check#in output)
_
(except ..invalid_type_application [funcT argT]))))
@@ -312,7 +312,7 @@
{.#Some {.#Some type}}
(case type
{.#Var post}
- (if (!n\= start post)
+ (if (!n#= start post)
{try.#Success [context output]}
(recur post (set.has post output)))
@@ -354,8 +354,8 @@
(def: (assumed? [e a] assumptions)
(-> Assumption (List Assumption) Bit)
(list.any? (function (_ [e' a'])
- (and (//\= e e')
- (//\= a a')))
+ (and (//#= e e')
+ (//#= a a')))
assumptions))
... TODO: "if_can_bind" can be optimized...
@@ -393,8 +393,8 @@
... TODO: "check_vars" can be optimized...
(def: (check_vars check' assumptions idE idA)
(-> (Checker Type) (Checker Var))
- (if (!n\= idE idA)
- (check\in assumptions)
+ (if (!n#= idE idA)
+ (check#in assumptions)
(do [! ..monad]
[ebound (attempt (..bound idE))
abound (attempt (..bound idA))]
@@ -433,7 +433,7 @@
(do !
[ringE (..ring idE)
ringA (..ring idA)]
- (if (\ set.equivalence = ringE ringA)
+ (if (# set.equivalence = ringE ringA)
(in assumptions)
... Fuse 2 rings
(do !
@@ -468,7 +468,7 @@
[actual_input actual_function] actual]
(case [expected_function actual_function]
[{.#Ex exE} {.#Ex exA}]
- (if (!n\= exE exA)
+ (if (!n#= exE exA)
(check' assumptions expected_input actual_input)
..silent_failure!)
@@ -560,7 +560,7 @@
(if (for [... TODO: Remove this once JPHP is gone.
@.php false]
(same? expected actual))
- (check\in assumptions)
+ (check#in assumptions)
(with ..type_check_failed [expected actual]
(case [expected actual]
[{.#Var idE} {.#Var idA}]
@@ -568,13 +568,13 @@
[{.#Var id} _]
(if_can_bind id actual
- (check\in assumptions)
+ (check#in assumptions)
(function (_ bound)
(check' assumptions bound actual)))
[_ {.#Var id}]
(if_can_bind id expected
- (check\in assumptions)
+ (check#in assumptions)
(function (_ bound)
(check' assumptions expected bound)))
@@ -589,7 +589,7 @@
[{.#Apply A F} _]
(let [new_assumption [expected actual]]
(if (assumed? new_assumption assumptions)
- (check\in assumptions)
+ (check#in assumptions)
(do ..monad
[expected' (..on A F)]
(check' {.#Item new_assumption assumptions} expected' actual))))
@@ -620,13 +620,13 @@
[.#ExQ ..existential])
[{.#Primitive e_name e_params} {.#Primitive a_name a_params}]
- (if (!text\= e_name a_name)
+ (if (!text#= e_name a_name)
(loop [assumptions assumptions
e_params e_params
a_params a_params]
(case [e_params a_params]
[{.#End} {.#End}]
- (check\in assumptions)
+ (check#in assumptions)
[{.#Item e_head e_tail} {.#Item a_head a_tail}]
(do ..monad
@@ -651,8 +651,8 @@
(check' assumptions eO aO))
[{.#Ex e!id} {.#Ex a!id}]
- (if (!n\= e!id a!id)
- (check\in assumptions)
+ (if (!n#= e!id a!id)
+ (check#in assumptions)
..silent_failure!)
[{.#Named _ ?etype} _]
@@ -689,17 +689,17 @@
{.#Primitive name paramsT+}
(|> paramsT+
(monad.each ..monad clean)
- (check\each (|>> {.#Primitive name})))
+ (check#each (|>> {.#Primitive name})))
(^or {.#Parameter _} {.#Ex _} {.#Named _})
- (check\in inputT)
+ (check#in inputT)
(^template [<tag>]
[{<tag> leftT rightT}
(do ..monad
[leftT' (clean leftT)]
(|> (clean rightT)
- (check\each (|>> {<tag> leftT'}))))])
+ (check#each (|>> {<tag> leftT'}))))])
([.#Sum] [.#Product] [.#Function] [.#Apply])
{.#Var id}
diff --git a/stdlib/source/library/lux/type/dynamic.lux b/stdlib/source/library/lux/type/dynamic.lux
index 48fb68378..0f0bf07d8 100644
--- a/stdlib/source/library/lux/type/dynamic.lux
+++ b/stdlib/source/library/lux/type/dynamic.lux
@@ -42,7 +42,7 @@
(with_identifiers [g!type g!value]
(in (list (` (let [[(~ g!type) (~ g!value)] ((~! ..representation) (~ value))]
(: ((~! try.Try) (~ type))
- (if (\ (~! type.equivalence) (~' =)
+ (if (# (~! type.equivalence) (~' =)
(.type (~ type)) (~ g!type))
{try.#Success (:as (~ type) (~ g!value))}
((~! exception.except) ..wrong_type [(.type (~ type)) (~ g!type)])))))))))
diff --git a/stdlib/source/library/lux/type/implicit.lux b/stdlib/source/library/lux/type/implicit.lux
index 1d32fd57c..c94abe40c 100644
--- a/stdlib/source/library/lux/type/implicit.lux
+++ b/stdlib/source/library/lux/type/implicit.lux
@@ -11,10 +11,10 @@
["<[0]>" code {"+" [Parser]}]]]
[data
["[0]" product]
- ["[0]" text ("[1]\[0]" equivalence)
+ ["[0]" text ("[1]#[0]" equivalence)
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" monad mix)]
+ ["[0]" list ("[1]#[0]" monad mix)]
["[0]" dictionary {"+" [Dictionary]}]]]
["[0]" macro
["[0]" code]
@@ -23,7 +23,7 @@
["[0]" number
["n" nat]]]
["[0]" meta]
- ["[0]" type ("[1]\[0]" equivalence)
+ ["[0]" type ("[1]#[0]" equivalence)
["[0]" check {"+" [Check]}]]]])
(def: (type_var id env)
@@ -36,7 +36,7 @@
(type_var id' env)
_
- (\ meta.monad in type))
+ (# meta.monad in type))
{.#Some [_ {.#None}]}
(meta.failure (format "Unbound type-var " (%.nat id)))
@@ -73,12 +73,12 @@
{.#Product left right}
(if (n.= 0 idx)
- (\ check.monad in left)
+ (# check.monad in left)
(member_type (-- idx) right))
_
(if (n.= 0 idx)
- (\ check.monad in sig_type)
+ (# check.monad in sig_type)
(check.failure (format "Cannot find member type " (%.nat idx) " for " (%.type sig_type))))))
(def: (member_name member)
@@ -93,8 +93,8 @@
[this_module_name meta.current_module_name
imp_mods (meta.imported_modules this_module_name)
tag_lists (monad.each ! meta.tag_lists imp_mods)
- .let [tag_lists (|> tag_lists list\conjoint (list\each product.left) list\conjoint)
- candidates (list.only (|>> product.right (text\= simple_name))
+ .let [tag_lists (|> tag_lists list#conjoint (list#each product.left) list#conjoint)
+ candidates (list.only (|>> product.right (text#= simple_name))
tag_lists)]]
(case candidates
{.#End}
@@ -107,7 +107,7 @@
(meta.failure (format "Too many candidate tags: " (%.list %.name candidates))))))
_
- (\ meta.monad in member)))
+ (# meta.monad in member)))
(def: (implicit_member member)
(-> Name (Meta [Nat Type]))
@@ -118,7 +118,7 @@
(def: .public (compatible_type? interface candidate)
(-> Type Type Bit)
- (with_expansions [<found?> (type\= interface candidate)]
+ (with_expansions [<found?> (type#= interface candidate)]
(<| (or <found?>)
(let [[parameters candidate] (type.flat_univ_q candidate)])
@@ -135,8 +135,8 @@
(def: (available_definitions sig_type source_module target_module constants aggregate)
(-> Type Text Text (List [Text Definition]) (-> (List [Name Type]) (List [Name Type])))
- (list\mix (function (_ [name [exported? def_type def_value]] aggregate)
- (if (and (or (text\= target_module source_module)
+ (list#mix (function (_ [name [exported? def_type def_value]] aggregate)
+ (if (and (or (text#= target_module source_module)
exported?)
(compatible_type? sig_type def_type))
{.#Item [[source_module name] def_type] aggregate}
@@ -148,11 +148,11 @@
(-> Type (Meta (List [Name Type])))
(do meta.monad
[local_batches meta.locals
- .let [total_locals (list\mix (function (_ [name type] table)
+ .let [total_locals (list#mix (function (_ [name type] table)
(try.else table (dictionary.has' name type table)))
(: (Dictionary Text Type)
(dictionary.empty text.hash))
- (list\conjoint local_batches))]]
+ (list#conjoint local_batches))]]
(in (|> total_locals
dictionary.entries
(list.all (function (_ [name type])
@@ -173,7 +173,7 @@
[this_module_name meta.current_module_name
imported_modules (meta.imported_modules this_module_name)
accessible_definitions (monad.each ! meta.definitions imported_modules)]
- (in (list\mix (function (_ [imported_module definitions] tail)
+ (in (list#mix (function (_ [imported_module definitions] tail)
(available_definitions sig_type imported_module this_module_name definitions tail))
{.#End}
(list.zipped/2 imported_modules accessible_definitions)))))
@@ -211,7 +211,7 @@
final_output]))
_
- (\ check.monad in [(list) type])))
+ (# check.monad in [(list) type])))
(def: (ensure_function_application! member_type input_types expected_output)
(-> Type (List Type) Type (Check []))
@@ -232,7 +232,7 @@
(do meta.monad
[compiler meta.compiler_state]
(case (|> alts
- (list\each (function (_ [alt_name alt_type])
+ (list#each (function (_ [alt_name alt_type])
(case (check.result context
(do [! check.monad]
[[tvars alt_type] (concrete_type alt_type)
@@ -246,7 +246,7 @@
{.#Right =deps}
(list [alt_name =deps]))))
- list\conjoint)
+ list#conjoint)
{.#End}
(meta.failure (format "No candidates for provisioning: " (%.type dep)))
@@ -269,7 +269,7 @@
(check.failure (format "No candidates for provisioning: " (%.type dep)))
{.#Item winner {.#End}}
- (\ check.monad in winner)
+ (# check.monad in winner)
_
(check.failure (format "Too many candidates for provisioning: " (%.type dep) " --- " (%.list (|>> product.left %.name) candidates))))
@@ -281,7 +281,7 @@
[compiler meta.compiler_state
context meta.type_context]
(case (|> alts
- (list\each (function (_ [alt_name alt_type])
+ (list#each (function (_ [alt_name alt_type])
(case (<| (check.result context)
(do [! check.monad]
[[tvars alt_type] (concrete_type alt_type)
@@ -297,7 +297,7 @@
{.#Right =deps}
(list [alt_name =deps]))))
- list\conjoint)
+ list#conjoint)
{.#End}
(meta.failure (format "No alternatives for " (%.type (type.function input_types output_type))))
@@ -332,9 +332,9 @@
(code.identifier constructor)
_
- (` ((~ (code.identifier constructor)) (~+ (list\each instance$ dependencies))))))
+ (` ((~ (code.identifier constructor)) (~+ (list#each instance$ dependencies))))))
-(syntax: .public (\\ [member <code>.identifier
+(syntax: .public (## [member <code>.identifier
args (<>.or (<>.and (<>.some <code>.identifier) <code>.end!)
(<>.and (<>.some <code>.any) <code>.end!))])
(case args
@@ -349,22 +349,22 @@
(meta.failure (format "No implementation could be found for member: " (%.name member)))
{.#Item chosen {.#End}}
- (in (list (` (\ (~ (instance$ chosen))
+ (in (list (` (# (~ (instance$ chosen))
(~ (code.local_identifier (product.right member)))
- (~+ (list\each code.identifier args))))))
+ (~+ (list#each code.identifier args))))))
_
(meta.failure (format "Too many implementations available: "
(|> chosen_ones
- (list\each (|>> product.left %.name))
+ (list#each (|>> product.left %.name))
(text.interposed ", "))
" --- for type: " (%.type sig_type)))))
{.#Right [args _]}
(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)))))))
+ (in (list (` (let [(~+ (|> args (list.zipped/2 labels) (list#each ..pair_list) list#conjoint))]
+ (..## (~ (code.identifier member)) (~+ labels)))))))
))
(def: (implicit_bindings amount)
@@ -382,15 +382,15 @@
(do meta.monad
[g!implicit+ (implicit_bindings (list.size implementations))]
(in (list (` (let [(~+ (|> (list.zipped/2 g!implicit+ implementations)
- (list\each (function (_ [g!implicit implementation])
+ (list#each (function (_ [g!implicit implementation])
(list g!implicit implementation)))
- list\conjoint))]
+ list#conjoint))]
(~ body)))))))
(syntax: .public (implicit: [implementations ..implicits])
(do meta.monad
[g!implicit+ (implicit_bindings (list.size implementations))]
(in (|> (list.zipped/2 g!implicit+ implementations)
- (list\each (function (_ [g!implicit implementation])
+ (list#each (function (_ [g!implicit implementation])
(` (def: .private (~ g!implicit)
(~ implementation)))))))))
diff --git a/stdlib/source/library/lux/type/poly.lux b/stdlib/source/library/lux/type/poly.lux
index 705c72ecc..acafa53e0 100644
--- a/stdlib/source/library/lux/type/poly.lux
+++ b/stdlib/source/library/lux/type/poly.lux
@@ -7,14 +7,14 @@
["[0]" monad {"+" [do]}]]
[control
["[0]" maybe]
- ["<>" parser ("[1]\[0]" monad)
+ ["<>" parser ("[1]#[0]" monad)
["<[0]>" type {"+" [Env]}]
["<[0]>" code {"+" [Parser]}]]]
[data
["[0]" product]
["[0]" text]
[collection
- ["[0]" list ("[1]\[0]" functor)]
+ ["[0]" list ("[1]#[0]" functor)]
["[0]" dictionary]]]
[macro {"+" [with_identifiers]}
["[0]" code]
@@ -29,7 +29,7 @@
<code>.local_identifier
<code>.any)]
(<>.either (<>.and <code>.any private)
- (<>.and (<>\in (` .private)) private))))
+ (<>.and (<>#in (` .private)) private))))
(syntax: .public (poly: [[export_policy name body] ..polyP])
(with_identifiers [g!_ g!type g!output]
@@ -53,7 +53,7 @@
(`` (case type
{.#Primitive name params}
(` {.#Primitive (~ (code.text name))
- (.list (~+ (list\each (code env) params)))})
+ (.list (~+ (list#each (code env) params)))})
(^template [<tag>]
[{<tag> idx}
@@ -80,7 +80,7 @@
(^template [<macro> <tag> <flattener>]
[{<tag> left right}
- (` (<macro> (~+ (list\each (code env) (<flattener> type)))))])
+ (` (<macro> (~+ (list#each (code env) (<flattener> type)))))])
([.Union .#Sum type.flat_variant]
[.Tuple .#Product type.flat_tuple])
@@ -89,7 +89,7 @@
(^template [<tag>]
[{<tag> scope body}
- (` {<tag> (.list (~+ (list\each (code env) scope)))
+ (` {<tag> (.list (~+ (list#each (code env) scope)))
(~ (code env body))})])
([.#UnivQ] [.#ExQ])
)))
diff --git a/stdlib/source/library/lux/type/quotient.lux b/stdlib/source/library/lux/type/quotient.lux
index a3a79bfd2..e38951591 100644
--- a/stdlib/source/library/lux/type/quotient.lux
+++ b/stdlib/source/library/lux/type/quotient.lux
@@ -57,4 +57,4 @@
(All (_ t c %) (-> (Equivalence c) (Equivalence (..Quotient t c %))))
(def: (= reference sample)
- (\ super = (..label reference) (..label sample))))
+ (# super = (..label reference) (..label sample))))
diff --git a/stdlib/source/library/lux/type/resource.lux b/stdlib/source/library/lux/type/resource.lux
index 23d504446..baad50a5b 100644
--- a/stdlib/source/library/lux/type/resource.lux
+++ b/stdlib/source/library/lux/type/resource.lux
@@ -16,7 +16,7 @@
[collection
["[0]" set]
["[0]" row {"+" [Row]}]
- ["[0]" list ("[1]\[0]" functor mix)]]]
+ ["[0]" list ("[1]#[0]" functor mix)]]]
["[0]" macro
[syntax {"+" [syntax:]}]]
[math
@@ -45,7 +45,7 @@
(def: (in value)
(function (_ keys)
- (\ monad in [keys value])))
+ (# monad in [keys value])))
(def: (then f input)
(function (_ keysI)
@@ -88,7 +88,7 @@
[(def: .public (<name> monad value)
(All (_ ! v) (Ex (_ k) (-> (Monad !) v (Affine ! (Key <mode> k) (Res k v)))))
(function (_ keys)
- (\ monad in [[(<key> []) keys] (:abstraction value)])))]
+ (# monad in [[(<key> []) keys] (:abstraction value)])))]
[ordered Ordered ..ordered_key]
[commutative Commutative ..commutative_key]
@@ -98,7 +98,7 @@
(All (_ ! v k m)
(-> (Monad !) (Res k v) (Relevant ! (Key m k) v)))
(function (_ [key keys])
- (\ monad in [keys (:representation resource)])))
+ (# monad in [keys (:representation resource)])))
)
(exception: .public (index_cannot_be_repeated [index Nat])
@@ -124,7 +124,7 @@
(def: (no_op monad)
(All (_ m) (-> (Monad m) (Linear m Any)))
(function (_ context)
- (\ monad in [context []])))
+ (# monad in [context []])))
(syntax: .public (exchange [swaps ..indices])
(macro.with_identifiers [g!_ g!context g!!]
@@ -134,7 +134,7 @@
{.#Item head tail}
(do [! meta.monad]
- [.let [max_idx (list\mix n.max head tail)]
+ [.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
(function (_ from to)
@@ -145,8 +145,8 @@
swaps)
maybe.trusted
row.list)
- g!inputsT+ (list\each (|>> (~) (..Key ..Commutative) (`)) g!inputs)
- g!outputsT+ (list\each (|>> (~) (..Key ..Commutative) (`)) g!outputs)]]
+ g!inputsT+ (list#each (|>> (~) (..Key ..Commutative) (`)) g!inputs)
+ g!outputsT+ (list#each (|>> (~) (..Key ..Commutative) (`)) g!outputs)]]
(in (list (` (: (All ((~ g!_) (~ g!!) (~+ g!inputs) (~ g!context))
(-> ((~! monad.Monad) (~ g!!))
(Procedure (~ g!!)
@@ -154,7 +154,7 @@
[(~+ g!outputsT+) (~ g!context)]
.Any)))
(function ((~ g!_) (~ g!!) [(~+ g!inputs) (~ g!context)])
- (\ (~ g!!) (~' in) [[(~+ g!outputs) (~ g!context)] []]))))))))))
+ (# (~ g!!) (~' in) [[(~+ g!outputs) (~ g!context)] []]))))))))))
(def: amount
(Parser Nat)
@@ -178,7 +178,7 @@
[<to> (~ g!context)]
.Any)))
(function ((~ g!_) (~ g!!) [<from> (~ g!context)])
- (\ (~ g!!) (~' in) [[<to> (~ g!context)] []])))))))))]
+ (# (~ g!!) (~' in) [[<to> (~ g!context)] []])))))))))]
[group (~+ g!keys) [(~+ g!keys)]]
[un_group [(~+ g!keys)] (~+ g!keys)]
diff --git a/stdlib/source/library/lux/type/unit.lux b/stdlib/source/library/lux/type/unit.lux
index 4a47eaf50..8da26b424 100644
--- a/stdlib/source/library/lux/type/unit.lux
+++ b/stdlib/source/library/lux/type/unit.lux
@@ -8,7 +8,7 @@
[order {"+" [Order]}]
[enum {"+" [Enum]}]]
[control
- ["<>" parser ("[1]\[0]" monad)
+ ["<>" parser ("[1]#[0]" monad)
["<[0]>" code {"+" [Parser]}]]]
[data
["[0]" text
@@ -146,8 +146,8 @@
(def: .public (re_scaled from to quantity)
(All (_ si so u) (-> (Scale si) (Scale so) (Qty (si u)) (Qty (so u))))
- (let [[numerator denominator] (ratio./ (\ from ratio)
- (\ to ratio))]
+ (let [[numerator denominator] (ratio./ (# from ratio)
+ (# to ratio))]
(|> quantity
out'
(i.* (.int numerator))
diff --git a/stdlib/source/library/lux/world/console.lux b/stdlib/source/library/lux/world/console.lux
index 276fd51de..937d05187 100644
--- a/stdlib/source/library/lux/world/console.lux
+++ b/stdlib/source/library/lux/world/console.lux
@@ -32,7 +32,7 @@
(`` (implementation
(~~ (template [<capability>]
[(def: <capability>
- (|>> (\ console <capability>) async.future))]
+ (|>> (# console <capability>) async.future))]
[read]
[read_line]
@@ -84,7 +84,7 @@
(def: (read _)
(|> jvm_input
java/io/InputStream::read
- (\ (try.with io.monad) each .nat)))
+ (# (try.with io.monad) each .nat)))
(def: (read_line _)
(java/io/Console::readLine jvm_console))
@@ -100,7 +100,7 @@
(def: .public (write_line message console)
(All (_ !) (-> Text (Console !) (! (Try Any))))
- (\ console write (format message text.new_line)))
+ (# console write (format message text.new_line)))
(type: .public (Mock s)
(Interface
@@ -121,7 +121,7 @@
[(def: (<method> _)
(do [! io.monad]
[|state| (atom.read! state)]
- (case (\ mock <mock> |state|)
+ (case (# mock <mock> |state|)
{try.#Success [|state| output]}
(do !
[_ (atom.write! |state| state)]
@@ -137,7 +137,7 @@
(def: (write input)
(do [! io.monad]
[|state| (atom.read! state)]
- (case (\ mock on_write input |state|)
+ (case (# mock on_write input |state|)
{try.#Success |state|}
(do !
[_ (atom.write! |state| state)]
@@ -149,7 +149,7 @@
(def: (close _)
(do [! io.monad]
[|state| (atom.read! state)]
- (case (\ mock on_close |state|)
+ (case (# mock on_close |state|)
{try.#Success |state|}
(do !
[_ (atom.write! |state| state)]
diff --git a/stdlib/source/library/lux/world/db/jdbc.lux b/stdlib/source/library/lux/world/db/jdbc.lux
index c67d9a8bb..d086a743d 100644
--- a/stdlib/source/library/lux/world/db/jdbc.lux
+++ b/stdlib/source/library/lux/world/db/jdbc.lux
@@ -8,7 +8,7 @@
["[0]" try {"+" [Try]}]
["ex" exception]
[concurrency
- ["[0]" async {"+" [Async]} ("[1]\[0]" monad)]]
+ ["[0]" async {"+" [Async]} ("[1]#[0]" monad)]]
[security
["!" capability {"+" [capability:]}]]]
[data
@@ -108,7 +108,7 @@
(-> (DB IO) (DB Async))
(`` (implementation
(~~ (template [<name> <forge>]
- [(def: <name> (<forge> (|>> (!.use (\ db <name>)) async.future)))]
+ [(def: <name> (<forge> (|>> (!.use (# db <name>)) async.future)))]
[execute can_execute]
[insert can_insert]
@@ -165,7 +165,7 @@
(do (try.with io.monad)
[db (..connect creds)
result (action db)
- _ (!.use (\ db close) [])]
+ _ (!.use (# db close) [])]
(in result)))
(def: .public (with_async_db creds action)
@@ -176,5 +176,5 @@
(do (try.with async.monad)
[db (async.future (..connect creds))
result (action (..async db))
- _ (async\in (io.run! (!.use (\ db close) [])))]
+ _ (async#in (io.run! (!.use (# db close) [])))]
(in result)))
diff --git a/stdlib/source/library/lux/world/db/sql.lux b/stdlib/source/library/lux/world/db/sql.lux
index dd0a2dd7e..dd3472474 100644
--- a/stdlib/source/library/lux/world/db/sql.lux
+++ b/stdlib/source/library/lux/world/db/sql.lux
@@ -6,10 +6,10 @@
[data
[number
["i" int]]
- ["[0]" text ("[1]\[0]" equivalence)
+ ["[0]" text ("[1]#[0]" equivalence)
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" functor)]]]
+ ["[0]" list ("[1]#[0]" functor)]]]
[macro
["[0]" template]]
[type
@@ -112,7 +112,7 @@
(def: listing
(-> (List (SQL Any)) Text)
- (|>> (list\each (|>> :representation))
+ (|>> (list#each (|>> :representation))
(text.interposed ", ")))
... Value
@@ -219,8 +219,8 @@
_
(|> columns
- (list\each (.function (_ [column alias])
- (if (text\= ..no_alias alias)
+ (list#each (.function (_ [column alias])
+ (if (text#= ..no_alias alias)
(:representation column)
(format (:representation column) " AS " alias))))
(text.interposed ", ")))
@@ -300,7 +300,7 @@
(format (:representation query)
" ORDER BY "
(|> pairs
- (list\each (.function (_ [value order])
+ (list#each (.function (_ [value order])
(format (:representation value) " " (:representation order))))
(text.interposed ", "))))))
@@ -327,7 +327,7 @@
(..parenthesize (..listing columns))
" VALUES "
(|> rows
- (list\each (|>> ..listing ..parenthesize))
+ (list#each (|>> ..listing ..parenthesize))
(text.interposed ", "))
)))
@@ -340,7 +340,7 @@
_
(format " SET " (|> pairs
- (list\each (.function (_ [column value])
+ (list#each (.function (_ [column value])
(format (:representation column) "=" (:representation value))))
(text.interposed ", ")))))))
diff --git a/stdlib/source/library/lux/world/file.lux b/stdlib/source/library/lux/world/file.lux
index 5a8c23c48..2aee13222 100644
--- a/stdlib/source/library/lux/world/file.lux
+++ b/stdlib/source/library/lux/world/file.lux
@@ -7,23 +7,23 @@
["[0]" monad {"+" [Monad do]}]]
[control
[pipe {"+" [case>]}]
- ["[0]" maybe ("[1]\[0]" functor)]
- ["[0]" try {"+" [Try]} ("[1]\[0]" functor)]
+ ["[0]" maybe ("[1]#[0]" functor)]
+ ["[0]" try {"+" [Try]} ("[1]#[0]" functor)]
["[0]" exception {"+" [exception:]}]
- ["[0]" io {"+" [IO]} ("[1]\[0]" functor)]
+ ["[0]" io {"+" [IO]} ("[1]#[0]" functor)]
["[0]" function]
[concurrency
["[0]" async {"+" [Async]}]
["[0]" stm {"+" [Var STM]}]]]
[data
- ["[0]" bit ("[1]\[0]" equivalence)]
+ ["[0]" bit ("[1]#[0]" equivalence)]
["[0]" product]
["[0]" binary {"+" [Binary]}]
- ["[0]" text ("[1]\[0]" equivalence)
+ ["[0]" text ("[1]#[0]" equivalence)
["%" format {"+" [format]}]]
[collection
["[0]" array {"+" [Array]}]
- ["[0]" list ("[1]\[0]" functor)]
+ ["[0]" list ("[1]#[0]" functor)]
["[0]" dictionary {"+" [Dictionary]}]]]
[macro
["[0]" template]]
@@ -79,7 +79,7 @@
(def: (un_rooted fs path)
(All (_ !) (-> (System !) Path (Maybe [Path Text])))
- (let [/ (\ fs separator)]
+ (let [/ (# fs separator)]
(case (text.last_index / path)
{.#None}
{.#None}
@@ -94,24 +94,24 @@
(All (_ !) (-> (System !) Path (Maybe Path)))
(|> path
(..un_rooted fs)
- (maybe\each product.left)))
+ (maybe#each product.left)))
(def: .public (name fs path)
(All (_ !) (-> (System !) Path Text))
(|> path
(..un_rooted fs)
- (maybe\each product.right)
+ (maybe#each product.right)
(maybe.else path)))
(def: .public (async fs)
(-> (System IO) (System Async))
(`` (implementation
(def: separator
- (\ fs separator))
+ (# fs separator))
(~~ (template [<name>]
[(def: <name>
- (|>> (\ fs <name>)
+ (|>> (# fs <name>)
async.future))]
[file?]
@@ -129,7 +129,7 @@
(~~ (template [<name>]
[(def: (<name> input path)
- (async.future (\ fs <name> input path)))]
+ (async.future (# fs <name> input path)))]
[modify]
[write]
@@ -139,7 +139,7 @@
(def: .public (rooted fs parent child)
(All (_ !) (-> (System !) Path Text Path))
- (format parent (\ fs separator) child))
+ (format parent (# fs separator) child))
(template [<name>]
[(exception: .public (<name> [file Path])
@@ -214,7 +214,7 @@
[(def: <name>
(|>> java/io/File::new
<method>
- (io\each (|>> (try.else false)))))]
+ (io#each (|>> (try.else false)))))]
[file? java/io/File::isFile]
[directory? java/io/File::isDirectory]
@@ -234,11 +234,11 @@
(|> children
(array.list {.#None})
(monad.only ! (|>> <method>))
- (\ ! each (monad.each ! (|>> java/io/File::getAbsolutePath)))
- (\ ! conjoint))
+ (# ! each (monad.each ! (|>> java/io/File::getAbsolutePath)))
+ (# ! conjoint))
{.#None}
- (\ io.monad in (exception.except ..cannot_find_directory [path])))))]
+ (# io.monad in (exception.except ..cannot_find_directory [path])))))]
[directory_files java/io/File::isFile]
[sub_directories java/io/File::isDirectory]
@@ -247,12 +247,12 @@
(def: file_size
(|>> java/io/File::new
java/io/File::length
- (\ (try.with io.monad) each .nat)))
+ (# (try.with io.monad) each .nat)))
(def: last_modified
(|>> java/io/File::new
(java/io/File::lastModified)
- (\ (try.with io.monad) each (|>> duration.of_millis instant.absolute))))
+ (# (try.with io.monad) each (|>> duration.of_millis instant.absolute))))
(def: can_execute?
(|>> java/io/File::new
@@ -268,7 +268,7 @@
_ (java/lang/AutoCloseable::close stream)]
(if (i.= size bytes_read)
(in data)
- (\ io.monad in (exception.except ..cannot_read_all_data path)))))
+ (# io.monad in (exception.except ..cannot_read_all_data path)))))
(def: (delete path)
(|> path
@@ -452,13 +452,13 @@
(Fs::readdir [path (..value_callback write!)] node_fs))]
(|> subs
(array.list {.#None})
- (list\each (|>> (format path ..js_separator)))
+ (list#each (|>> (format path ..js_separator)))
(monad.each ! (function (_ sub)
- (\ ! each (|>> (<method> []) [sub])
+ (# ! each (|>> (<method> []) [sub])
(with_async write! (Try Stats)
(Fs::stat [sub (..value_callback write!)] node_fs)))))
- (\ ! each (|>> (list.only product.right)
- (list\each product.left))))))]
+ (# ! each (|>> (list.only product.right)
+ (list#each product.left))))))]
[directory_files Stats::isFile]
[sub_directories Stats::isDirectory]
@@ -486,7 +486,7 @@
(def: (can_execute? path)
(let [node_fs (..node_fs [])]
- (\ async.monad each
+ (# async.monad each
(|>> (case> {try.#Success _}
true
@@ -584,7 +584,7 @@
(~~ (template [<name> <method>]
[(def: <name>
(|>> <method>
- (io\each (|>> (try.else false)))))]
+ (io#each (|>> (try.else false)))))]
[file? os/path::isfile]
[directory? os/path::isdir]
@@ -598,13 +598,13 @@
(let [! (try.with io.monad)]
(|> path
os::listdir
- (\ ! each (|>> (array.list {.#None})
- (list\each (|>> (format path ..python_separator)))
+ (# ! each (|>> (array.list {.#None})
+ (list#each (|>> (format path ..python_separator)))
(monad.each ! (function (_ sub)
- (\ ! each (|>> [sub]) (<method> [sub]))))
- (\ ! each (|>> (list.only product.right)
- (list\each product.left)))))
- (\ ! conjoint))))]
+ (# ! each (|>> [sub]) (<method> [sub]))))
+ (# ! each (|>> (list.only product.right)
+ (list#each product.left)))))
+ (# ! conjoint))))]
[directory_files os/path::isfile]
[sub_directories os/path::isdir]
@@ -612,11 +612,11 @@
(def: file_size
(|>> os/path::getsize
- (\ (try.with io.monad) each .nat)))
+ (# (try.with io.monad) each .nat)))
(def: last_modified
(|>> os/path::getmtime
- (\ (try.with io.monad) each (|>> f.int
+ (# (try.with io.monad) each (|>> f.int
(i.* +1,000)
duration.of_millis
instant.absolute))))
@@ -710,7 +710,7 @@
(~~ (template [<name> <test>]
[(def: <name>
(|>> <test>
- (io\each (|>> (try.else false)))))]
+ (io#each (|>> (try.else false)))))]
[file? RubyFile::file?]
[directory? RubyFile::directory?]
@@ -726,7 +726,7 @@
children (RubyDir::children [] self)
output (loop [input (|> children
(array.list {.#None})
- (list\each (|>> (format path ..ruby_separator))))
+ (list#each (|>> (format path ..ruby_separator))))
output (: (List ..Path)
(list))]
(case input
@@ -750,7 +750,7 @@
[(def: <name>
(let [! (try.with io.monad)]
(|>> RubyFile::stat
- (\ ! each (`` (|>> (~~ (template.spliced <pipeline>))))))))]
+ (# ! each (`` (|>> (~~ (template.spliced <pipeline>))))))))]
[file_size [RubyStat::size .nat]]
[last_modified [(RubyStat::mtime [])
@@ -852,8 +852,8 @@
... [(def: (<name> data)
... (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]))
+ ... (if (bit#= false (:as Bit outcome))
+ ... (# io.monad in (exception.except ..cannot_write_to_file [path]))
... (in []))))]
... [over_write +0]
@@ -863,8 +863,8 @@
... (def: (content _)
... (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]))
+ ... (if (bit#= false (:as Bit data))
+ ... (# io.monad in (exception.except ..cannot_find_file [path]))
... (in (..unpack [..byte_array_format data])))))
... (def: path
@@ -874,8 +874,8 @@
... [(def: (<name> _)
... (do [! (try.with io.monad)]
... [value (<ffi> [path])]
- ... (if (bit\= false (:as Bit value))
- ... (\ io.monad in (exception.except ..cannot_find_file [path]))
+ ... (if (bit#= false (:as Bit value))
+ ... (# io.monad in (exception.except ..cannot_find_file [path]))
... (in (`` (|> value (~~ (template.spliced <pipeline>))))))))]
... [size ..filesize [.nat]]
@@ -888,22 +888,22 @@
... (def: (modify moment)
... (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]))
+ ... (if (bit#= false (:as Bit verdict))
+ ... (# io.monad in (exception.except ..cannot_find_file [path]))
... (in []))))
... (def: (move destination)
... (do [! (try.with io.monad)]
... [verdict (..rename [path destination])]
- ... (if (bit\= false (:as Bit verdict))
- ... (\ io.monad in (exception.except ..cannot_find_file [path]))
+ ... (if (bit#= false (:as Bit verdict))
+ ... (# io.monad in (exception.except ..cannot_find_file [path]))
... (in (file destination)))))
... (def: (delete _)
... (do (try.with io.monad)
... [verdict (..unlink [path])]
- ... (if (bit\= false (:as Bit verdict))
- ... (\ io.monad in (exception.except ..cannot_find_file [path]))
+ ... (if (bit#= false (:as Bit verdict))
+ ... (# io.monad in (exception.except ..cannot_find_file [path]))
... (in []))))
... ))
@@ -920,8 +920,8 @@
... (loop [input (|> children
... (array.list {.#None})
... (list.only (function (_ child)
- ... (not (or (text\= "." child)
- ... (text\= ".." child))))))
+ ... (not (or (text#= "." child)
+ ... (text#= ".." child))))))
... output (: (List (<capability> IO))
... (list))]
... (case input
@@ -942,8 +942,8 @@
... (def: (discard _)
... (do (try.with io.monad)
... [verdict (..rmdir [path])]
- ... (if (bit\= false (:as Bit verdict))
- ... (\ io.monad in (exception.except ..cannot_find_directory [path]))
+ ... (if (bit#= false (:as Bit verdict))
+ ... (# io.monad in (exception.except ..cannot_find_directory [path]))
... (in []))))
... ))
@@ -954,7 +954,7 @@
... [(def: (<name> path)
... (do [! (try.with io.monad)]
... [verdict (<test> path)]
- ... (\ io.monad in
+ ... (# io.monad in
... (if verdict
... {try.#Success (<constructor> path)}
... (exception.except <exception> [path])))))]
@@ -966,7 +966,7 @@
... (def: (make_file path)
... (do [! (try.with io.monad)]
... [verdict (..touch [path (|> instant.now io.run! instant.relative duration.millis (i./ +1,000))])]
- ... (\ io.monad in
+ ... (# io.monad in
... (if verdict
... {try.#Success (..file path)}
... (exception.except ..cannot_make_file [path])))))
@@ -974,7 +974,7 @@
... (def: (make_directory path)
... (do [! (try.with io.monad)]
... [verdict (..mkdir path)]
- ... (\ io.monad in
+ ... (# io.monad in
... (if verdict
... {try.#Success (..directory path)}
... (exception.except ..cannot_make_directory [path])))))
@@ -989,10 +989,10 @@
(def: .public (exists? monad fs path)
(All (_ !) (-> (Monad !) (System !) Path (! Bit)))
(do monad
- [verdict (\ fs file? path)]
+ [verdict (# fs file? path)]
(if verdict
(in verdict)
- (\ fs directory? path))))
+ (# fs directory? path))))
(type: Mock_File
(Record
@@ -1184,9 +1184,9 @@
[(def: (<method> path)
(|> store
stm.read
- (\ stm.monad each
+ (# stm.monad each
(|>> (<retrieve> separator path)
- (try\each (function.constant true))
+ (try#each (function.constant true))
(try.else false)))
stm.commit!))]
@@ -1233,7 +1233,7 @@
[|store| (stm.read store)]
(in (|> |store|
(..retrieve_mock_file! separator path)
- (try\each (|>> product.right
+ (try#each (|>> product.right
(value@ #mock_content)
binary.size)))))))
@@ -1243,7 +1243,7 @@
[|store| (stm.read store)]
(in (|> |store|
(..retrieve_mock_file! separator path)
- (try\each (|>> product.right
+ (try#each (|>> product.right
(value@ #mock_last_modified))))))))
(def: (can_execute? path)
@@ -1252,7 +1252,7 @@
[|store| (stm.read store)]
(in (|> |store|
(..retrieve_mock_file! separator path)
- (try\each (|>> product.right
+ (try#each (|>> product.right
(value@ #mock_can_execute))))))))
(def: (read path)
@@ -1261,7 +1261,7 @@
[|store| (stm.read store)]
(in (|> |store|
(..retrieve_mock_file! separator path)
- (try\each (|>> product.right
+ (try#each (|>> product.right
(value@ #mock_content))))))))
(def: (delete path)
@@ -1290,7 +1290,7 @@
(do try.monad
[[name file] (..retrieve_mock_file! separator path |store|)]
(..update_mock_file! separator path now
- (\ binary.monoid composite
+ (# binary.monoid composite
(value@ #mock_content file)
content)
|store|)))
@@ -1316,26 +1316,26 @@
(def: (check_or_make_directory monad fs path)
(All (_ !) (-> (Monad !) (System !) Path (! (Try Any))))
(do monad
- [? (\ fs directory? path)]
+ [? (# fs directory? path)]
(if ?
(in {try.#Success []})
- (\ fs make_directory path))))
+ (# fs make_directory path))))
(def: .public (make_directories monad fs path)
(All (_ !) (-> (Monad !) (System !) Path (! (Try Any))))
- (let [rooted? (text.starts_with? (\ fs separator) path)
- segments (text.all_split_by (\ fs separator) path)]
+ (let [rooted? (text.starts_with? (# fs separator) path)
+ segments (text.all_split_by (# fs separator) path)]
(case (if rooted?
(list.after 1 segments)
segments)
{.#End}
- (\ monad in (exception.except ..cannot_make_directory [path]))
+ (# monad in (exception.except ..cannot_make_directory [path]))
{.#Item head tail}
(case head
- "" (\ monad in (exception.except ..cannot_make_directory [path]))
+ "" (# monad in (exception.except ..cannot_make_directory [path]))
_ (loop [current (if rooted?
- (format (\ fs separator) head)
+ (format (# fs separator) head)
head)
next tail]
(do monad
@@ -1347,7 +1347,7 @@
(in {try.#Success []})
{.#Item head tail}
- (recur (format current (\ fs separator) head)
+ (recur (format current (# fs separator) head)
tail))
{try.#Failure error}
@@ -1356,7 +1356,7 @@
(def: .public (make_file monad fs content path)
(All (_ !) (-> (Monad !) (System !) Binary Path (! (Try Any))))
(do monad
- [? (\ fs file? path)]
+ [? (# fs file? path)]
(if ?
(in (exception.except ..cannot_make_file [path]))
- (\ fs write content path))))
+ (# fs write content path))))
diff --git a/stdlib/source/library/lux/world/file/watch.lux b/stdlib/source/library/lux/world/file/watch.lux
index 86620bd7b..de05e5185 100644
--- a/stdlib/source/library/lux/world/file/watch.lux
+++ b/stdlib/source/library/lux/world/file/watch.lux
@@ -20,14 +20,14 @@
["%" format {"+" [format]}]]
[collection
["[0]" dictionary {"+" [Dictionary]}]
- ["[0]" list ("[1]\[0]" functor monoid mix)]
+ ["[0]" list ("[1]#[0]" functor monoid mix)]
["[0]" set]
["[0]" array]]]
[math
[number
["n" nat]]]
[time
- ["[0]" instant {"+" [Instant]} ("[1]\[0]" equivalence)]]
+ ["[0]" instant {"+" [Instant]} ("[1]#[0]" equivalence)]]
[type
[abstract {"+" [abstract: :representation :abstraction]}]]]]
["[0]" //])
@@ -123,11 +123,11 @@
(def: (file_tracker fs directory)
(-> (//.System Async) //.Path (Async (Try File_Tracker)))
(do [! (try.with async.monad)]
- [files (\ fs directory_files directory)]
+ [files (# fs directory_files directory)]
(monad.mix !
(function (_ file tracker)
(do !
- [last_modified (\ fs last_modified file)]
+ [last_modified (# fs last_modified file)]
(in (dictionary.has file last_modified tracker))))
(: File_Tracker
(dictionary.empty text.hash))
@@ -136,11 +136,11 @@
(def: (available_files fs directory)
(-> (//.System Async) //.Path (Async (Try (List [//.Path Instant]))))
(do [! (try.with async.monad)]
- [files (\ fs directory_files directory)]
+ [files (# fs directory_files directory)]
(monad.each ! (function (_ file)
(|> file
- (\ fs last_modified)
- (\ ! each (|>> [file]))))
+ (# fs last_modified)
+ (# ! each (|>> [file]))))
files)))
(def: (available_directory_changes fs [directory [the_concern file_tracker]])
@@ -156,11 +156,11 @@
current_files)
(list))
available (|> current_files
- (list\each product.left)
+ (list#each product.left)
(set.of_list text.hash))
deletions (if (..deletion? the_concern)
(|> (dictionary.entries file_tracker)
- (list\each product.left)
+ (list#each product.left)
(list.only (|>> (set.member? available) not)))
(list))
modifications (list.all (function (_ [path current_modification])
@@ -170,12 +170,12 @@
current_files)]]
(in [[directory
[the_concern
- (let [with_deletions (list\mix dictionary.lacks file_tracker deletions)
- with_creations (list\mix (function (_ [path last_modified] tracker)
+ (let [with_deletions (list#mix dictionary.lacks file_tracker deletions)
+ with_creations (list#mix (function (_ [path last_modified] tracker)
(dictionary.has path last_modified tracker))
with_deletions
creations)
- with_modifications (list\mix (function (_ [path previous_modification current_modification] tracker)
+ with_modifications (list#mix (function (_ [path previous_modification current_modification] tracker)
(dictionary.has path current_modification tracker))
with_creations
modifications)]
@@ -191,7 +191,7 @@
(implementation
(def: (start new_concern path)
(do [! async.monad]
- [exists? (\ fs directory? path)]
+ [exists? (# fs directory? path)]
(if exists?
(do !
[updated? (stm.commit! (..update_watch! new_concern path tracker))]
@@ -234,25 +234,25 @@
(monad.each ! (..available_directory_changes fs)))
_ (do async.monad
[_ (stm.commit! (stm.write (|> changes
- (list\each product.left)
+ (list#each product.left)
(dictionary.of_list text.hash))
tracker))]
(in {try.#Success []}))
.let [[creations modifications deletions]
- (list\mix (function (_ [_ [creations modifications deletions]]
+ (list#mix (function (_ [_ [creations modifications deletions]]
[all_creations all_modifications all_deletions])
- [(list\composite creations all_creations)
- (list\composite modifications all_modifications)
- (list\composite deletions all_deletions)])
+ [(list#composite creations all_creations)
+ (list#composite modifications all_modifications)
+ (list#composite deletions all_deletions)])
[(list) (list) (list)]
changes)]]
- (in ($_ list\composite
- (list\each (|>> product.left [..creation]) creations)
+ (in ($_ list#composite
+ (list#each (|>> product.left [..creation]) creations)
(|> modifications
(list.only (function (_ [path previous_modification current_modification])
- (not (instant\= previous_modification current_modification))))
- (list\each (|>> product.left [..modification])))
- (list\each (|>> [..deletion]) deletions)
+ (not (instant#= previous_modification current_modification))))
+ (list#each (|>> product.left [..modification])))
+ (list#each (|>> [..deletion]) deletions)
)))))
)))
@@ -332,9 +332,9 @@
(def: default_key_concern
(-> java/nio/file/WatchKey (IO Concern))
(|>> java/nio/file/WatchKey::pollEvents
- (\ io.monad each (|>> ..default_list
- (list\each default_event_concern)
- (list\mix ..also ..none)))))
+ (# io.monad each (|>> ..default_list
+ (list#each default_event_concern)
+ (list#mix ..also ..none)))))
(import: java/nio/file/WatchService
["[1]::[0]"
@@ -358,7 +358,7 @@
(def: (default_start watch_events watcher path)
(-> (List Watch_Event) java/nio/file/WatchService //.Path (Async (Try java/nio/file/WatchKey)))
- (let [watch_events' (list\mix (function (_ [index watch_event] watch_events')
+ (let [watch_events' (list#mix (function (_ [index watch_event] watch_events')
(ffi.write! index watch_event watch_events'))
(ffi.array (java/nio/file/WatchEvent$Kind java/lang/Object)
(list.size watch_events))
@@ -395,7 +395,7 @@
(def: (watch_events concern)
(-> Concern (List Watch_Event))
- ($_ list\composite
+ ($_ list#composite
(if (..creation? concern)
(list (:as Watch_Event (java/nio/file/StandardWatchEventKinds::ENTRY_CREATE)))
(list))
diff --git a/stdlib/source/library/lux/world/net/http/client.lux b/stdlib/source/library/lux/world/net/http/client.lux
index 7fed7739e..03b4cc26d 100644
--- a/stdlib/source/library/lux/world/net/http/client.lux
+++ b/stdlib/source/library/lux/world/net/http/client.lux
@@ -8,7 +8,7 @@
[control
[pipe {"+" [case>]}]
["[0]" io {"+" [IO]}]
- ["[0]" maybe ("[1]\[0]" functor)]
+ ["[0]" maybe ("[1]#[0]" functor)]
["[0]" try {"+" [Try]}]
[concurrency
["[0]" async {"+" [Async]}]]
@@ -45,7 +45,7 @@
(All (_ !)
(-> URL //.Headers (Maybe Binary) (Client !)
(! (Try (//.Response !)))))
- (\ client request {<method>} url headers data)))]
+ (# client request {<method>} url headers data)))]
[//.#Post]
[//.#Get]
@@ -120,7 +120,7 @@
(def: (default_body input)
(-> java/io/BufferedInputStream (//.Body IO))
- (|>> (maybe\each (|>> [true]))
+ (|>> (maybe#each (|>> [true]))
(maybe.else [false ..default_buffer_size])
(case> [_ 0]
(do (try.with io.monad)
@@ -143,7 +143,7 @@
(in [buffer_size buffer])
(recur (i.+ bytes_read so_far))))))
(loop [so_far +0
- output (\ binary.monoid identity)]
+ output (# binary.monoid identity)]
(do [! (try.with io.monad)]
[.let [remaining (i.- so_far (.int buffer_size))]
bytes_read (java/io/BufferedInputStream::read buffer so_far remaining input)]
@@ -154,14 +154,14 @@
+0 (in (..body_of output))
_ (|> buffer
(binary.slice 0 (.nat so_far))
- (\ try.functor each
- (|>> (\ binary.monoid composite output)
+ (# try.functor each
+ (|>> (# binary.monoid composite output)
..body_of))
- (\ io.monad in))))
+ (# io.monad in))))
+0 (recur so_far output)
_ (if (i.= remaining bytes_read)
(recur +0
- (\ binary.monoid composite output buffer))
+ (# binary.monoid composite output buffer))
(recur (i.+ bytes_read so_far)
output))))))))))
@@ -209,7 +209,7 @@
headers (..default_headers connection)
input (|> connection
java/net/URLConnection::getInputStream
- (\ ! each (|>> java/io/BufferedInputStream::new)))]
+ (# ! each (|>> java/io/BufferedInputStream::new)))]
(in [(.nat status)
[//.#headers headers
//.#body (..default_body input)]]))))))]
@@ -221,9 +221,9 @@
(-> (Client IO) (Client Async))
(def: (request method url headers data)
- (|> (\ client request method url headers data)
+ (|> (# client request method url headers data)
async.future
- (\ async.monad each
+ (# async.monad each
(|>> (case> {try.#Success [status message]}
{try.#Success [status (revised@ //.#body (: (-> (//.Body IO) (//.Body Async))
(function (_ body)
diff --git a/stdlib/source/library/lux/world/net/http/cookie.lux b/stdlib/source/library/lux/world/net/http/cookie.lux
index a7e2d1644..834dc1d81 100644
--- a/stdlib/source/library/lux/world/net/http/cookie.lux
+++ b/stdlib/source/library/lux/world/net/http/cookie.lux
@@ -4,7 +4,7 @@
[control
[monad {"+" [do]}]
["[0]" try {"+" [Try]}]
- ["p" parser ("[1]\[0]" monad)
+ ["p" parser ("[1]#[0]" monad)
["l" text {"+" [Parser]}]]]
[data
[number
@@ -83,7 +83,7 @@
[context' (..cookie context)
_ (l.this "; ")]
(cookies context'))
- (p\in context)))
+ (p#in context)))
(def: .public (get header)
(-> Text (Try Context))
diff --git a/stdlib/source/library/lux/world/net/http/query.lux b/stdlib/source/library/lux/world/net/http/query.lux
index 6a07496d4..78ed13a06 100644
--- a/stdlib/source/library/lux/world/net/http/query.lux
+++ b/stdlib/source/library/lux/world/net/http/query.lux
@@ -35,7 +35,7 @@
[_ (l.this "%")
code (|> (l.exactly 2 l.hexadecimal)
(p.codec nat.hex)
- (\ ! each text.from_code))
+ (# ! each text.from_code))
tail component]
(in (format head code tail))))))))
@@ -58,7 +58,7 @@
l.end)]
(form (dictionary.has key "" context)))))
... if invalid form data, just stop parsing...
- (\ p.monad in context)))
+ (# p.monad in context)))
(def: .public (parameters raw)
(-> Text (Try Context))
diff --git a/stdlib/source/library/lux/world/net/http/request.lux b/stdlib/source/library/lux/world/net/http/request.lux
index 12287083d..4b60936a6 100644
--- a/stdlib/source/library/lux/world/net/http/request.lux
+++ b/stdlib/source/library/lux/world/net/http/request.lux
@@ -20,7 +20,7 @@
["[0]" json {"+" [JSON]}]
["[0]" context {"+" [Context Property]}]]
[collection
- ["[0]" list ("[1]\[0]" functor mix)]
+ ["[0]" list ("[1]#[0]" functor mix)]
["[0]" dictionary]]]
[world
["[0]" binary {"+" [Binary]}]]]]
@@ -35,11 +35,11 @@
(monad.mix try.monad
(function (_ input [offset output])
(let [amount (binary.size input)]
- (\ try.functor each (|>> [(n.+ amount offset)])
+ (# try.functor each (|>> [(n.+ amount offset)])
(binary.copy amount 0 input offset output))))
[0 (|> inputs
- (list\each binary.size)
- (list\mix n.+ 0)
+ (list#each binary.size)
+ (list#mix n.+ 0)
binary.empty)]
inputs))]
output))
@@ -48,7 +48,7 @@
(-> Body (Async (Try Text)))
(do async.monad
[blobs (frp.list body)]
- (in (\ encoding.utf8 decoded (merge blobs)))))
+ (in (# encoding.utf8 decoded (merge blobs)))))
(def: failure (//response.bad_request ""))
@@ -59,7 +59,7 @@
[?raw (read_text_body (value@ //.#body message))]
(case (do try.monad
[raw ?raw
- content (\ json.codec decoded raw)]
+ content (# json.codec decoded raw)]
(json.result content reader))
{try.#Success input}
(server input request)
diff --git a/stdlib/source/library/lux/world/net/http/response.lux b/stdlib/source/library/lux/world/net/http/response.lux
index 272e906b5..77b2ef773 100644
--- a/stdlib/source/library/lux/world/net/http/response.lux
+++ b/stdlib/source/library/lux/world/net/http/response.lux
@@ -4,7 +4,7 @@
[control
[concurrency
["[0]" async]
- ["[0]" frp ("[1]\[0]" monad)]]]
+ ["[0]" frp ("[1]#[0]" monad)]]]
[data
["[0]" text
["[0]" encoding]]
@@ -12,7 +12,7 @@
["[0]" html]
["[0]" css {"+" [CSS]}]
["[0]" context]
- ["[0]" json {"+" [JSON]} ("[1]\[0]" codec)]]]
+ ["[0]" json {"+" [JSON]} ("[1]#[0]" codec)]]]
["[0]" io]
[world
["[0]" binary {"+" [Binary]}]]]]
@@ -29,7 +29,7 @@
(def: .public empty
(-> Status Response)
- (let [body (frp\in (\ encoding.utf8 encoded ""))]
+ (let [body (frp#in (# encoding.utf8 encoded ""))]
(function (_ status)
[status
[//.#headers (|> context.empty
@@ -52,11 +52,11 @@
[//.#headers (|> context.empty
(header.content_length (binary.size data))
(header.content_type type))
- //.#body (frp\in data)]])
+ //.#body (frp#in data)]])
(def: .public bad_request
(-> Text Response)
- (|>> (\ encoding.utf8 encoded) (content status.bad_request mime.utf_8)))
+ (|>> (# encoding.utf8 encoded) (content status.bad_request mime.utf_8)))
(def: .public ok
(-> MIME Binary Response)
@@ -65,10 +65,10 @@
(template [<name> <type> <mime> <pre>]
[(def: .public <name>
(-> <type> Response)
- (|>> <pre> (\ encoding.utf8 encoded) (..ok <mime>)))]
+ (|>> <pre> (# encoding.utf8 encoded) (..ok <mime>)))]
[text Text mime.utf_8 (<|)]
[html html.Document mime.html html.html]
[css CSS mime.css css.css]
- [json JSON mime.json json\encoded]
+ [json JSON mime.json json#encoded]
)
diff --git a/stdlib/source/library/lux/world/output/video/resolution.lux b/stdlib/source/library/lux/world/output/video/resolution.lux
index f83a2dd75..af2870923 100644
--- a/stdlib/source/library/lux/world/output/video/resolution.lux
+++ b/stdlib/source/library/lux/world/output/video/resolution.lux
@@ -21,7 +21,7 @@
(def: .public equivalence
(Equivalence Resolution)
- (\ ..hash &equivalence))
+ (# ..hash &equivalence))
... https://en.wikipedia.org/wiki/Display_resolution#Common_display_resolutions
(template [<name> <width> <height>]
diff --git a/stdlib/source/library/lux/world/program.lux b/stdlib/source/library/lux/world/program.lux
index 3a4b1417a..48c5f6ada 100644
--- a/stdlib/source/library/lux/world/program.lux
+++ b/stdlib/source/library/lux/world/program.lux
@@ -17,13 +17,13 @@
[parser
["[0]" environment {"+" [Environment]}]]]
[data
- ["[0]" bit ("[1]\[0]" equivalence)]
+ ["[0]" bit ("[1]#[0]" equivalence)]
["[0]" text
["%" format {"+" [format]}]]
[collection
["[0]" array {"+" [Array]}]
["[0]" dictionary {"+" [Dictionary]}]
- ["[0]" list ("[1]\[0]" functor)]]]
+ ["[0]" list ("[1]#[0]" functor)]]]
["[0]" macro
["[0]" template]]
[math
@@ -55,9 +55,9 @@
(def: .public (environment monad program)
(All (_ !) (-> (Monad !) (Program !) (! Environment)))
(do [! monad]
- [variables (\ program available_variables [])
+ [variables (# program available_variables [])
entries (monad.each ! (function (_ name)
- (\ ! each (|>> [name]) (\ program variable name)))
+ (# ! each (|>> [name]) (# program variable name)))
variables)]
(in (|> entries
(list.all (function (_ [name value])
@@ -74,7 +74,7 @@
(~~ (template [<method>]
[(def: <method>
- (\ program <method>))]
+ (# program <method>))]
[home]
[directory]
@@ -82,7 +82,7 @@
(~~ (template [<method>]
[(def: <method>
- (|>> (\ program <method>) async.future))]
+ (|>> (# program <method>) async.future))]
[available_variables]
[variable]
@@ -134,11 +134,11 @@
("static" getProperty [java/lang/String] "?" java/lang/String)
("static" exit [int] "io" void)])
- (def: (jvm\\consume iterator)
+ (def: (jvm##consume iterator)
(All (_ a) (-> (java/util/Iterator a) (List a)))
(if (java/util/Iterator::hasNext iterator)
{.#Item (java/util/Iterator::next iterator)
- (jvm\\consume iterator)}
+ (jvm##consume iterator)}
{.#End}))
)]
(for [@.old (as_is <jvm>)
@@ -309,7 +309,7 @@
(with_expansions [<jvm> (io.io (|> (java/lang/System::getenv)
java/util/Map::keySet
java/util/Set::iterator
- ..jvm\\consume))]
+ ..jvm##consume))]
(for [@.old <jvm>
@.jvm <jvm>
@.js (io.io (if ffi.on_node_js?
@@ -317,12 +317,12 @@
{.#Some process/env}
(|> (Object::entries [process/env])
(array.list {.#None})
- (list\each (|>> (array.read! 0) maybe.trusted)))
+ (list#each (|>> (array.read! 0) maybe.trusted)))
{.#None}
(list))
(list)))
- @.python (\ io.monad each (array.list {.#None}) (os/environ::keys []))
+ @.python (# io.monad each (array.list {.#None}) (os/environ::keys []))
... Lua offers no way to get all the environment variables available.
@.lua (io.io (list))
@.ruby (|> (RubyEnv::keys [])
@@ -333,7 +333,7 @@
... (in (|> environment
... ..array_keys
... (array.list {.#None})
- ... (list\each (function (_ variable)
+ ... (list#each (function (_ variable)
... [variable ("php array read" (:as Nat variable) environment)]))
... (dictionary.of_list text.hash))))
... @.scheme (do io.monad
@@ -392,7 +392,7 @@
@.ruby (io.io (RubyDir::home))
... @.php (do io.monad
... [output (..getenv/1 ["HOME"])]
- ... (in (if (bit\= false (:as Bit output))
+ ... (in (if (bit#= false (:as Bit output))
... "~"
... output)))
]
@@ -423,7 +423,7 @@
@.ruby (io.io (RubyFileUtils::pwd))
... @.php (do io.monad
... [output (..getcwd [])]
- ... (in (if (bit\= false (:as Bit output))
+ ... (in (if (bit#= false (:as Bit output))
... "."
... output)))
]
diff --git a/stdlib/source/library/lux/world/service/journal.lux b/stdlib/source/library/lux/world/service/journal.lux
index 6f080a26f..414b65017 100644
--- a/stdlib/source/library/lux/world/service/journal.lux
+++ b/stdlib/source/library/lux/world/service/journal.lux
@@ -8,9 +8,9 @@
[security
["!" capability {"+" [capability:]}]]]
[data
- ["[0]" text ("[1]\[0]" equivalence)]]
+ ["[0]" text ("[1]#[0]" equivalence)]]
[time
- ["[0]" instant {"+" [Instant]} ("[1]\[0]" equivalence)]]]])
+ ["[0]" instant {"+" [Instant]} ("[1]#[0]" equivalence)]]]])
(type: .public (Entry a)
(Record
@@ -31,15 +31,15 @@
(def: bottom start)
(def: top end)))
-(implementation: .public (equivalence (^open "_\[0]"))
+(implementation: .public (equivalence (^open "_#[0]"))
(All (_ a) (-> (Equivalence a) (Equivalence (Entry a))))
(def: (= reference sample)
- (and (_\= (value@ #what reference) (value@ #what sample))
- (text\= (value@ #why reference) (value@ #why sample))
- (text\= (value@ #how reference) (value@ #how sample))
- (text\= (value@ #who reference) (value@ #who sample))
- (text\= (value@ #where reference) (value@ #where sample))
- (instant\= (value@ #when reference) (value@ #when sample)))))
+ (and (_#= (value@ #what reference) (value@ #what sample))
+ (text#= (value@ #why reference) (value@ #why sample))
+ (text#= (value@ #how reference) (value@ #how sample))
+ (text#= (value@ #who reference) (value@ #who sample))
+ (text#= (value@ #where reference) (value@ #where sample))
+ (instant#= (value@ #when reference) (value@ #when sample)))))
(capability: .public (Can_Write ! a)
(can_write (Entry a) (! (Try Any))))
diff --git a/stdlib/source/library/lux/world/shell.lux b/stdlib/source/library/lux/world/shell.lux
index 29ff3ab2e..c195cb24a 100644
--- a/stdlib/source/library/lux/world/shell.lux
+++ b/stdlib/source/library/lux/world/shell.lux
@@ -25,7 +25,7 @@
["[0]" utf8]]]
[collection
["[0]" array {"+" [Array]}]
- ["[0]" list ("[1]\[0]" mix functor)]
+ ["[0]" list ("[1]#[0]" mix functor)]
["[0]" dictionary]]]
[math
[number {"+" [hex]}
@@ -63,7 +63,7 @@
(`` (implementation
(~~ (template [<method>]
[(def: <method>
- (|>> (\ process <method>)
+ (|>> (# process <method>)
async.future))]
[read]
@@ -90,7 +90,7 @@
(def: (execute input)
(async.future
(do (try.with io.monad)
- [process (\ shell execute input)]
+ [process (# shell execute input)]
(in (..async_process process)))))))
... https://en.wikipedia.org/wiki/Code_injection#Shell_injection
@@ -177,7 +177,7 @@
(def: (jvm::arguments_array arguments)
(-> (List Argument) (Array java/lang/String))
(product.right
- (list\mix (function (_ argument [idx output])
+ (list#mix (function (_ argument [idx output])
[(++ idx) (jvm.write! idx
(:as java/lang/String argument)
output)])
@@ -192,7 +192,7 @@
(-> Environment
(java/util/Map java/lang/String java/lang/String)
(java/util/Map java/lang/String java/lang/String))
- (list\mix (function (_ [key value] target')
+ (list#mix (function (_ [key value] target')
(exec
(java/util/Map::put (:as java/lang/String key)
(:as java/lang/String value)
@@ -253,13 +253,13 @@
(in output)
{.#None}
- (\ io.monad in (exception.except ..no_more_output [])))))]
+ (# io.monad in (exception.except ..no_more_output [])))))]
[read jvm_input]
[fail jvm_error]
))
(def: (write message)
- (java/io/OutputStream::write (\ utf8.codec encoded message) jvm_output))
+ (java/io/OutputStream::write (# utf8.codec encoded message) jvm_output))
(~~ (template [<name> <method>]
[(def: (<name> _)
(<method> process))]
@@ -286,7 +286,7 @@
... https://en.wikipedia.org/wiki/Code_injection#Shell_injection
(def: windows?
(IO (Try Bit))
- (\ (try.with io.monad) each
+ (# (try.with io.monad) each
(|>> java/lang/String::toLowerCase (text.starts_with? "windows"))
(java/lang/System::getProperty "os.name")))
@@ -301,8 +301,8 @@
(java/lang/ProcessBuilder::directory (java/io/File::new working_directory)))]
_ (|> builder
java/lang/ProcessBuilder::environment
- (\ try.functor each (..jvm::load_environment environment))
- (\ io.monad in))
+ (# try.functor each (..jvm::load_environment environment))
+ (# io.monad in))
process (java/lang/ProcessBuilder::start builder)]
(..default_process process))))
)]
@@ -330,7 +330,7 @@
[(def: (<name> _)
(do [! io.monad]
[|state| (atom.read! state)]
- (case (\ mock <mock> |state|)
+ (case (# mock <mock> |state|)
{try.#Success [|state| output]}
(do !
[_ (atom.write! |state| state)]
@@ -346,7 +346,7 @@
(def: (write message)
(do [! io.monad]
[|state| (atom.read! state)]
- (case (\ mock on_write message |state|)
+ (case (# mock on_write message |state|)
{try.#Success |state|}
(do !
[_ (atom.write! |state| state)]
@@ -357,7 +357,7 @@
(def: (destroy _)
(do [! io.monad]
[|state| (atom.read! state)]
- (case (\ mock on_destroy |state|)
+ (case (# mock on_destroy |state|)
{try.#Success |state|}
(do !
[_ (atom.write! |state| state)]
@@ -375,5 +375,5 @@
(def: execute
(|>> mock
- (\ try.monad each (..mock_process (atom.atom init)))
+ (# try.monad each (..mock_process (atom.atom init)))
io.io)))