diff options
author | Eduardo Julian | 2022-03-15 07:24:35 -0400 |
---|---|---|
committer | Eduardo Julian | 2022-03-15 07:24:35 -0400 |
commit | bc36487224f670c23002cc4575c0dba3e5dc1be1 (patch) | |
tree | 01601f7e5d992ace77a16cfa90240ffc4511a7af /lux-lua | |
parent | 4ef1ac1dfe0edd1a11bb7f1fd13c8b6cb8f1bab4 (diff) |
De-sigil-ification: ^
Diffstat (limited to 'lux-lua')
-rw-r--r-- | lux-lua/source/program.lux | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/lux-lua/source/program.lux b/lux-lua/source/program.lux index 56437b026..ac9e9d310 100644 --- a/lux-lua/source/program.lux +++ b/lux-lua/source/program.lux @@ -23,6 +23,7 @@ ["[0]" array {"+" Array}] ["[0]" list ("[1]#[0]" monad)]]] [macro + ["^" pattern] ["[0]" template] ["[0]" code]] [math @@ -186,9 +187,9 @@ (case [(net/sandius/rembulan/Table::get_key (:as java/lang/Object runtime.variant_tag_field) host_object) (net/sandius/rembulan/Table::get_key (:as java/lang/Object runtime.variant_flag_field) host_object) (net/sandius/rembulan/Table::get_key (:as java/lang/Object runtime.variant_value_field) host_object)] - (^multi [{.#Some tag} ?flag {.#Some value}] - [(read value) - {try.#Success value}]) + (^.multi [{.#Some tag} ?flag {.#Some value}] + [(read value) + {try.#Success value}]) {try.#Success [(: Any (|> tag (:as Int) ffi.as_long @@ -295,11 +296,11 @@ (loop [lux_function abstraction input/* input/*] (`` (`` (case input/* - (^ (list)) + (pattern (list)) (in self) (~~ (template [<arity>] - [(^ (list (~~ (static.literals function.identity (..input/* <arity>))))) + [(pattern (list (~~ (static.literals function.identity (..input/* <arity>))))) (in (to_host ((:as (~~ (static.literal function.identity (..function/* <arity>))) lux_function) (~~ (static.literals function.identity (..input/* <arity>))))))] @@ -311,7 +312,7 @@ [5] )) - (^ (list& (~~ (static.literals function.identity (..input/* 5))) input/+)) + (pattern (list& (~~ (static.literals function.identity (..input/* 5))) input/+)) (again ((:as (~~ (static.literal function.identity (..function/* 5))) lux_function) (~~ (static.literals function.identity (..input/* 5)))) @@ -396,7 +397,7 @@ (case (ffi.check net/sandius/rembulan/ByteString field) {.#Some field} (case (ffi.of_string (net/sandius/rembulan/ByteString::decode field)) - (^ (static runtime.variant_tag_field)) + (pattern (static runtime.variant_tag_field)) (case (array.read! 0 value) {.#Some it} (|> it @@ -406,7 +407,7 @@ {.#None} (undefined)) - (^ (static runtime.variant_flag_field)) + (pattern (static runtime.variant_flag_field)) (case (array.read! 1 value) {.#Some _} (:as java/lang/Object "") @@ -414,7 +415,7 @@ {.#None} (ffi.null)) - (^ (static runtime.variant_value_field)) + (pattern (static runtime.variant_value_field)) (|> value (array.read! 2) maybe.trusted |