From f623de52d76ad8ec96feb048cd95a3fb150717e1 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sun, 5 Jun 2022 01:39:29 -0400 Subject: De-sigil-ification: : [Part 1] --- stdlib/source/test/lux.lux | 38 ++++------------- stdlib/source/test/lux/ffi.js.lux | 12 +++--- stdlib/source/test/lux/ffi.jvm.lux | 48 +++++++++++----------- stdlib/source/test/lux/ffi.lua.lux | 4 +- stdlib/source/test/lux/ffi.old.lux | 14 +++---- stdlib/source/test/lux/ffi.py.lux | 4 +- stdlib/source/test/lux/ffi.rb.lux | 4 +- stdlib/source/test/lux/ffi/export.js.lux | 4 +- stdlib/source/test/lux/ffi/export.jvm.lux | 4 +- stdlib/source/test/lux/ffi/export.lua.lux | 4 +- stdlib/source/test/lux/ffi/export.py.lux | 4 +- stdlib/source/test/lux/ffi/export.rb.lux | 8 ++-- stdlib/source/test/lux/macro.lux | 24 +++++++++++ stdlib/source/test/lux/math/number/frac.lux | 2 +- stdlib/source/test/lux/meta.lux | 4 +- stdlib/source/test/lux/target/jvm.lux | 26 ++++++------ stdlib/source/test/lux/target/lua.lux | 2 +- stdlib/source/test/lux/target/python.lux | 6 +-- stdlib/source/test/lux/target/ruby.lux | 2 +- .../compiler/language/lux/analysis/inference.lux | 4 +- .../tool/compiler/language/lux/analysis/macro.lux | 4 +- .../tool/compiler/language/lux/phase/analysis.lux | 4 +- .../compiler/language/lux/phase/analysis/case.lux | 4 +- .../language/lux/phase/analysis/complex.lux | 4 +- .../language/lux/phase/analysis/function.lux | 4 +- 25 files changed, 121 insertions(+), 117 deletions(-) (limited to 'stdlib/source/test') diff --git a/stdlib/source/test/lux.lux b/stdlib/source/test/lux.lux index ac59df0cc..d83a447f5 100644 --- a/stdlib/source/test/lux.lux +++ b/stdlib/source/test/lux.lux @@ -24,7 +24,7 @@ ["[0]" set (.only Set) (.open: "[1]#[0]" equivalence)] [dictionary ["[0]" plist]]]] - ["[0]" macro + ["[0]" macro (.only) [syntax (.only syntax:)] ["^" pattern] ["[0]" code (.open: "[1]#[0]" equivalence)] @@ -375,31 +375,17 @@ (location#= location.dummy))) ))) -(/.macro: (identity_macro tokens) - (at meta.monad in tokens)) +(def: identity_macro + (/.macro (_ tokens) + (at meta.monad in tokens))) (def: crosshair "This is an arbitrary text whose only purpose is to be found, somewhere, in the source-code.") -(/.macro: (found_crosshair? tokens lux) - (let [[_ _ source_code] (the .#source lux)] - {.#Right [lux (list (code.bit (text.contains? ..crosshair source_code)))]})) - -(/.macro: (sum tokens) - (loop (again [tokens tokens - output 0]) - (case tokens - {.#End} - (meta#in (list (code.nat output))) - - {.#Item [_ {.#Nat head}] tail} - (again tail (n.+ head output)) - - _ - (meta.failure "")))) - -(/.macro: (sum' tokens lux) - ((/.macro ..sum) tokens lux)) +(def: found_crosshair? + (macro (_ tokens lux) + (let [[_ _ source_code] (the .#source lux)] + {.#Right [lux (list (code.bit (text.contains? ..crosshair source_code)))]}))) (def: for_macro Test @@ -419,17 +405,11 @@ (is /.Macro) (is Any) (same? (is Any macro)))) - (_.coverage [/.macro:] + (_.coverage [/.macro] (same? expected (..identity_macro expected))) (~~ (for @.old (~~ (these)) (_.coverage [/.Source] (..found_crosshair?)))) - (_.coverage [/.macro] - (with_expansions [n/0 (static.random_nat) - n/1 (static.random_nat) - n/1 (static.random_nat)] - (n.= (..sum n/0 n/1 n/1) - (..sum' n/0 n/1 n/1)))) (_.coverage [/.using] (`` (with_expansions [ ("lux in-module" "library/lux" library/lux.refer) (static.random code.text (random.lower_case 1)) diff --git a/stdlib/source/test/lux/ffi.js.lux b/stdlib/source/test/lux/ffi.js.lux index 166347728..fa58458ae 100644 --- a/stdlib/source/test/lux/ffi.js.lux +++ b/stdlib/source/test/lux/ffi.js.lux @@ -19,28 +19,28 @@ ["$[0]" / ["[1][0]" export]]) -(/.import: Uint8Array +(/.import Uint8Array "[1]::[0]") ... On Nashorn -(/.import: java/lang/String +(/.import java/lang/String "[1]::[0]" (new [Uint8Array /.String]) (getBytes [/.String] Uint8Array)) ... On Node -(/.import: Buffer +(/.import Buffer "[1]::[0]" ("static" from [/.String /.String] Buffer) (toString [/.String] /.String)) ... On the browser -(/.import: TextEncoder +(/.import TextEncoder "[1]::[0]" (new [/.String]) (encode [/.String] Uint8Array)) -(/.import: TextDecoder +(/.import TextDecoder "[1]::[0]" (new [/.String]) (decode [Uint8Array] /.String)) @@ -125,7 +125,7 @@ (text#= "string" (/.type_of string)) (text#= "function" (/.type_of function)) (text#= "object" (/.type_of object)))) - (_.coverage [/.import:] + (_.coverage [/.import] (let [encoding "utf8"] (text#= string (cond /.on_nashorn? diff --git a/stdlib/source/test/lux/ffi.jvm.lux b/stdlib/source/test/lux/ffi.jvm.lux index d23e1f326..4a25f246e 100644 --- a/stdlib/source/test/lux/ffi.jvm.lux +++ b/stdlib/source/test/lux/ffi.jvm.lux @@ -39,19 +39,19 @@ ["$[0]" / ["[1][0]" export]]) -(/.import: java/lang/Boolean +(/.import java/lang/Boolean "[1]::[0]") -(/.import: java/lang/Long +(/.import java/lang/Long "[1]::[0]") -(/.import: java/lang/String +(/.import java/lang/String "[1]::[0]") -(/.import: java/lang/Object +(/.import java/lang/Object "[1]::[0]") -(/.import: (java/lang/Class a) +(/.import (java/lang/Class a) "[1]::[0]" (getName [] java/lang/String)) @@ -264,35 +264,35 @@ (/.interface: test/TestInterface0 ([] actual0 [] java/lang/Long)) -(/.import: test/TestInterface0 +(/.import test/TestInterface0 "[1]::[0]" (actual0 [] java/lang/Long)) (/.interface: test/TestInterface1 ([] actual1 [java/lang/Boolean] java/lang/Long "throws" [java/lang/Throwable])) -(/.import: test/TestInterface1 +(/.import test/TestInterface1 "[1]::[0]" (actual1 [java/lang/Boolean] "try" java/lang/Long)) (/.interface: test/TestInterface2 ([a] actual2 [a] a)) -(/.import: test/TestInterface2 +(/.import test/TestInterface2 "[1]::[0]" ([a] actual2 [a] a)) (/.interface: (test/TestInterface3 a) ([] actual3 [] a)) -(/.import: (test/TestInterface3 a) +(/.import (test/TestInterface3 a) "[1]::[0]" (actual3 [] a)) (/.interface: test/TestInterface4 ([] actual4 [long long] long)) -(/.import: test/TestInterface4 +(/.import test/TestInterface4 "[1]::[0]" (actual4 [long long] long)) @@ -386,7 +386,7 @@ java/lang/Long ::value)) -(/.import: test/TestClass0 +(/.import test/TestClass0 "[1]::[0]" (new [java/lang/Long])) @@ -404,7 +404,7 @@ (panic! "YOLO") ::value))) -(/.import: test/TestClass1 +(/.import test/TestClass1 "[1]::[0]" (new [java/lang/Long])) @@ -418,7 +418,7 @@ a input)) -(/.import: test/TestClass2 +(/.import test/TestClass2 "[1]::[0]" (new [])) @@ -434,7 +434,7 @@ a ::value)) -(/.import: (test/TestClass3 a) +(/.import (test/TestClass3 a) "[1]::[0]" (new [a])) @@ -446,7 +446,7 @@ ("public" (actual4 self [value java/lang/Long]) java/lang/Long value)) -(/.import: test/TestClass4 +(/.import test/TestClass4 "[1]::[0]" (new []) (actual4 [java/lang/Long] java/lang/Long)) @@ -460,7 +460,7 @@ java/lang/Long value)) -(/.import: test/TestClass5 +(/.import test/TestClass5 "[1]::[0]" ("static" actual5 [java/lang/Long] java/lang/Long)) @@ -472,7 +472,7 @@ ("public" "abstract" (actual6 [value java/lang/Long]) java/lang/Long)) -(/.import: test/TestClass6 +(/.import test/TestClass6 "[1]::[0]" (actual6 [java/lang/Long] java/lang/Long)) @@ -486,7 +486,7 @@ java/lang/Long input)) -(/.import: test/TestClass7 +(/.import test/TestClass7 "[1]::[0]" (new [])) @@ -503,7 +503,7 @@ (i.+ (/.of_long actual_left) (/.of_long actual_right))))) -(/.import: test/TestClass8 +(/.import test/TestClass8 "[1]::[0]" (new [])) @@ -519,7 +519,7 @@ ("public" (get_actual9 self []) a ::value9)) -(/.import: (test/TestClass9 a) +(/.import (test/TestClass9 a) "[1]::[0]" (new [a]) (set_actual9 [a] void) @@ -601,7 +601,7 @@ /.as_long (same? dummy/2))]] (all _.and - (_.coverage [/.class: /.import:] + (_.coverage [/.class: /.import] (and example/0! example/1! example/2! @@ -638,12 +638,12 @@ (all _.and (_.coverage [/.class_names_cannot_contain_periods] (with_expansions [ (template.symbol ["java.lang.Float"])] - (not (expands? (/.import: ))))) + (not (expands? (/.import ))))) (_.coverage [/.class_name_cannot_be_a_type_variable] - (and (not (expands? (/.import: (java/lang/Double a) + (and (not (expands? (/.import (java/lang/Double a) "[1]::[0]" (invalid [] (a java/lang/String))))) - (not (expands? (/.import: java/lang/Double + (not (expands? (/.import java/lang/Double "[1]::[0]" ([a] invalid [] (a java/lang/String))))))) (_.coverage [/.unknown_type_variable] diff --git a/stdlib/source/test/lux/ffi.lua.lux b/stdlib/source/test/lux/ffi.lua.lux index 5551bc29a..cd80999b8 100644 --- a/stdlib/source/test/lux/ffi.lua.lux +++ b/stdlib/source/test/lux/ffi.lua.lux @@ -13,7 +13,7 @@ ["$[0]" / ["[1][0]" export]]) -(/.import: (os/getenv [/.String] "io" "?" /.String)) +(/.import (os/getenv [/.String] "io" "?" /.String)) (def: .public test Test @@ -56,7 +56,7 @@ (is /.Function) (is (Ex (_ a) (/.Object a)))) true)) - (_.coverage [/.import:] + (_.coverage [/.import] (case (io.run! (..os/getenv string)) {.#Some _} true {.#None} true)) diff --git a/stdlib/source/test/lux/ffi.old.lux b/stdlib/source/test/lux/ffi.old.lux index ae5acc8a0..021af2ad4 100644 --- a/stdlib/source/test/lux/ffi.old.lux +++ b/stdlib/source/test/lux/ffi.old.lux @@ -22,17 +22,17 @@ [\\library ["[0]" /]]) -(/.import: java/lang/Object +(/.import java/lang/Object "[1]::[0]") -(/.import: java/lang/String +(/.import java/lang/String "[1]::[0]") -(/.import: java/lang/Exception +(/.import java/lang/Exception "[1]::[0]" (new [java/lang/String])) -(/.import: (java/lang/Class a) +(/.import (java/lang/Class a) "[1]::[0]" (getName [] java/lang/String)) @@ -53,7 +53,7 @@ ("public" (downC self []) void (:= ::counter (i.- ::increase ::counter)))) -(/.import: (test/lux/ffi/TestClass a) +(/.import (test/lux/ffi/TestClass a) "[1]::[0]" (new [java/lang/Long java/lang/Long]) (currentC [] java/lang/Long) @@ -65,7 +65,7 @@ ([] up [] test/lux/ffi/TestInterface "throws" [java/lang/Exception]) ([] down [] test/lux/ffi/TestInterface "throws" [java/lang/Exception])) -(/.import: test/lux/ffi/TestInterface +(/.import test/lux/ffi/TestInterface "[1]::[0]" (current [] java/lang/Long) (up [] java/lang/Long) @@ -208,7 +208,7 @@ (case (/.as java/lang/Object (/.null)) {.#Some _} false {.#None} true))) (_.coverage [/.synchronized] (/.synchronized sample #1)) - (_.coverage [/.class_for /.import:] + (_.coverage [/.class_for /.import] (|> (/.class_for java/lang/Class) java/lang/Class::getName (text#= "java.lang.Class"))) diff --git a/stdlib/source/test/lux/ffi.py.lux b/stdlib/source/test/lux/ffi.py.lux index 9269cdee5..98d68142f 100644 --- a/stdlib/source/test/lux/ffi.py.lux +++ b/stdlib/source/test/lux/ffi.py.lux @@ -13,7 +13,7 @@ ["$[0]" / ["[1][0]" export]]) -(/.import: os +(/.import os "[1]::[0]" ("static" R_OK /.Integer) ("static" W_OK /.Integer)) @@ -59,7 +59,7 @@ (is /.Function) (is (Ex (_ a) (/.Object a)))) true)) - (_.coverage [/.import:] + (_.coverage [/.import] (and (i.= (os::R_OK) (os::R_OK)) (not (i.= (os::W_OK) (os::R_OK))))) diff --git a/stdlib/source/test/lux/ffi.rb.lux b/stdlib/source/test/lux/ffi.rb.lux index f16152246..268512134 100644 --- a/stdlib/source/test/lux/ffi.rb.lux +++ b/stdlib/source/test/lux/ffi.rb.lux @@ -11,7 +11,7 @@ ["$[0]" / ["[1][0]" export]]) -(/.import: File +(/.import File "[1]::[0]" ("static" SEPARATOR /.String)) @@ -48,7 +48,7 @@ [/.Nil] [/.Function] )))) - (_.coverage [/.import:] + (_.coverage [/.import] (same? (..File::SEPARATOR) (..File::SEPARATOR))) diff --git a/stdlib/source/test/lux/ffi/export.js.lux b/stdlib/source/test/lux/ffi/export.js.lux index 592674b10..913fe5d5e 100644 --- a/stdlib/source/test/lux/ffi/export.js.lux +++ b/stdlib/source/test/lux/ffi/export.js.lux @@ -19,8 +19,8 @@ (-> Nat Nat) (|>> (n.+ )))) - (//.import: (constant Nat)) - (//.import: (shift (-> Nat Nat))) + (//.import (constant Nat)) + (//.import (shift (-> Nat Nat))) (def: .public test Test diff --git a/stdlib/source/test/lux/ffi/export.jvm.lux b/stdlib/source/test/lux/ffi/export.jvm.lux index 5fa93e75d..805e01c28 100644 --- a/stdlib/source/test/lux/ffi/export.jvm.lux +++ b/stdlib/source/test/lux/ffi/export.jvm.lux @@ -66,7 +66,7 @@ )) ))) -(`` (`` (//.import: Primitives +(`` (`` (//.import Primitives "[1]::[0]" ("static" actual_boolean boolean) ("static" actual_byte byte) @@ -101,7 +101,7 @@ (([a] left [left a right a]) a left) (([a] right [left a right a]) a right)) -(//.import: Objects +(//.import Objects "[1]::[0]" ("static" actual_string java/lang/String) diff --git a/stdlib/source/test/lux/ffi/export.lua.lux b/stdlib/source/test/lux/ffi/export.lua.lux index e8997e608..d253d7329 100644 --- a/stdlib/source/test/lux/ffi/export.lua.lux +++ b/stdlib/source/test/lux/ffi/export.lua.lux @@ -19,8 +19,8 @@ (-> Nat Nat) (|>> (n.+ )))) - (//.import: (constant Nat)) - (//.import: (shift (-> Nat Nat))) + (//.import (constant Nat)) + (//.import (shift (-> Nat Nat))) (def: .public test Test diff --git a/stdlib/source/test/lux/ffi/export.py.lux b/stdlib/source/test/lux/ffi/export.py.lux index 592674b10..913fe5d5e 100644 --- a/stdlib/source/test/lux/ffi/export.py.lux +++ b/stdlib/source/test/lux/ffi/export.py.lux @@ -19,8 +19,8 @@ (-> Nat Nat) (|>> (n.+ )))) - (//.import: (constant Nat)) - (//.import: (shift (-> Nat Nat))) + (//.import (constant Nat)) + (//.import (shift (-> Nat Nat))) (def: .public test Test diff --git a/stdlib/source/test/lux/ffi/export.rb.lux b/stdlib/source/test/lux/ffi/export.rb.lux index 2d1356fac..c785c9abd 100644 --- a/stdlib/source/test/lux/ffi/export.rb.lux +++ b/stdlib/source/test/lux/ffi/export.rb.lux @@ -25,10 +25,10 @@ (-> Nat Nat) (|>> (n.+ )))) - (//.import: (nullary [] Nat)) - (//.import: (unary [Nat] Nat)) - (//.import: (CONSTANT Nat)) - (//.import: ($global (-> Nat Nat))) + (//.import (nullary [] Nat)) + (//.import (unary [Nat] Nat)) + (//.import (CONSTANT Nat)) + (//.import ($global (-> Nat Nat))) (def: .public test Test diff --git a/stdlib/source/test/lux/macro.lux b/stdlib/source/test/lux/macro.lux index 0b6bfe2f3..531b43139 100644 --- a/stdlib/source/test/lux/macro.lux +++ b/stdlib/source/test/lux/macro.lux @@ -180,6 +180,24 @@ false)))) )))) +(def: sum + (macro (_ tokens) + (loop (again [tokens tokens + output 0]) + (case tokens + {.#End} + (at meta.monad in (list (code.nat output))) + + {.#Item [_ {.#Nat head}] tail} + (again tail (n.+ head output)) + + _ + (meta.failure ""))))) + +(def: sum' + (macro (_ tokens lux) + ((/.function ..sum) tokens lux))) + (def: .public test Test (<| (_.covering /._) @@ -208,6 +226,12 @@ (!expect (^.multi {try.#Success [_ {.#Symbol ["" actual]}]} (text.contains? (template.text []) actual)))))) + (_.coverage [/.function] + (with_expansions [n/0 (static.random_nat) + n/1 (static.random_nat) + n/1 (static.random_nat)] + (n.= (..sum n/0 n/1 n/1) + (..sum' n/0 n/1 n/1)))) )) ..test|expansion diff --git a/stdlib/source/test/lux/math/number/frac.lux b/stdlib/source/test/lux/math/number/frac.lux index c2e792e8b..d06a60251 100644 --- a/stdlib/source/test/lux/math/number/frac.lux +++ b/stdlib/source/test/lux/math/number/frac.lux @@ -120,7 +120,7 @@ )) ))) -(with_expansions [ (these (ffi.import: java/lang/Double +(with_expansions [ (these (ffi.import java/lang/Double "[1]::[0]" ("static" doubleToRawLongBits [double] long) ("static" longBitsToDouble [long] double)))] diff --git a/stdlib/source/test/lux/meta.lux b/stdlib/source/test/lux/meta.lux index 9c162b1fe..c4f1f334c 100644 --- a/stdlib/source/test/lux/meta.lux +++ b/stdlib/source/test/lux/meta.lux @@ -383,7 +383,7 @@ {.#Primitive name (list)}) (random.upper_case 1)) expected_value (random.either (in .def:) - (in .macro:)) + (in .macro)) .let [expected_lux (is (-> Bit (Maybe Type) [(List [Text .Global]) @@ -499,7 +499,7 @@ {.#Primitive name (list)}) (random.upper_case 1)) expected_value (random.either (in .def:) - (in .macro:)) + (in .macro)) .let [expected_lux (is (-> Bit (Maybe Type) [(List [Text .Global]) diff --git a/stdlib/source/test/lux/target/jvm.lux b/stdlib/source/test/lux/target/jvm.lux index 9f93ee4e1..974394c30 100644 --- a/stdlib/source/test/lux/target/jvm.lux +++ b/stdlib/source/test/lux/target/jvm.lux @@ -1,7 +1,7 @@ (.using [library [lux (.except Type Primitive Label type int) - ["[0]" ffi (.only import:)] + ["[0]" ffi (.only import)] ["@" target] [abstract ["[0]" monad (.only do)]] @@ -59,43 +59,43 @@ /method.public /method.static)) -(import: java/lang/Boolean +(import java/lang/Boolean "[1]::[0]") -(import: java/lang/Byte +(import java/lang/Byte "[1]::[0]") -(import: java/lang/Short +(import java/lang/Short "[1]::[0]") -(import: java/lang/Integer +(import java/lang/Integer "[1]::[0]") -(import: java/lang/Long +(import java/lang/Long "[1]::[0]") -(import: java/lang/Float +(import java/lang/Float "[1]::[0]") -(import: java/lang/Double +(import java/lang/Double "[1]::[0]" ("static" compare [double double] int)) -(import: java/lang/Character +(import java/lang/Character "[1]::[0]") -(import: java/lang/String +(import java/lang/String "[1]::[0]") -(import: java/lang/reflect/Method +(import java/lang/reflect/Method "[1]::[0]" (invoke [java/lang/Object [java/lang/Object]] "try" java/lang/Object)) -(import: (java/lang/Class c) +(import (java/lang/Class c) "[1]::[0]" (getDeclaredMethod [java/lang/String [(java/lang/Class [? < java/lang/Object])]] java/lang/reflect/Method)) -(import: java/lang/Object +(import java/lang/Object "[1]::[0]" (getClass [] (java/lang/Class java/lang/Object)) (toString [] java/lang/String)) diff --git a/stdlib/source/test/lux/target/lua.lux b/stdlib/source/test/lux/target/lua.lux index 98c79bcd2..38babfca6 100644 --- a/stdlib/source/test/lux/target/lua.lux +++ b/stdlib/source/test/lux/target/lua.lux @@ -33,7 +33,7 @@ ["[0]" /]]) ... http://www.lua.org/manual/5.3/manual.html#pdf-load -(ffi.import: (load [Text] "?" (-> Any Any))) +(ffi.import (load [Text] "?" (-> Any Any))) (def: (expression ??? it) (-> (-> Any Bit) /.Expression Bit) diff --git a/stdlib/source/test/lux/target/python.lux b/stdlib/source/test/lux/target/python.lux index 3dd88db55..56e946bd5 100644 --- a/stdlib/source/test/lux/target/python.lux +++ b/stdlib/source/test/lux/target/python.lux @@ -32,7 +32,7 @@ [\\library ["[0]" / (.open: "[1]#[0]" equivalence)]]) -(ffi.import: (eval [Text] "try" "?" Any)) +(ffi.import (eval [Text] "try" "?" Any)) (def: (expression ??? it) (-> (-> Any Bit) (/.Expression Any) Bit) @@ -427,11 +427,11 @@ ..test|var) )))) -(ffi.import: Dict +(ffi.import Dict "[1]::[0]" (get [ffi.String] Any)) -(ffi.import: (dict [] ..Dict)) +(ffi.import (dict [] ..Dict)) (def: (statement it) (-> (-> /.SVar (/.Statement Any)) Any) diff --git a/stdlib/source/test/lux/target/ruby.lux b/stdlib/source/test/lux/target/ruby.lux index 3d0e61485..62639b7d5 100644 --- a/stdlib/source/test/lux/target/ruby.lux +++ b/stdlib/source/test/lux/target/ruby.lux @@ -37,7 +37,7 @@ [\\library ["[0]" / (.open: "[1]#[0]" equivalence)]]) -(ffi.import: (eval [Text] "try" "?" Any)) +(ffi.import (eval [Text] "try" "?" Any)) (def: (expression ??? it) (-> (-> Any Bit) /.Expression Bit) diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/analysis/inference.lux b/stdlib/source/test/lux/tool/compiler/language/lux/analysis/inference.lux index f69dd6382..86c9c3409 100644 --- a/stdlib/source/test/lux/tool/compiler/language/lux/analysis/inference.lux +++ b/stdlib/source/test/lux/tool/compiler/language/lux/analysis/inference.lux @@ -14,7 +14,7 @@ ["[0]" text] [collection ["[0]" list (.open: "[1]#[0]" monad)]]] - [macro + ["[0]" macro (.only) ["[0]" code]] [math ["[0]" random (.only Random) (.open: "[1]#[0]" monad)] @@ -52,7 +52,7 @@ (def: (expander macro inputs state) //macro.Expander - {try.#Success ((.macro macro) inputs state)}) + {try.#Success ((macro.function macro) inputs state)}) (def: random_state (Random Lux) diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/analysis/macro.lux b/stdlib/source/test/lux/tool/compiler/language/lux/analysis/macro.lux index ff54e0902..05c17f492 100644 --- a/stdlib/source/test/lux/tool/compiler/language/lux/analysis/macro.lux +++ b/stdlib/source/test/lux/tool/compiler/language/lux/analysis/macro.lux @@ -16,7 +16,7 @@ ["[0]" text (.open: "[1]#[0]" equivalence)] [collection ["[0]" list (.open: "[1]#[0]" monad)]]] - [macro + ["[0]" macro (.only) ["[0]" code (.open: "[1]#[0]" equivalence)]] [math ["[0]" random (.only Random) (.open: "[1]#[0]" monad)] @@ -44,7 +44,7 @@ (def: (expander macro inputs state) /.Expander - {try.#Success ((.macro macro) inputs state)}) + {try.#Success ((macro.function macro) inputs state)}) (def: .public test Test diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis.lux index 9d7d2abc2..16e9fa6c6 100644 --- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis.lux +++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis.lux @@ -12,7 +12,7 @@ ["[0]" text] [collection ["[0]" list]]] - [macro + ["[0]" macro (.only) ["[0]" code]] [math ["[0]" random] @@ -52,7 +52,7 @@ (def: (expander macro inputs state) //macro.Expander - {try.#Success ((.macro macro) inputs state)}) + {try.#Success ((macro.function macro) inputs state)}) (def: (can_analyse_unit! lux module/0) (-> Lux Text Bit) diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/case.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/case.lux index f8be52465..01cb6c5bc 100644 --- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/case.lux +++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/case.lux @@ -11,7 +11,7 @@ ["[0]" product] ["[0]" text (.only) ["%" format]]] - [macro + ["[0]" macro (.only) ["[0]" code]] [math ["[0]" random]] @@ -46,7 +46,7 @@ (def: (expander macro inputs state) //macro.Expander - {try.#Success ((.macro macro) inputs state)}) + {try.#Success ((macro.function macro) inputs state)}) (def: analysis //analysis.Phase diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/complex.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/complex.lux index 314dc7e6a..c991c5850 100644 --- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/complex.lux +++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/complex.lux @@ -17,7 +17,7 @@ [collection ["[0]" list (.open: "[1]#[0]" monad monoid)] ["[0]" set]]] - [macro + ["[0]" macro (.only) ["^" pattern] ["[0]" code]] [math @@ -58,7 +58,7 @@ (def: (expander macro inputs state) //macro.Expander - {try.#Success ((.macro macro) inputs state)}) + {try.#Success ((macro.function macro) inputs state)}) (def: random_state (Random Lux) diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/function.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/function.lux index 90730f325..88ce51858 100644 --- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/function.lux +++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/function.lux @@ -14,7 +14,7 @@ ["%" format]] [collection ["[0]" list]]] - [macro + ["[0]" macro (.only) ["[0]" code]] [math ["[0]" random] @@ -53,7 +53,7 @@ (def: (expander macro inputs state) //macro.Expander - {try.#Success ((.macro macro) inputs state)}) + {try.#Success ((macro.function macro) inputs state)}) (def: analysis //analysis.Phase -- cgit v1.2.3