From 93eb82e1bf6d2f2a6b3b0adb85f4ab93cbb766a9 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Mon, 14 Mar 2022 03:33:01 -0400 Subject: De-sigil-ification: @ --- stdlib/source/library/lux.lux | 50 +++++++++++++++++++++---------------------- 1 file changed, 25 insertions(+), 25 deletions(-) (limited to 'stdlib/source/library/lux.lux') diff --git a/stdlib/source/library/lux.lux b/stdlib/source/library/lux.lux index 657bc4faa..09f0a9e4c 100644 --- a/stdlib/source/library/lux.lux +++ b/stdlib/source/library/lux.lux @@ -3965,7 +3965,7 @@ (-> (List a) (List [Nat a]))) (enumeration' 0 xs)) -(macro: .public (value@ tokens) +(macro: .public (the tokens) (case tokens (^ (list [_ {#Symbol slot'}] record)) (do meta_monad @@ -3988,12 +3988,12 @@ (meta#in (list (` ({(~ pattern) (~ g!output)} (~ record)))))) _ - (failure "value@ can only use records."))) + (failure "the can only use records."))) (^ (list [_ {#Tuple slots}] record)) (meta#in (list (list#mix (: (-> Code Code Code) (function (_ slot inner) - (` (..value@ (~ slot) (~ inner))))) + (` (..the (~ slot) (~ inner))))) record slots))) @@ -4001,10 +4001,10 @@ (do meta_monad [g!_ (..generated_symbol "_") g!record (..generated_symbol "record")] - (in (list (` (function ((~ g!_) (~ g!record)) (..value@ (~ selector) (~ g!record))))))) + (in (list (` (function ((~ g!_) (~ g!record)) (..the (~ selector) (~ g!record))))))) _ - (failure "Wrong syntax for value@"))) + (failure "Wrong syntax for the"))) (def: (open_declaration alias tags my_tag_index [module short] source type) (-> Text (List Symbol) Nat Symbol Code Type (Meta (List Code))) @@ -4200,7 +4200,7 @@ _ (failure "Wrong syntax for #"))) -(macro: .public (with@ tokens) +(macro: .public (has tokens) (case tokens (^ (list [_ {#Symbol slot'}] value record)) (do meta_monad @@ -4236,12 +4236,12 @@ (meta#in (list (` ({(~ pattern) (~ output)} (~ record))))))) _ - (failure "with@ can only use records."))) + (failure "has can only use records."))) (^ (list [_ {#Tuple slots}] value record)) (case slots {#End} - (failure "Wrong syntax for with@") + (failure "Wrong syntax for has") _ (do meta_monad @@ -4252,12 +4252,12 @@ .let [pairs (zipped/2 slots bindings) update_expr (list#mix (: (-> [Code Code] Code Code) (function (_ [s b] v) - (` (..with@ (~ s) (~ v) (~ b))))) + (` (..has (~ s) (~ v) (~ b))))) value (list#reversed pairs)) [_ accesses'] (list#mix (: (-> [Code Code] [Code (List (List Code))] [Code (List (List Code))]) (function (_ [new_slot new_binding] [old_record accesses']) - [(` (value@ (~ new_slot) (~ new_binding))) + [(` (the (~ new_slot) (~ new_binding))) {#Item (list new_binding old_record) accesses'}])) [record (: (List (List Code)) {#End})] pairs) @@ -4270,7 +4270,7 @@ [g!_ (..generated_symbol "_") g!record (..generated_symbol "record")] (in (list (` (function ((~ g!_) (~ g!record)) - (..with@ (~ selector) (~ value) (~ g!record))))))) + (..has (~ selector) (~ value) (~ g!record))))))) (^ (list selector)) (do meta_monad @@ -4278,12 +4278,12 @@ g!value (..generated_symbol "value") g!record (..generated_symbol "record")] (in (list (` (function ((~ g!_) (~ g!value) (~ g!record)) - (..with@ (~ selector) (~ g!value) (~ g!record))))))) + (..has (~ selector) (~ g!value) (~ g!record))))))) _ - (failure "Wrong syntax for with@"))) + (failure "Wrong syntax for has"))) -(macro: .public (revised@ tokens) +(macro: .public (revised tokens) (case tokens (^ (list [_ {#Symbol slot'}] fun record)) (do meta_monad @@ -4319,27 +4319,27 @@ (meta#in (list (` ({(~ pattern) (~ output)} (~ record))))))) _ - (failure "revised@ can only use records."))) + (failure "revised can only use records."))) (^ (list [_ {#Tuple slots}] fun record)) (case slots {#End} - (failure "Wrong syntax for revised@") + (failure "Wrong syntax for revised") _ (do meta_monad [g!record (..generated_symbol "record") g!temp (..generated_symbol "temp")] (in (list (` (let [(~ g!record) (~ record) - (~ g!temp) (value@ [(~+ slots)] (~ g!record))] - (with@ [(~+ slots)] ((~ fun) (~ g!temp)) (~ g!record)))))))) + (~ g!temp) (the [(~+ slots)] (~ g!record))] + (has [(~+ slots)] ((~ fun) (~ g!temp)) (~ g!record)))))))) (^ (list selector fun)) (do meta_monad [g!_ (..generated_symbol "_") g!record (..generated_symbol "record")] (in (list (` (function ((~ g!_) (~ g!record)) - (..revised@ (~ selector) (~ fun) (~ g!record))))))) + (..revised (~ selector) (~ fun) (~ g!record))))))) (^ (list selector)) (do meta_monad @@ -4347,10 +4347,10 @@ g!fun (..generated_symbol "fun") g!record (..generated_symbol "record")] (in (list (` (function ((~ g!_) (~ g!fun) (~ g!record)) - (..revised@ (~ selector) (~ g!fun) (~ g!record))))))) + (..revised (~ selector) (~ g!fun) (~ g!record))))))) _ - (failure "Wrong syntax for revised@"))) + (failure "Wrong syntax for revised"))) (macro: .public (^template tokens) (case tokens @@ -4704,7 +4704,7 @@ (-> a a Bit)) ("lux is" reference sample)) -(macro: .public (^@ tokens) +(macro: .public (^let tokens) (case tokens (^ (list& [_meta {#Form (list [_ {#Symbol ["" name]}] pattern)}] body branches)) (let [g!whole (local_symbol$ name)] @@ -4713,7 +4713,7 @@ branches))) _ - (failure (..wrong_syntax_error (symbol ..^@))))) + (failure (..wrong_syntax_error (symbol ..^let))))) (macro: .public (^|> tokens) (case tokens @@ -4740,7 +4740,7 @@ (def: location (Meta Location) (function (_ compiler) - {#Right [compiler (value@ #location compiler)]})) + {#Right [compiler (the #location compiler)]})) (macro: .public (undefined tokens) (case tokens @@ -4835,7 +4835,7 @@ (def: target (Meta Text) (function (_ compiler) - {#Right [compiler (value@ [#info #target] compiler)]})) + {#Right [compiler (the [#info #target] compiler)]})) (def: (platform_name choice) (-> Code (Meta Text)) -- cgit v1.2.3