From b0d725f24335e82eefc77175efc0a5282951316e Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Wed, 6 Apr 2022 21:52:30 -0400 Subject: More efficient binary formatting. --- .github/workflows/test.yml | 15 ++- .../bookmark/application_binary_interface.md | 1 + documentation/bookmark/back_end/c++.md | 1 + documentation/bookmark/back_end/go.md | 4 + documentation/bookmark/back_end/wasm.md | 1 + .../bookmark/composition/inheritance/mixin.md | 4 + .../bookmark/math/geometry/trigonometry.md | 4 + documentation/bookmark/operating_system.md | 1 + .../bookmark/user_interface/color/palette.md | 4 + lux-lua/commands.md | 10 +- lux-lua/project.lux | 6 +- lux-lua/source/program.lux | 40 +++--- stdlib/project.lux | 2 +- .../lux/data/collection/dictionary.lux | 12 +- stdlib/source/documentation/lux/time/duration.lux | 28 ++-- .../library/lux/data/collection/dictionary.lux | 11 +- stdlib/source/library/lux/data/collection/set.lux | 2 +- .../library/lux/data/collection/set/multi.lux | 2 +- stdlib/source/library/lux/data/format/binary.lux | 111 ++++++++-------- stdlib/source/library/lux/time.lux | 4 +- stdlib/source/library/lux/time/duration.lux | 22 +-- stdlib/source/library/lux/time/instant.lux | 4 +- .../library/lux/tool/compiler/default/init.lux | 4 +- .../library/lux/tool/compiler/default/platform.lux | 6 +- .../language/lux/phase/extension/analysis.lux | 24 ++-- .../language/lux/phase/extension/analysis/js.lux | 4 +- .../language/lux/phase/extension/analysis/jvm.lux | 148 ++++++++++----------- .../language/lux/phase/extension/analysis/lua.lux | 46 ++++--- .../language/lux/phase/extension/analysis/lux.lux | 10 +- .../language/lux/phase/extension/analysis/php.lux | 4 +- .../lux/phase/extension/analysis/python.lux | 4 +- .../language/lux/phase/extension/analysis/ruby.lux | 4 +- .../lux/phase/extension/analysis/scheme.lux | 4 +- .../language/lux/phase/extension/directive/lux.lux | 4 +- .../lux/phase/extension/generation/common_lisp.lux | 28 ++-- .../extension/generation/common_lisp/common.lux | 10 +- .../language/lux/phase/extension/generation/js.lux | 28 ++-- .../lux/phase/extension/generation/js/common.lux | 8 +- .../lux/phase/extension/generation/js/host.lux | 4 +- .../lux/phase/extension/generation/jvm.lux | 26 ++-- .../lux/phase/extension/generation/jvm/common.lux | 8 +- .../lux/phase/extension/generation/jvm/host.lux | 136 +++++++++---------- .../lux/phase/extension/generation/lua.lux | 28 ++-- .../lux/phase/extension/generation/lua/common.lux | 8 +- .../lux/phase/extension/generation/lua/host.lux | 6 +- .../lux/phase/extension/generation/php.lux | 28 ++-- .../lux/phase/extension/generation/php/common.lux | 10 +- .../lux/phase/extension/generation/php/host.lux | 68 +++++----- .../lux/phase/extension/generation/python.lux | 28 ++-- .../phase/extension/generation/python/common.lux | 8 +- .../lux/phase/extension/generation/python/host.lux | 4 +- .../language/lux/phase/extension/generation/r.lux | 28 ++-- .../lux/phase/extension/generation/r/common.lux | 10 +- .../lux/phase/extension/generation/ruby.lux | 28 ++-- .../lux/phase/extension/generation/ruby/common.lux | 8 +- .../lux/phase/extension/generation/ruby/host.lux | 4 +- .../lux/phase/extension/generation/scheme.lux | 28 ++-- .../phase/extension/generation/scheme/common.lux | 10 +- .../lux/phase/extension/generation/scheme/host.lux | 68 +++++----- .../generation/common_lisp/extension/common.lux | 52 ++++---- .../language/lux/phase/generation/lua/function.lux | 2 - .../lux/phase/generation/php/extension/common.lux | 56 ++++---- .../lux/phase/generation/r/procedure/common.lux | 10 +- .../lux/phase/generation/r/procedure/host.lux | 2 +- .../phase/generation/scheme/extension/common.lux | 8 +- .../library/lux/tool/compiler/meta/archive.lux | 2 +- .../library/lux/tool/compiler/meta/io/archive.lux | 8 +- stdlib/source/program/aedifex/profile.lux | 2 +- stdlib/source/program/aedifex/project.lux | 2 +- .../source/test/lux/data/collection/dictionary.lux | 10 +- stdlib/source/test/lux/target/lua.lux | 6 +- stdlib/source/test/lux/time/duration.lux | 8 +- 72 files changed, 694 insertions(+), 645 deletions(-) create mode 100644 documentation/bookmark/back_end/go.md create mode 100644 documentation/bookmark/composition/inheritance/mixin.md create mode 100644 documentation/bookmark/math/geometry/trigonometry.md create mode 100644 documentation/bookmark/user_interface/color/palette.md diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6dd130899..931e57ab3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -38,11 +38,12 @@ jobs: with: ruby-version: '2.6' - run: cd ./stdlib/ ../lux.sh with ruby with bibliotheca test -# test_stdlib: -# runs-on: ubuntu-latest -# steps: -# # Test on Lua -# # https://github.com/marketplace/actions/setup-lua-luajit -# - uses: xpol/setup-lua@v0.3 -# - run: cd ./stdlib/ && ../lux.sh clean && ../lux.sh with lua with bibliotheca test && cd .. + test_stdlib_on_lua: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: ./.github/workflows/setup_aedifex + # https://github.com/marketplace/actions/setup-lua-luajit + - uses: xpol/setup-lua@v0.3 + - run: cd ./stdlib/ && ../lux.sh with lua with bibliotheca test diff --git a/documentation/bookmark/application_binary_interface.md b/documentation/bookmark/application_binary_interface.md index a5c7a78fe..0cde5cb58 100644 --- a/documentation/bookmark/application_binary_interface.md +++ b/documentation/bookmark/application_binary_interface.md @@ -1,5 +1,6 @@ # Reference +0. [Interface method calls with the Go register ABI](https://eli.thegreenplace.net/2022/interface-method-calls-with-the-go-register-abi/) 0. [To Save C, We Must Save ABI](https://thephd.dev/to-save-c-we-must-save-abi-fixing-c-function-abi) 0. [Making Libraries Consumable for Non-C++ Developers - Aaron R Robinson - CppCon 2021](https://www.youtube.com/watch?v=4r09pv9v1w0) diff --git a/documentation/bookmark/back_end/c++.md b/documentation/bookmark/back_end/c++.md index e86d2672d..b1ee86bb3 100644 --- a/documentation/bookmark/back_end/c++.md +++ b/documentation/bookmark/back_end/c++.md @@ -51,6 +51,7 @@ # Interpreter +0. [Clasp — Bringing Common Lisp and C++ Together](https://github.com/clasp-developers/clasp) 0. [Cling](https://root.cern/cling/) 0. [Interactive C++ with Cling](https://blog.llvm.org/posts/2020-11-30-interactive-cpp-with-cling/) 0. [Cling Transitions to LLVM's Clang-Repl](https://root.cern/blog/cling-in-llvm/) diff --git a/documentation/bookmark/back_end/go.md b/documentation/bookmark/back_end/go.md new file mode 100644 index 000000000..6d25fd45d --- /dev/null +++ b/documentation/bookmark/back_end/go.md @@ -0,0 +1,4 @@ +# Reference + +0. [Interface method calls with the Go register ABI](https://eli.thegreenplace.net/2022/interface-method-calls-with-the-go-register-abi/) + diff --git a/documentation/bookmark/back_end/wasm.md b/documentation/bookmark/back_end/wasm.md index 9c10078be..4ad7a40e9 100644 --- a/documentation/bookmark/back_end/wasm.md +++ b/documentation/bookmark/back_end/wasm.md @@ -22,6 +22,7 @@ # Reference +0. [Recommendations when publishing a Wasm library](https://nickb.dev/blog/recommendations-when-publishing-a-wasm-library) 0. [Building host implementations for WebAssembly interfaces](https://radu-matei.com/blog/wasm-components-host-implementations/) 0. [WebAssembly Techniques to Speed Up Matrix Multiplication by 120x](https://jott.live/markdown/mm_wasm) 0. [Chasing Memory Bugs through V8 and WebAssembly](https://blog.stackblitz.com/posts/debugging-v8-webassembly/) diff --git a/documentation/bookmark/composition/inheritance/mixin.md b/documentation/bookmark/composition/inheritance/mixin.md new file mode 100644 index 000000000..eec85a062 --- /dev/null +++ b/documentation/bookmark/composition/inheritance/mixin.md @@ -0,0 +1,4 @@ +# Reference + +0. [DynaMix](https://ibob.bg/dynamix/index.html) + diff --git a/documentation/bookmark/math/geometry/trigonometry.md b/documentation/bookmark/math/geometry/trigonometry.md new file mode 100644 index 000000000..8aad6aa16 --- /dev/null +++ b/documentation/bookmark/math/geometry/trigonometry.md @@ -0,0 +1,4 @@ +# Reference + +0. [Implementing cosine in C from scratch](https://austinhenley.com/blog/cosine.html) + diff --git a/documentation/bookmark/operating_system.md b/documentation/bookmark/operating_system.md index 9c96dbc5b..4b1b90904 100644 --- a/documentation/bookmark/operating_system.md +++ b/documentation/bookmark/operating_system.md @@ -19,6 +19,7 @@ ## Operating system +0. [Phantom - forward-thinking concept of OS that's not Linux derived](http://phantomos.org/) 0. [CLOSOS: Specication of a Lisp operating system.](http://metamodular.com/lispos.pdf) 0. [CLOSOS: Specication of a Lisp operating system.](http://metamodular.com/closos.pdf) 0. https://medium.com/@jasonyuan/introducing-mercury-os-f4de45a04289 diff --git a/documentation/bookmark/user_interface/color/palette.md b/documentation/bookmark/user_interface/color/palette.md new file mode 100644 index 000000000..0f2b5fda0 --- /dev/null +++ b/documentation/bookmark/user_interface/color/palette.md @@ -0,0 +1,4 @@ +# Reference + +0. [I want visually distinct colors!: Generate palettes of optimally distinct colors.](https://mokole.com/palette.html) + diff --git a/lux-lua/commands.md b/lux-lua/commands.md index 6783b7b17..d09567831 100644 --- a/lux-lua/commands.md +++ b/lux-lua/commands.md @@ -28,6 +28,14 @@ cd ~/lux/stdlib/ \ ``` cd ~/lux/lux-lua/ \ -&& mvn install:install-file -Dfile=target/program.jar -DgroupId=com.github.luxlang -DartifactId=lux-lua -Dversion=0.6.6-SNAPSHOT -Dpackaging=jar +&& mvn install:install-file -Dfile=target/program.jar -DgroupId=com.github.luxlang -DartifactId=lux-lua -Dversion=0.7.0-SNAPSHOT -Dpackaging=jar + +cd ~/lux/lux-lua/ && mvn deploy:deploy-file \ +-Durl=https://$NEXUS_USERNAME:$NEXUS_PASSWORD@oss.sonatype.org/content/repositories/snapshots/ \ +-Dfile=target/program.jar \ +-DgroupId=com.github.luxlang \ +-DartifactId=lux-python \ +-Dversion=0.7.0-SNAPSHOT \ +-Dpackaging=jar ``` diff --git a/lux-lua/project.lux b/lux-lua/project.lux index f1b9c0c46..1e54cef63 100644 --- a/lux-lua/project.lux +++ b/lux-lua/project.lux @@ -1,5 +1,5 @@ ["" - ["identity" ["com.github.luxlang" "lux-lua" "0.6.6-SNAPSHOT"] + ["identity" ["com.github.luxlang" "lux-lua" "0.7.0-SNAPSHOT"] "description" "A Lua compiler for Lux." "info" ["url" "https://github.com/LuxLang/lux" "scm" "https://github.com/LuxLang/lux.git" @@ -15,9 +15,9 @@ "repositories" ["https://oss.sonatype.org/content/repositories/snapshots/" "https://oss.sonatype.org/service/local/staging/deploy/maven2/"] - "lux" ["com.github.luxlang" "lux-jvm" "0.6.6-SNAPSHOT" "jar"] + "lux" ["com.github.luxlang" "lux-jvm" "0.7.0-SNAPSHOT" "jar"] "dependencies" [... ["com.github.luxlang" "stdlib" "0.6.5" "tar"] - ... ["com.github.luxlang" "lux-jvm-function" "0.6.5" "jar"] + ["com.github.luxlang" "lux-jvm-function" "0.6.5" "jar"] ["org.ow2.asm" "asm" "5.0.4" "jar"] ["org.ow2.asm" "asm-commons" "5.0.4" "jar"] diff --git a/lux-lua/source/program.lux b/lux-lua/source/program.lux index fbe24bba8..1d4a2518b 100644 --- a/lux-lua/source/program.lux +++ b/lux-lua/source/program.lux @@ -218,7 +218,7 @@ {.#Some member} (case (read member) {try.#Success parsed_member} - (again num_keys (++ idx) (array.write! idx (as java/lang/Object parsed_member) output)) + (again num_keys (++ idx) (array.has! idx (as java/lang/Object parsed_member) output)) {try.#Failure error} {try.#Failure error})) @@ -387,7 +387,7 @@ (net/sandius/rembulan/impl/DefaultTable [] (rawget self [idx long]) java/lang/Object (|> value - (array.read! (|> idx ffi.of_long .nat --)) + (array.item (|> idx ffi.of_long .nat --)) maybe.trusted to_host)) @@ -398,7 +398,7 @@ {.#Some field} (case (ffi.of_string (net/sandius/rembulan/ByteString::decode field)) (pattern (static runtime.variant_tag_field)) - (case (array.read! 0 value) + (case (array.item 0 value) {.#Some it} (|> it (as java/lang/Integer) @@ -408,7 +408,7 @@ (undefined)) (pattern (static runtime.variant_flag_field)) - (case (array.read! 1 value) + (case (array.item 1 value) {.#Some _} (as java/lang/Object "") @@ -417,7 +417,7 @@ (pattern (static runtime.variant_value_field)) (|> value - (array.read! 2) + (array.item 2) maybe.trusted to_host) @@ -434,7 +434,7 @@ {.#None} (case (ffi.as java/lang/Long field) {.#Some idx} - (case (array.read! (|> idx ffi.of_long .nat --) value) + (case (array.item (|> idx ffi.of_long .nat --) value) {.#Some it} (to_host it) @@ -463,15 +463,15 @@ (do try.monad [.let [inputs (is (ffi.type [java/lang/Object]) (|> (array.empty 2) - (array.write! 0 ... (as java/lang/Object inputs) - ... (net/sandius/rembulan/impl/ImmutableTable$Builder::build (net/sandius/rembulan/impl/ImmutableTable$Builder::new)) - (as java/lang/Object (lux_structure to_host (as (Array java/lang/Object) inputs)))) - (array.write! 1 ... (as java/lang/Object lux) - ... (net/sandius/rembulan/impl/ImmutableTable$Builder::build (net/sandius/rembulan/impl/ImmutableTable$Builder::new)) - (as java/lang/Object (lux_structure to_host (as (Array java/lang/Object) lux))))))] + (array.has! 0 ... (as java/lang/Object inputs) + ... (net/sandius/rembulan/impl/ImmutableTable$Builder::build (net/sandius/rembulan/impl/ImmutableTable$Builder::new)) + (as java/lang/Object (lux_structure to_host (as (Array java/lang/Object) inputs)))) + (array.has! 1 ... (as java/lang/Object lux) + ... (net/sandius/rembulan/impl/ImmutableTable$Builder::build (net/sandius/rembulan/impl/ImmutableTable$Builder::new)) + (as java/lang/Object (lux_structure to_host (as (Array java/lang/Object) lux))))))] output (net/sandius/rembulan/exec/DirectCallExecutor::call state_context (as java/lang/Object macro) inputs executor)] (|> output - (array.read! 0) + (array.item 0) maybe.trusted (as java/lang/Object) ..read))) @@ -703,7 +703,7 @@ [lua_function (net/sandius/rembulan/load/ChunkLoader::loadTextChunk variable (ffi.as_string "lux compilation") (ffi.as_string (_.code code)) loader) output (net/sandius/rembulan/exec/DirectCallExecutor::call state_context (as java/lang/Object lua_function) (array.empty 0) executor)] - (case (array.read! 0 output) + (case (array.item 0 output) {.#None} (in []) @@ -816,14 +816,14 @@ output (net/sandius/rembulan/exec/DirectCallExecutor::call state_context (as java/lang/Object handler) (|> (array.empty 5) - (array.write! 0 name) - (array.write! 1 (as java/lang/Object (phase_wrapper phase))) - (array.write! 2 (..to_host archive)) - (array.write! 3 (..to_host parameters)) - (array.write! 4 (..to_host state))) + (array.has! 0 name) + (array.has! 1 (as java/lang/Object (phase_wrapper phase))) + (array.has! 2 (..to_host archive)) + (array.has! 3 (..to_host parameters)) + (array.has! 4 (..to_host state))) executor)] (|> output - (array.read! 0) + (array.item 0) maybe.trusted (as java/lang/Object) ..read)))))] diff --git a/stdlib/project.lux b/stdlib/project.lux index 6de4fa930..2ba89ffe9 100644 --- a/stdlib/project.lux +++ b/stdlib/project.lux @@ -63,7 +63,7 @@ ] "lua" - ["lux" ["com.github.luxlang" "lux-lua" "0.6.6-SNAPSHOT" "jar"] + ["lux" ["com.github.luxlang" "lux-lua" "0.7.0-SNAPSHOT" "jar"] ... The OS command to use when running Lua tests. The default is described below. ... "lua" ["lua"] ] diff --git a/stdlib/source/documentation/lux/data/collection/dictionary.lux b/stdlib/source/documentation/lux/data/collection/dictionary.lux index 72bbc43a8..80e23fc70 100644 --- a/stdlib/source/documentation/lux/data/collection/dictionary.lux +++ b/stdlib/source/documentation/lux/data/collection/dictionary.lux @@ -58,15 +58,15 @@ "" [(of_list key_hash kvs)]) -(documentation: /.merged +(documentation: /.composite (format "Merges 2 dictionaries." \n "If any collisions with keys occur, the values of dict2 will overwrite those of dict1.") - [(merged dict2 dict1)]) + [(composite dict2 dict1)]) -(documentation: /.merged_with +(documentation: /.composite_with (format "Merges 2 dictionaries." \n "If any collisions with keys occur, a new value will be computed by applying 'f' to the values of dict2 and dict1.") - [(merged_with f dict2 dict1)]) + [(composite_with f dict2 dict1)]) (documentation: /.re_bound "If there is a value under 'from_key', remove 'from_key' and store the value under 'to_key'." @@ -90,8 +90,8 @@ ..revised ..revised' ..of_list - ..merged - ..merged_with + ..composite + ..composite_with ..re_bound ..sub ($.default /.key_hash) diff --git a/stdlib/source/documentation/lux/time/duration.lux b/stdlib/source/documentation/lux/time/duration.lux index 3eed756a9..fcd2a6706 100644 --- a/stdlib/source/documentation/lux/time/duration.lux +++ b/stdlib/source/documentation/lux/time/duration.lux @@ -1,17 +1,17 @@ (.using - [library - [lux {"-" and} - ["$" documentation {"+" documentation:}] - [control - ["<>" parser - ["<[0]>" code]]] - [data - ["[0]" text {"+" \n} - ["%" format {"+" format}]]] - [macro - ["[0]" template]]]] - [\\library - ["[0]" /]]) + [library + [lux {"-" and} + ["$" documentation {"+" documentation:}] + [control + ["<>" parser + ["<[0]>" code]]] + [data + ["[0]" text {"+" \n} + ["%" format {"+" format}]]] + [macro + ["[0]" template]]]] + [\\library + ["[0]" /]]) (documentation: /.Duration "Durations have a resolution of milli-seconds.") @@ -28,7 +28,7 @@ ..difference ($.default /.of_millis) ($.default /.millis) - ($.default /.merged) + ($.default /.composite) ($.default /.framed) ($.default /.up) ($.default /.down) diff --git a/stdlib/source/library/lux/data/collection/dictionary.lux b/stdlib/source/library/lux/data/collection/dictionary.lux index 8383fc8e1..9c5469265 100644 --- a/stdlib/source/library/lux/data/collection/dictionary.lux +++ b/stdlib/source/library/lux/data/collection/dictionary.lux @@ -4,6 +4,7 @@ [abstract [hash {"+" Hash}] [equivalence {"+" Equivalence}] + [monoid {"+" Monoid}] [functor {"+" Functor}]] [control ["[0]" maybe] @@ -649,14 +650,14 @@ [v values] ) -(def: .public (merged dict2 dict1) +(def: .public (composite dict2 dict1) (All (_ k v) (-> (Dictionary k v) (Dictionary k v) (Dictionary k v))) (node#mix (function (_ [key val] dict) (has key val dict)) dict1 (the #root dict2))) -(def: .public (merged_with f dict2 dict1) +(def: .public (composite_with f dict2 dict1) (All (_ k v) (-> (-> v v v) (Dictionary k v) (Dictionary k v) (Dictionary k v))) (node#mix (function (_ [key val2] dict) (case (value key dict) @@ -732,3 +733,9 @@ (def: (each f fa) (.revised #root (# ..node_functor each f) fa))) + +(implementation: .public (monoid hash) + (All (_ k v) (-> (Hash k) (Monoid (Dictionary k v)))) + + (def: identity (..empty hash)) + (def: composite ..composite)) diff --git a/stdlib/source/library/lux/data/collection/set.lux b/stdlib/source/library/lux/data/collection/set.lux index b0f03ef92..3507442c3 100644 --- a/stdlib/source/library/lux/data/collection/set.lux +++ b/stdlib/source/library/lux/data/collection/set.lux @@ -50,7 +50,7 @@ (def: .public union (All (_ a) (-> (Set a) (Set a) (Set a))) - //.merged) + //.composite) (def: .public (difference sub base) (All (_ a) (-> (Set a) (Set a) (Set a))) diff --git a/stdlib/source/library/lux/data/collection/set/multi.lux b/stdlib/source/library/lux/data/collection/set/multi.lux index 6de0ed5df..2043075cf 100644 --- a/stdlib/source/library/lux/data/collection/set/multi.lux +++ b/stdlib/source/library/lux/data/collection/set/multi.lux @@ -69,7 +69,7 @@ (template [ ] [(def: .public ( parameter subject) (All (_ a) (-> (Set a) (Set a) (Set a))) - (abstraction (dictionary.merged_with (representation parameter) (representation subject))))] + (abstraction (dictionary.composite_with (representation parameter) (representation subject))))] [union n.max] [sum n.+] diff --git a/stdlib/source/library/lux/data/format/binary.lux b/stdlib/source/library/lux/data/format/binary.lux index 3c43cea09..6e9e000ad 100644 --- a/stdlib/source/library/lux/data/format/binary.lux +++ b/stdlib/source/library/lux/data/format/binary.lux @@ -1,6 +1,7 @@ (.using [library [lux {"-" and or nat int rev list type symbol} + [ffi {"+"}] [abstract [monoid {"+" Monoid}] [monad {"+" Monad do}] @@ -8,12 +9,12 @@ [control ["[0]" pipe] ["[0]" function] - ["[0]" try {"+" Try}] ["<>" parser ("[1]#[0]" monad) - ["/" binary {"+" Offset Size Parser}]]] + ["" binary {"+" Offset Size Parser}]]] [data + ["/" binary "_" + ["[1]" \\unsafe {"+" Binary}]] ["[0]" product] - ["[0]" binary {"+" Binary}] [text ["%" format {"+" format}] [encoding @@ -21,18 +22,29 @@ [collection ["[0]" list] ["[0]" sequence {"+" Sequence} ("[1]#[0]" functor)] - ["[0]" set {"+" Set}]]] + ["[0]" set {"+" Set}] + [array + [\\unsafe {"+"}]]]] [macro ["^" pattern]] [math [number - ["[0]" i64] ["n" nat] + ["[0]" i64] ["[0]" frac]]]]]) +(template [ ] + [(template: ( ) + [( ( (.int ) (.int )))])] + + [n#= "lux i64 =" .|>] + [n#+ "lux i64 +" .nat] + [n#* "lux i64 *" .nat] + ) + (def: mask (-> Size (I64 Any)) - (|>> (n.* i64.bits_per_byte) i64.mask)) + (|>> (n#* i64.bits_per_byte) i64.mask)) (type: .public Mutation (-> [Offset Binary] [Offset Binary])) @@ -46,7 +58,7 @@ (def: .public (instance [size mutation]) (-> Specification Binary) - (|> size binary.empty [0] mutation product.right)) + (|> size /.empty [0] mutation product.right)) (implementation: .public monoid (Monoid Specification) @@ -55,7 +67,7 @@ ..no_op) (def: (composite [sizeL mutL] [sizeR mutR]) - [(n.+ sizeL sizeR) + [(n#+ sizeL sizeR) (|>> mutL mutR)])) (type: .public (Writer a) @@ -71,15 +83,13 @@ (function (_ value) [ (function (_ [offset binary]) - [(n.+ offset) - (|> binary - ( offset value) - try.trusted)])]))] - - [bits_8 /.size_8 binary.has_8!] - [bits_16 /.size_16 binary.has_16!] - [bits_32 /.size_32 binary.has_32!] - [bits_64 /.size_64 binary.has_64!] + [(n#+ offset) + ( offset value binary)])]))] + + [bits_8 .size_8 /.has_8!] + [bits_16 .size_16 /.has_16!] + [bits_32 .size_32 /.has_32!] + [bits_64 .size_64 /.has_64!] ) (def: .public (or left right) @@ -92,8 +102,7 @@ [(.++ caseS) (function (_ [offset binary]) (|> binary - (binary.has_8! offset ) - try.trusted + (/.has_8! offset ) [(.++ offset)] caseT))])]) ([0 .#Left left] @@ -135,33 +144,31 @@ (function (_ value) [size (function (_ [offset binary]) - [(n.+ size offset) - (try.trusted - (binary.copy! (n.min size (binary.size value)) - 0 - value - offset - binary))])])) + [(n#+ size offset) + (/.copy! (n.min size (/.size value)) + 0 + value + offset + binary)])])) (template [ ] [(def: .public (Writer Binary) (let [mask (..mask )] (function (_ value) - (let [size (|> value binary.size (i64.and mask)) - size' (n.+ size)] + (let [size (|> value /.size (i64.and mask)) + size' (n#+ size)] [size' (function (_ [offset binary]) - [(n.+ size' offset) - (try.trusted - (do try.monad - [_ ( offset size binary)] - (binary.copy! size 0 value (n.+ offset) binary)))])]))))] - - [binary_8 ..bits_8 /.size_8 binary.has_8!] - [binary_16 ..bits_16 /.size_16 binary.has_16!] - [binary_32 ..bits_32 /.size_32 binary.has_32!] - [binary_64 ..bits_64 /.size_64 binary.has_64!] + [(n#+ size' offset) + (|> binary + ( offset size) + (/.copy! size 0 value (n#+ offset)))])]))))] + + [binary_8 ..bits_8 .size_8 /.has_8!] + [binary_16 ..bits_16 .size_16 /.has_16!] + [binary_32 ..bits_32 .size_32 /.has_32!] + [binary_64 ..bits_64 .size_64 /.has_64!] ) (template [ ] @@ -184,7 +191,7 @@ (let [original_count (sequence.size value) capped_count (i64.and (..mask ) original_count) - value (if (n.= original_count capped_count) + value (if (n#= original_count capped_count) value (|> value sequence.list (list.first capped_count) sequence.of_list)) (open "specification#[0]") ..monoid @@ -194,17 +201,17 @@ (function (_ post pre) (specification#composite pre post)) specification#identity))] - [(n.+ size) + [(n#+ size) (function (_ [offset binary]) - (try.trusted - (do try.monad - [_ ( offset capped_count binary)] - (in (mutation [(n.+ offset) binary])))))])))] - - [sequence_8 /.size_8 binary.has_8!] - [sequence_16 /.size_16 binary.has_16!] - [sequence_32 /.size_32 binary.has_32!] - [sequence_64 /.size_64 binary.has_64!] + (|> binary + ( offset capped_count) + [(n#+ offset)] + mutation))])))] + + [sequence_8 .size_8 /.has_8!] + [sequence_16 .size_16 /.has_16!] + [sequence_32 .size_32 /.has_32!] + [sequence_64 .size_64 /.has_64!] ) (def: .public maybe @@ -240,8 +247,7 @@ [(.++ caseS) (function (_ [offset binary]) (|> binary - (binary.has_8! offset ) - try.trusted + (/.has_8! offset ) [(.++ offset)] caseT))])]) ([0 .#Primitive (..and ..text (..list again))] @@ -275,8 +281,7 @@ [(.++ caseS) (function (_ [offset binary]) (|> binary - (binary.has_8! offset ) - try.trusted + (/.has_8! offset ) [(.++ offset)] caseT))])]) ([0 .#Bit ..bit] diff --git a/stdlib/source/library/lux/time.lux b/stdlib/source/library/lux/time.lux index b0bf5c94c..cb70226c9 100644 --- a/stdlib/source/library/lux/time.lux +++ b/stdlib/source/library/lux/time.lux @@ -155,7 +155,7 @@ (def: (positive space duration) (-> Duration Duration Duration) (if (duration.negative? duration) - (duration.merged space duration) + (duration.composite space duration) duration)) (def: (millis_format millis) @@ -189,7 +189,7 @@ (def: .public (time clock) (-> Clock (Try Time)) - (|> ($_ duration.merged + (|> ($_ duration.composite (duration.up (the #hour clock) duration.hour) (duration.up (the #minute clock) duration.minute) (duration.up (the #second clock) duration.second) diff --git a/stdlib/source/library/lux/time/duration.lux b/stdlib/source/library/lux/time/duration.lux index 2a2d00771..257401f2d 100644 --- a/stdlib/source/library/lux/time/duration.lux +++ b/stdlib/source/library/lux/time/duration.lux @@ -39,7 +39,7 @@ (-> Duration Duration Duration) (abstraction ( (representation param) (representation subject))))] - [i.+ merged] + [i.+ composite] [i.% framed] ) @@ -104,13 +104,13 @@ ) (def: .public leap_year - (..merged ..day ..normal_year)) + (..composite ..day ..normal_year)) (implementation: .public monoid (Monoid Duration) (def: identity ..empty) - (def: composite ..merged)) + (def: composite ..composite)) (template [ ] [(def: )] @@ -172,11 +172,11 @@ seconds (section ..second_suffix "") millis (section ..milli_second_suffix "") .let [span (|> ..empty - (..merged (..up days ..day)) - (..merged (..up hours ..hour)) - (..merged (..up minutes ..minute)) - (..merged (..up seconds ..second)) - (..merged (..up millis ..milli_second)))]] + (..composite (..up days ..day)) + (..composite (..up hours ..hour)) + (..composite (..up minutes ..minute)) + (..composite (..up seconds ..second)) + (..composite (..up millis ..milli_second)))]] (in (case sign {.#Left _} (..inverse span) {.#Right _} span))))) @@ -189,13 +189,13 @@ (def: .public (difference from to) (-> Duration Duration Duration) - (|> from ..inverse (..merged to))) + (|> from ..inverse (..composite to))) (implementation: .public enum (Enum Duration) (def: &order ..order) (def: succ - (..merged ..milli_second)) + (..composite ..milli_second)) (def: pred - (..merged (..inverse ..milli_second)))) + (..composite (..inverse ..milli_second)))) diff --git a/stdlib/source/library/lux/time/instant.lux b/stdlib/source/library/lux/time/instant.lux index b48836c7e..64467ec99 100644 --- a/stdlib/source/library/lux/time/instant.lux +++ b/stdlib/source/library/lux/time/instant.lux @@ -112,7 +112,7 @@ (def: (clock_time duration) (-> Duration Time) (|> (if (# duration.order < duration.empty duration) - (duration.merged duration.day duration) + (duration.composite duration.day duration) duration) duration.millis .nat @@ -139,7 +139,7 @@ (duration.up (.nat (i.* -1 days))) duration.inverse) (duration.up (.nat days) duration.day)) - (duration.merged (duration.up time duration.milli_second)) + (duration.composite (duration.up time duration.milli_second)) ..absolute)))) (implementation: .public codec diff --git a/stdlib/source/library/lux/tool/compiler/default/init.lux b/stdlib/source/library/lux/tool/compiler/default/init.lux index f6c30c1cd..c46cbfa7b 100644 --- a/stdlib/source/library/lux/tool/compiler/default/init.lux +++ b/stdlib/source/library/lux/tool/compiler/default/init.lux @@ -87,8 +87,8 @@ (-> (///directive.State+ anchor expression directive) (///directive.State+ anchor expression directive)))) (function (_ [directive_extensions sub_state]) - [(dictionary.merged directive_extensions - (luxD.bundle expander host_analysis program anchorT,expressionT,directiveT extender)) + [(dictionary.composite directive_extensions + (luxD.bundle expander host_analysis program anchorT,expressionT,directiveT extender)) sub_state])) (type: Reader diff --git a/stdlib/source/library/lux/tool/compiler/default/platform.lux b/stdlib/source/library/lux/tool/compiler/default/platform.lux index c93c30c99..0e6a0f2bc 100644 --- a/stdlib/source/library/lux/tool/compiler/default/platform.lux +++ b/stdlib/source/library/lux/tool/compiler/default/platform.lux @@ -247,7 +247,7 @@ [analysers synthesizers generators - (dictionary.merged directives (host_directive_bundle phase_wrapper))]) + (dictionary.composite directives (host_directive_bundle phase_wrapper))]) (def: .public (initialize context module expander host_analysis platform generation_bundle host_directive_bundle program anchorT,expressionT,directiveT extender import compilation_sources compilation_configuration) @@ -579,7 +579,7 @@ {try.#Success [resulting_archive resulting_state]} (stm.commit! (do stm.monad [[_ [merged_archive _]] (stm.update (function (_ [archive state]) - [(archive.merged resulting_archive archive) + [(archive.composite resulting_archive archive) state]) current)] (in {try.#Success [merged_archive resulting_state]}))))] @@ -668,7 +668,7 @@ (monad.all ..monad))] (in [(|> archive,state/* (list#each product.left) - (list#mix archive.merged archive)) + (list#mix archive.composite archive)) (list#each product.right archive,state/*)]))) (async#in (exception.except ..cannot_import_twice [module duplicates]))))) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis.lux index ac0c5d9a8..3529ba762 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis.lux @@ -1,16 +1,16 @@ (.using - [library - [lux "*" - [data - [collection - ["[0]" dictionary]]]]] - [//// - [analysis {"+" Bundle} - [evaluation {"+" Eval}]]] - ["[0]" / "_" - ["[1][0]" lux]]) + [library + [lux "*" + [data + [collection + ["[0]" dictionary]]]]] + [//// + [analysis {"+" Bundle} + [evaluation {"+" Eval}]]] + ["[0]" / "_" + ["[1][0]" lux]]) (def: .public (bundle eval host_specific) (-> Eval Bundle Bundle) - (dictionary.merged host_specific - (/lux.bundle eval))) + (dictionary.composite host_specific + (/lux.bundle eval))) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/js.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/js.lux index 61dc4713e..5acdad833 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/js.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/js.lux @@ -221,8 +221,8 @@ Bundle (<| (bundle.prefix "js") (|> bundle.empty - (dictionary.merged bundle::array) - (dictionary.merged bundle::object) + (dictionary.composite bundle::array) + (dictionary.composite bundle::object) (bundle.install "constant" js::constant) (bundle.install "apply" js::apply) 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 6d7804b9a..4b7c3e153 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 @@ -786,50 +786,50 @@ Bundle (<| (///bundle.prefix "array") (|> ///bundle.empty - (dictionary.merged (<| (///bundle.prefix "length") - (|> ///bundle.empty - (///bundle.install (reflection.reflection reflection.boolean) (primitive_array_length_handler jvm.boolean)) - (///bundle.install (reflection.reflection reflection.byte) (primitive_array_length_handler jvm.byte)) - (///bundle.install (reflection.reflection reflection.short) (primitive_array_length_handler jvm.short)) - (///bundle.install (reflection.reflection reflection.int) (primitive_array_length_handler jvm.int)) - (///bundle.install (reflection.reflection reflection.long) (primitive_array_length_handler jvm.long)) - (///bundle.install (reflection.reflection reflection.float) (primitive_array_length_handler jvm.float)) - (///bundle.install (reflection.reflection reflection.double) (primitive_array_length_handler jvm.double)) - (///bundle.install (reflection.reflection reflection.char) (primitive_array_length_handler jvm.char)) - (///bundle.install "object" array::length::object)))) - (dictionary.merged (<| (///bundle.prefix "new") - (|> ///bundle.empty - (///bundle.install (reflection.reflection reflection.boolean) (new_primitive_array_handler jvm.boolean)) - (///bundle.install (reflection.reflection reflection.byte) (new_primitive_array_handler jvm.byte)) - (///bundle.install (reflection.reflection reflection.short) (new_primitive_array_handler jvm.short)) - (///bundle.install (reflection.reflection reflection.int) (new_primitive_array_handler jvm.int)) - (///bundle.install (reflection.reflection reflection.long) (new_primitive_array_handler jvm.long)) - (///bundle.install (reflection.reflection reflection.float) (new_primitive_array_handler jvm.float)) - (///bundle.install (reflection.reflection reflection.double) (new_primitive_array_handler jvm.double)) - (///bundle.install (reflection.reflection reflection.char) (new_primitive_array_handler jvm.char)) - (///bundle.install "object" array::new::object)))) - (dictionary.merged (<| (///bundle.prefix "read") - (|> ///bundle.empty - (///bundle.install (reflection.reflection reflection.boolean) (read_primitive_array_handler ..boolean jvm.boolean)) - (///bundle.install (reflection.reflection reflection.byte) (read_primitive_array_handler ..byte jvm.byte)) - (///bundle.install (reflection.reflection reflection.short) (read_primitive_array_handler ..short jvm.short)) - (///bundle.install (reflection.reflection reflection.int) (read_primitive_array_handler ..int jvm.int)) - (///bundle.install (reflection.reflection reflection.long) (read_primitive_array_handler ..long jvm.long)) - (///bundle.install (reflection.reflection reflection.float) (read_primitive_array_handler ..float jvm.float)) - (///bundle.install (reflection.reflection reflection.double) (read_primitive_array_handler ..double jvm.double)) - (///bundle.install (reflection.reflection reflection.char) (read_primitive_array_handler ..char jvm.char)) - (///bundle.install "object" array::read::object)))) - (dictionary.merged (<| (///bundle.prefix "write") - (|> ///bundle.empty - (///bundle.install (reflection.reflection reflection.boolean) (write_primitive_array_handler ..boolean jvm.boolean)) - (///bundle.install (reflection.reflection reflection.byte) (write_primitive_array_handler ..byte jvm.byte)) - (///bundle.install (reflection.reflection reflection.short) (write_primitive_array_handler ..short jvm.short)) - (///bundle.install (reflection.reflection reflection.int) (write_primitive_array_handler ..int jvm.int)) - (///bundle.install (reflection.reflection reflection.long) (write_primitive_array_handler ..long jvm.long)) - (///bundle.install (reflection.reflection reflection.float) (write_primitive_array_handler ..float jvm.float)) - (///bundle.install (reflection.reflection reflection.double) (write_primitive_array_handler ..double jvm.double)) - (///bundle.install (reflection.reflection reflection.char) (write_primitive_array_handler ..char jvm.char)) - (///bundle.install "object" array::write::object)))) + (dictionary.composite (<| (///bundle.prefix "length") + (|> ///bundle.empty + (///bundle.install (reflection.reflection reflection.boolean) (primitive_array_length_handler jvm.boolean)) + (///bundle.install (reflection.reflection reflection.byte) (primitive_array_length_handler jvm.byte)) + (///bundle.install (reflection.reflection reflection.short) (primitive_array_length_handler jvm.short)) + (///bundle.install (reflection.reflection reflection.int) (primitive_array_length_handler jvm.int)) + (///bundle.install (reflection.reflection reflection.long) (primitive_array_length_handler jvm.long)) + (///bundle.install (reflection.reflection reflection.float) (primitive_array_length_handler jvm.float)) + (///bundle.install (reflection.reflection reflection.double) (primitive_array_length_handler jvm.double)) + (///bundle.install (reflection.reflection reflection.char) (primitive_array_length_handler jvm.char)) + (///bundle.install "object" array::length::object)))) + (dictionary.composite (<| (///bundle.prefix "new") + (|> ///bundle.empty + (///bundle.install (reflection.reflection reflection.boolean) (new_primitive_array_handler jvm.boolean)) + (///bundle.install (reflection.reflection reflection.byte) (new_primitive_array_handler jvm.byte)) + (///bundle.install (reflection.reflection reflection.short) (new_primitive_array_handler jvm.short)) + (///bundle.install (reflection.reflection reflection.int) (new_primitive_array_handler jvm.int)) + (///bundle.install (reflection.reflection reflection.long) (new_primitive_array_handler jvm.long)) + (///bundle.install (reflection.reflection reflection.float) (new_primitive_array_handler jvm.float)) + (///bundle.install (reflection.reflection reflection.double) (new_primitive_array_handler jvm.double)) + (///bundle.install (reflection.reflection reflection.char) (new_primitive_array_handler jvm.char)) + (///bundle.install "object" array::new::object)))) + (dictionary.composite (<| (///bundle.prefix "read") + (|> ///bundle.empty + (///bundle.install (reflection.reflection reflection.boolean) (read_primitive_array_handler ..boolean jvm.boolean)) + (///bundle.install (reflection.reflection reflection.byte) (read_primitive_array_handler ..byte jvm.byte)) + (///bundle.install (reflection.reflection reflection.short) (read_primitive_array_handler ..short jvm.short)) + (///bundle.install (reflection.reflection reflection.int) (read_primitive_array_handler ..int jvm.int)) + (///bundle.install (reflection.reflection reflection.long) (read_primitive_array_handler ..long jvm.long)) + (///bundle.install (reflection.reflection reflection.float) (read_primitive_array_handler ..float jvm.float)) + (///bundle.install (reflection.reflection reflection.double) (read_primitive_array_handler ..double jvm.double)) + (///bundle.install (reflection.reflection reflection.char) (read_primitive_array_handler ..char jvm.char)) + (///bundle.install "object" array::read::object)))) + (dictionary.composite (<| (///bundle.prefix "write") + (|> ///bundle.empty + (///bundle.install (reflection.reflection reflection.boolean) (write_primitive_array_handler ..boolean jvm.boolean)) + (///bundle.install (reflection.reflection reflection.byte) (write_primitive_array_handler ..byte jvm.byte)) + (///bundle.install (reflection.reflection reflection.short) (write_primitive_array_handler ..short jvm.short)) + (///bundle.install (reflection.reflection reflection.int) (write_primitive_array_handler ..int jvm.int)) + (///bundle.install (reflection.reflection reflection.long) (write_primitive_array_handler ..long jvm.long)) + (///bundle.install (reflection.reflection reflection.float) (write_primitive_array_handler ..float jvm.float)) + (///bundle.install (reflection.reflection reflection.double) (write_primitive_array_handler ..double jvm.double)) + (///bundle.install (reflection.reflection reflection.char) (write_primitive_array_handler ..char jvm.char)) + (///bundle.install "object" array::write::object)))) ))) (def: object::null @@ -1437,8 +1437,8 @@ (function (_ method) (do ! [.let [expected_method_tvars (method_type_variables method) - aliasing (dictionary.merged (..aliasing expected_class_tvars actual_class_tvars) - (..aliasing expected_method_tvars actual_method_tvars))] + aliasing (dictionary.composite (..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? (|>> {#Pass}) @@ -1470,8 +1470,8 @@ (monad.each ! (function (_ constructor) (do ! [.let [expected_method_tvars (constructor_type_variables constructor) - aliasing (dictionary.merged (..aliasing expected_class_tvars actual_class_tvars) - (..aliasing expected_method_tvars actual_method_tvars))] + aliasing (dictionary.composite (..aliasing expected_class_tvars actual_class_tvars) + (..aliasing expected_method_tvars actual_method_tvars))] passes? (check_constructor aliasing class inputsJT constructor)] (# ! each (if passes? @@ -1629,22 +1629,22 @@ (-> java/lang/ClassLoader Bundle) (<| (///bundle.prefix "member") (|> ///bundle.empty - (dictionary.merged (<| (///bundle.prefix "get") - (|> ///bundle.empty - (///bundle.install "static" (get::static class_loader)) - (///bundle.install "virtual" (get::virtual class_loader))))) - (dictionary.merged (<| (///bundle.prefix "put") - (|> ///bundle.empty - (///bundle.install "static" (put::static class_loader)) - (///bundle.install "virtual" (put::virtual class_loader))))) - (dictionary.merged (<| (///bundle.prefix "invoke") - (|> ///bundle.empty - (///bundle.install "static" (invoke::static class_loader)) - (///bundle.install "virtual" (invoke::virtual class_loader)) - (///bundle.install "special" (invoke::special class_loader)) - (///bundle.install "interface" (invoke::interface class_loader)) - (///bundle.install "constructor" (invoke::constructor class_loader)) - ))) + (dictionary.composite (<| (///bundle.prefix "get") + (|> ///bundle.empty + (///bundle.install "static" (get::static class_loader)) + (///bundle.install "virtual" (get::virtual class_loader))))) + (dictionary.composite (<| (///bundle.prefix "put") + (|> ///bundle.empty + (///bundle.install "static" (put::static class_loader)) + (///bundle.install "virtual" (put::virtual class_loader))))) + (dictionary.composite (<| (///bundle.prefix "invoke") + (|> ///bundle.empty + (///bundle.install "static" (invoke::static class_loader)) + (///bundle.install "virtual" (invoke::virtual class_loader)) + (///bundle.install "special" (invoke::special class_loader)) + (///bundle.install "interface" (invoke::interface class_loader)) + (///bundle.install "constructor" (invoke::constructor class_loader)) + ))) ))) (type: .public (Annotation_Parameter a) @@ -2657,14 +2657,14 @@ (-> java/lang/ClassLoader runtime.Host Bundle) (<| (///bundle.prefix "jvm") (|> ///bundle.empty - (dictionary.merged bundle::conversion) - (dictionary.merged bundle::int) - (dictionary.merged bundle::long) - (dictionary.merged bundle::float) - (dictionary.merged bundle::double) - (dictionary.merged bundle::char) - (dictionary.merged bundle::array) - (dictionary.merged (bundle::object class_loader)) - (dictionary.merged (bundle::member class_loader)) - (dictionary.merged (bundle::class class_loader host)) + (dictionary.composite bundle::conversion) + (dictionary.composite bundle::int) + (dictionary.composite bundle::long) + (dictionary.composite bundle::float) + (dictionary.composite bundle::double) + (dictionary.composite bundle::char) + (dictionary.composite bundle::array) + (dictionary.composite (bundle::object class_loader)) + (dictionary.composite (bundle::member class_loader)) + (dictionary.composite (bundle::class class_loader host)) ))) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/lua.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/lua.lux index ca7dfe9bb..4949783fe 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/lua.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/lua.lux @@ -9,7 +9,7 @@ ["<[0]>" code {"+" Parser}]]] [data [collection - ["[0]" array {"+" Array}] + ["[0]" array] ["[0]" dictionary] ["[0]" list]]] ["[0]" type @@ -44,11 +44,13 @@ [.any (function (_ extension phase archive lengthC) (<| analysis/type.with_var - (function (_ [@var :var:])) + (function (_ [@read :read:])) + analysis/type.with_var + (function (_ [@write :write:])) (do phase.monad [lengthA (analysis/type.expecting Nat (phase archive lengthC)) - _ (analysis/type.inference (type (Array :var:)))] + _ (analysis/type.inference (type (array.Array' :read: :write:)))] (in {analysis.#Extension extension (list lengthA)}))))])) (def: array::length @@ -57,9 +59,11 @@ [.any (function (_ extension phase archive arrayC) (<| analysis/type.with_var - (function (_ [@var :var:])) + (function (_ [@read :read:])) + analysis/type.with_var + (function (_ [@write :write:])) (do phase.monad - [arrayA (analysis/type.expecting (type (Array :var:)) + [arrayA (analysis/type.expecting (type (array.Array' :read: :write:)) (phase archive arrayC)) _ (analysis/type.inference Nat)] (in {analysis.#Extension extension (list arrayA)}))))])) @@ -70,13 +74,15 @@ [(<>.and .any .any) (function (_ extension phase archive [indexC arrayC]) (<| analysis/type.with_var - (function (_ [@var :var:])) + (function (_ [@read :read:])) + analysis/type.with_var + (function (_ [@write :write:])) (do phase.monad [indexA (analysis/type.expecting Nat (phase archive indexC)) - arrayA (analysis/type.expecting (type (Array :var:)) + arrayA (analysis/type.expecting (type (array.Array' :read: :write:)) (phase archive arrayC)) - _ (analysis/type.inference :var:)] + _ (analysis/type.inference :read:)] (in {analysis.#Extension extension (list indexA arrayA)}))))])) (def: array::write @@ -85,15 +91,17 @@ [($_ <>.and .any .any .any) (function (_ extension phase archive [indexC valueC arrayC]) (<| analysis/type.with_var - (function (_ [@var :var:])) + (function (_ [@read :read:])) + analysis/type.with_var + (function (_ [@write :write:])) (do phase.monad [indexA (analysis/type.expecting Nat (phase archive indexC)) - valueA (analysis/type.expecting :var: + valueA (analysis/type.expecting :write: (phase archive valueC)) - arrayA (analysis/type.expecting (type (Array :var:)) + arrayA (analysis/type.expecting (type (array.Array' :read: :write:)) (phase archive arrayC)) - _ (analysis/type.inference (type (Array :var:)))] + _ (analysis/type.inference (type (array.Array' :read: :write:)))] (in {analysis.#Extension extension (list indexA valueA arrayA)}))))])) (def: array::delete @@ -102,13 +110,15 @@ [($_ <>.and .any .any) (function (_ extension phase archive [indexC arrayC]) (<| analysis/type.with_var - (function (_ [@var :var:])) + (function (_ [@read :read:])) + analysis/type.with_var + (function (_ [@write :write:])) (do phase.monad [indexA (analysis/type.expecting Nat (phase archive indexC)) - arrayA (analysis/type.expecting (type (Array :var:)) + arrayA (analysis/type.expecting (type (array.Array' :read: :write:)) (phase archive arrayC)) - _ (analysis/type.inference (type (Array :var:)))] + _ (analysis/type.inference (type (array.Array' :read: :write:)))] (in {analysis.#Extension extension (list indexA arrayA)}))))])) (def: bundle::array @@ -242,9 +252,9 @@ Bundle (<| (bundle.prefix "lua") (|> bundle.empty - (dictionary.merged bundle::array) - (dictionary.merged bundle::object) - (dictionary.merged bundle::utf8) + (dictionary.composite bundle::array) + (dictionary.composite bundle::object) + (dictionary.composite bundle::utf8) (bundle.install "constant" lua::constant) (bundle.install "apply" lua::apply) 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 d2f911155..ba71661c9 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 @@ -304,9 +304,9 @@ (-> Eval Bundle) (<| (///bundle.prefix "lux") (|> ///bundle.empty - (dictionary.merged (bundle::lux eval)) - (dictionary.merged bundle::i64) - (dictionary.merged bundle::f64) - (dictionary.merged bundle::text) - (dictionary.merged bundle::io) + (dictionary.composite (bundle::lux eval)) + (dictionary.composite bundle::i64) + (dictionary.composite bundle::f64) + (dictionary.composite bundle::text) + (dictionary.composite bundle::io) ))) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/php.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/php.lux index a90a68096..dae6adef6 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/php.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/php.lux @@ -209,8 +209,8 @@ Bundle (<| (bundle.prefix "php") (|> bundle.empty - (dictionary.merged bundle::array) - (dictionary.merged bundle::object) + (dictionary.composite bundle::array) + (dictionary.composite bundle::object) (bundle.install "constant" php::constant) (bundle.install "apply" php::apply) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/python.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/python.lux index fa87792da..f35ad7128 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/python.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/python.lux @@ -232,8 +232,8 @@ Bundle (<| (bundle.prefix "python") (|> bundle.empty - (dictionary.merged bundle::array) - (dictionary.merged bundle::object) + (dictionary.composite bundle::array) + (dictionary.composite bundle::object) (bundle.install "constant" python::constant) (bundle.install "import" python::import) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/ruby.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/ruby.lux index ab9ed4837..a102f6b29 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/ruby.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/ruby.lux @@ -202,8 +202,8 @@ Bundle (<| (bundle.prefix "ruby") (|> bundle.empty - (dictionary.merged bundle::array) - (dictionary.merged bundle::object) + (dictionary.composite bundle::array) + (dictionary.composite bundle::object) (bundle.install "constant" ruby::constant) (bundle.install "apply" ruby::apply) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/scheme.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/scheme.lux index 488b39e2c..c1c425142 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/scheme.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/scheme.lux @@ -153,8 +153,8 @@ Bundle (<| (bundle.prefix "scheme") (|> bundle.empty - (dictionary.merged bundle::array) - (dictionary.merged bundle::object) + (dictionary.composite bundle::array) + (dictionary.composite bundle::object) (bundle.install "constant" scheme::constant) (bundle.install "apply" scheme::apply) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/lux.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/lux.lux index 8a7f95cee..a25d02ed7 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/lux.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/lux.lux @@ -233,7 +233,7 @@ (is (-> /////analysis.State+ /////analysis.State+) (|>> product.right [(|> previous_analysis_extensions - (dictionary.merged (///analysis.bundle eval host_analysis)))])) + (dictionary.composite (///analysis.bundle eval host_analysis)))])) state)]))) (def: (announce_definition! short type) @@ -568,4 +568,4 @@ (<| (///bundle.prefix "lux") (|> ///bundle.empty (dictionary.has "def" (lux::def expander host_analysis)) - (dictionary.merged (..bundle::def expander host_analysis program anchorT,expressionT,directiveT extender))))) + (dictionary.composite (..bundle::def expander host_analysis program anchorT,expressionT,directiveT extender))))) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/common_lisp.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/common_lisp.lux index a446c5cbe..bb22d2126 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/common_lisp.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/common_lisp.lux @@ -1,18 +1,18 @@ (.using - [library - [lux "*" - [data - [collection - ["[0]" dictionary]]]]] - ["[0]" / "_" - ["[1][0]" common] - ["[1][0]" host] - [//// - [generation - [common_lisp - [runtime {"+" Bundle}]]]]]) + [library + [lux "*" + [data + [collection + ["[0]" dictionary]]]]] + ["[0]" / "_" + ["[1][0]" common] + ["[1][0]" host] + [//// + [generation + [common_lisp + [runtime {"+" Bundle}]]]]]) (def: .public bundle Bundle - (dictionary.merged /common.bundle - /host.bundle)) + (dictionary.composite /common.bundle + /host.bundle)) 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 987ae0104..9e68d5992 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 @@ -172,9 +172,9 @@ Bundle (<| (/.prefix "lux") (|> /.empty - (dictionary.merged lux_procs) - (dictionary.merged i64_procs) - (dictionary.merged f64_procs) - (dictionary.merged text_procs) - (dictionary.merged io_procs) + (dictionary.composite lux_procs) + (dictionary.composite i64_procs) + (dictionary.composite f64_procs) + (dictionary.composite text_procs) + (dictionary.composite io_procs) ))) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/js.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/js.lux index 0b7a64802..2530af7ec 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/js.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/js.lux @@ -1,18 +1,18 @@ (.using - [library - [lux "*" - [data - [collection - ["[0]" dictionary]]]]] - ["[0]" / "_" - ["[1][0]" common] - ["[1][0]" host] - [//// - [generation - [js - [runtime {"+" Bundle}]]]]]) + [library + [lux "*" + [data + [collection + ["[0]" dictionary]]]]] + ["[0]" / "_" + ["[1][0]" common] + ["[1][0]" host] + [//// + [generation + [js + [runtime {"+" Bundle}]]]]]) (def: .public bundle Bundle - (dictionary.merged /common.bundle - /host.bundle)) + (dictionary.composite /common.bundle + /host.bundle)) 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 c8c48451e..3d2fd35f3 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 @@ -245,8 +245,8 @@ Bundle (<| (/.prefix "lux") (|> lux_procs - (dictionary.merged i64_procs) - (dictionary.merged f64_procs) - (dictionary.merged text_procs) - (dictionary.merged io_procs) + (dictionary.composite i64_procs) + (dictionary.composite f64_procs) + (dictionary.composite text_procs) + (dictionary.composite io_procs) ))) 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 f3305a2d5..5037742a3 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 @@ -150,8 +150,8 @@ Bundle (<| (/.prefix "js") (|> /.empty - (dictionary.merged ..array) - (dictionary.merged ..object) + (dictionary.composite ..array) + (dictionary.composite ..object) (/.install "constant" js::constant) (/.install "apply" js::apply) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/jvm.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/jvm.lux index a7ed22841..87684f26d 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/jvm.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/jvm.lux @@ -1,20 +1,20 @@ (.using - [library - [lux "*" - [data - [collection - ["[0]" dictionary]]]]] - ["[0]" / "_" - ["[1][0]" common] - ["[1][0]" host] - [//// - [generation - [jvm - [runtime {"+" Bundle}]]]]]) + [library + [lux "*" + [data + [collection + ["[0]" dictionary]]]]] + ["[0]" / "_" + ["[1][0]" common] + ["[1][0]" host] + [//// + [generation + [jvm + [runtime {"+" Bundle}]]]]]) (def: .public bundle Bundle - ($_ dictionary.merged + ($_ dictionary.composite /common.bundle /host.bundle )) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/jvm/common.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/jvm/common.lux index becc799b6..eb7cb76d4 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 @@ -408,7 +408,7 @@ Bundle (<| (/////bundle.prefix "lux") (|> bundle::lux - (dictionary.merged ..bundle::i64) - (dictionary.merged ..bundle::f64) - (dictionary.merged ..bundle::text) - (dictionary.merged ..bundle::io)))) + (dictionary.composite ..bundle::i64) + (dictionary.composite ..bundle::f64) + (dictionary.composite ..bundle::text) + (dictionary.composite ..bundle::io)))) 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 1ccc58417..45c374faa 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 @@ -494,50 +494,50 @@ Bundle (<| (/////bundle.prefix "array") (|> /////bundle.empty - (dictionary.merged (<| (/////bundle.prefix "length") - (|> /////bundle.empty - (/////bundle.install (reflection.reflection reflection.boolean) (primitive_array_length_handler type.boolean)) - (/////bundle.install (reflection.reflection reflection.byte) (primitive_array_length_handler type.byte)) - (/////bundle.install (reflection.reflection reflection.short) (primitive_array_length_handler type.short)) - (/////bundle.install (reflection.reflection reflection.int) (primitive_array_length_handler type.int)) - (/////bundle.install (reflection.reflection reflection.long) (primitive_array_length_handler type.long)) - (/////bundle.install (reflection.reflection reflection.float) (primitive_array_length_handler type.float)) - (/////bundle.install (reflection.reflection reflection.double) (primitive_array_length_handler type.double)) - (/////bundle.install (reflection.reflection reflection.char) (primitive_array_length_handler type.char)) - (/////bundle.install "object" array::length::object)))) - (dictionary.merged (<| (/////bundle.prefix "new") - (|> /////bundle.empty - (/////bundle.install (reflection.reflection reflection.boolean) (new_primitive_array_handler __.t_boolean)) - (/////bundle.install (reflection.reflection reflection.byte) (new_primitive_array_handler __.t_byte)) - (/////bundle.install (reflection.reflection reflection.short) (new_primitive_array_handler __.t_short)) - (/////bundle.install (reflection.reflection reflection.int) (new_primitive_array_handler __.t_int)) - (/////bundle.install (reflection.reflection reflection.long) (new_primitive_array_handler __.t_long)) - (/////bundle.install (reflection.reflection reflection.float) (new_primitive_array_handler __.t_float)) - (/////bundle.install (reflection.reflection reflection.double) (new_primitive_array_handler __.t_double)) - (/////bundle.install (reflection.reflection reflection.char) (new_primitive_array_handler __.t_char)) - (/////bundle.install "object" array::new::object)))) - (dictionary.merged (<| (/////bundle.prefix "read") - (|> /////bundle.empty - (/////bundle.install (reflection.reflection reflection.boolean) (read_primitive_array_handler type.boolean _.baload)) - (/////bundle.install (reflection.reflection reflection.byte) (read_primitive_array_handler type.byte _.baload)) - (/////bundle.install (reflection.reflection reflection.short) (read_primitive_array_handler type.short _.saload)) - (/////bundle.install (reflection.reflection reflection.int) (read_primitive_array_handler type.int _.iaload)) - (/////bundle.install (reflection.reflection reflection.long) (read_primitive_array_handler type.long _.laload)) - (/////bundle.install (reflection.reflection reflection.float) (read_primitive_array_handler type.float _.faload)) - (/////bundle.install (reflection.reflection reflection.double) (read_primitive_array_handler type.double _.daload)) - (/////bundle.install (reflection.reflection reflection.char) (read_primitive_array_handler type.char _.caload)) - (/////bundle.install "object" array::read::object)))) - (dictionary.merged (<| (/////bundle.prefix "write") - (|> /////bundle.empty - (/////bundle.install (reflection.reflection reflection.boolean) (write_primitive_array_handler type.boolean _.bastore)) - (/////bundle.install (reflection.reflection reflection.byte) (write_primitive_array_handler type.byte _.bastore)) - (/////bundle.install (reflection.reflection reflection.short) (write_primitive_array_handler type.short _.sastore)) - (/////bundle.install (reflection.reflection reflection.int) (write_primitive_array_handler type.int _.iastore)) - (/////bundle.install (reflection.reflection reflection.long) (write_primitive_array_handler type.long _.lastore)) - (/////bundle.install (reflection.reflection reflection.float) (write_primitive_array_handler type.float _.fastore)) - (/////bundle.install (reflection.reflection reflection.double) (write_primitive_array_handler type.double _.dastore)) - (/////bundle.install (reflection.reflection reflection.char) (write_primitive_array_handler type.char _.castore)) - (/////bundle.install "object" array::write::object)))) + (dictionary.composite (<| (/////bundle.prefix "length") + (|> /////bundle.empty + (/////bundle.install (reflection.reflection reflection.boolean) (primitive_array_length_handler type.boolean)) + (/////bundle.install (reflection.reflection reflection.byte) (primitive_array_length_handler type.byte)) + (/////bundle.install (reflection.reflection reflection.short) (primitive_array_length_handler type.short)) + (/////bundle.install (reflection.reflection reflection.int) (primitive_array_length_handler type.int)) + (/////bundle.install (reflection.reflection reflection.long) (primitive_array_length_handler type.long)) + (/////bundle.install (reflection.reflection reflection.float) (primitive_array_length_handler type.float)) + (/////bundle.install (reflection.reflection reflection.double) (primitive_array_length_handler type.double)) + (/////bundle.install (reflection.reflection reflection.char) (primitive_array_length_handler type.char)) + (/////bundle.install "object" array::length::object)))) + (dictionary.composite (<| (/////bundle.prefix "new") + (|> /////bundle.empty + (/////bundle.install (reflection.reflection reflection.boolean) (new_primitive_array_handler __.t_boolean)) + (/////bundle.install (reflection.reflection reflection.byte) (new_primitive_array_handler __.t_byte)) + (/////bundle.install (reflection.reflection reflection.short) (new_primitive_array_handler __.t_short)) + (/////bundle.install (reflection.reflection reflection.int) (new_primitive_array_handler __.t_int)) + (/////bundle.install (reflection.reflection reflection.long) (new_primitive_array_handler __.t_long)) + (/////bundle.install (reflection.reflection reflection.float) (new_primitive_array_handler __.t_float)) + (/////bundle.install (reflection.reflection reflection.double) (new_primitive_array_handler __.t_double)) + (/////bundle.install (reflection.reflection reflection.char) (new_primitive_array_handler __.t_char)) + (/////bundle.install "object" array::new::object)))) + (dictionary.composite (<| (/////bundle.prefix "read") + (|> /////bundle.empty + (/////bundle.install (reflection.reflection reflection.boolean) (read_primitive_array_handler type.boolean _.baload)) + (/////bundle.install (reflection.reflection reflection.byte) (read_primitive_array_handler type.byte _.baload)) + (/////bundle.install (reflection.reflection reflection.short) (read_primitive_array_handler type.short _.saload)) + (/////bundle.install (reflection.reflection reflection.int) (read_primitive_array_handler type.int _.iaload)) + (/////bundle.install (reflection.reflection reflection.long) (read_primitive_array_handler type.long _.laload)) + (/////bundle.install (reflection.reflection reflection.float) (read_primitive_array_handler type.float _.faload)) + (/////bundle.install (reflection.reflection reflection.double) (read_primitive_array_handler type.double _.daload)) + (/////bundle.install (reflection.reflection reflection.char) (read_primitive_array_handler type.char _.caload)) + (/////bundle.install "object" array::read::object)))) + (dictionary.composite (<| (/////bundle.prefix "write") + (|> /////bundle.empty + (/////bundle.install (reflection.reflection reflection.boolean) (write_primitive_array_handler type.boolean _.bastore)) + (/////bundle.install (reflection.reflection reflection.byte) (write_primitive_array_handler type.byte _.bastore)) + (/////bundle.install (reflection.reflection reflection.short) (write_primitive_array_handler type.short _.sastore)) + (/////bundle.install (reflection.reflection reflection.int) (write_primitive_array_handler type.int _.iastore)) + (/////bundle.install (reflection.reflection reflection.long) (write_primitive_array_handler type.long _.lastore)) + (/////bundle.install (reflection.reflection reflection.float) (write_primitive_array_handler type.float _.fastore)) + (/////bundle.install (reflection.reflection reflection.double) (write_primitive_array_handler type.double _.dastore)) + (/////bundle.install (reflection.reflection reflection.char) (write_primitive_array_handler type.char _.castore)) + (/////bundle.install "object" array::write::object)))) ))) (def: (object::null _) @@ -791,21 +791,21 @@ Bundle (<| (/////bundle.prefix "member") (|> (is Bundle /////bundle.empty) - (dictionary.merged (<| (/////bundle.prefix "get") - (|> (is Bundle /////bundle.empty) - (/////bundle.install "static" get::static) - (/////bundle.install "virtual" get::virtual)))) - (dictionary.merged (<| (/////bundle.prefix "put") - (|> (is Bundle /////bundle.empty) - (/////bundle.install "static" put::static) - (/////bundle.install "virtual" put::virtual)))) - (dictionary.merged (<| (/////bundle.prefix "invoke") - (|> (is Bundle /////bundle.empty) - (/////bundle.install "static" invoke::static) - (/////bundle.install "virtual" invoke::virtual) - (/////bundle.install "special" invoke::special) - (/////bundle.install "interface" invoke::interface) - (/////bundle.install "constructor" invoke::constructor)))) + (dictionary.composite (<| (/////bundle.prefix "get") + (|> (is Bundle /////bundle.empty) + (/////bundle.install "static" get::static) + (/////bundle.install "virtual" get::virtual)))) + (dictionary.composite (<| (/////bundle.prefix "put") + (|> (is Bundle /////bundle.empty) + (/////bundle.install "static" put::static) + (/////bundle.install "virtual" put::virtual)))) + (dictionary.composite (<| (/////bundle.prefix "invoke") + (|> (is Bundle /////bundle.empty) + (/////bundle.install "static" invoke::static) + (/////bundle.install "virtual" invoke::virtual) + (/////bundle.install "special" invoke::special) + (/////bundle.install "interface" invoke::interface) + (/////bundle.install "constructor" invoke::constructor)))) ))) (def: annotation_parameter @@ -1249,13 +1249,13 @@ Bundle (<| (/////bundle.prefix "jvm") (|> ..bundle::conversion - (dictionary.merged ..bundle::int) - (dictionary.merged ..bundle::long) - (dictionary.merged ..bundle::float) - (dictionary.merged ..bundle::double) - (dictionary.merged ..bundle::char) - (dictionary.merged ..bundle::array) - (dictionary.merged ..bundle::object) - (dictionary.merged ..bundle::member) - (dictionary.merged ..bundle::class) + (dictionary.composite ..bundle::int) + (dictionary.composite ..bundle::long) + (dictionary.composite ..bundle::float) + (dictionary.composite ..bundle::double) + (dictionary.composite ..bundle::char) + (dictionary.composite ..bundle::array) + (dictionary.composite ..bundle::object) + (dictionary.composite ..bundle::member) + (dictionary.composite ..bundle::class) ))) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/lua.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/lua.lux index 7ed62f342..8335ce18d 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/lua.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/lua.lux @@ -1,18 +1,18 @@ (.using - [library - [lux "*" - [data - [collection - ["[0]" dictionary]]]]] - ["[0]" / "_" - ["[1][0]" common] - ["[1][0]" host] - [//// - [generation - [lua - [runtime {"+" Bundle}]]]]]) + [library + [lux "*" + [data + [collection + ["[0]" dictionary]]]]] + ["[0]" / "_" + ["[1][0]" common] + ["[1][0]" host] + [//// + [generation + [lua + [runtime {"+" Bundle}]]]]]) (def: .public bundle Bundle - (dictionary.merged /common.bundle - /host.bundle)) + (dictionary.composite /common.bundle + /host.bundle)) 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 bb9c71927..ea9f1b1c9 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 @@ -230,8 +230,8 @@ Bundle (<| (/.prefix "lux") (|> lux_procs - (dictionary.merged i64_procs) - (dictionary.merged f64_procs) - (dictionary.merged text_procs) - (dictionary.merged io_procs) + (dictionary.composite i64_procs) + (dictionary.composite f64_procs) + (dictionary.composite text_procs) + (dictionary.composite io_procs) ))) 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 74540b895..d854e210d 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 @@ -187,9 +187,9 @@ Bundle (<| (/.prefix "lua") (|> /.empty - (dictionary.merged ..array) - (dictionary.merged ..object) - (dictionary.merged ..utf8) + (dictionary.composite ..array) + (dictionary.composite ..object) + (dictionary.composite ..utf8) (/.install "constant" lua::constant) (/.install "apply" lua::apply) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/php.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/php.lux index 6ee279cf5..3bf186a60 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/php.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/php.lux @@ -1,18 +1,18 @@ (.using - [library - [lux "*" - [data - [collection - ["[0]" dictionary]]]]] - ["[0]" / "_" - ["[1][0]" common] - ["[1][0]" host] - [//// - [generation - [php - [runtime {"+" Bundle}]]]]]) + [library + [lux "*" + [data + [collection + ["[0]" dictionary]]]]] + ["[0]" / "_" + ["[1][0]" common] + ["[1][0]" host] + [//// + [generation + [php + [runtime {"+" Bundle}]]]]]) (def: .public bundle Bundle - (dictionary.merged /common.bundle - /host.bundle)) + (dictionary.composite /common.bundle + /host.bundle)) 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 2e6338e37..dc7b0f38b 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 @@ -185,8 +185,8 @@ Bundle (<| (/.prefix "lux") (|> /.empty - (dictionary.merged lux_procs) - (dictionary.merged i64_procs) - (dictionary.merged f64_procs) - (dictionary.merged text_procs) - (dictionary.merged io_procs)))) + (dictionary.composite lux_procs) + (dictionary.composite i64_procs) + (dictionary.composite f64_procs) + (dictionary.composite text_procs) + (dictionary.composite io_procs)))) 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 04399cc8d..4f4f010da 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 @@ -1,37 +1,37 @@ (.using - [library - [lux "*" - [abstract - ["[0]" monad {"+" do}]] - [control - ["[0]" function] - ["<>" parser - ["" synthesis {"+" Parser}]]] - [data - [collection - ["[0]" dictionary] - ["[0]" list]] - [text - ["%" format {"+" format}]]] - [target - ["_" php {"+" Var Expression}]]]] - ["[0]" // "_" - ["[1][0]" common {"+" custom}] - ["//[1]" /// "_" - ["/" bundle] + [library + [lux "*" + [abstract + ["[0]" monad {"+" do}]] + [control + ["[0]" function] + ["<>" parser + ["" synthesis {"+" Parser}]]] + [data + [collection + ["[0]" dictionary] + ["[0]" list]] + [text + ["%" format {"+" format}]]] + [target + ["_" php {"+" Var Expression}]]]] + ["[0]" // "_" + ["[1][0]" common {"+" custom}] + ["//[1]" /// "_" + ["/" bundle] + ["/[1]" // "_" + ["[0]" extension] + [generation + [extension {"+" Nullary Unary Binary Trinary + nullary unary binary trinary}] + ["[0]" reference] + ["//" php "_" + ["[1][0]" runtime {"+" Operation Phase Handler Bundle + with_vars}]]] ["/[1]" // "_" - ["[0]" extension] - [generation - [extension {"+" Nullary Unary Binary Trinary - nullary unary binary trinary}] - ["[0]" reference] - ["//" php "_" - ["[1][0]" runtime {"+" Operation Phase Handler Bundle - with_vars}]]] - ["/[1]" // "_" - ["[0]" generation] - ["//[1]" /// "_" - ["[1][0]" phase]]]]]]) + ["[0]" generation] + ["//[1]" /// "_" + ["[1][0]" phase]]]]]]) (def: (array::new size) (Unary Expression) @@ -133,8 +133,8 @@ Bundle (<| (/.prefix "php") (|> /.empty - (dictionary.merged ..array) - (dictionary.merged ..object) + (dictionary.composite ..array) + (dictionary.composite ..object) (/.install "constant" php::constant) (/.install "apply" php::apply) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/python.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/python.lux index 750ff51ef..4124be69d 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/python.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/python.lux @@ -1,18 +1,18 @@ (.using - [library - [lux "*" - [data - [collection - ["[0]" dictionary]]]]] - ["[0]" / "_" - ["[1][0]" common] - ["[1][0]" host] - [//// - [generation - [python - [runtime {"+" Bundle}]]]]]) + [library + [lux "*" + [data + [collection + ["[0]" dictionary]]]]] + ["[0]" / "_" + ["[1][0]" common] + ["[1][0]" host] + [//// + [generation + [python + [runtime {"+" Bundle}]]]]]) (def: .public bundle Bundle - (dictionary.merged /common.bundle - /host.bundle)) + (dictionary.composite /common.bundle + /host.bundle)) 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 dc6845bc8..12260ae49 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 @@ -238,8 +238,8 @@ Bundle (<| (/.prefix "lux") (|> lux_procs - (dictionary.merged i64_procs) - (dictionary.merged f64_procs) - (dictionary.merged text_procs) - (dictionary.merged io_procs) + (dictionary.composite i64_procs) + (dictionary.composite f64_procs) + (dictionary.composite text_procs) + (dictionary.composite io_procs) ))) 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 72ade0f7d..1522dc667 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 @@ -156,8 +156,8 @@ Bundle (<| (/.prefix "python") (|> /.empty - (dictionary.merged ..array) - (dictionary.merged ..object) + (dictionary.composite ..array) + (dictionary.composite ..object) (/.install "constant" python::constant) (/.install "import" python::import) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/r.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/r.lux index cb2814a3e..338342aba 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/r.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/r.lux @@ -1,18 +1,18 @@ (.using - [library - [lux "*" - [data - [collection - ["[0]" dictionary]]]]] - ["[0]" / "_" - ["[1][0]" common] - ["[1][0]" host] - [//// - [generation - [r - [runtime {"+" Bundle}]]]]]) + [library + [lux "*" + [data + [collection + ["[0]" dictionary]]]]] + ["[0]" / "_" + ["[1][0]" common] + ["[1][0]" host] + [//// + [generation + [r + [runtime {"+" Bundle}]]]]]) (def: .public bundle Bundle - (dictionary.merged /common.bundle - /host.bundle)) + (dictionary.composite /common.bundle + /host.bundle)) 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 e3beeba75..e48ccb29c 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 @@ -171,9 +171,9 @@ Bundle (<| (/.prefix "lux") (|> /.empty - ... (dictionary.merged lux_procs) - (dictionary.merged i64_procs) - ... (dictionary.merged f64_procs) - (dictionary.merged text_procs) - ... (dictionary.merged io_procs) + ... (dictionary.composite lux_procs) + (dictionary.composite i64_procs) + ... (dictionary.composite f64_procs) + (dictionary.composite text_procs) + ... (dictionary.composite io_procs) ))) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/ruby.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/ruby.lux index bf475eb70..fe36de1b2 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/ruby.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/ruby.lux @@ -1,18 +1,18 @@ (.using - [library - [lux "*" - [data - [collection - ["[0]" dictionary]]]]] - ["[0]" / "_" - ["[1][0]" common] - ["[1][0]" host] - [//// - [generation - [ruby - [runtime {"+" Bundle}]]]]]) + [library + [lux "*" + [data + [collection + ["[0]" dictionary]]]]] + ["[0]" / "_" + ["[1][0]" common] + ["[1][0]" host] + [//// + [generation + [ruby + [runtime {"+" Bundle}]]]]]) (def: .public bundle Bundle - (dictionary.merged /common.bundle - /host.bundle)) + (dictionary.composite /common.bundle + /host.bundle)) 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 37a202c9f..0221c118b 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 @@ -235,8 +235,8 @@ Bundle (<| (/.prefix "lux") (|> lux_procs - (dictionary.merged ..i64_procs) - (dictionary.merged ..f64_procs) - (dictionary.merged ..text_procs) - (dictionary.merged ..io_procs) + (dictionary.composite ..i64_procs) + (dictionary.composite ..f64_procs) + (dictionary.composite ..text_procs) + (dictionary.composite ..io_procs) ))) 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 53b71239f..bb512a883 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 @@ -126,8 +126,8 @@ Bundle (<| (/.prefix "ruby") (|> /.empty - (dictionary.merged ..array) - (dictionary.merged ..object) + (dictionary.composite ..array) + (dictionary.composite ..object) (/.install "constant" ruby::constant) (/.install "apply" ruby::apply) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/scheme.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/scheme.lux index 3fc377538..5419daa5e 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/scheme.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/scheme.lux @@ -1,18 +1,18 @@ (.using - [library - [lux "*" - [data - [collection - ["[0]" dictionary]]]]] - ["[0]" / "_" - ["[1][0]" common] - ["[1][0]" host] - [//// - [generation - [scheme - [runtime {"+" Bundle}]]]]]) + [library + [lux "*" + [data + [collection + ["[0]" dictionary]]]]] + ["[0]" / "_" + ["[1][0]" common] + ["[1][0]" host] + [//// + [generation + [scheme + [runtime {"+" Bundle}]]]]]) (def: .public bundle Bundle - (dictionary.merged /common.bundle - /host.bundle)) + (dictionary.composite /common.bundle + /host.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 6aa4e52b1..c73614b6d 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 @@ -167,9 +167,9 @@ Bundle (<| (/.prefix "lux") (|> /.empty - (dictionary.merged lux_procs) - (dictionary.merged i64_procs) - (dictionary.merged f64_procs) - (dictionary.merged text_procs) - (dictionary.merged io_procs) + (dictionary.composite lux_procs) + (dictionary.composite i64_procs) + (dictionary.composite f64_procs) + (dictionary.composite text_procs) + (dictionary.composite io_procs) ))) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/scheme/host.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/scheme/host.lux index 38742ff13..2b4e5cd45 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/scheme/host.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/scheme/host.lux @@ -1,37 +1,37 @@ (.using - [library - [lux "*" - [abstract - ["[0]" monad {"+" do}]] - [control - ["[0]" function] - ["<>" parser - ["" synthesis {"+" Parser}]]] - [data - [collection - ["[0]" dictionary] - ["[0]" list]] - [text - ["%" format {"+" format}]]] - [target - ["_" scheme {"+" Var Expression}]]]] - ["[0]" // "_" - ["[1][0]" common {"+" custom}] - ["//[1]" /// "_" - ["/" bundle] + [library + [lux "*" + [abstract + ["[0]" monad {"+" do}]] + [control + ["[0]" function] + ["<>" parser + ["" synthesis {"+" Parser}]]] + [data + [collection + ["[0]" dictionary] + ["[0]" list]] + [text + ["%" format {"+" format}]]] + [target + ["_" scheme {"+" Var Expression}]]]] + ["[0]" // "_" + ["[1][0]" common {"+" custom}] + ["//[1]" /// "_" + ["/" bundle] + ["/[1]" // "_" + ["[0]" extension] + [generation + [extension {"+" Nullary Unary Binary Trinary + nullary unary binary trinary}] + ["[0]" reference] + ["//" scheme "_" + ["[1][0]" runtime {"+" Operation Phase Handler Bundle + with_vars}]]] ["/[1]" // "_" - ["[0]" extension] - [generation - [extension {"+" Nullary Unary Binary Trinary - nullary unary binary trinary}] - ["[0]" reference] - ["//" scheme "_" - ["[1][0]" runtime {"+" Operation Phase Handler Bundle - with_vars}]]] - ["/[1]" // "_" - ["[0]" generation] - ["//[1]" /// "_" - ["[1][0]" phase]]]]]]) + ["[0]" generation] + ["//[1]" /// "_" + ["[1][0]" phase]]]]]]) (def: (array::new size) (Unary Expression) @@ -100,8 +100,8 @@ Bundle (<| (/.prefix "scheme") (|> /.empty - (dictionary.merged ..array) - (dictionary.merged ..object) + (dictionary.composite ..array) + (dictionary.composite ..object) (/.install "constant" scheme::constant) (/.install "apply" scheme::apply) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/extension/common.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/extension/common.lux index ee0e8f2b8..fe6ef4179 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/extension/common.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/extension/common.lux @@ -1,27 +1,27 @@ (.using - [library - [lux "*" - [abstract - ["[0]" monad {"+" do}]] - [control - ["[0]" function]] - [data - ["[0]" product] - [number - ["f" frac]] - [collection - ["[0]" dictionary]]] - [target - ["_" common_lisp {"+" Expression}]]]] - ["[0]" /// "_" - ["[1][0]" runtime {"+" Operation Phase Handler Bundle}] - ["[1][0]" primitive] + [library + [lux "*" + [abstract + ["[0]" monad {"+" do}]] + [control + ["[0]" function]] + [data + ["[0]" product] + [number + ["f" frac]] + [collection + ["[0]" dictionary]]] + [target + ["_" common_lisp {"+" Expression}]]]] + ["[0]" /// "_" + ["[1][0]" runtime {"+" Operation Phase Handler Bundle}] + ["[1][0]" primitive] + [// + [extension {"+" Nullary Unary Binary Trinary + nullary unary binary trinary}] [// - [extension {"+" Nullary Unary Binary Trinary - nullary unary binary trinary}] - [// - [extension - ["[0]" bundle]]]]]) + [extension + ["[0]" bundle]]]]]) (def: lux_procs Bundle @@ -130,8 +130,8 @@ Bundle (<| (bundle.prefix "lux") (|> lux_procs - (dictionary.merged i64_procs) - (dictionary.merged f64_procs) - (dictionary.merged text_procs) - (dictionary.merged io_procs) + (dictionary.composite i64_procs) + (dictionary.composite f64_procs) + (dictionary.composite text_procs) + (dictionary.composite io_procs) ))) 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 bc3e2210d..c4fa6bb64 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 @@ -3,8 +3,6 @@ [lux {"-" Label function} [abstract ["[0]" monad {"+" do}]] - [control - pipe] [data ["[0]" product] [text diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/extension/common.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/extension/common.lux index 5be01062d..c52d69b22 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/extension/common.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/extension/common.lux @@ -1,28 +1,28 @@ (.using - [library - [lux "*" - [abstract - ["[0]" monad {"+" do}]] - [control - ["[0]" function]] - [data - ["[0]" product] - ["[0]" text] - [number - ["f" frac]] - [collection - ["[0]" dictionary]]] - [target - ["_" php {"+" Expression}]]]] - ["[0]" /// "_" - ["[1][0]" runtime {"+" Operation Phase Handler Bundle}] - ["[1][0]" primitive] + [library + [lux "*" + [abstract + ["[0]" monad {"+" do}]] + [control + ["[0]" function]] + [data + ["[0]" product] + ["[0]" text] + [number + ["f" frac]] + [collection + ["[0]" dictionary]]] + [target + ["_" php {"+" Expression}]]]] + ["[0]" /// "_" + ["[1][0]" runtime {"+" Operation Phase Handler Bundle}] + ["[1][0]" primitive] + [// + [extension {"+" Nullary Unary Binary Trinary + nullary unary binary trinary}] [// - [extension {"+" Nullary Unary Binary Trinary - nullary unary binary trinary}] - [// - [extension - ["[0]" bundle]]]]]) + [extension + ["[0]" bundle]]]]]) (def: lux_procs Bundle @@ -104,9 +104,9 @@ Bundle (<| (bundle.prefix "lux") (|> lux_procs - (dictionary.merged i64_procs) - (dictionary.merged int_procs) - (dictionary.merged frac_procs) - (dictionary.merged text_procs) - (dictionary.merged io_procs) + (dictionary.composite i64_procs) + (dictionary.composite int_procs) + (dictionary.composite frac_procs) + (dictionary.composite text_procs) + (dictionary.composite io_procs) ))) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/procedure/common.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/procedure/common.lux index 5869ff984..ecde6abbd 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/procedure/common.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/procedure/common.lux @@ -334,9 +334,9 @@ Bundle (<| (prefix "lux") (|> lux_procs - (dict.merged bit_procs) - (dict.merged int_procs) - (dict.merged frac_procs) - (dict.merged text_procs) - (dict.merged io_procs) + (dict.composite bit_procs) + (dict.composite int_procs) + (dict.composite frac_procs) + (dict.composite text_procs) + (dict.composite io_procs) ))) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/procedure/host.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/procedure/host.lux index f459b2d31..5a1b6479f 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/procedure/host.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/procedure/host.lux @@ -86,5 +86,5 @@ (<| (@.prefix "lua") (dict.empty text.Hash) ... (|> lua_procs - ... (dict.merged table_procs)) + ... (dict.composite table_procs)) )) 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 062aa6c59..d40d0c4df 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 @@ -218,8 +218,8 @@ Bundle (<| (bundle.prefix "lux") (|> bundle::lux - (dict.merged bundle::i64) - (dict.merged bundle::f64) - (dict.merged bundle::text) - (dict.merged bundle::io) + (dict.composite bundle::i64) + (dict.composite bundle::f64) + (dict.composite bundle::text) + (dict.composite bundle::io) ))) diff --git a/stdlib/source/library/lux/tool/compiler/meta/archive.lux b/stdlib/source/library/lux/tool/compiler/meta/archive.lux index b1397ef8c..a2fa63404 100644 --- a/stdlib/source/library/lux/tool/compiler/meta/archive.lux +++ b/stdlib/source/library/lux/tool/compiler/meta/archive.lux @@ -196,7 +196,7 @@ (list#each (function (_ [module [id _]]) [module id])))) - (def: .public (merged additions archive) + (def: .public (composite additions archive) (-> Archive Archive Archive) (let [[+next +resolver] (representation additions)] (|> archive 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 bd1c6aa1e..8b0d5e6f7 100644 --- a/stdlib/source/library/lux/tool/compiler/meta/io/archive.lux +++ b/stdlib/source/library/lux/tool/compiler/meta/io/archive.lux @@ -367,10 +367,10 @@ analysis_state (list#mix (function (_ [_ [+analysers +synthesizers +generators +directives]] [analysers synthesizers generators directives]) - [(dictionary.merged +analysers analysers) - (dictionary.merged +synthesizers synthesizers) - (dictionary.merged +generators generators) - (dictionary.merged +directives directives)]) + [(dictionary.composite +analysers analysers) + (dictionary.composite +synthesizers synthesizers) + (dictionary.composite +generators generators) + (dictionary.composite +directives directives)]) ..empty_bundles loaded_caches)]))))) diff --git a/stdlib/source/program/aedifex/profile.lux b/stdlib/source/program/aedifex/profile.lux index 56e79674b..94baee351 100644 --- a/stdlib/source/program/aedifex/profile.lux +++ b/stdlib/source/program/aedifex/profile.lux @@ -266,7 +266,7 @@ (the #target baseline)) #program (maybe#composite (the #program override) (the #program baseline)) #test (maybe#composite (the #test override) (the #test baseline)) - #deploy_repositories (dictionary.merged (the #deploy_repositories override) (the #deploy_repositories baseline)) + #deploy_repositories (dictionary.composite (the #deploy_repositories override) (the #deploy_repositories baseline)) #configuration (plist#composite (the #configuration override) (the #configuration baseline)) #java (!runtime #java runtime.default_java) #js (!runtime #js runtime.default_js) diff --git a/stdlib/source/program/aedifex/project.lux b/stdlib/source/program/aedifex/project.lux index 7a8ed68e2..71a9a0381 100644 --- a/stdlib/source/program/aedifex/project.lux +++ b/stdlib/source/program/aedifex/project.lux @@ -39,7 +39,7 @@ (dictionary.empty text.hash)) (def: composite - (dictionary.merged_with (# //.monoid composite)))) + (dictionary.composite_with (# //.monoid composite)))) (exception: .public (unknown_profile [name Name]) (exception.report diff --git a/stdlib/source/test/lux/data/collection/dictionary.lux b/stdlib/source/test/lux/data/collection/dictionary.lux index 95f2bed9e..491e35448 100644 --- a/stdlib/source/test/lux/data/collection/dictionary.lux +++ b/stdlib/source/test/lux/data/collection/dictionary.lux @@ -108,21 +108,21 @@ (n.= (/.size dict) (list.size (/.values dict)))) - (_.cover [/.merged] + (_.cover [/.composite] (let [merging_with_oneself (let [(open "[0]") (/.equivalence n.equivalence)] - (= dict (/.merged dict dict))) + (= dict (/.composite dict dict))) overwritting_keys (let [dict' (|> dict /.entries (list#each (function (_ [k v]) [k (++ v)])) (/.of_list n.hash)) (open "[0]") (/.equivalence n.equivalence)] - (= dict' (/.merged dict' dict)))] + (= dict' (/.composite dict' dict)))] (and merging_with_oneself overwritting_keys))) - (_.cover [/.merged_with] + (_.cover [/.composite_with] (list.every? (function (_ [x x*2]) (n.= (n.* 2 x) x*2)) (list.zipped_2 (/.values dict) - (/.values (/.merged_with n.+ dict dict))))) + (/.values (/.composite_with n.+ dict dict))))) (_.cover [/.of_list] (let [(open "[0]") (/.equivalence n.equivalence)] diff --git a/stdlib/source/test/lux/target/lua.lux b/stdlib/source/test/lux/target/lua.lux index 3068a6e18..31d4a6f95 100644 --- a/stdlib/source/test/lux/target/lua.lux +++ b/stdlib/source/test/lux/target/lua.lux @@ -22,7 +22,7 @@ ["[0]" list ("[1]#[0]" functor)]]] [macro ["[0]" template]] - ["[0]" math + [math ["[0]" random {"+" Random} ("[1]#[0]" monad)] [number ["n" nat] @@ -94,7 +94,7 @@ )))) (template [] - [(`` (def: (~~ (template.symbol [int/ ])) + [(`` (def: (~~ (template.symbol [int_ ])) (Random Int) (let [mask (|> 1 (i64.left_shifted (-- )) --)] (random#each (|>> (i64.and mask) .int) random.nat))))] @@ -164,7 +164,7 @@ [/.* f.* |>] [/./ f./ |>] [/.% f.mod |>] - [/.^ math.pow f.abs] + [/.^ f.pow f.abs] )) (~~ (template [ ] [(_.cover [] diff --git a/stdlib/source/test/lux/time/duration.lux b/stdlib/source/test/lux/time/duration.lux index af1550e29..0ff2471d8 100644 --- a/stdlib/source/test/lux/time/duration.lux +++ b/stdlib/source/test/lux/time/duration.lux @@ -45,13 +45,13 @@ expected random.duration parameter random.duration] ($_ _.and - (_.cover [/.merged /.difference] - (|> expected (/.merged parameter) (/.difference parameter) (#= expected))) + (_.cover [/.composite /.difference] + (|> expected (/.composite parameter) (/.difference parameter) (#= expected))) (_.cover [/.empty] - (|> expected (/.merged /.empty) (#= expected))) + (|> expected (/.composite /.empty) (#= expected))) (_.cover [/.inverse] (and (|> expected /.inverse /.inverse (#= expected)) - (|> expected (/.merged (/.inverse expected)) (#= /.empty)))) + (|> expected (/.composite (/.inverse expected)) (#= /.empty)))) (_.cover [/.positive? /.negative? /.neutral?] (or (bit#= (/.positive? expected) (/.negative? (/.inverse expected))) -- cgit v1.2.3