diff options
Diffstat (limited to '')
109 files changed, 476 insertions, 401 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6583d8129..30184748e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,6 +2,7 @@ name: test_everything on: [push] jobs: setup_aedifex: + runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - run: wget https://github.com/LuxLang/lux/releases/download/0.6.5/aedifex_do_not_touch_3.jar && mv aedifex_do_not_touch_3.jar aedifex.jar diff --git a/documentation/bookmark/back_end/Python.md b/documentation/bookmark/back_end/Python.md deleted file mode 100644 index 5a3266107..000000000 --- a/documentation/bookmark/back_end/Python.md +++ /dev/null @@ -1,4 +0,0 @@ -# Platform - -1. [BeeWare: Write once. Deploy everywhere.](https://beeware.org/) - diff --git a/documentation/bookmark/back_end/c++.md b/documentation/bookmark/back_end/c++.md index 6b6cc1083..8cbb088d5 100644 --- a/documentation/bookmark/back_end/c++.md +++ b/documentation/bookmark/back_end/c++.md @@ -1,5 +1,7 @@ # Reference +0. [Unionizing for Profit: How to Exploit the Power of Unions in C++](https://dev-discuss.pytorch.org/t/unionizing-for-profit-how-to-exploit-the-power-of-unions-in-c/444) +0. [std::any: How, when, and why](https://devblogs.microsoft.com/cppblog/stdany-how-when-and-why/) 0. [Using C Libraries in your Modern C++ Embedded Project - Michael Caisse - CppCon 2021](https://www.youtube.com/watch?v=Ototzy-nP4M) 0. [In-memory and Persistent Representations of C++ - Gabriel Dos Reis - CppCon 2021](https://www.youtube.com/watch?v=39wlNRk-nAg) 0. [Back to Basics: const and constexpr - Rainer Grimm - CppCon 2021](https://www.youtube.com/watch?v=tA6LbPyYdco) @@ -42,3 +44,18 @@ 0. [std::atomic](https://en.cppreference.com/w/cpp/atomic/atomic) 0. [std::atomic::compare_exchange_strong](https://www.cplusplus.com/reference/atomic/atomic/compare_exchange_strong/) +# Interpreter + +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/) +0. [cppyy: Automatic Python-C++ bindings](https://cppyy.readthedocs.io/en/latest/index.html) + +# Cross-compilation + +0. [Cross compiling Windows binaries from Linux](https://jake-shadle.github.io/xwin/) +0. [Clang C++ Cross Compiler - Generating Windows Executable from Mac OS X](https://stackoverflow.com/questions/23248989/clang-c-cross-compiler-generating-windows-executable-from-mac-os-x) +0. [The Clang Universal Driver Project](https://clang.llvm.org/UniversalDriver.html) +0. [Cross-compilation using Clang](https://clang.llvm.org/docs/CrossCompilation.html) +0. [Wclang: Cross compile source code easily for Windows with clang on Linux/Unix](https://github.com/tpoechtrager/wclang) + diff --git a/documentation/bookmark/back_end/c.md b/documentation/bookmark/back_end/c.md index 17c3b9ee9..73383e848 100644 --- a/documentation/bookmark/back_end/c.md +++ b/documentation/bookmark/back_end/c.md @@ -1,5 +1,7 @@ # Reference +0. [Quirks of C](https://gist.github.com/fay59/5ccbe684e6e56a7df8815c3486568f01) +0. [C Isn't A Programming Language Anymore](https://gankra.github.io/blah/c-isnt-a-language/) 0. [Functional C](https://ris.utwente.nl/ws/portalfiles/portal/5128727/book.pdf) 0. [Cello: High Level C](https://libcello.org/) 0. [C as a scripting language thanks to TinyCC](https://ciesie.com/post/tinycc_dynamic_compilation/) diff --git a/documentation/bookmark/back_end/python.md b/documentation/bookmark/back_end/python.md new file mode 100644 index 000000000..5113bb712 --- /dev/null +++ b/documentation/bookmark/back_end/python.md @@ -0,0 +1,5 @@ +# Platform + +0. [nanobind — Seamless operability between C++17 and Python](https://github.com/wjakob/nanobind) +0. [BeeWare: Write once. Deploy everywhere.](https://beeware.org/) + diff --git a/documentation/bookmark/back_end/wasm.md b/documentation/bookmark/back_end/wasm.md index 378915465..9c10078be 100644 --- a/documentation/bookmark/back_end/wasm.md +++ b/documentation/bookmark/back_end/wasm.md @@ -1,5 +1,6 @@ # Interoperability +0. [How to Extend WebAssembly with Host Functions](https://www.secondstate.io/articles/extend-webassembly/) 0. [js-wasm: JavaScript and WebAssembly should be a joy to use together.](https://wasm.js.org/) # Concurrency diff --git a/documentation/bookmark/business/advice.md b/documentation/bookmark/business/advice.md new file mode 100644 index 000000000..54240ad61 --- /dev/null +++ b/documentation/bookmark/business/advice.md @@ -0,0 +1,4 @@ +# Reference + +0. [Paul Graham 101](https://www.jaakkoj.com/blog/graham) + diff --git a/documentation/bookmark/business/planning.md b/documentation/bookmark/business/planning.md new file mode 100644 index 000000000..7243dbff7 --- /dev/null +++ b/documentation/bookmark/business/planning.md @@ -0,0 +1,4 @@ +# Reference + +0. [User Story Mapping: Developing a Shared Understanding](https://www.youtube.com/watch?v=UDHW525sCOo) + diff --git a/documentation/bookmark/business/tool.md b/documentation/bookmark/business/tool.md new file mode 100644 index 000000000..c0d3d0257 --- /dev/null +++ b/documentation/bookmark/business/tool.md @@ -0,0 +1,5 @@ +# Reference + +0. [Open Source Alternative to...](https://www.opensourcealternative.to/) +0. [Akaunting: Free Accounting Software](https://akaunting.com/) + diff --git a/documentation/bookmark/community/trolling.md b/documentation/bookmark/community/trolling.md new file mode 100644 index 000000000..01d0adc04 --- /dev/null +++ b/documentation/bookmark/community/trolling.md @@ -0,0 +1,4 @@ +# Reference + +0. [Trolls Aren’t Like the Rest of Us](https://www.theatlantic.com/family/archive/2022/03/how-to-manage-cyberbullying-internet-trolls/627084/) + diff --git a/documentation/bookmark/foreign_function_interface.md b/documentation/bookmark/foreign_function_interface.md new file mode 100644 index 000000000..eca9fe747 --- /dev/null +++ b/documentation/bookmark/foreign_function_interface.md @@ -0,0 +1,4 @@ +# Reference + +0. [Porting libffi to pure WebAssembly](https://www.tweag.io/blog/2022-03-17-libffi-wasm32/) + diff --git a/documentation/bookmark/game/business.md b/documentation/bookmark/game/business.md index d7338c071..14b087412 100644 --- a/documentation/bookmark/game/business.md +++ b/documentation/bookmark/game/business.md @@ -1,4 +1,6 @@ # Reference +0. [Studio Design: Building a Foundation for Success and Avoiding Business Disaster](https://www.youtube.com/watch?v=5ZGE_awGGik) +0. [7 Lessons From 7 Years of Indie Game Dev](http://amirrajan.net/7-lessons-from-7-years-of-indie-game-dev/) 0. [Practical Law 101 For Indie Developers: Not Scary Edition](https://www.youtube.com/watch?v=8eAW-7Js7NA) diff --git a/documentation/bookmark/game/mechanic/strategy.md b/documentation/bookmark/game/mechanic/strategy.md new file mode 100644 index 000000000..5c4a55a56 --- /dev/null +++ b/documentation/bookmark/game/mechanic/strategy.md @@ -0,0 +1,4 @@ +# Reference + +0. [What Can Game Designers Learn from Competitive Reality Shows](https://www.youtube.com/watch?v=UkR4cxz7_t8) + diff --git a/documentation/bookmark/game/storytelling.md b/documentation/bookmark/game/storytelling.md index 43e7ee536..69176dbe4 100644 --- a/documentation/bookmark/game/storytelling.md +++ b/documentation/bookmark/game/storytelling.md @@ -1,5 +1,6 @@ # Reference +0. [Press Y to Cry: Generating Emotions in Videogame Narrative](https://www.youtube.com/watch?v=_lp0libfp5M) 0. [How James Bond Can Improve Your Dungeons & Dragons Game (Ep. 213)](https://www.youtube.com/watch?v=QRJXiRbXEek) 0. [The ONE CLASSIC Book Every DM Needs to Read (Ep. 212)](https://www.youtube.com/watch?v=lfbnNxSFK6U) diff --git a/documentation/bookmark/io.md b/documentation/bookmark/io.md new file mode 100644 index 000000000..c25af645b --- /dev/null +++ b/documentation/bookmark/io.md @@ -0,0 +1,4 @@ +# Reference + +0. [Blocking I/O, Nonblocking I/O, And Epoll](https://eklitzke.org/blocking-io-nonblocking-io-and-epoll) + diff --git a/documentation/bookmark/security/compiler.md b/documentation/bookmark/security/compiler.md new file mode 100644 index 000000000..59e0a1fe1 --- /dev/null +++ b/documentation/bookmark/security/compiler.md @@ -0,0 +1,4 @@ +# Reference + +0. [Compilers: The Old New Security Frontier](https://grsecurity.net/Compilers_The_Old_New_Security_Frontier_BlueHat_IL_2022.pdf) + diff --git a/documentation/bookmark/security/memory.md b/documentation/bookmark/security/memory.md new file mode 100644 index 000000000..3bbd00fe9 --- /dev/null +++ b/documentation/bookmark/security/memory.md @@ -0,0 +1,4 @@ +# Reference + +0. [Why is memory safety still a concern?](https://docs.google.com/presentation/d/1EscMOcMNOwi-bCgOthjiwIXE30w_SeHk3ahjyY0pX10/edit#slide=id.p) + diff --git a/documentation/bookmark/security/operating_system.md b/documentation/bookmark/security/operating_system.md new file mode 100644 index 000000000..a3d78b67a --- /dev/null +++ b/documentation/bookmark/security/operating_system.md @@ -0,0 +1,4 @@ +# Reference + +0. [Setuid Demystified](https://people.eecs.berkeley.edu/~daw/papers/setuid-usenix02.pdf) + diff --git a/documentation/bookmark/security/secret.md b/documentation/bookmark/security/secret.md new file mode 100644 index 000000000..53e2fda98 --- /dev/null +++ b/documentation/bookmark/security/secret.md @@ -0,0 +1,4 @@ +# Reference + +0. [Don't use Math.random()](https://deepsource.io/blog/dont-use-math-random/) + diff --git a/documentation/bookmark/text/format.md b/documentation/bookmark/text/format.md new file mode 100644 index 000000000..fd5f3678c --- /dev/null +++ b/documentation/bookmark/text/format.md @@ -0,0 +1,4 @@ +# Reference + +0. [{fmt} Formatting & Printing Library](https://hackingcpp.com/cpp/libs/fmt.html) + diff --git a/documentation/bookmark/user_interface/color.md b/documentation/bookmark/user_interface/color.md index 16dc073bd..2a81c4260 100644 --- a/documentation/bookmark/user_interface/color.md +++ b/documentation/bookmark/user_interface/color.md @@ -1,5 +1,6 @@ # Reference +0. [How to Choose Colours Procedurally (Algorithms)](http://devmag.org.za/2012/07/29/how-to-choose-colours-procedurally-algorithms/) 0. [CSS System Colors](https://blog.jim-nielsen.com/2021/css-system-colors/) 0. [LUTious Color: Grading for Games](https://www.youtube.com/watch?v=-fb3QXR5spE) 0. [Building a color scheme: A foundational overview of how to establish a dynamic and configurable color scheme](https://web.dev/building-a-color-scheme/) diff --git a/lux-js/source/program.lux b/lux-js/source/program.lux index 5e7cdd72f..450b4f9ae 100644 --- a/lux-js/source/program.lux +++ b/lux-js/source/program.lux @@ -78,7 +78,7 @@ "???")) (for @.jvm - (as_is (import: java/lang/String + (these (import: java/lang/String "[1]::[0]") (import: (java/lang/Class a) @@ -458,10 +458,10 @@ ) @.js - (as_is)) + (these)) (for @.jvm - (as_is (def: (call_macro inputs lux macro) + (these (def: (call_macro inputs lux macro) (-> (List Code) Lux org/openjdk/nashorn/api/scripting/JSObject (Try (Try [Lux (List Code)]))) (let [to_js (is (-> Any java/lang/Object) (|>> (as (Array java/lang/Object)) js_structure (as java/lang/Object)))] @@ -502,7 +502,7 @@ ) (for @.jvm - (as_is (def: (evaluate! interpreter alias input) + (these (def: (evaluate! interpreter alias input) (-> javax/script/ScriptEngine unit.ID _.Expression (Try Any)) (do try.monad [?output (javax/script/ScriptEngine::eval (ffi.as_string (_.code input)) interpreter)] @@ -553,7 +553,7 @@ ) @.js - (as_is (def: (eval code) + (these (def: (eval code) (-> Text (Try (Maybe Any))) ... Note: I have to call "eval" this way ... in order to avoid a quirk of calling eval in Node diff --git a/lux-jvm/source/luxc/lang/directive/jvm.lux b/lux-jvm/source/luxc/lang/directive/jvm.lux index 5f1b09ec9..bff4a1ab4 100644 --- a/lux-jvm/source/luxc/lang/directive/jvm.lux +++ b/lux-jvm/source/luxc/lang/directive/jvm.lux @@ -539,10 +539,10 @@ sequence.list _.fuse)) -(with_expansions [<anchor> (as_is jvm.Anchor) - <expression> (as_is Inst) - <directive> (as_is jvm.Definition) - <type_vars> (as_is <anchor> <expression> <directive>)] +(with_expansions [<anchor> (these jvm.Anchor) + <expression> (these Inst) + <directive> (these jvm.Definition) + <type_vars> (these <anchor> <expression> <directive>)] (type: Handler' ... (generation.Handler jvm.Anchor (/.Bytecode Inst /.Label) jvm.Definition) (-> extension.Name diff --git a/lux-lua/source/program.lux b/lux-lua/source/program.lux index 46fb33033..8d572e8c2 100644 --- a/lux-lua/source/program.lux +++ b/lux-lua/source/program.lux @@ -68,7 +68,7 @@ [program ["/" compositor]]) -(with_expansions [<jvm> (as_is (ffi.import: java/lang/String +(with_expansions [<jvm> (these (ffi.import: java/lang/String "[1]::[0]") (ffi.import: (java/lang/Class a) @@ -491,15 +491,15 @@ {.#None} (exception.except ..cannot_apply_a_non_function (as java/lang/Object macro)))))] - (for @.old (as_is <jvm>) - @.jvm (as_is <jvm>) + (for @.old (these <jvm>) + @.jvm (these <jvm>) @.lua (def: (expander macro inputs lux) Expander {try.#Success ((as Macro' macro) inputs lux)}))) -(with_expansions [<jvm> (as_is (with_expansions [$var_args (_.var "...") +(with_expansions [<jvm> (these (with_expansions [$var_args (_.var "...") $str_rel_to_abs (_.var "_utf8_str_rel_to_abs") $decode (_.var "_utf8_decode")] (template.let [(!int <hex>) @@ -515,7 +515,7 @@ (_.bit_shr (_.int <shift>)) (_.bit_and (!int <and>)) (_.bit_or (!int <or>)))]] - (as_is (def: rembulan//char + (these (def: rembulan//char (let [$buffer (_.var "buffer") $k (_.var "k") $v (_.var "v") @@ -741,9 +741,9 @@ (do try.monad [_ (run! content)] (run! (_.return (_.var (reference.artifact context))))))))]))))] - (for @.old (as_is <jvm>) - @.jvm (as_is <jvm>) - @.lua (as_is (ffi.import: (load [ffi.String] "try" ffi.Function)) + (for @.old (these <jvm>) + @.jvm (these <jvm>) + @.lua (these (ffi.import: (load [ffi.String] "try" ffi.Function)) (def: host (IO (Host _.Expression _.Statement)) (io (let [run! (is (-> _.Statement (Try Any)) @@ -782,7 +782,7 @@ [_ (run! content)] (run! (_.return (_.var (reference.artifact context)))))))))))))) -(with_expansions [<jvm> (as_is (def: (to_host it) +(with_expansions [<jvm> (these (def: (to_host it) (-> Any java/lang/Object) (`` (<| (~~ (template [<jvm> <lua>] [(case (ffi.check <jvm> (as java/lang/Object it)) @@ -827,8 +827,8 @@ maybe.trusted (as java/lang/Object) ..read)))))] - (for @.old (as_is <jvm>) - @.jvm (as_is <jvm>) + (for @.old (these <jvm>) + @.jvm (these <jvm>) @.lua (def: (extender phase_wrapper handler) diff --git a/lux-python/source/program.lux b/lux-python/source/program.lux index b821f62c3..d6dc27186 100644 --- a/lux-python/source/program.lux +++ b/lux-python/source/program.lux @@ -72,7 +72,7 @@ [program ["/" compositor]]) -(with_expansions [<jvm> (as_is (import: java/lang/String +(with_expansions [<jvm> (these (import: java/lang/String "[1]::[0]") (import: (java/lang/Class a) @@ -351,11 +351,11 @@ )) (as org/python/core/PyObject it)))) )] - (for @.old (as_is <jvm>) - @.jvm (as_is <jvm>) - @.python (as_is))) + (for @.old (these <jvm>) + @.jvm (these <jvm>) + @.python (these))) -(with_expansions [<jvm> (as_is (def: (call_macro inputs lux macro) +(with_expansions [<jvm> (these (def: (call_macro inputs lux macro) (-> (List Code) Lux org/python/core/PyFunction (Try (Try [Lux (List Code)]))) (|> macro (org/python/core/PyFunction::__call__ (|> (ffi.array org/python/core/PyObject 2) @@ -391,8 +391,8 @@ {.#None} (exception.except ..cannot_apply_a_non_function [(as java/lang/Object macro)]))))] - (for @.old (as_is <jvm>) - @.jvm (as_is <jvm>) + (for @.old (these <jvm>) + @.jvm (these <jvm>) @.python (def: (expander macro inputs lux) @@ -448,7 +448,7 @@ @.jvm <jvm> @.python - (as_is (import: (dict [] ffi.Dict)) + (these (import: (dict [] ffi.Dict)) (import: (eval [ffi.String ffi.Dict] "try" Any)) (def: host @@ -486,7 +486,7 @@ [_ (execute! content)] (evaluate! context (_.var (reference.artifact context))))))))))))) -(with_expansions [<jvm> (as_is (def: (extender phase_wrapper) +(with_expansions [<jvm> (these (def: (extender phase_wrapper) (-> phase.Wrapper Extender) ... TODO: Stop relying on coercions ASAP. (<| (as Extender) @@ -510,8 +510,8 @@ (ffi.write! 4 (..to_host state))) handler)] (..read output)))))] - (for @.old (as_is <jvm>) - @.jvm (as_is <jvm>) + (for @.old (these <jvm>) + @.jvm (these <jvm>) @.python (def: (extender phase_wrapper handler) diff --git a/lux-ruby/source/program.lux b/lux-ruby/source/program.lux index 198faf43b..86dd1d553 100644 --- a/lux-ruby/source/program.lux +++ b/lux-ruby/source/program.lux @@ -773,7 +773,7 @@ [_ (run! content)] (run! (_.global (reference.artifact context)))))))))) -(for @.jvm (as_is (exception: .public (invaid_phase_application [partial_application (List Any) +(for @.jvm (these (exception: .public (invaid_phase_application [partial_application (List Any) arity (List Any)]) (exception.report "Partial Application" (%.nat (list.size partial_application)) diff --git a/stdlib/source/documentation/lux.lux b/stdlib/source/documentation/lux.lux index 823f6efc4..be907a73d 100644 --- a/stdlib/source/documentation/lux.lux +++ b/stdlib/source/documentation/lux.lux @@ -831,10 +831,10 @@ [(template: (square x) (* x x))]) -(documentation: /.as_is +(documentation: /.these (format "Given a (potentially empty) list of codes, just returns them immediately, without any work done." \n "This may seen useless, but it has its utility when dealing with controlled-macro-expansion macros.") - [(with_expansions [<operands> (as_is 1 + [(with_expansions [<operands> (these 1 2 3 4)] @@ -1000,7 +1000,7 @@ ..undefined ..type_of ..template: - ..as_is + ..these ..char ..for ..`` diff --git a/stdlib/source/documentation/lux/control/concurrency/actor.lux b/stdlib/source/documentation/lux/control/concurrency/actor.lux index 408a6f897..4a7199952 100644 --- a/stdlib/source/documentation/lux/control/concurrency/actor.lux +++ b/stdlib/source/documentation/lux/control/concurrency/actor.lux @@ -1,14 +1,14 @@ (.using - [library - [lux {"-" if loop} - ["$" documentation {"+" documentation:}] - [data - [text {"+" \n} - ["%" format {"+" format}]]] - [macro - ["[0]" template]]]] - [\\library - ["[0]" /]]) + [library + [lux {"-" if loop} + ["$" documentation {"+" documentation:}] + [data + [text {"+" \n} + ["%" format {"+" format}]]] + [macro + ["[0]" template]]]] + [\\library + ["[0]" /]]) (documentation: (/.Actor state) "An entity that can react to messages (mail) sent to it concurrently.") @@ -44,7 +44,7 @@ (format "Kills the actor by sending mail that will kill it upon processing," \n "but allows the actor to handle previous mail.")) -(with_expansions [<examples> (as_is (actor: .public (stack a) +(with_expansions [<examples> (these (actor: .public (stack a) (List a) ((on_mail mail state self) diff --git a/stdlib/source/documentation/lux/control/parser/analysis.lux b/stdlib/source/documentation/lux/control/parser/analysis.lux index c2a58f279..aa4542f2d 100644 --- a/stdlib/source/documentation/lux/control/parser/analysis.lux +++ b/stdlib/source/documentation/lux/control/parser/analysis.lux @@ -27,7 +27,7 @@ "Checks whether there are no more inputs.") (template [<query> <assertion>] - [(`` (as_is (`` (documentation: <query> + [(`` (these (`` (documentation: <query> (format "Queries for a " (~~ (template.text [<query>])) " value."))) (`` (documentation: <assertion> (format "Assert a specific " (~~ (template.text [<query>])) " value.")))))] diff --git a/stdlib/source/documentation/lux/world/console.lux b/stdlib/source/documentation/lux/world/console.lux index 63c9c60f5..bc7cd8818 100644 --- a/stdlib/source/documentation/lux/world/console.lux +++ b/stdlib/source/documentation/lux/world/console.lux @@ -38,8 +38,8 @@ ..Mock ..mock ($.default /.async) - (~~ (for @.jvm (~~ (as_is ($.default /.cannot_open) + (~~ (for @.jvm (~~ (these ($.default /.cannot_open) ($.default /.cannot_close) ($.default /.default))) - (~~ (as_is))))] + (~~ (these))))] [])))) diff --git a/stdlib/source/documentation/lux/world/file.lux b/stdlib/source/documentation/lux/world/file.lux index c9f9168a1..7d4bddcc6 100644 --- a/stdlib/source/documentation/lux/world/file.lux +++ b/stdlib/source/documentation/lux/world/file.lux @@ -72,10 +72,10 @@ ($.default /.cannot_make_directory) ($.default /.cannot_find_directory) ($.default /.cannot_read_all_data) - (~~ (for @.jvm (~~ (as_is ($.default /.cannot_modify_file) + (~~ (for @.jvm (~~ (these ($.default /.cannot_modify_file) ($.default /.default))) - @.js (~~ (as_is ($.default /.default))) - @.python (~~ (as_is ($.default /.default))) - @.ruby (~~ (as_is ($.default /.default))) - (~~ (as_is))))] + @.js (~~ (these ($.default /.default))) + @.python (~~ (these ($.default /.default))) + @.ruby (~~ (these ($.default /.default))) + (~~ (these))))] [/watch.documentation])))) diff --git a/stdlib/source/documentation/lux/world/file/watch.lux b/stdlib/source/documentation/lux/world/file/watch.lux index 3db866343..3cf437056 100644 --- a/stdlib/source/documentation/lux/world/file/watch.lux +++ b/stdlib/source/documentation/lux/world/file/watch.lux @@ -34,9 +34,9 @@ \n "Must be given a path separator for the file-system.") [(mock separator)]) -(for @.jvm (as_is (documentation: /.default +(for @.jvm (these (documentation: /.default "The default watcher for the default file-system.")) - (as_is)) + (these)) (.def: .public documentation (.List $.Module) @@ -56,6 +56,6 @@ ($.default /.all) ($.default /.not_being_watched) ($.default /.cannot_poll_a_non_existent_directory) - (~~ (for @.jvm (~~ (as_is ..default)) - (~~ (as_is))))] + (~~ (for @.jvm (~~ (these ..default)) + (~~ (these))))] [])))) diff --git a/stdlib/source/documentation/lux/world/net/http/client.lux b/stdlib/source/documentation/lux/world/net/http/client.lux index 17912d11e..a84745c73 100644 --- a/stdlib/source/documentation/lux/world/net/http/client.lux +++ b/stdlib/source/documentation/lux/world/net/http/client.lux @@ -48,6 +48,6 @@ ..trace ($.default /.async) ($.default /.headers) - (~~ (for @.jvm (~~ (as_is ($.default /.default))) - (~~ (as_is))))] + (~~ (for @.jvm (~~ (these ($.default /.default))) + (~~ (these))))] [])))) diff --git a/stdlib/source/documentation/lux/world/shell.lux b/stdlib/source/documentation/lux/world/shell.lux index b1b8a1de5..cccc8dc3e 100644 --- a/stdlib/source/documentation/lux/world/shell.lux +++ b/stdlib/source/documentation/lux/world/shell.lux @@ -50,7 +50,7 @@ ($.default /.normal) ($.default /.error) ($.default /.async) - (~~ (for @.jvm (~~ (as_is ($.default /.no_more_output) + (~~ (for @.jvm (~~ (these ($.default /.no_more_output) ($.default /.default))) - (~~ (as_is))))] + (~~ (these))))] [])))) diff --git a/stdlib/source/library/lux.lux b/stdlib/source/library/lux.lux index 7cc43774e..67f2dc4d3 100644 --- a/stdlib/source/library/lux.lux +++ b/stdlib/source/library/lux.lux @@ -4804,7 +4804,7 @@ [rev ..Rev] ) -(macro: .public (as_is tokens compiler) +(macro: .public (these tokens compiler) {#Right [compiler tokens]}) (macro: .public (char tokens compiler) @@ -4880,7 +4880,7 @@ (failure (..wrong_syntax_error (symbol ..for))))) ... TODO: Delete "scope_type_vars" (including the #scope_type_vars Lux state) and "parameter" ASAP. -(for "{old}" (as_is (def: (scope_type_vars state) +(for "{old}" (these (def: (scope_type_vars state) (Meta (List Nat)) (case state [..#info info ..#source source ..#current_module _ ..#modules modules @@ -4903,7 +4903,7 @@ _ (failure (..wrong_syntax_error (symbol ..$)))))) - (as_is (def: .public parameter ""))) + (these (def: .public parameter ""))) (macro: .public (using _imports) (do meta_monad diff --git a/stdlib/source/library/lux/control/concurrency/actor.lux b/stdlib/source/library/lux/control/concurrency/actor.lux index 715b2b98f..16a789547 100644 --- a/stdlib/source/library/lux/control/concurrency/actor.lux +++ b/stdlib/source/library/lux/control/concurrency/actor.lux @@ -39,9 +39,9 @@ (exception: .public dead) (with_expansions - [<Mail> (as_is (-> s (Actor s) (Async (Try s)))) - <Obituary> (as_is [Text s (List <Mail>)]) - <Mailbox> (as_is (Rec Mailbox + [<Mail> (these (-> s (Actor s) (Async (Try s)))) + <Obituary> (these [Text s (List <Mail>)]) + <Mailbox> (these (Rec Mailbox [(Async [<Mail> Mailbox]) (Resolver [<Mail> Mailbox])]))] diff --git a/stdlib/source/library/lux/control/concurrency/atom.lux b/stdlib/source/library/lux/control/concurrency/atom.lux index 1fe0d8262..8fd8e86bf 100644 --- a/stdlib/source/library/lux/control/concurrency/atom.lux +++ b/stdlib/source/library/lux/control/concurrency/atom.lux @@ -15,14 +15,14 @@ [type [abstract {"-" pattern}]]]]) -(with_expansions [<jvm> (as_is (ffi.import: (java/util/concurrent/atomic/AtomicReference a) +(with_expansions [<jvm> (these (ffi.import: (java/util/concurrent/atomic/AtomicReference a) "[1]::[0]" (new [a]) (get [] "io" a) (compareAndSet [a a] boolean)))] (for @.old <jvm> @.jvm <jvm> - (as_is))) + (these))) (with_expansions [<new> (for @.js "js array new" @.python "python array new" @@ -30,14 +30,14 @@ @.ruby "ruby array new" @.php "php array new" @.scheme "scheme array new" - (as_is)) + (these)) <write> (for @.js "js array write" @.python "python array write" @.lua "lua array write" @.ruby "ruby array write" @.php "php array write" @.scheme "scheme array write" - (as_is)) + (these)) <read> (for @.js "js array read" @.python "python array read" @@ -45,7 +45,7 @@ @.ruby "ruby array read" @.php "php array read" @.scheme "scheme array read" - (as_is))] + (these))] (abstract: .public (Atom a) (with_expansions [<jvm> (java/util/concurrent/atomic/AtomicReference a)] (for @.old <jvm> diff --git a/stdlib/source/library/lux/control/concurrency/semaphore.lux b/stdlib/source/library/lux/control/concurrency/semaphore.lux index 504e5472b..1e177aa5e 100644 --- a/stdlib/source/library/lux/control/concurrency/semaphore.lux +++ b/stdlib/source/library/lux/control/concurrency/semaphore.lux @@ -51,7 +51,7 @@ (async.async []))] (exec (io.run! - (with_expansions [<had_open_position?> (as_is (the #open_positions) (i.> -1))] + (with_expansions [<had_open_position?> (these (the #open_positions) (i.> -1))] (do io.monad [[_ state'] (atom.update! (|>> (revised #open_positions --) (pipe.if [<had_open_position?>] diff --git a/stdlib/source/library/lux/control/concurrency/thread.lux b/stdlib/source/library/lux/control/concurrency/thread.lux index 6c2a36ebc..a885b63a9 100644 --- a/stdlib/source/library/lux/control/concurrency/thread.lux +++ b/stdlib/source/library/lux/control/concurrency/thread.lux @@ -24,7 +24,7 @@ [// ["[0]" atom {"+" Atom}]]) -(with_expansions [<jvm> (as_is (ffi.import: java/lang/Object +(with_expansions [<jvm> (these (ffi.import: java/lang/Object "[1]::[0]") (ffi.import: java/lang/Long @@ -53,11 +53,11 @@ "[1]::[0]" (new [int]) (schedule [java/lang/Runnable long java/util/concurrent/TimeUnit] "io" (java/util/concurrent/ScheduledFuture java/lang/Object))))] - (for @.old (as_is <jvm>) - @.jvm (as_is <jvm>) + (for @.old (these <jvm>) + @.jvm (these <jvm>) @.js - (as_is (ffi.import: (setTimeout [ffi.Function ffi.Number] "io" Any))) + (these (ffi.import: (setTimeout [ffi.Function ffi.Number] "io" Any))) @.python (ffi.import: threading/Timer @@ -88,7 +88,7 @@ ... Default <default>))) -(with_expansions [<jvm> (as_is (def: runner +(with_expansions [<jvm> (these (def: runner java/util/concurrent/ScheduledThreadPoolExecutor (|> ..parallelism .int @@ -96,11 +96,11 @@ java/util/concurrent/ScheduledThreadPoolExecutor::new)))] (for @.old <jvm> @.jvm <jvm> - @.js (as_is) - @.python (as_is) + @.js (these) + @.python (these) ... Default - (as_is (def: started? + (these (def: started? (Atom Bit) (atom.atom false)) (def: runner @@ -122,7 +122,7 @@ (def: .public (schedule! milli_seconds action) (-> Nat (IO Any) (IO Any)) - (with_expansions [<jvm> (as_is (let [runnable (ffi.object [] [java/lang/Runnable] + (with_expansions [<jvm> (these (let [runnable (ffi.object [] [java/lang/Runnable] [] (java/lang/Runnable [] (run self []) void (..execute! action)))] @@ -153,13 +153,13 @@ ..runner)] (in []))))) -(for @.old (as_is) - @.jvm (as_is) - @.js (as_is) - @.python (as_is) +(for @.old (these) + @.jvm (these) + @.js (these) + @.python (these) ... Default - (as_is (exception: .public cannot_continue_running_threads) + (these (exception: .public cannot_continue_running_threads) ... https://en.wikipedia.org/wiki/Event_loop ... Starts the event-loop. diff --git a/stdlib/source/library/lux/control/parser/analysis.lux b/stdlib/source/library/lux/control/parser/analysis.lux index b6794db76..078fedb7e 100644 --- a/stdlib/source/library/lux/control/parser/analysis.lux +++ b/stdlib/source/library/lux/control/parser/analysis.lux @@ -89,7 +89,7 @@ _ false)]})) (template [<query> <assertion> <tag> <type> <eq>] - [(`` (as_is (def: .public <query> + [(`` (these (def: .public <query> (Parser <type>) (function (_ input) (case input diff --git a/stdlib/source/library/lux/control/parser/code.lux b/stdlib/source/library/lux/control/parser/code.lux index 6b76cd137..554ad21e9 100644 --- a/stdlib/source/library/lux/control/parser/code.lux +++ b/stdlib/source/library/lux/control/parser/code.lux @@ -58,7 +58,7 @@ {try.#Success [tokens next]}))) (template [<query> <check> <type> <tag> <eq> <desc>] - [(with_expansions [<failure> (as_is {try.#Failure ($_ text#composite "Cannot parse " <desc> (remaining_inputs tokens))})] + [(with_expansions [<failure> (these {try.#Failure ($_ text#composite "Cannot parse " <desc> (remaining_inputs tokens))})] (def: .public <query> (Parser <type>) (function (_ tokens) @@ -103,7 +103,7 @@ _ {try.#Failure "There are no tokens to parse!"}))) -(with_expansions [<failure> (as_is {try.#Failure ($_ text#composite "Cannot parse local symbol" (remaining_inputs tokens))})] +(with_expansions [<failure> (these {try.#Failure ($_ text#composite "Cannot parse local symbol" (remaining_inputs tokens))})] (def: .public local (Parser Text) (function (_ tokens) @@ -126,7 +126,7 @@ _ <failure>)))) -(with_expansions [<failure> (as_is {try.#Failure ($_ text#composite "Cannot parse local symbol" (remaining_inputs tokens))})] +(with_expansions [<failure> (these {try.#Failure ($_ text#composite "Cannot parse local symbol" (remaining_inputs tokens))})] (def: .public global (Parser Symbol) (function (_ tokens) diff --git a/stdlib/source/library/lux/data/collection/dictionary/ordered.lux b/stdlib/source/library/lux/data/collection/dictionary/ordered.lux index d7e8d99d1..217c07d1e 100644 --- a/stdlib/source/library/lux/data/collection/dictionary/ordered.lux +++ b/stdlib/source/library/lux/data/collection/dictionary/ordered.lux @@ -162,7 +162,7 @@ {#Black} (with_expansions - [<default_behavior> (as_is (black (the #key center) + [<default_behavior> (these (black (the #key center) (the #value center) {.#Some addition} (the #right center)))] @@ -211,7 +211,7 @@ {#Black} (with_expansions - [<default_behavior> (as_is (black (the #key center) + [<default_behavior> (these (black (the #key center) (the #value center) (the #left center) {.#Some addition}))] diff --git a/stdlib/source/library/lux/data/format/tar.lux b/stdlib/source/library/lux/data/format/tar.lux index 422d11814..2387b162f 100644 --- a/stdlib/source/library/lux/data/format/tar.lux +++ b/stdlib/source/library/lux/data/format/tar.lux @@ -403,7 +403,7 @@ (|>> representation format.bits/8)) - (with_expansions [<options> (as_is [0 old_normal] + (with_expansions [<options> (these [0 old_normal] [(char "0") normal] [(char "1") link] [(char "2") symbolic_link] @@ -463,7 +463,7 @@ (exception.report "Value" (%.nat value))) - (with_expansions [<options> (as_is ["0000" none] + (with_expansions [<options> (these ["0000" none] ["0001" execute_by_other] ["0002" write_by_other] diff --git a/stdlib/source/library/lux/data/text.lux b/stdlib/source/library/lux/data/text.lux index 9380fce55..5ac09a8e5 100644 --- a/stdlib/source/library/lux/data/text.lux +++ b/stdlib/source/library/lux/data/text.lux @@ -184,7 +184,7 @@ [[pre post] (..split_by pattern template)] (in ($_ "lux text concat" pre replacement post))))) -(for @.js (as_is (macro: (defined? tokens lux) +(for @.js (these (macro: (defined? tokens lux) (case tokens (pattern (list it)) {.#Right [lux (list (` (.case ("js type-of" ("js constant" (~ it))) @@ -207,7 +207,7 @@ _ {.#Left ""}))) - (as_is)) + (these)) (def: .public (replaced pattern replacement template) (-> Text Text Text Text) diff --git a/stdlib/source/library/lux/data/text/buffer.lux b/stdlib/source/library/lux/data/text/buffer.lux index eb1cecf59..341c9a688 100644 --- a/stdlib/source/library/lux/data/text/buffer.lux +++ b/stdlib/source/library/lux/data/text/buffer.lux @@ -19,7 +19,7 @@ [abstract {"-" pattern}]]]] ["[0]" //]) -(with_expansions [<jvm> (as_is (import: java/lang/CharSequence +(with_expansions [<jvm> (these (import: java/lang/CharSequence "[1]::[0]") (import: java/lang/Appendable @@ -35,18 +35,18 @@ "[1]::[0]" (new [int]) (toString [] java/lang/String)))] - (`` (for @.old (as_is <jvm>) - @.jvm (as_is <jvm>) - @.js (as_is (import: (JS_Array a) + (`` (for @.old (these <jvm>) + @.jvm (these <jvm>) + @.js (these (import: (JS_Array a) "[1]::[0]" (push [a] a) (join [Text] Text))) - @.lua (as_is (import: (table/concat [(array.Array Text) Text] Text)) + @.lua (these (import: (table/concat [(array.Array Text) Text] Text)) ...https://www.lua.org/manual/5.3/manual.html#pdf-table.concat (import: (table/insert [(array.Array Text) Text] "?" Nothing)) ... https://www.lua.org/manual/5.3/manual.html#pdf-table.insert ) - (as_is)))) + (these)))) (`` (abstract: .public Buffer (for @.old [Nat (-> java/lang/StringBuilder java/lang/StringBuilder)] diff --git a/stdlib/source/library/lux/data/text/encoding/utf8.lux b/stdlib/source/library/lux/data/text/encoding/utf8.lux index e618307b4..21bbe8e81 100644 --- a/stdlib/source/library/lux/data/text/encoding/utf8.lux +++ b/stdlib/source/library/lux/data/text/encoding/utf8.lux @@ -11,15 +11,15 @@ ["[0]" binary {"+" Binary}]]]] ["[0]" //]) -(with_expansions [<jvm> (as_is (ffi.import: java/lang/String +(with_expansions [<jvm> (these (ffi.import: java/lang/String "[1]::[0]" (new [[byte] java/lang/String]) (getBytes [java/lang/String] [byte])))] - (for @.old (as_is <jvm>) - @.jvm (as_is <jvm>) + (for @.old (these <jvm>) + @.jvm (these <jvm>) @.js - (as_is (ffi.import: Uint8Array + (these (ffi.import: Uint8Array "[1]::[0]") ... On Node @@ -41,7 +41,7 @@ (decode [Uint8Array] ffi.String))) @.ruby - (as_is (ffi.import: String + (these (ffi.import: String "[1]::[0]" (encode [Text] String) (force_encoding [Text] Text) @@ -52,16 +52,16 @@ (pack [Text] String))) @.php - (as_is (ffi.import: Almost_Binary) + (these (ffi.import: Almost_Binary) (ffi.import: (unpack [ffi.String ffi.String] Almost_Binary)) (ffi.import: (array_values [Almost_Binary] Binary)) (def: php_byte_array_format "C*")) @.scheme ... https://srfi.schemers.org/srfi-140/srfi-140.html - (as_is (ffi.import: (string->utf8 [Text] Binary)) + (these (ffi.import: (string->utf8 [Text] Binary)) (ffi.import: (utf8->string [Binary] Text))) - (as_is))) + (these))) (def: (encoded value) (-> Text Binary) diff --git a/stdlib/source/library/lux/debug.lux b/stdlib/source/library/lux/debug.lux index 79a8b16e1..6e8b498e6 100644 --- a/stdlib/source/library/lux/debug.lux +++ b/stdlib/source/library/lux/debug.lux @@ -42,7 +42,7 @@ [month {"+" Month}] [day {"+" Day}]]]]) -(with_expansions [<jvm> (as_is (import: java/lang/String +(with_expansions [<jvm> (these (import: java/lang/String "[1]::[0]") (import: (java/lang/Class a) @@ -68,11 +68,11 @@ (intValue [] int) (longValue [] long) (doubleValue [] double)))] - (for @.old (as_is <jvm>) - @.jvm (as_is <jvm>) + (for @.old (these <jvm>) + @.jvm (these <jvm>) @.js - (as_is (import: JSON + (these (import: JSON "[1]::[0]" ("static" stringify [.Any] ffi.String)) (import: Array @@ -80,14 +80,14 @@ ("static" isArray [.Any] ffi.Boolean))) @.python - (as_is (type: PyType + (these (type: PyType (Primitive "python_type")) (import: (type [.Any] PyType)) (import: (str [.Any] ffi.String))) @.lua - (as_is (import: (type [.Any] ffi.String)) + (these (import: (type [.Any] ffi.String)) (import: (tostring [.Any] ffi.String)) (import: math @@ -95,7 +95,7 @@ ("static" type [.Any] "?" ffi.String))) @.ruby - (as_is (import: Class + (these (import: Class "[1]::[0]") (import: Object @@ -104,11 +104,11 @@ (to_s [] ffi.String))) @.php - (as_is (import: (gettype [.Any] ffi.String)) + (these (import: (gettype [.Any] ffi.String)) (import: (strval [.Any] ffi.String))) @.scheme - (as_is (import: (boolean? [.Any] Bit)) + (these (import: (boolean? [.Any] Bit)) (import: (integer? [.Any] Bit)) (import: (real? [.Any] Bit)) (import: (string? [.Any] Bit)) @@ -130,12 +130,12 @@ (if ("lua object nil?" member) {.#End} {.#Item member (again (++ idx))}))))) - (as_is)) + (these)) (def: (tuple_inspection inspection) (-> Inspector Inspector) - (with_expansions [<adaption> (for @.lua (~~ (as_is ..tuple_array)) - (~~ (as_is)))] + (with_expansions [<adaption> (for @.lua (~~ (these ..tuple_array)) + (~~ (these)))] (`` (|>> (as (array.Array Any)) <adaption> (array.list {.#None}) diff --git a/stdlib/source/library/lux/ffi.jvm.lux b/stdlib/source/library/lux/ffi.jvm.lux index 67932ee7c..6b0c04c63 100644 --- a/stdlib/source/library/lux/ffi.jvm.lux +++ b/stdlib/source/library/lux/ffi.jvm.lux @@ -1698,7 +1698,7 @@ (exception.report "Lux Type" (%.type type))) -(with_expansions [<failure> (as_is (meta.failure (exception.error ..cannot_convert_to_jvm_type [type])))] +(with_expansions [<failure> (these (meta.failure (exception.error ..cannot_convert_to_jvm_type [type])))] (def: (lux_type->jvm_type context type) (-> Type_Context .Type (Meta (Type Value))) (if (type#= .Any type) diff --git a/stdlib/source/library/lux/ffi.lux b/stdlib/source/library/lux/ffi.lux index 8a9c74362..da6bd2b3b 100644 --- a/stdlib/source/library/lux/ffi.lux +++ b/stdlib/source/library/lux/ffi.lux @@ -33,7 +33,7 @@ @.ruby "ruby apply") <new> (for @.js "js object new" @.python "python apply" - (as_is)) + (these)) <do> (for @.js "js object do" @.python "python object do" @.lua "lua object do" @@ -42,25 +42,25 @@ @.python "python object get" @.lua "lua object get" @.ruby "ruby object get" - (as_is)) + (these)) <import> (for @.python "python import" @.lua "lua import" @.ruby "ruby import" - (as_is)) + (these)) <function> (for @.js "js function" @.python "python function" @.lua "lua function" - (as_is))] + (these))] (abstract: .public (Object brand) Any) - (with_expansions [<un_common> (for @.js (as_is [Symbol] + (with_expansions [<un_common> (for @.js (these [Symbol] [Null] [Undefined]) - @.python (as_is [None] + @.python (these [None] [Dict]) - @.lua (as_is [Nil] + @.lua (these [Nil] [Table]) - @.ruby (as_is [Nil])) + @.ruby (these [Nil])) <un_common> <un_common>] (template [<name>] [(with_expansions [<brand> (template.symbol [<name> "'"])] @@ -74,12 +74,12 @@ <un_common> )) - (with_expansions [<un_common> (for @.js (as_is [Number Frac]) - @.python (as_is [Integer Int] + (with_expansions [<un_common> (for @.js (these [Number Frac]) + @.python (these [Integer Int] [Float Frac]) - @.lua (as_is [Integer Int] + @.lua (these [Integer Int] [Float Frac]) - @.ruby (as_is [Integer Int] + @.ruby (these [Integer Int] [Float Frac])) <un_common> <un_common>] (template [<name> <type>] @@ -231,8 +231,8 @@ (`` (`` (type: Sub (Variant - (~~ (for @.lua (~~ (as_is)) - @.ruby (~~ (as_is)) + (~~ (for @.lua (~~ (these)) + @.ruby (~~ (these)) {#Constructor Constructor})) {#Field Field} {#Method Method})))) @@ -240,8 +240,8 @@ (`` (`` (def: sub (Parser Sub) ($_ <>.or - (~~ (for @.lua (~~ (as_is)) - @.ruby (~~ (as_is)) + (~~ (for @.lua (~~ (these)) + @.ruby (~~ (these)) ..constructor)) ..field ..method @@ -271,7 +271,7 @@ (|>> <host_?>)) (template.with_locals [g!it] - (as_is (def: g!it' (' g!it)) + (these (def: g!it' (' g!it)) (def: (host_optional it) (-> Optional Code) (.if (.the #optional? it) @@ -402,7 +402,7 @@ (def: host_path (text.replaced .module_separator ..class_separator)) - (for @.js (as_is) + (for @.js (these) (def: (imported class) (-> Text Code) (case (text.all_split_by .module_separator class) @@ -431,8 +431,8 @@ (~ (<| (lux_optional :output:) (` (<constant> (~ (code.text (..host_path (the #name it)))))))))))))) - (for @.lua (as_is) - @.ruby (as_is) + (for @.lua (these) + @.ruby (these) (def: (constructor_definition [class_name class_parameters] alias namespace it) (-> Declaration Alias Namespace Constructor Code) (let [g!it (|> it @@ -588,9 +588,9 @@ [(~+ g!class_variables)])))) (list#each (.function (_ member) (`` (`` (case member - (~~ (for @.lua (~~ (as_is)) - @.ruby (~~ (as_is)) - (~~ (as_is {#Constructor it} + (~~ (for @.lua (~~ (these)) + @.ruby (~~ (these)) + (~~ (these {#Constructor it} (..constructor_definition class alias namespace it))))) {#Field it} @@ -601,7 +601,7 @@ (the #members it))))) ))) - (for @.ruby (as_is) + (for @.ruby (these) (syntax: .public (function [[self inputs] (<code>.form ($_ <>.and <code>.local @@ -617,7 +617,7 @@ (.function ((~ (code.local self)) [(~+ (list#each product.left inputs))]) (~ term)))))))) - (for @.js (as_is (template: .public (type_of object) + (for @.js (these (template: .public (type_of object) [("js type-of" object)]) (syntax: .public (global [type <code>.any @@ -671,5 +671,5 @@ (text#= "[object process]"))) (maybe.else false))) ) - (as_is)) + (these)) ) diff --git a/stdlib/source/library/lux/macro/template.lux b/stdlib/source/library/lux/macro/template.lux index 778a5fe44..f324e2efb 100644 --- a/stdlib/source/library/lux/macro/template.lux +++ b/stdlib/source/library/lux/macro/template.lux @@ -42,7 +42,7 @@ (monad.all !))] (in (list (` (.with_expansions [(~+ (|> (list.zipped/2 locals g!locals) (list#each (function (_ [name symbol]) - (list (code.local name) (as_is symbol)))) + (list (code.local name) symbol))) list#conjoint))] (~ body))))))) diff --git a/stdlib/source/library/lux/math.lux b/stdlib/source/library/lux/math.lux index 028ed346b..c9cbed213 100644 --- a/stdlib/source/library/lux/math.lux +++ b/stdlib/source/library/lux/math.lux @@ -62,17 +62,17 @@ last prevs))))) -(for @.old (as_is) +(for @.old (these) (with_expansions [<@> (static.text (let [[@ _] (symbol .._)] @)) <ratio/0> [ratio.#numerator 0 ratio.#denominator 1] <ratio/1> [ratio.#numerator 1 ratio.#denominator 1] <complex/0> [complex.#real +0.0 complex.#imaginary +0.0] <complex/1> [complex.#real +1.0 complex.#imaginary +0.0]] - (as_is (template [<name> <scenarios>'] + (these (template [<name> <scenarios>'] [(with_expansions [<extension> (static.seed) <extension> (template.text [<@> " " <extension>]) <scenarios> (template.spliced <scenarios>')] - (as_is (analysis: (<extension> self phase archive [operands (<>.some <code>.any)]) + (these (analysis: (<extension> self phase archive [operands (<>.some <code>.any)]) (<| type.with_var (function (_ [$it :it:])) (do [! phase.monad] @@ -141,7 +141,7 @@ [(with_expansions [<extension> (static.seed) <extension> (template.text [<@> " " <extension>]) <scenarios> (template.spliced <scenarios>')] - (as_is (analysis: (<extension> self phase archive [left <code>.any + (these (analysis: (<extension> self phase archive [left <code>.any right <code>.any]) (<| type.with_var (function (_ [$it :it:])) @@ -196,7 +196,7 @@ [(with_expansions [<extension> (static.seed) <extension> (template.text [<@> " " <extension>]) <scenarios> (template.spliced <scenarios>')] - (as_is (analysis: (<extension> self phase archive [left <code>.any + (these (analysis: (<extension> self phase archive [left <code>.any right <code>.any]) (<| type.with_var (function (_ [$it :it:])) diff --git a/stdlib/source/library/lux/math/number/frac.lux b/stdlib/source/library/lux/math/number/frac.lux index 6d81a958b..aff22f26d 100644 --- a/stdlib/source/library/lux/math/number/frac.lux +++ b/stdlib/source/library/lux/math/number/frac.lux @@ -35,7 +35,7 @@ ) (for @.old - (as_is (template [<name> <method>] + (these (template [<name> <method>] [(def: .public (<name> it) (-> Frac Frac) (<method> it))] @@ -62,7 +62,7 @@ ("jvm invokestatic:java.lang.Math:pow:double,double" subject param))) @.jvm - (as_is (template: (!double value) + (these (template: (!double value) [(|> value (as (Primitive "java.lang.Double")) "jvm object cast")]) @@ -106,7 +106,7 @@ !frac))) @.js - (as_is (template [<name> <method>] + (these (template [<name> <method>] [(def: .public <name> (-> Frac Frac) (|>> [] @@ -136,7 +136,7 @@ (as Frac ("js apply" ("js constant" "Math.pow") [subject param])))) @.python - (as_is (template [<name> <method>] + (these (template [<name> <method>] [(def: .public <name> (-> Frac Frac) (|>> [] @@ -175,7 +175,7 @@ (..pow ("lux f64 /" +3.0 +1.0)))))) @.lua - (as_is (template [<name> <method>] + (these (template [<name> <method>] [(def: .public <name> (-> Frac Frac) (|>> [] @@ -214,7 +214,7 @@ (..pow ("lux f64 /" +3.0 +1.0)))))) @.ruby - (as_is (template [<name> <method>] + (these (template [<name> <method>] [(def: .public <name> (-> Frac Frac) (|>> [] @@ -252,7 +252,7 @@ (as Frac ("ruby object do" "**" subject [param])))) @.php - (as_is (template [<name> <method>] + (these (template [<name> <method>] [(def: .public <name> (-> Frac Frac) (|>> ("php apply" ("php constant" <method>)) @@ -284,7 +284,7 @@ (..pow ("lux f64 /" +3.0 +1.0)))) @.scheme - (as_is (template [<name> <method>] + (these (template [<name> <method>] [(def: .public <name> (-> Frac Frac) (|>> ("scheme apply" ("scheme constant" <method>)) diff --git a/stdlib/source/library/lux/math/number/rev.lux b/stdlib/source/library/lux/math/number/rev.lux index 9a6e9c826..31aa1799b 100644 --- a/stdlib/source/library/lux/math/number/rev.lux +++ b/stdlib/source/library/lux/math/number/rev.lux @@ -223,7 +223,7 @@ ("lux text clip" 1 (-- ("lux text size" input)) input)) (template [<struct> <codec> <char_bit_size> <error>] - [(with_expansions [<failure> (as_is {try.#Failure ("lux text concat" <error> repr)})] + [(with_expansions [<failure> (these {try.#Failure ("lux text concat" <error> repr)})] (implementation: .public <struct> (Codec Text Rev) diff --git a/stdlib/source/library/lux/target/jvm/attribute.lux b/stdlib/source/library/lux/target/jvm/attribute.lux index 50d73af68..6fd6eba84 100644 --- a/stdlib/source/library/lux/target/jvm/attribute.lux +++ b/stdlib/source/library/lux/target/jvm/attribute.lux @@ -55,7 +55,7 @@ [($_ n.+ nameS lengthS infoS) (|>> nameT lengthT infoT)]))) -(with_expansions [<Code> (as_is (/code.Code Attribute))] +(with_expansions [<Code> (these (/code.Code Attribute))] (type: .public Attribute (Rec Attribute (Variant diff --git a/stdlib/source/library/lux/target/jvm/bytecode.lux b/stdlib/source/library/lux/target/jvm/bytecode.lux index a58bce01c..59dbcc697 100644 --- a/stdlib/source/library/lux/target/jvm/bytecode.lux +++ b/stdlib/source/library/lux/target/jvm/bytecode.lux @@ -176,7 +176,7 @@ [..relative#identity (the /environment.#stack environment)]]}))) -(with_expansions [<success> (as_is (try|in [[pool +(with_expansions [<success> (these (try|in [[pool environment (revised #known (dictionary.has label [actual {.#Some @here}]) diff --git a/stdlib/source/library/lux/target/jvm/constant.lux b/stdlib/source/library/lux/target/jvm/constant.lux index 1afa70f79..edd68d05b 100644 --- a/stdlib/source/library/lux/target/jvm/constant.lux +++ b/stdlib/source/library/lux/target/jvm/constant.lux @@ -225,7 +225,7 @@ (def: .public writer (Writer Constant) - (with_expansions [<constants> (as_is [#UTF8 /tag.utf8 ..utf8_writer] + (with_expansions [<constants> (these [#UTF8 /tag.utf8 ..utf8_writer] [#Integer /tag.integer ..integer_writer] [#Float /tag.float ..float_writer] [#Long /tag.long ..long_writer] diff --git a/stdlib/source/library/lux/target/jvm/constant/pool.lux b/stdlib/source/library/lux/target/jvm/constant/pool.lux index e2fcfd655..11df35740 100644 --- a/stdlib/source/library/lux/target/jvm/constant/pool.lux +++ b/stdlib/source/library/lux/target/jvm/constant/pool.lux @@ -91,7 +91,7 @@ (template: (!add <state> <tag> <equivalence> <value>) [(let [[current pool] <state> <value>' <value>] - (with_expansions [<try_again> (as_is (again (.++ idx)))] + (with_expansions [<try_again> (these (again (.++ idx)))] (loop [idx 0] (case (sequence.item idx pool) {try.#Success entry} diff --git a/stdlib/source/library/lux/target/jvm/loader.lux b/stdlib/source/library/lux/target/jvm/loader.lux index bff3cb325..443f07227 100644 --- a/stdlib/source/library/lux/target/jvm/loader.lux +++ b/stdlib/source/library/lux/target/jvm/loader.lux @@ -64,7 +64,7 @@ (loadClass [java/lang/String] "io" "try" (java/lang/Class java/lang/Object))) -(with_expansions [<elemT> (as_is (java/lang/Class java/lang/Object))] +(with_expansions [<elemT> (these (java/lang/Class java/lang/Object))] (def: java/lang/ClassLoader::defineClass java/lang/reflect/Method (let [signature (|> (ffi.array <elemT> 4) diff --git a/stdlib/source/library/lux/target/jvm/reflection.lux b/stdlib/source/library/lux/target/jvm/reflection.lux index bc587e90c..94ca109a2 100644 --- a/stdlib/source/library/lux/target/jvm/reflection.lux +++ b/stdlib/source/library/lux/target/jvm/reflection.lux @@ -253,7 +253,7 @@ (def: .public (return reflection) (-> java/lang/reflect/Type (Try (/.Type Return))) - (with_expansions [<else> (as_is (..type reflection))] + (with_expansions [<else> (these (..type reflection))] (case (ffi.check java/lang/Class reflection) {.#Some class} (let [class_name (|> reflection diff --git a/stdlib/source/library/lux/target/python.lux b/stdlib/source/library/lux/target/python.lux index 277e2c947..1210e2ad1 100644 --- a/stdlib/source/library/lux/target/python.lux +++ b/stdlib/source/library/lux/target/python.lux @@ -34,13 +34,13 @@ (-> Text Text) (text.enclosed ["(" ")"])) -(for @.old (as_is (ffi.import: java/lang/CharSequence +(for @.old (these (ffi.import: java/lang/CharSequence "[1]::[0]") (ffi.import: java/lang/String "[1]::[0]" (replace [java/lang/CharSequence java/lang/CharSequence] java/lang/String))) - (as_is)) + (these)) ... Added the carriage return for better Windows compatibility. (def: \n+ diff --git a/stdlib/source/library/lux/time/day.lux b/stdlib/source/library/lux/time/day.lux index eb9439295..935d1937d 100644 --- a/stdlib/source/library/lux/time/day.lux +++ b/stdlib/source/library/lux/time/day.lux @@ -135,7 +135,7 @@ {#Friday} {#Saturday})) -(with_expansions [<pairs> (as_is [01 #Sunday] +(with_expansions [<pairs> (these [01 #Sunday] [02 #Monday] [03 #Tuesday] [04 #Wednesday] diff --git a/stdlib/source/library/lux/time/month.lux b/stdlib/source/library/lux/time/month.lux index a9ac9c6bd..3d97636a5 100644 --- a/stdlib/source/library/lux/time/month.lux +++ b/stdlib/source/library/lux/time/month.lux @@ -58,7 +58,7 @@ _ false))) -(with_expansions [<pairs> (as_is [01 #January] +(with_expansions [<pairs> (these [01 #January] [02 #February] [03 #March] [04 #April] diff --git a/stdlib/source/library/lux/tool/compiler/default/platform.lux b/stdlib/source/library/lux/tool/compiler/default/platform.lux index 0a69b7995..4f62b38da 100644 --- a/stdlib/source/library/lux/tool/compiler/default/platform.lux +++ b/stdlib/source/library/lux/tool/compiler/default/platform.lux @@ -72,8 +72,8 @@ ["[1]" context] ["ioW" archive]]]]]) -(with_expansions [<type_vars> (as_is anchor expression directive) - <Operation> (as_is ///generation.Operation <type_vars>)] +(with_expansions [<type_vars> (these anchor expression directive) + <Operation> (these ///generation.Operation <type_vars>)] (type: .public (Platform <type_vars>) (Record [#&file_system (file.System Async) @@ -92,9 +92,9 @@ (as (Monad Action) (try.with async.monad))) - (with_expansions [<Platform> (as_is (Platform <type_vars>)) - <State+> (as_is (///directive.State+ <type_vars>)) - <Bundle> (as_is (///generation.Bundle <type_vars>))] + (with_expansions [<Platform> (these (Platform <type_vars>)) + <State+> (these (///directive.State+ <type_vars>)) + <Bundle> (these (///generation.Bundle <type_vars>))] (def: (writer //) (All (_ a) @@ -795,7 +795,7 @@ [_ (cache/archive.cache! (the #&file_system platform) context archive)] (async#in {try.#Failure error}))))))) - (for @.old (as_is (def: Fake_State + (for @.old (these (def: Fake_State Type {.#Primitive (%.nat (static.random_nat)) (list)}) @@ -806,7 +806,7 @@ (def: Fake_Object Type {.#Primitive (%.nat (static.random_nat)) (list)})) - (as_is)) + (these)) (def: (serial_compiler import context platform compilation_sources compiler) (All (_ <type_vars>) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/analysis/coverage.lux b/stdlib/source/library/lux/tool/compiler/language/lux/analysis/coverage.lux index 0484b5941..f7170c8ce 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/analysis/coverage.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/analysis/coverage.lux @@ -41,7 +41,7 @@ ... not being handled by any pattern). (template.let [(Variant' @) [[(Maybe Nat) (Dictionary Nat @)]]] - (as_is (type: .public Coverage + (these (type: .public Coverage (Rec @ (.Variant {#Exhaustive} diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/directive.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/directive.lux index eb3cfa9ba..ea6adec7a 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/directive.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/directive.lux @@ -74,7 +74,7 @@ {try.#Failure error} {try.#Failure error}))))) -(with_expansions [<lux_def_module> (as_is [|form_location| {.#Form (list& [|text_location| {.#Text "lux def module"}] annotations)}])] +(with_expansions [<lux_def_module> (these [|form_location| {.#Form (list& [|text_location| {.#Text "lux def module"}] annotations)}])] (def: .public (phase wrapper expander) (-> //.Wrapper Expander Phase) (let [analysis (//analysis.phase expander)] diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension.lux index fb3699ba8..42528ba33 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension.lux @@ -39,7 +39,7 @@ (|>> list.hash (product.hash text.hash))) -(with_expansions [<Bundle> (as_is (Dictionary Name (Handler s i o)))] +(with_expansions [<Bundle> (these (Dictionary Name (Handler s i o)))] (type: .public (Handler s i o) (-> Name (//.Phase [<Bundle> s] i o) 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 a85e87d85..31bc84be0 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 @@ -81,7 +81,7 @@ (simple (list subjectT param0T param1T) outputT)) ... TODO: Get rid of this ASAP -(as_is +(these (exception: .public (char_text_must_be_size_1 [text Text]) (exception.report "Text" (%.text text))) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/runtime.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/runtime.lux index 8579b8865..f98ce4c6f 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/runtime.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/runtime.lux @@ -165,7 +165,7 @@ (def: last_index (|>> _.length/1 [(_.int +1)] _.-/2)) -(with_expansions [<recur> (as_is ($_ _.then +(with_expansions [<recur> (these ($_ _.then (_.; (_.set lefts (_.-/2 [last_index_right lefts]))) (_.; (_.set tuple (_.nth last_index_right tuple)))))] (template: (!recur <side>) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/runtime.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/runtime.lux index 761a1c668..af22a192b 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/runtime.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/runtime.lux @@ -140,7 +140,7 @@ (_.at (..last_index tuple) tuple)) -(with_expansions [<recur> (as_is ($_ _.then +(with_expansions [<recur> (these ($_ _.then (_.set lefts (_.- last_index_right lefts)) (_.set tuple (_.at last_index_right tuple))))] (runtime: (tuple//left lefts tuple) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/runtime.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/runtime.lux index 99378b28c..dfce813ed 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/runtime.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/runtime.lux @@ -166,7 +166,7 @@ (def: last_index (|>> _.length (_.- (_.int +1)))) -(with_expansions [<recur> (as_is ($_ _.then +(with_expansions [<recur> (these ($_ _.then (_.set (list lefts) (_.- last_index_right lefts)) (_.set (list tuple) (..item last_index_right tuple))))] (runtime: (tuple//left lefts tuple) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/runtime.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/runtime.lux index 25bbcfe47..165bbd55d 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/runtime.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/runtime.lux @@ -178,7 +178,7 @@ (def: normal_last_index (|>> _.count/1 (_.- (_.int +1)))) -(with_expansions [<recur> (as_is ($_ _.then +(with_expansions [<recur> (these ($_ _.then (_.set! lefts (_.- last_index_right lefts)) (_.set! tuple (_.item last_index_right tuple))))] (runtime: (tuple//make size values) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/runtime.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/runtime.lux index a9e12aede..adddebae3 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/runtime.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/runtime.lux @@ -207,7 +207,7 @@ (def: last_index (|>> _.len/1 (_.- (_.int +1)))) -(with_expansions [<recur> (as_is ($_ _.then +(with_expansions [<recur> (these ($_ _.then (_.set (list lefts) (_.- last_index_right lefts)) (_.set (list tuple) (_.item last_index_right tuple))))] (runtime: (tuple::left lefts tuple) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/runtime.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/runtime.lux index 94005f819..086c1ff0c 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/runtime.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/runtime.lux @@ -157,7 +157,7 @@ (def: last_index (|>> ..tuple_size (_.- (_.int +1)))) -(with_expansions [<recur> (as_is ($_ _.then +(with_expansions [<recur> (these ($_ _.then (_.set (list lefts) (_.- last_index_right lefts)) (_.set (list tuple) (_.item last_index_right tuple))))] (runtime: (tuple//left lefts tuple) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/case.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/case.lux index d21a2a13e..9515ea518 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/case.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/case.lux @@ -124,7 +124,7 @@ (def: (weave new old) (-> Path Path Path) - (with_expansions [<default> (as_is {/.#Alt old new})] + (with_expansions [<default> (these {/.#Alt old new})] (case [new old] [_ {/.#Alt old_left old_right}] @@ -203,10 +203,10 @@ (-> (///complex.Tuple Pattern) Register (List Member)) (loop [lefts 0 patterns patterns] - (with_expansions [<failure> (as_is (list)) - <continue> (as_is (again (++ lefts) + (with_expansions [<failure> (these (list)) + <continue> (these (again (++ lefts) tail)) - <member> (as_is (let [right? (list.empty? tail)] + <member> (these (let [right? (list.empty? tail)] [/member.#lefts (if right? (-- lefts) lefts) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/function.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/function.lux index 87abcaff0..e478001a6 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/function.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/function.lux @@ -56,7 +56,7 @@ (do [! phase.monad] [funcS (phase archive funcA) argsS (monad.each ! (phase archive) argsA)] - (with_expansions [<apply> (as_is (/.function/apply [funcS argsS]))] + (with_expansions [<apply> (these (/.function/apply [funcS argsS]))] (case funcS (pattern (/.function/abstraction functionS)) (if (n.= (the /.#arity functionS) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/loop.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/loop.lux index 2121e37b9..e8917d6a8 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/loop.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/loop.lux @@ -170,7 +170,7 @@ (pattern (/.function/apply [abstraction arguments])) (do [! maybe.monad] [arguments' (monad.each ! (again false) arguments)] - (with_expansions [<application> (as_is (do ! + (with_expansions [<application> (these (do ! [abstraction' (again false abstraction)] (in (/.function/apply [abstraction' arguments']))))] (case abstraction diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/variable.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/variable.lux index 5429a8f0c..366984646 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/variable.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/variable.lux @@ -331,7 +331,7 @@ (def: (optimization' [redundancy synthesis]) (Optimization Synthesis) - (with_expansions [<no_op> (as_is {try.#Success [redundancy + (with_expansions [<no_op> (these {try.#Success [redundancy synthesis]})] (case synthesis {/.#Simple _} diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/syntax.lux b/stdlib/source/library/lux/tool/compiler/language/lux/syntax.lux index dbe91632a..18ad84ac7 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/syntax.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/syntax.lux @@ -273,7 +273,7 @@ _ (!failure ..text_parser where offset source_code))) -(with_expansions [<digits> (as_is "0" "1" "2" "3" "4" "5" "6" "7" "8" "9") +(with_expansions [<digits> (these "0" "1" "2" "3" "4" "5" "6" "7" "8" "9") <non_symbol_chars> (template [<char>] [(~~ (static <char>))] @@ -340,8 +340,8 @@ Offset 0) -(with_expansions [<int_output> (as_is (!number_output source_code start end int.decimal .#Int)) - <frac_output> (as_is (!number_output source_code start end frac.decimal .#Frac)) +(with_expansions [<int_output> (these (!number_output source_code start end int.decimal .#Int)) + <frac_output> (these (!number_output source_code start end frac.decimal .#Frac)) <failure> (!failure ..frac_parser where offset source_code) <frac_separator> (static ..frac_separator) <signs> (template [<sign>] @@ -445,7 +445,7 @@ [(!letE [source' symbol] (..short_symbol_parser source_code//size @current_module @source) {.#Right [source' [@where {@tag symbol}]]})]) -(with_expansions [<simple> (as_is {.#Right [source' ["" simple]]})] +(with_expansions [<simple> (these {.#Right [source' ["" simple]]})] (`` (def: (full_symbol_parser aliases start source) (-> Aliases Offset (Parser Symbol)) (<| (!letE [source' simple] (let [[where offset source_code] source] @@ -473,10 +473,10 @@ ... [expression ...] ... [form "(" [#* expression] ")"]) -(with_expansions [<consume_1> (as_is where (!++ offset/0) source_code) - <move_1> (as_is [(!forward 1 where) (!++ offset/0) source_code]) - <move_2> (as_is [(!forward 1 where) (!++/2 offset/0) source_code]) - <again> (as_is (parse current_module aliases source_code//size))] +(with_expansions [<consume_1> (these where (!++ offset/0) source_code) + <move_1> (these [(!forward 1 where) (!++ offset/0) source_code]) + <move_2> (these [(!forward 1 where) (!++/2 offset/0) source_code]) + <again> (these (parse current_module aliases source_code//size))] (template: (!close closer) [{.#Left [<move_1> closer]}]) 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 05f766d5d..3bc8ed418 100644 --- a/stdlib/source/library/lux/tool/compiler/meta/io/archive.lux +++ b/stdlib/source/library/lux/tool/compiler/meta/io/archive.lux @@ -285,7 +285,7 @@ (-> (List Custom) (file.System Async) Context Import (List //.Context) [descriptor.Module module.ID] (Async (Try Cache))) - (with_expansions [<cache> (as_is module_name @module module registry)] + (with_expansions [<cache> (these module_name @module module registry)] (do [! (try.with async.monad)] [data (is (Async (Try Binary)) (cache/module.cache fs context @module)) diff --git a/stdlib/source/library/lux/tool/interpreter.lux b/stdlib/source/library/lux/tool/interpreter.lux index 7fc7687be..580dc9d4e 100644 --- a/stdlib/source/library/lux/tool/interpreter.lux +++ b/stdlib/source/library/lux/tool/interpreter.lux @@ -87,7 +87,7 @@ _ (# Console<!> write ..welcome_message)] (in state))) -(with_expansions [<Interpretation> (as_is (Operation anchor expression directive [Type Any]))] +(with_expansions [<Interpretation> (these (Operation anchor expression directive [Type Any]))] (def: (interpret_directive code) (All (_ anchor expression directive) @@ -169,7 +169,7 @@ #state (State+ anchor expression directive) #source Source])) -(with_expansions [<Context> (as_is (Context anchor expression directive))] +(with_expansions [<Context> (these (Context anchor expression directive))] (def: (read_eval_print context) (All (_ anchor expression directive) (-> <Context> (Try [<Context> Text]))) diff --git a/stdlib/source/library/lux/type.lux b/stdlib/source/library/lux/type.lux index 629947eb0..c3c537701 100644 --- a/stdlib/source/library/lux/type.lux +++ b/stdlib/source/library/lux/type.lux @@ -502,6 +502,6 @@ bodyT <code>.any]) (in (list (` (..with_expansions [(~+ (|> bindings (list#each (.function (_ [localT valueT]) - (list localT (` (..as_is (~ valueT)))))) + (list localT (` (.these (~ valueT)))))) list#conjoint))] (~ bodyT)))))) diff --git a/stdlib/source/library/lux/world/console.lux b/stdlib/source/library/lux/world/console.lux index 74700b18b..00346ef03 100644 --- a/stdlib/source/library/lux/world/console.lux +++ b/stdlib/source/library/lux/world/console.lux @@ -42,7 +42,7 @@ (exception: .public cannot_close) -(with_expansions [<jvm> (as_is (import: java/lang/String +(with_expansions [<jvm> (these (import: java/lang/String "[1]::[0]") (import: java/io/Console @@ -94,9 +94,9 @@ (def: close (|>> (exception.except ..cannot_close) in)))))))))] - (for @.old (as_is <jvm>) - @.jvm (as_is <jvm>) - @.js (as_is (ffi.import: Buffer + (for @.old (these <jvm>) + @.jvm (these <jvm>) + @.js (these (ffi.import: Buffer "[1]::[0]" (toString [] ffi.String)) @@ -162,7 +162,7 @@ (def: close (|>> (exception.except ..cannot_close) async#in)))} {.#None}))) - (as_is))) + (these))) (def: .public (write_line message console) (All (_ !) (-> Text (Console !) (! (Try Any)))) diff --git a/stdlib/source/library/lux/world/file.lux b/stdlib/source/library/lux/world/file.lux index 4e47a182b..2c8db5ea3 100644 --- a/stdlib/source/library/lux/world/file.lux +++ b/stdlib/source/library/lux/world/file.lux @@ -25,9 +25,9 @@ ["[0]" list ("[1]#[0]" functor)] ["[0]" dictionary {"+" Dictionary}]]] ["[0]" ffi - (~~ (.for "JavaScript" (~~ (.as_is ["[0]" node_js])) - "{old}" (~~ (.as_is ["node_js" //control/thread])) - (~~ (.as_is))))] + (~~ (.for "JavaScript" (~~ (.these ["[0]" node_js])) + "{old}" (~~ (.these ["node_js" //control/thread])) + (~~ (.these))))] [macro ["[0]" template]] [math @@ -157,7 +157,7 @@ [cannot_find_directory] ) -(with_expansions [<for_jvm> (as_is (ffi.import: java/lang/String +(with_expansions [<for_jvm> (these (ffi.import: java/lang/String "[1]::[0]") (`` (ffi.import: java/io/File @@ -299,11 +299,11 @@ java/io/File::new (java/io/File::renameTo (java/io/File::new (ffi.as_string destination))))) )))] - (for @.old (as_is <for_jvm>) - @.jvm (as_is <for_jvm>) + (for @.old (these <for_jvm>) + @.jvm (these <for_jvm>) @.js - (as_is (ffi.import: Buffer + (these (ffi.import: Buffer "[1]::[0]" ("static" from [Binary] ..Buffer)) @@ -509,7 +509,7 @@ node_fs)))))))))) @.python - (as_is (type: (Tuple/2 left right) + (these (type: (Tuple/2 left right) (Primitive "python_tuple[2]" [left right])) (ffi.import: PyFile @@ -630,7 +630,7 @@ ))) @.ruby - (as_is (ffi.import: Time + (these (ffi.import: Time "[1]::[0]" ("static" at [Frac] Time) (to_f [] Frac)) @@ -777,7 +777,7 @@ ))) ... @.php - ... (as_is (ffi.import: (FILE_APPEND Int)) + ... (these (ffi.import: (FILE_APPEND Int)) ... ... https://www.php.net/manual/en/dir.constants.php ... (ffi.import: (DIRECTORY_SEPARATOR ffi.String)) ... ... https://www.php.net/manual/en/function.pack.php @@ -956,7 +956,7 @@ ... )) ... ) - (as_is))) + (these))) (def: .public (exists? monad fs path) (All (_ !) (-> (Monad !) (System !) Path (! Bit))) diff --git a/stdlib/source/library/lux/world/file/watch.lux b/stdlib/source/library/lux/world/file/watch.lux index 645c4e99e..4266f170c 100644 --- a/stdlib/source/library/lux/world/file/watch.lux +++ b/stdlib/source/library/lux/world/file/watch.lux @@ -262,7 +262,7 @@ [fs (..polling fs)])) -(with_expansions [<jvm> (as_is (import: java/lang/Object +(with_expansions [<jvm> (these (import: java/lang/Object "[1]::[0]") (import: java/lang/String @@ -461,6 +461,6 @@ (async.future (..default_poll watcher))) ))))) )] - (for @.old (as_is <jvm>) - @.jvm (as_is <jvm>) - (as_is))) + (for @.old (these <jvm>) + @.jvm (these <jvm>) + (these))) diff --git a/stdlib/source/library/lux/world/net/http/client.lux b/stdlib/source/library/lux/world/net/http/client.lux index ce2bbc6c3..c992f10ac 100644 --- a/stdlib/source/library/lux/world/net/http/client.lux +++ b/stdlib/source/library/lux/world/net/http/client.lux @@ -69,7 +69,7 @@ (-> Binary [Nat Binary]) [(binary.size data) data]) -(with_expansions [<jvm> (as_is (ffi.import: java/lang/String +(with_expansions [<jvm> (these (ffi.import: java/lang/String "[1]::[0]") (ffi.import: java/lang/AutoCloseable @@ -219,9 +219,9 @@ (in [(.nat (ffi.of_int status)) [//.#headers headers //.#body (..default_body input)]]))))))] - (for @.old (as_is <jvm>) - @.jvm (as_is <jvm>) - (as_is))) + (for @.old (these <jvm>) + @.jvm (these <jvm>) + (these))) (implementation: .public (async client) (-> (Client IO) (Client Async)) diff --git a/stdlib/source/library/lux/world/program.lux b/stdlib/source/library/lux/world/program.lux index 9bdba0392..4b0703936 100644 --- a/stdlib/source/library/lux/world/program.lux +++ b/stdlib/source/library/lux/world/program.lux @@ -24,9 +24,9 @@ ["[0]" dictionary {"+" Dictionary}] ["[0]" list ("[1]#[0]" functor)]]] ["[0]" ffi {"+" import:} - (~~ (.for "JavaScript" (~~ (.as_is ["[0]" node_js])) - "{old}" (~~ (.as_is ["node_js" //math])) - (~~ (.as_is))))] + (~~ (.for "JavaScript" (~~ (.these ["[0]" node_js])) + "{old}" (~~ (.these ["node_js" //math])) + (~~ (.these))))] ["[0]" macro ["[0]" template]] [math @@ -113,7 +113,7 @@ ... Do not trust the values of environment variables ... https://wiki.sei.cmu.edu/confluence/display/java/ENV02-J.+Do+not+trust+the+values+of+environment+variables -(with_expansions [<jvm> (as_is (import: java/lang/String +(with_expansions [<jvm> (these (import: java/lang/String "[1]::[0]") (import: (java/util/Iterator a) @@ -143,9 +143,9 @@ (jvm##consume iterator)} {.#End})) )] - (for @.old (as_is <jvm>) - @.jvm (as_is <jvm>) - @.js (as_is (def: default_exit! + (for @.old (these <jvm>) + @.jvm (these <jvm>) + @.js (these (def: default_exit! (-> Exit (IO Nothing)) (|>> %.int panic! io.io)) @@ -201,7 +201,7 @@ (import: NodeJs_OS "[1]::[0]" (homedir [] "io" Path))) - @.python (as_is (import: os + @.python (these (import: os "[1]::[0]" ("static" getcwd [] "io" ffi.String) ("static" _exit [ffi.Integer] "io" Nothing)) @@ -214,7 +214,7 @@ "[1]::[0]" ("static" keys [] "io" (Array ffi.String)) ("static" get [ffi.String] "io" "?" ffi.String))) - @.lua (as_is (ffi.import: LuaFile + @.lua (these (ffi.import: LuaFile "[1]::[0]" (read [ffi.String] "io" "?" ffi.String) (close [] "io" ffi.Boolean)) @@ -241,7 +241,7 @@ {try.#Failure _} (in default))))) - @.ruby (as_is (ffi.import: Env + @.ruby (these (ffi.import: Env "[1]::[0]" ("static" keys [] (Array Text)) ("static" fetch [Text] "io" "?" Text)) @@ -259,7 +259,7 @@ ("static" exit [Int] "io" Nothing))) ... @.php - ... (as_is (ffi.import: (exit [Int] "io" Nothing)) + ... (these (ffi.import: (exit [Int] "io" Nothing)) ... ... https://www.php.net/manual/en/function.exit.php ... (ffi.import: (getcwd [] "io" ffi.String)) ... ... https://www.php.net/manual/en/function.getcwd.php @@ -271,7 +271,7 @@ ... ) ... @.scheme - ... (as_is (ffi.import: (exit [Int] "io" Nothing)) + ... (these (ffi.import: (exit [Int] "io" Nothing)) ... ... https://srfi.schemers.org/srfi-98/srfi-98.html ... (abstract: Pair Any) ... (abstract: PList Any) @@ -281,7 +281,7 @@ ... (ffi.import: (car "as" head [PList] Pair)) ... (ffi.import: (cdr "as" tail [PList] PList))) - (as_is))) + (these))) (implementation: .public default (Program IO) diff --git a/stdlib/source/library/lux/world/shell.lux b/stdlib/source/library/lux/world/shell.lux index 1881054bd..e94c0dda4 100644 --- a/stdlib/source/library/lux/world/shell.lux +++ b/stdlib/source/library/lux/world/shell.lux @@ -170,7 +170,7 @@ (text.enclosed' text.double_quote)))] (..policy safe_command safe_argument))) -(with_expansions [<jvm> (as_is (import: java/lang/String +(with_expansions [<jvm> (these (import: java/lang/String "[1]::[0]" (toLowerCase [] java/lang/String)) @@ -307,9 +307,9 @@ process (java/lang/ProcessBuilder::start builder)] (..default_process process)))) )] - (for @.old (as_is <jvm>) - @.jvm (as_is <jvm>) - (as_is))) + (for @.old (these <jvm>) + @.jvm (these <jvm>) + (these))) (type: .public (Mock s) (Interface diff --git a/stdlib/source/program/compositor.lux b/stdlib/source/program/compositor.lux index e67c28d0d..a6e31ec08 100644 --- a/stdlib/source/program/compositor.lux +++ b/stdlib/source/program/compositor.lux @@ -129,7 +129,7 @@ (again tail (dictionary.has head content output))))))) -(with_expansions [<parameters> (as_is anchor expression artifact)] +(with_expansions [<parameters> (these anchor expression artifact)] (def: .public (compiler lux_compiler file_context expander host_analysis platform generation_bundle host_directive_bundle program anchorT,expressionT,directiveT extender service diff --git a/stdlib/source/specification/lux/world/shell.lux b/stdlib/source/specification/lux/world/shell.lux index 8897596ba..9d18afee2 100644 --- a/stdlib/source/specification/lux/world/shell.lux +++ b/stdlib/source/specification/lux/world/shell.lux @@ -1,28 +1,28 @@ (.using - [library - [lux "*" - ["_" test {"+" Test}] - [abstract - [monad {"+" do}]] - [control - ["[0]" try ("[1]#[0]" functor)] - [concurrency - ["[0]" async {"+" Async} ("[1]#[0]" monad)]] - [parser - ["[0]" environment {"+" Environment}]]] - [data - ["[0]" product] - ["[0]" text ("[1]#[0]" equivalence) - ["%" format {"+" format}]]] - [math - ["[0]" random] - [number - ["n" nat] - ["i" int]]]]] - [\\library - ["[0]" / - [// - [file {"+" Path}]]]]) + [library + [lux "*" + ["_" test {"+" Test}] + [abstract + [monad {"+" do}]] + [control + ["[0]" try ("[1]#[0]" functor)] + [concurrency + ["[0]" async {"+" Async} ("[1]#[0]" monad)]] + [parser + ["[0]" environment {"+" Environment}]]] + [data + ["[0]" product] + ["[0]" text ("[1]#[0]" equivalence) + ["%" format {"+" format}]]] + [math + ["[0]" random] + [number + ["n" nat] + ["i" int]]]]] + [\\library + ["[0]" / + [// + [file {"+" Path}]]]]) (template [<name> <command> <type> <prep>] [(def: <name> @@ -65,7 +65,7 @@ {try.#Failure error} true))))) -(with_expansions [<shell_coverage> (as_is [/.Command /.Argument])] +(with_expansions [<shell_coverage> (these [/.Command /.Argument])] (def: .public (spec shell) (-> (/.Shell Async) Test) (<| (_.for [/.Shell /.Process]) diff --git a/stdlib/source/test/lux.lux b/stdlib/source/test/lux.lux index 576f6e9b9..d7a2ac3eb 100644 --- a/stdlib/source/test/lux.lux +++ b/stdlib/source/test/lux.lux @@ -63,13 +63,13 @@ ["[1][0]" ffi] ["[1][0]" extension] ["[1][0]" target "_" - (~~ (.for "{old}" (~~ (.as_is ["[1]/[0]" jvm])) - "JVM" (~~ (.as_is ["[1]/[0]" jvm])) - "JavaScript" (~~ (.as_is ["[1]/[0]" js])) - "Lua" (~~ (.as_is ["[1]/[0]" lua])) - "Python" (~~ (.as_is ["[1]/[0]" python])) - "Ruby" (~~ (.as_is ["[1]/[0]" ruby])) - (~~ (.as_is))))]]))) + (~~ (.for "{old}" (~~ (.these ["[1]/[0]" jvm])) + "JVM" (~~ (.these ["[1]/[0]" jvm])) + "JavaScript" (~~ (.these ["[1]/[0]" js])) + "Lua" (~~ (.these ["[1]/[0]" lua])) + "Python" (~~ (.these ["[1]/[0]" python])) + "Ruby" (~~ (.these ["[1]/[0]" ruby])) + (~~ (.these))))]]))) (def: for_bit Test @@ -422,7 +422,7 @@ (same? (is Any macro)))) (_.cover [/.macro:] (same? expected (..identity_macro expected))) - (~~ (for @.old (~~ (as_is)) + (~~ (for @.old (~~ (these)) (_.cover [/.Source] (..found_crosshair?)))) (_.cover [/.macro] @@ -844,23 +844,23 @@ dummy random.nat .let [expected (n.+ left right)]] ($_ _.and - (_.cover [/.as_is] - (`` (and (~~ (as_is true + (_.cover [/.these] + (`` (and (~~ (these true true true))))) (_.cover [/.with_expansions] - (/.with_expansions [<operands> (as_is left right)] + (/.with_expansions [<operands> (these left right)] (n.= expected (n.+ <operands>)))) (_.cover [/.comment] (/.with_expansions [<dummy> (/.comment dummy) - <operands> (as_is left right)] + <operands> (these left right)] (n.= expected ($_ n.+ <operands> <dummy>)))) (_.cover [/.``] (n.= expected (/.`` ($_ n.+ - (~~ (as_is left right)) + (~~ (these left right)) (~~ (/.comment dummy)))))) (_.cover [/.for] (and (n.= expected @@ -1116,8 +1116,8 @@ (bit#= /.private /.local))) )) -(for @.old (as_is) - (as_is (syntax: (for_bindings|test [fn/0 <code>.local +(for @.old (these) + (these (syntax: (for_bindings|test [fn/0 <code>.local var/0 <code>.local let/0 <code>.local @@ -1221,8 +1221,8 @@ ..for_def: ..for_meta ..for_export - (~~ (for @.old (~~ (as_is)) - (~~ (as_is ..for_bindings)))) + (~~ (for @.old (~~ (these)) + (~~ (these ..for_bindings)))) )))) (def: test @@ -1254,14 +1254,14 @@ /world.test /ffi.test - (~~ (for @.old (~~ (as_is)) - (~~ (as_is /extension.test)))) - (~~ (for @.jvm (~~ (as_is /target/jvm.test)) - @.old (~~ (as_is /target/jvm.test)) - @.js (~~ (as_is /target/js.test)) - @.lua (~~ (as_is /target/lua.test)) - @.python (~~ (as_is /target/python.test)) - @.ruby (~~ (as_is /target/ruby.test)))) + (~~ (for @.old (~~ (these)) + (~~ (these /extension.test)))) + (~~ (for @.jvm (~~ (these /target/jvm.test)) + @.old (~~ (these /target/jvm.test)) + @.js (~~ (these /target/js.test)) + @.lua (~~ (these /target/lua.test)) + @.python (~~ (these /target/python.test)) + @.ruby (~~ (these /target/ruby.test)))) )))))) (program: args diff --git a/stdlib/source/test/lux/data/color/named.lux b/stdlib/source/test/lux/data/color/named.lux index e7be0c11e..2c9d336a4 100644 --- a/stdlib/source/test/lux/data/color/named.lux +++ b/stdlib/source/test/lux/data/color/named.lux @@ -18,7 +18,7 @@ ["[0]" / ["/[1]" //]]]) -(with_expansions [<colors> (as_is [letter/a +(with_expansions [<colors> (these [letter/a [/.alice_blue /.antique_white ... /.aqua diff --git a/stdlib/source/test/lux/data/text/encoding.lux b/stdlib/source/test/lux/data/text/encoding.lux index c8410b813..6317fef10 100644 --- a/stdlib/source/test/lux/data/text/encoding.lux +++ b/stdlib/source/test/lux/data/text/encoding.lux @@ -25,7 +25,7 @@ ["[0]" / "_" ["[1][0]" utf8]]) -(with_expansions [<encodings> (as_is [all/a +(with_expansions [<encodings> (these [all/a [/.ascii]] [all/ibm<700 diff --git a/stdlib/source/test/lux/data/text/unicode/block.lux b/stdlib/source/test/lux/data/text/unicode/block.lux index b54ec0d9c..4e3de67c4 100644 --- a/stdlib/source/test/lux/data/text/unicode/block.lux +++ b/stdlib/source/test/lux/data/text/unicode/block.lux @@ -29,7 +29,7 @@ additional (# ! each (n.% 1,000,000) random.nat)] (in (/.block start additional)))) -(with_expansions [<blocks> (as_is [blocks/0 +(with_expansions [<blocks> (these [blocks/0 [/.basic_latin /.latin_1_supplement /.latin_extended_a diff --git a/stdlib/source/test/lux/debug.lux b/stdlib/source/test/lux/debug.lux index fdf83aaa7..d8b81370d 100644 --- a/stdlib/source/test/lux/debug.lux +++ b/stdlib/source/test/lux/debug.lux @@ -245,8 +245,8 @@ bar random.nat baz random.bit] (_.cover [/.here] - (with_expansions [<no_parameters> (for @.js (~~ (as_is)) - (~~ (as_is (/.here))))] + (with_expansions [<no_parameters> (for @.js (~~ (these)) + (~~ (these (/.here))))] (`` (exec <no_parameters> (/.here foo diff --git a/stdlib/source/test/lux/documentation.lux b/stdlib/source/test/lux/documentation.lux index 9e6566d91..8e6fd65d2 100644 --- a/stdlib/source/test/lux/documentation.lux +++ b/stdlib/source/test/lux/documentation.lux @@ -38,7 +38,7 @@ (with_expansions ['definition_description' (..description) 'sub_description' (..description) 'super_description' (..description)] - (as_is (def: .public g!default + (these (def: .public g!default Nat 123) diff --git a/stdlib/source/test/lux/extension.lux b/stdlib/source/test/lux/extension.lux index 410d006b4..f07656314 100644 --- a/stdlib/source/test/lux/extension.lux +++ b/stdlib/source/test/lux/extension.lux @@ -10,12 +10,12 @@ ["[0]" php] ["[0]" scheme] ["[0]" jvm "_" - (~~ (.for "JVM" (~~ (.as_is ["[1]" bytecode] + (~~ (.for "JVM" (~~ (.these ["[1]" bytecode] ["[0]" class] ["[0]" version] [encoding ["[0]" name]])) - (~~ (.as_is))))]] + (~~ (.these))))]] [abstract ["[0]" monad {"+" do}]] [control @@ -55,9 +55,9 @@ ["[0]" type]] [phase [generation - (~~ (.for "JVM" (~~ (.as_is ["[0]" jvm "_" + (~~ (.for "JVM" (~~ (.these ["[0]" jvm "_" ["[1]/[0]" runtime]])) - (~~ (.as_is))))]]]]]] + (~~ (.these))))]]]]]] ["_" test {"+" Test}]]] [\\library ["[0]" / {"+" analysis: synthesis: generation: directive:}]]))) @@ -77,15 +77,15 @@ ... Generation (for @.old - (as_is) + (these) - (as_is + (these (for @.python ... TODO: Remove this hack once Jython is no longer being used as the Python interpreter. (analysis: ("dummy dum dum" self phase archive []) (undefined)) - (as_is)) + (these)) ... Analysis (analysis: (..analysis self phase archive [pass_through <code>.any]) diff --git a/stdlib/source/test/lux/macro/template.lux b/stdlib/source/test/lux/macro/template.lux index ca5cf4149..6bdbc04fd 100644 --- a/stdlib/source/test/lux/macro/template.lux +++ b/stdlib/source/test/lux/macro/template.lux @@ -1,26 +1,26 @@ (.using - [library - [lux "*" - ["_" test {"+" Test}] - [abstract - [monad {"+" do}]] - [control - ["[0]" try] - ["[0]" exception] - [parser - ["<[0]>" code]]] - [data - [collection - ["[0]" list]]] - ["[0]" macro - [syntax {"+" syntax:}] - ["[0]" code]] - [math - ["[0]" random {"+" Random}] - [number - ["[0]" nat]]]]] - [\\library - ["[0]" /]]) + [library + [lux "*" + ["_" test {"+" Test}] + [abstract + [monad {"+" do}]] + [control + ["[0]" try] + ["[0]" exception] + [parser + ["<[0]>" code]]] + [data + [collection + ["[0]" list]]] + ["[0]" macro + [syntax {"+" syntax:}] + ["[0]" code]] + [math + ["[0]" random {"+" Random}] + [number + ["[0]" nat]]]]] + [\\library + ["[0]" /]]) (/.let [(!pow/2 <scalar>) [(nat.* <scalar> <scalar>)]] @@ -44,9 +44,9 @@ [left random.nat mid random.nat right random.nat] - (with_expansions [<module> (as_is [.5 -4 +3 2 #1 #0 c b "a"]) + (with_expansions [<module> (these [.5 -4 +3 2 #1 #0 c b "a"]) <module>' ".5-4+32#1#0cba" - <short> (as_is ["a" b c #0 #1 2 +3 -4 .5]) + <short> (these ["a" b c #0 #1 2 +3 -4 .5]) <short>' "abc#0#12+3-4.5"] ($_ _.and (_.cover [/.spliced] diff --git a/stdlib/source/test/lux/math/number/frac.lux b/stdlib/source/test/lux/math/number/frac.lux index 9f1064796..4aec70f14 100644 --- a/stdlib/source/test/lux/math/number/frac.lux +++ b/stdlib/source/test/lux/math/number/frac.lux @@ -120,13 +120,13 @@ )) ))) -(with_expansions [<jvm> (as_is (ffi.import: java/lang/Double +(with_expansions [<jvm> (these (ffi.import: java/lang/Double "[1]::[0]" ("static" doubleToRawLongBits [double] long) ("static" longBitsToDouble [long] double)))] - (for @.old (as_is <jvm>) - @.jvm (as_is <jvm>) - (as_is))) + (for @.old (these <jvm>) + @.jvm (these <jvm>) + (these))) (def: margin_of_error +0.0000001) diff --git a/stdlib/source/test/lux/target.lux b/stdlib/source/test/lux/target.lux index fd6dd73a0..351271072 100644 --- a/stdlib/source/test/lux/target.lux +++ b/stdlib/source/test/lux/target.lux @@ -1,19 +1,19 @@ (.using - [library - [lux "*" - ["_" test {"+" Test}] - [data - ["[0]" text] - [collection - ["[0]" list] - ["[0]" set {"+" Set}]]] - [math - [number - ["n" nat]]]]] - [\\library - ["[0]" /]]) + [library + [lux "*" + ["_" test {"+" Test}] + [data + ["[0]" text] + [collection + ["[0]" list] + ["[0]" set {"+" Set}]]] + [math + [number + ["n" nat]]]]] + [\\library + ["[0]" /]]) -(with_expansions [<targets> (as_is /.old +(with_expansions [<targets> (these /.old /.js /.jvm /.lua diff --git a/stdlib/source/test/lux/type/abstract.lux b/stdlib/source/test/lux/type/abstract.lux index 8bae5b3bc..27c6e97c4 100644 --- a/stdlib/source/test/lux/type/abstract.lux +++ b/stdlib/source/test/lux/type/abstract.lux @@ -24,7 +24,7 @@ ["[0]" /]]) (template.with_locals [g!Foo g!Bar] - (as_is (template [<syntax> <meta>] + (these (template [<syntax> <meta>] [(syntax: (<syntax> []) (do meta.monad [frame <meta>] diff --git a/stdlib/source/test/lux/type/poly/equivalence.lux b/stdlib/source/test/lux/type/poly/equivalence.lux index 1b1695122..02c94b58e 100644 --- a/stdlib/source/test/lux/type/poly/equivalence.lux +++ b/stdlib/source/test/lux/type/poly/equivalence.lux @@ -76,8 +76,8 @@ (random.unicode size)) gen_recursive))) -(for @.old (as_is) - (as_is (def: equivalence +(for @.old (these) + (these (def: equivalence (Equivalence ..Record) (/.equivalence ..Record)))) diff --git a/stdlib/source/test/lux/type/poly/functor.lux b/stdlib/source/test/lux/type/poly/functor.lux index 727f658af..b7debe316 100644 --- a/stdlib/source/test/lux/type/poly/functor.lux +++ b/stdlib/source/test/lux/type/poly/functor.lux @@ -14,8 +14,8 @@ [data ["[0]" identity]]]]) -(for @.old (as_is) - (as_is (def: maybe_functor +(for @.old (these) + (these (def: maybe_functor (Functor .Maybe) (/.functor .Maybe)) diff --git a/stdlib/source/test/lux/type/poly/json.lux b/stdlib/source/test/lux/type/poly/json.lux index 16300a25d..38b36eecf 100644 --- a/stdlib/source/test/lux/type/poly/json.lux +++ b/stdlib/source/test/lux/type/poly/json.lux @@ -107,8 +107,8 @@ ..qty ))) -(for @.old (as_is) - (as_is (def: equivalence +(for @.old (these) + (these (def: equivalence (Equivalence Record) (poly/equivalence.equivalence Record)) diff --git a/stdlib/source/test/lux/world/input/keyboard.lux b/stdlib/source/test/lux/world/input/keyboard.lux index 97ebb59ac..5553373d7 100644 --- a/stdlib/source/test/lux/world/input/keyboard.lux +++ b/stdlib/source/test/lux/world/input/keyboard.lux @@ -20,7 +20,7 @@ [\\library ["[0]" /]]) -(with_expansions [<groups> (as_is [keys/commands +(with_expansions [<groups> (these [keys/commands [/.back_space /.enter /.shift diff --git a/stdlib/source/test/lux/world/net/http/client.lux b/stdlib/source/test/lux/world/net/http/client.lux index 1ab2b0a1d..aee92d1a0 100644 --- a/stdlib/source/test/lux/world/net/http/client.lux +++ b/stdlib/source/test/lux/world/net/http/client.lux @@ -88,7 +88,7 @@ //.#body (function (_ ?wanted_bytes) (io.io {try.#Success [(binary.size data) data]}))]]})))))]] - (with_expansions [<cases> (as_is [/.post on_post] + (with_expansions [<cases> (these [/.post on_post] [/.get on_get] [/.put on_put] [/.patch on_patch] diff --git a/stdlib/source/test/lux/world/net/http/status.lux b/stdlib/source/test/lux/world/net/http/status.lux index f6c5a32ab..b9018fda1 100644 --- a/stdlib/source/test/lux/world/net/http/status.lux +++ b/stdlib/source/test/lux/world/net/http/status.lux @@ -15,7 +15,7 @@ ["[0]" / ["/[1]" //]]]) -(with_expansions [<categories> (as_is [informational +(with_expansions [<categories> (these [informational [/.continue /.switching_protocols /.processing diff --git a/stdlib/source/test/lux/world/output/video/resolution.lux b/stdlib/source/test/lux/world/output/video/resolution.lux index b4a9cebfd..9e2ac6c29 100644 --- a/stdlib/source/test/lux/world/output/video/resolution.lux +++ b/stdlib/source/test/lux/world/output/video/resolution.lux @@ -1,26 +1,26 @@ (.using - [library - [lux "*" - ["_" test {"+" Test}] - [abstract - [monad {"+" do}] - [\\specification - ["$[0]" equivalence] - ["$[0]" hash]]] - [control - ["[0]" maybe]] - [data - [collection - ["[0]" list] - ["[0]" set {"+" Set}]]] - [math - ["[0]" random {"+" Random}] - [number - ["n" nat]]]]] - [\\library - ["[0]" /]]) + [library + [lux "*" + ["_" test {"+" Test}] + [abstract + [monad {"+" do}] + [\\specification + ["$[0]" equivalence] + ["$[0]" hash]]] + [control + ["[0]" maybe]] + [data + [collection + ["[0]" list] + ["[0]" set {"+" Set}]]] + [math + ["[0]" random {"+" Random}] + [number + ["n" nat]]]]] + [\\library + ["[0]" /]]) -(with_expansions [<resolutions> (as_is /.svga +(with_expansions [<resolutions> (these /.svga /.wsvga /.xga /.xga+ diff --git a/stdlib/source/unsafe/lux/data/binary.lux b/stdlib/source/unsafe/lux/data/binary.lux index 1f24ad030..0dd650ec2 100644 --- a/stdlib/source/unsafe/lux/data/binary.lux +++ b/stdlib/source/unsafe/lux/data/binary.lux @@ -14,7 +14,7 @@ [number {"+" hex} ["[0]" i64]]]]]) -(with_expansions [<jvm> (as_is (type: .public Binary +(with_expansions [<jvm> (these (type: .public Binary (ffi.type [byte])) (ffi.import: java/lang/Object @@ -28,11 +28,11 @@ "[1]::[0]" ("static" copyOfRange [[byte] int int] [byte]) ("static" equals [[byte] [byte]] boolean)))] - (for @.old (as_is <jvm>) - @.jvm (as_is <jvm>) + (for @.old (these <jvm>) + @.jvm (these <jvm>) @.js - (as_is (ffi.import: ArrayBuffer + (these (ffi.import: ArrayBuffer "[1]::[0]") (ffi.import: Uint8Array "[1]::[0]") @@ -45,7 +45,7 @@ (Primitive "bytearray")) @.scheme - (as_is (type: .public Binary + (these (type: .public Binary (Primitive "bytevector")) (ffi.import: (make-bytevector [Nat] Binary)) diff --git a/stdlib/source/unsafe/lux/data/collection/array.lux b/stdlib/source/unsafe/lux/data/collection/array.lux index ca3620f56..3897dd399 100644 --- a/stdlib/source/unsafe/lux/data/collection/array.lux +++ b/stdlib/source/unsafe/lux/data/collection/array.lux @@ -22,7 +22,7 @@ (.as <index_type>) "jvm object cast" "jvm conversion long-to-int")]) - (as_is)) + (these)) (`` (template: .public (empty <size>) [((.is (.All (_ a) (.-> .Nat (..Array a))) @@ -299,7 +299,7 @@ [((.is (.All (_ a) (.-> a (..Array a) (.List a))) (.function (list|+default default array) (.loop [index ("lux i64 -" 1 (..size array)) - output (`` (.is (.List (~~ (.as_is (~~ (.type_of default))))) + output (`` (.is (.List (~~ (.these (~~ (.type_of default))))) {.#End}))] (.if ("lux i64 =" (~~ (.static ..underflow)) index) output |