diff options
author | Eduardo Julian | 2022-03-30 13:12:18 -0400 |
---|---|---|
committer | Eduardo Julian | 2022-03-30 13:12:18 -0400 |
commit | 1a962ee4b03f51f46a5979bfefc954f35ee3a1b7 (patch) | |
tree | b042049a8ff6036007d57c8253ce203a1ed90744 /stdlib/source/library/lux/tool/compiler | |
parent | 220c804f9136c73058802575ee49f3f769d5599f (diff) |
Re-named "as_is" to "these" to avoid confusion with the new type-annotation macro names.
Diffstat (limited to 'stdlib/source/library/lux/tool/compiler')
17 files changed, 33 insertions, 33 deletions
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)) |