aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library
diff options
context:
space:
mode:
authorEduardo Julian2022-03-17 04:29:59 -0400
committerEduardo Julian2022-03-17 04:29:59 -0400
commit220c804f9136c73058802575ee49f3f769d5599f (patch)
tree238ffc7163635103ffca835a082902a4f8fda943 /stdlib/source/library
parent49387dbbf08a9b06b815a662d117c7aa37120482 (diff)
De-sigil-ification: !
Diffstat (limited to 'stdlib/source/library')
-rw-r--r--stdlib/source/library/lux.lux80
-rw-r--r--stdlib/source/library/lux/abstract/monad/indexed.lux10
-rw-r--r--stdlib/source/library/lux/control/concatenative.lux14
-rw-r--r--stdlib/source/library/lux/control/concurrency/actor.lux38
-rw-r--r--stdlib/source/library/lux/control/concurrency/stm.lux2
-rw-r--r--stdlib/source/library/lux/control/exception.lux6
-rw-r--r--stdlib/source/library/lux/control/function/inline.lux6
-rw-r--r--stdlib/source/library/lux/control/function/mutual.lux8
-rw-r--r--stdlib/source/library/lux/control/maybe.lux4
-rw-r--r--stdlib/source/library/lux/control/parser/analysis.lux20
-rw-r--r--stdlib/source/library/lux/control/parser/code.lux30
-rw-r--r--stdlib/source/library/lux/control/parser/json.lux6
-rw-r--r--stdlib/source/library/lux/control/parser/synthesis.lux16
-rw-r--r--stdlib/source/library/lux/control/parser/text.lux113
-rw-r--r--stdlib/source/library/lux/control/parser/type.lux6
-rw-r--r--stdlib/source/library/lux/control/security/capability.lux6
-rw-r--r--stdlib/source/library/lux/data/format/css/property.lux2
-rw-r--r--stdlib/source/library/lux/data/format/css/query.lux2
-rw-r--r--stdlib/source/library/lux/data/format/css/value.lux2
-rw-r--r--stdlib/source/library/lux/data/format/xml.lux49
-rw-r--r--stdlib/source/library/lux/debug.lux6
-rw-r--r--stdlib/source/library/lux/documentation.lux16
-rw-r--r--stdlib/source/library/lux/extension.lux20
-rw-r--r--stdlib/source/library/lux/ffi.jvm.lux140
-rw-r--r--stdlib/source/library/lux/ffi.lux74
-rw-r--r--stdlib/source/library/lux/ffi.old.lux140
-rw-r--r--stdlib/source/library/lux/ffi.php.lux30
-rw-r--r--stdlib/source/library/lux/ffi.scm.lux24
-rw-r--r--stdlib/source/library/lux/ffi/export.js.lux4
-rw-r--r--stdlib/source/library/lux/ffi/export.jvm.lux20
-rw-r--r--stdlib/source/library/lux/ffi/export.lua.lux4
-rw-r--r--stdlib/source/library/lux/ffi/export.py.lux4
-rw-r--r--stdlib/source/library/lux/ffi/export.rb.lux4
-rw-r--r--stdlib/source/library/lux/macro.lux6
-rw-r--r--stdlib/source/library/lux/macro/code.lux4
-rw-r--r--stdlib/source/library/lux/macro/pattern.lux6
-rw-r--r--stdlib/source/library/lux/macro/syntax.lux2
-rw-r--r--stdlib/source/library/lux/macro/syntax/check.lux2
-rw-r--r--stdlib/source/library/lux/macro/syntax/declaration.lux10
-rw-r--r--stdlib/source/library/lux/macro/syntax/definition.lux8
-rw-r--r--stdlib/source/library/lux/macro/syntax/type/variable.lux4
-rw-r--r--stdlib/source/library/lux/macro/template.lux12
-rw-r--r--stdlib/source/library/lux/program.lux2
-rw-r--r--stdlib/source/library/lux/target/js.lux4
-rw-r--r--stdlib/source/library/lux/target/lua.lux2
-rw-r--r--stdlib/source/library/lux/target/php.lux2
-rw-r--r--stdlib/source/library/lux/target/python.lux2
-rw-r--r--stdlib/source/library/lux/target/r.lux2
-rw-r--r--stdlib/source/library/lux/target/ruby.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/jvm.lux22
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/jvm.lux22
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/lux.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/jvm/host.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/runtime.lux98
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/extension.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/function.lux10
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/runtime.lux20
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/runtime.lux22
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/runtime.lux98
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/runtime.lux20
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/procedure/common.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/runtime.lux22
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/runtime.lux24
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/extension/common.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/runtime.lux100
-rw-r--r--stdlib/source/library/lux/type.lux10
-rw-r--r--stdlib/source/library/lux/type/abstract.lux18
-rw-r--r--stdlib/source/library/lux/type/implicit.lux6
-rw-r--r--stdlib/source/library/lux/type/poly.lux2
-rw-r--r--stdlib/source/library/lux/type/unit.lux20
-rw-r--r--stdlib/source/library/lux/world/net/http/client.lux2
71 files changed, 775 insertions, 735 deletions
diff --git a/stdlib/source/library/lux.lux b/stdlib/source/library/lux.lux
index df53c5058..7cc43774e 100644
--- a/stdlib/source/library/lux.lux
+++ b/stdlib/source/library/lux.lux
@@ -341,7 +341,7 @@
([_ name] (_ann {#Symbol name})))
#0)
-("lux def" local_symbol$
+("lux def" local$
("lux type check" {#Function Text Code}
([_ name] (_ann {#Symbol ["" name]})))
#0)
@@ -965,13 +965,13 @@
(def:'' .private quantified
{#Function Code Code}
- (let$ (local_symbol$ ..quantification_level) (nat$ 0)))
+ (let$ (local$ ..quantification_level) (nat$ 0)))
(def:'' .private (quantified_type_parameter idx)
{#Function Nat Code}
(variant$ {#Item (symbol$ [..prelude_module "#Parameter"])
{#Item (form$ {#Item (text$ "lux i64 +")
- {#Item (local_symbol$ ..quantification_level)
+ {#Item (local$ ..quantification_level)
{#Item (nat$ idx)
{#End}}}})
{#End}}}))
@@ -1041,7 +1041,7 @@
(def:'' .private (with_correct_quantification body)
{#Function Code Code}
(form$ {#Item (symbol$ [prelude_module "__adjusted_quantified_type__"])
- {#Item (local_symbol$ ..quantification_level)
+ {#Item (local$ ..quantification_level)
{#Item (nat$ 0)
{#Item body
{#End}}}}}))
@@ -1058,7 +1058,7 @@
depth))))
{#End}}}})
body)}
- (local_symbol$ ..quantification_level)))
+ (local$ ..quantification_level)))
(def:'' .private (initialized_quantification? lux)
{#Function Lux Bit}
@@ -1205,10 +1205,10 @@
(failure "function' requires a non-empty arguments tuple.")
{#Item [harg targs]}
- (meta#in (list (form$ (list (tuple$ (list (local_symbol$ name)
+ (meta#in (list (form$ (list (tuple$ (list (local$ name)
harg))
(list#mix (function'' [arg body']
- (form$ (list (tuple$ (list (local_symbol$ "")
+ (form$ (list (tuple$ (list (local$ "")
arg))
body')))
body
@@ -1412,15 +1412,15 @@
(macro:' .private (do tokens)
({{#Item monad {#Item [_ {#Tuple bindings}] {#Item body {#End}}}}
({{#Some bindings}
- (let' [g!in (local_symbol$ "in")
- g!then (local_symbol$ " then ")
+ (let' [g!in (local$ "in")
+ g!then (local$ " then ")
body' (list#mix ("lux type check" (-> (Tuple Code Code) Code Code)
(function' [binding body']
(let' [[var value] binding]
({[_ {#Symbol [module short]}]
({""
(form$ (list g!then
- (form$ (list (tuple$ (list (local_symbol$ "") var)) body'))
+ (form$ (list (tuple$ (list (local$ "") var)) body'))
value))
_
@@ -1430,7 +1430,7 @@
_
(form$ (list g!then
- (form$ (list (tuple$ (list (local_symbol$ "") var)) body'))
+ (form$ (list (tuple$ (list (local$ "") var)) body'))
value))}
var))))
body
@@ -2360,12 +2360,12 @@
..#seed ("lux i64 +" 1 seed) ..#expected expected
..#location location ..#extensions extensions
..#scope_type_vars scope_type_vars ..#eval _eval]
- (local_symbol$ ($_ text#composite "__gensym__" prefix (nat#encoded seed)))}}
+ (local$ ($_ text#composite "__gensym__" prefix (nat#encoded seed)))}}
state))
(macro:' .public (exec tokens)
({{#Item value actions}
- (let' [dummy (local_symbol$ "")]
+ (let' [dummy (local$ "")]
(meta#in (list (list#mix ("lux type check" (-> Code Code Code)
(function' [pre post] (` ({(~ dummy) (~ post)}
(~ pre)))))
@@ -2528,7 +2528,7 @@
_
{#None}))
{#Some g!name head tail body}
- (let [g!blank (local_symbol$ "")
+ (let [g!blank (local$ "")
nest (is (-> Code (-> Code Code Code))
(function' [g!name]
(function' [arg body']
@@ -2536,7 +2536,7 @@
(` ([(~ g!name) (~ arg)] (~ body')))
(` ([(~ g!name) (~ g!blank)]
(.case (~ g!blank) (~ arg) (~ body'))))))))]
- (meta#in (list (nest (..local_symbol$ g!name) head
+ (meta#in (list (nest (..local$ g!name) head
(list#mix (nest g!blank) body (list#reversed tail))))))
{#None}
@@ -2633,11 +2633,11 @@
_
{#None}))
-(def:' .private (local_symbolP tokens)
+(def:' .private (localP tokens)
(-> (List Code) (Maybe [(List Code) Text]))
(case tokens
- (pattern (list& [_ {#Symbol ["" local_symbol]}] tokens'))
- {#Some [tokens' local_symbol]}
+ (pattern (list& [_ {#Symbol ["" local]}] tokens'))
+ {#Some [tokens' local]}
_
{#None}))
@@ -2656,7 +2656,7 @@
tail (<parser> tokens)]
(in {#Item head tail}))))]
- [parametersP Text local_symbolP]
+ [parametersP Text localP]
[enhanced_parametersP Code anyP]
)
@@ -2666,14 +2666,14 @@
(case tokens
(pattern (list& [_ {#Form local_declaration}] tokens'))
(do maybe_monad
- [% (local_symbolP local_declaration)
+ [% (localP local_declaration)
.let' [[local_declaration name] %]
parameters (<parameters_parser> local_declaration)]
(in [tokens' [name parameters]]))
_
(do maybe_monad
- [% (local_symbolP tokens)
+ [% (localP tokens)
.let' [[tokens' name] %]]
(in [tokens' [name {#End}]]))))]
@@ -2746,7 +2746,7 @@
body
_
- (` (function ((~ (..local_symbol$ name)) (~+ parameters))
+ (` (function ((~ (..local$ name)) (~+ parameters))
(~ body))))
body (case ?type
{#Some type}
@@ -2755,7 +2755,7 @@
{#None}
body)]
- (meta#in (list (` ("lux def" (~ (..local_symbol$ name))
+ (meta#in (list (` ("lux def" (~ (..local$ name))
(~ body)
(~ export_policy))))))
@@ -2775,14 +2775,14 @@
(macro:' .public (macro: tokens)
(case (macroP tokens)
{#Some [export_policy name args body]}
- (let [name (local_symbol$ name)
+ (let [name (local$ name)
body (case args
{#End}
body
_
(` ("lux macro"
- (function ((~ name) (~+ (list#each local_symbol$ args))) (~ body)))))]
+ (function ((~ name) (~+ (list#each local$ args))) (~ body)))))]
(meta#in (list (` ("lux def" (~ name)
(~ body)
(~ export_policy))))))
@@ -3192,10 +3192,10 @@
{#Some [export_policy name args type definitions]}
(let [usage (case args
{#End}
- (local_symbol$ name)
+ (local$ name)
_
- (` ((~ (local_symbol$ name)) (~+ args))))]
+ (` ((~ (local$ name)) (~+ args))))]
(meta#in (list (` (..def: (~ export_policy) (~ usage)
(~ type)
(..implementation
@@ -3334,7 +3334,7 @@
(do meta_monad
[type+labels?? (..type_declaration type_codes)
module_name current_module_name
- .let' [type_name (local_symbol$ name)
+ .let' [type_name (local$ name)
[type labels??] type+labels??
type' (is (Maybe Code)
(case args
@@ -3342,7 +3342,7 @@
{#Some type}
_
- {#Some (` (.All ((~ type_name) (~+ (list#each local_symbol$ args)))
+ {#Some (` (.All ((~ type_name) (~+ (list#each local$ args)))
(~ type)))}))]]
(case type'
{#Some type''}
@@ -4021,7 +4021,7 @@
(do meta_monad
[output (record_slots type)
g!_ (..generated_symbol "g!_")
- .let [g!output (local_symbol$ short)
+ .let [g!output (local$ short)
pattern (|> tags
enumeration
(list#each (function (_ [tag_idx tag])
@@ -4041,7 +4041,7 @@
(meta#in (list#conjoint decls')))
_
- (meta#in (list (` ("lux def" (~ (local_symbol$ (..module_alias (list short) alias)))
+ (meta#in (list (` ("lux def" (~ (local$ (..module_alias (list short) alias)))
(~ source+)
#0)))))))
@@ -4150,7 +4150,7 @@
(in (list)))
.let [defs (list#each (is (-> Text Code)
(function (_ def)
- (` ("lux def alias" (~ (local_symbol$ def)) (~ (symbol$ [module_name def]))))))
+ (` ("lux def alias" (~ (local$ def)) (~ (symbol$ [module_name def]))))))
defs')
openings (|> r_opens
(list#each (is (-> Openings (List Code))
@@ -4180,10 +4180,10 @@
(list (' "*"))
{#Only defs}
- (list (variant$ (list& (' "+") (list#each local_symbol$ defs))))
+ (list (variant$ (list& (' "+") (list#each local$ defs))))
{#Exclude defs}
- (list (variant$ (list& (' "-") (list#each local_symbol$ defs))))
+ (list (variant$ (list& (' "-") (list#each local$ defs))))
{#Ignore}
(list)
@@ -4192,7 +4192,7 @@
(list)))
openings (list#each (function (_ [alias structs])
(form$ (list& (text$ (..module_alias (list (alias_stand_in 0) module_alias) alias))
- (list#each local_symbol$ structs))))
+ (list#each local$ structs))))
r_opens)]
(` ((~! ..refer) (~ (text$ module_name))
(~+ localizations)
@@ -4453,7 +4453,7 @@
{#Some [name bindings body]}
(pattern (list [_ {#Tuple bindings}] body))
- {#Some [(local_symbol$ "again") bindings body]}
+ {#Some [(local$ "again") bindings body]}
_
{#None})]
@@ -4775,13 +4775,13 @@
g!compiler (..generated_symbol "compiler")
g!_ (..generated_symbol "_")
.let [rep_env (list#each (function (_ arg)
- [arg (` ((~' ~) (~ (local_symbol$ arg))))])
+ [arg (` ((~' ~) (~ (local$ arg))))])
args)]
this_module current_module_name]
(in (list (` (macro: (~ export_policy)
- ((~ (local_symbol$ name)) (~ g!tokens) (~ g!compiler))
+ ((~ (local$ name)) (~ g!tokens) (~ g!compiler))
(case (~ g!tokens)
- (pattern (list (~+ (list#each local_symbol$ args))))
+ (pattern (list (~+ (list#each local$ args))))
{.#Right [(~ g!compiler)
(list (~+ (list#each (function (_ template)
(` (`' (~ (with_replacements rep_env
@@ -5013,7 +5013,7 @@
(-> Code Code Text Code Code)
(` {.#Apply (..Primitive "")
(.All ((~ g!self) (~ g!dummy))
- (~ (let$ (local_symbol$ name) (` {.#Apply (..Primitive "") (~ g!self)})
+ (~ (let$ (local$ name) (` {.#Apply (..Primitive "") (~ g!self)})
body)))}))
(macro: .public (Rec tokens)
diff --git a/stdlib/source/library/lux/abstract/monad/indexed.lux b/stdlib/source/library/lux/abstract/monad/indexed.lux
index a6b99afc4..fb6371bad 100644
--- a/stdlib/source/library/lux/abstract/monad/indexed.lux
+++ b/stdlib/source/library/lux/abstract/monad/indexed.lux
@@ -1,6 +1,6 @@
(.using
[library
- [lux "*"
+ [lux {"-" global}
[control
["<>" parser
["<[0]>" code {"+" Parser}]]]
@@ -36,7 +36,7 @@
{#Macro Symbol Code}
{#Binding Binding}))
-(def: global_symbol
+(def: global
(Parser Symbol)
(//.do <>.monad
[[module short] <code>.symbol
@@ -45,7 +45,7 @@
(def: context
(Parser Context)
- (<>.or (<>.and ..global_symbol
+ (<>.or (<>.and ..global
<code>.any)
binding))
@@ -56,7 +56,7 @@
(def: named_monad
(Parser [(Maybe Text) Code])
(<>.either (<code>.tuple (<>.and (# <>.monad each (|>> {.#Some})
- <code>.local_symbol)
+ <code>.local)
<code>.any))
(# <>.monad each (|>> [{.#None}])
<code>.any)))
@@ -81,7 +81,7 @@
(list.reversed context))]
(in (list (case ?name
{.#Some name}
- (let [name (code.local_symbol name)]
+ (let [name (code.local name)]
(` (let [(~ name) (~ monad)
[..in (~' in)
..then (~ g!then)] (~ name)]
diff --git a/stdlib/source/library/lux/control/concatenative.lux b/stdlib/source/library/lux/control/concatenative.lux
index c4bf4c544..0f01c8d9f 100644
--- a/stdlib/source/library/lux/control/concatenative.lux
+++ b/stdlib/source/library/lux/control/concatenative.lux
@@ -36,7 +36,7 @@
(def: aliases^
(Parser (List Alias))
- (|> (<>.and <code>.local_symbol <code>.any)
+ (|> (<>.and <code>.local <code>.any)
<>.some
<code>.tuple))
@@ -82,7 +82,7 @@
(syntax: .public (=> [[aliases inputs outputs] signature^])
(let [de_alias (function (_ aliased)
(list#mix (function (_ [from to] pre)
- (code.replaced (code.local_symbol from) to pre))
+ (code.replaced (code.local from) to pre))
aliased
aliases))]
(case [(the #bottom inputs)
@@ -104,28 +104,28 @@
(-> (~ (de_alias inputC))
(~ (de_alias outputC)))))))))))))
-(def: begin!
+(def: beginning
Any
[])
-(def: end!
+(def: end
(All (_ a) (-> [Any a] a))
(function (_ [_ top])
top))
(syntax: .public (||> [commands (<>.some <code>.any)])
- (in (list (` (|> (~! ..begin!) (~+ commands) ((~! ..end!)))))))
+ (in (list (` (|> (~! ..beginning) (~+ commands) ((~! ..end)))))))
(def: word
(Parser [Code Text Code (List Code)])
(|export|.parser
($_ <>.and
- <code>.local_symbol
+ <code>.local
<code>.any
(<>.many <code>.any))))
(syntax: .public (word: [[export_policy name type commands] ..word])
- (in (list (` (def: (~ export_policy) (~ (code.local_symbol name))
+ (in (list (` (def: (~ export_policy) (~ (code.local name))
(~ type)
(|>> (~+ commands)))))))
diff --git a/stdlib/source/library/lux/control/concurrency/actor.lux b/stdlib/source/library/lux/control/concurrency/actor.lux
index bdb3db4ce..715b2b98f 100644
--- a/stdlib/source/library/lux/control/concurrency/actor.lux
+++ b/stdlib/source/library/lux/control/concurrency/actor.lux
@@ -213,8 +213,8 @@
(def: actor_decl^
(Parser [Text (List Text)])
- (<>.either (<code>.form (<>.and <code>.local_symbol (<>.some <code>.local_symbol)))
- (<>.and <code>.local_symbol (# <>.monad in (list)))))
+ (<>.either (<code>.form (<>.and <code>.local (<>.some <code>.local)))
+ (<>.and <code>.local (# <>.monad in (list)))))
(type: On_MailC
[[Text Text Text] Code])
@@ -224,11 +224,11 @@
(def: argument
(Parser Text)
- <code>.local_symbol)
+ <code>.local)
(def: on_mail^
(Parser (Maybe On_MailC))
- (<>.maybe (<code>.form (<>.and (<code>.form (<>.after (<code>.this! (' on_mail))
+ (<>.maybe (<code>.form (<>.and (<code>.form (<>.after (<code>.this (' on_mail))
($_ <>.and ..argument ..argument ..argument)))
<code>.any))))
@@ -246,9 +246,9 @@
{.#Some [[mailN stateN selfN] bodyC]}
(` (function ((~ g!_)
- (~ (code.local_symbol mailN))
- (~ (code.local_symbol stateN))
- (~ (code.local_symbol selfN)))
+ (~ (code.local mailN))
+ (~ (code.local stateN))
+ (~ (code.local selfN)))
(~ bodyC)))))
(def: actorP
@@ -263,8 +263,8 @@
(with_symbols [g!_]
(do meta.monad
[g!type (macro.symbol (format name "_abstract_type"))
- .let [g!actor (code.local_symbol name)
- g!vars (list#each code.local_symbol vars)]]
+ .let [g!actor (code.local name)
+ g!vars (list#each code.local vars)]]
(in (list (` ((~! abstract:) (~ export_policy) ((~ g!type) (~+ g!vars))
(~ state_type)
@@ -297,15 +297,15 @@
(def: signature^
(Parser Signature)
(<code>.form ($_ <>.and
- (<>.else (list) (<code>.tuple (<>.some <code>.local_symbol)))
- <code>.local_symbol
+ (<>.else (list) (<code>.tuple (<>.some <code>.local)))
+ <code>.local
|input|.parser
- <code>.local_symbol
- <code>.local_symbol)))
+ <code>.local
+ <code>.local)))
(def: reference^
(Parser [Symbol (List Text)])
- (<>.either (<code>.form (<>.and <code>.symbol (<>.some <code>.local_symbol)))
+ (<>.either (<code>.form (<>.and <code>.symbol (<>.some <code>.local)))
(<>.and <code>.symbol (# <>.monad in (list)))))
(def: messageP
@@ -320,14 +320,14 @@
(with_symbols [g!_ g!return]
(do meta.monad
[actor_scope abstract.current
- .let [g!type (code.local_symbol (the abstract.#name actor_scope))
- g!message (code.local_symbol (the #name signature))
+ .let [g!type (code.local (the abstract.#name actor_scope))
+ g!message (code.local (the #name signature))
g!actor_vars (the abstract.#type_vars actor_scope)
- g!all_vars (|> signature (the #vars) (list#each code.local_symbol) (list#composite g!actor_vars))
+ g!all_vars (|> signature (the #vars) (list#each code.local) (list#composite g!actor_vars))
g!inputsC (|> signature (the #inputs) (list#each product.left))
g!inputsT (|> signature (the #inputs) (list#each product.right))
- g!state (|> signature (the #state) code.local_symbol)
- g!self (|> signature (the #self) code.local_symbol)]]
+ g!state (|> signature (the #state) code.local)
+ g!self (|> signature (the #self) code.local)]]
(in (list (` (def: (~ export_policy) ((~ g!message) (~+ g!inputsC))
(All ((~ g!_) (~+ g!all_vars))
(-> (~+ g!inputsT)
diff --git a/stdlib/source/library/lux/control/concurrency/stm.lux b/stdlib/source/library/lux/control/concurrency/stm.lux
index 3668a2e9c..9935069d9 100644
--- a/stdlib/source/library/lux/control/concurrency/stm.lux
+++ b/stdlib/source/library/lux/control/concurrency/stm.lux
@@ -65,7 +65,7 @@
(in []))
(write! new_value var))))
- (def: .public (follow! target)
+ (def: .public (changes target)
(All (_ a) (-> (Var a) (IO [(Channel a) (Sink a)])))
(do io.monad
[.let [[channel sink] (frp.channel [])]
diff --git a/stdlib/source/library/lux/control/exception.lux b/stdlib/source/library/lux/control/exception.lux
index 3d0be75fd..3d34b95f7 100644
--- a/stdlib/source/library/lux/control/exception.lux
+++ b/stdlib/source/library/lux/control/exception.lux
@@ -81,8 +81,8 @@
(let [private (is (Parser [(List |type_variable|.Variable) [Text (List |input|.Input)] (Maybe Code)])
($_ <>.and
(<>.else (list) (<code>.tuple (<>.some |type_variable|.parser)))
- (<>.either (<code>.form (<>.and <code>.local_symbol |input|.parser))
- (<>.and <code>.local_symbol (<>#in (list))))
+ (<>.either (<code>.form (<>.and <code>.local |input|.parser))
+ (<>.and <code>.local (<>#in (list))))
(<>.maybe <code>.any)
))]
($_ <>.either
@@ -95,7 +95,7 @@
(do meta.monad
[current_module meta.current_module_name
.let [descriptor ($_ text#composite "{" current_module "." name "}" text.new_line)
- g!self (code.local_symbol name)]]
+ g!self (code.local name)]]
(in (list (` (def: (~ export_policy)
(~ g!self)
(All ((~ g!_) (~+ (list#each |type_variable|.format t_vars)))
diff --git a/stdlib/source/library/lux/control/function/inline.lux b/stdlib/source/library/lux/control/function/inline.lux
index f932b64e9..80674c8eb 100644
--- a/stdlib/source/library/lux/control/function/inline.lux
+++ b/stdlib/source/library/lux/control/function/inline.lux
@@ -17,7 +17,7 @@
(def: declaration
(Parser [Text (List Code)])
- (<code>.form (<>.and <code>.local_symbol (<>.some <code>.any))))
+ (<code>.form (<>.and <code>.local (<>.some <code>.any))))
(def: inline
(Parser [Code [Text (List Code)] Code Code])
@@ -37,7 +37,7 @@
.let [inlined (` (("lux in-module"
(~ (code.text @))
(.is (~ type)
- (.function ((~ (code.local_symbol name)) (~+ parameters))
+ (.function ((~ (code.local name)) (~+ parameters))
(~ term))))
(~+ (list#each (function (_ g!parameter)
(` ((~' ~) (~ g!parameter))))
@@ -46,5 +46,5 @@
(list#each (function (_ parameter)
(list parameter (` (~! <code>.any)))))
list#conjoint)]]
- (in (list (` ((~! syntax:) (~ privacy) ((~ (code.local_symbol name)) [(~+ g!parameters)])
+ (in (list (` ((~! syntax:) (~ privacy) ((~ (code.local name)) [(~+ g!parameters)])
(.# (~! meta.monad) (~' in) (.list (.`' (~ inlined))))))))))
diff --git a/stdlib/source/library/lux/control/function/mutual.lux b/stdlib/source/library/lux/control/function/mutual.lux
index 02f5eaabb..16506a4e3 100644
--- a/stdlib/source/library/lux/control/function/mutual.lux
+++ b/stdlib/source/library/lux/control/function/mutual.lux
@@ -59,7 +59,7 @@
(in (list body))
{.#Item mutual {.#End}}
- (.let [g!name (|> mutual (the [#declaration declaration.#name]) code.local_symbol)]
+ (.let [g!name (|> mutual (the [#declaration declaration.#name]) code.local)]
(in (list (` (.let [(~ g!name) (is (~ (the #type mutual))
(function (~ (declaration.format (the #declaration mutual)))
(~ (the #body mutual))))]
@@ -77,7 +77,7 @@
context_types (list#each (function (_ mutual)
(` (-> (~ g!context) (~ (the #type mutual)))))
functions)
- user_names (list#each (|>> (the [#declaration declaration.#name]) code.local_symbol)
+ user_names (list#each (|>> (the [#declaration declaration.#name]) code.local)
functions)]
g!pop (local.push (list#each (function (_ [g!name mutual])
[[here_name (the [#declaration declaration.#name] mutual)]
@@ -129,7 +129,7 @@
context_types (list#each (function (_ mutual)
(` (-> (~ g!context) (~ (the [#mutual #type] mutual)))))
functions)
- user_names (list#each (|>> (the [#mutual #declaration declaration.#name]) code.local_symbol)
+ user_names (list#each (|>> (the [#mutual #declaration declaration.#name]) code.local)
functions)]
g!pop (local.push (list#each (function (_ [g!name mutual])
[[here_name (the [#mutual #declaration declaration.#name] mutual)]
@@ -147,7 +147,7 @@
user_names))])))
g!pop
(list#each (function (_ mutual)
- (.let [g!name (|> mutual (the [#mutual #declaration declaration.#name]) code.local_symbol)]
+ (.let [g!name (|> mutual (the [#mutual #declaration declaration.#name]) code.local)]
(` (.def:
(~ (the #export_policy mutual))
(~ g!name)
diff --git a/stdlib/source/library/lux/control/maybe.lux b/stdlib/source/library/lux/control/maybe.lux
index 98192ffa1..4f678aecb 100644
--- a/stdlib/source/library/lux/control/maybe.lux
+++ b/stdlib/source/library/lux/control/maybe.lux
@@ -148,11 +148,11 @@
(All (_ a) (-> (Maybe a) (List a)))
(case value
{.#Some value}
- {.#Item value {.#End}}
+ (.list value)
... {.#None}
_
- {.#End}))
+ (.list)))
(macro: .public (when tokens state)
(case tokens
diff --git a/stdlib/source/library/lux/control/parser/analysis.lux b/stdlib/source/library/lux/control/parser/analysis.lux
index 2ea814f3d..b6794db76 100644
--- a/stdlib/source/library/lux/control/parser/analysis.lux
+++ b/stdlib/source/library/lux/control/parser/analysis.lux
@@ -73,7 +73,7 @@
{.#Item [head tail]}
{try.#Success [tail head]})))
-(def: .public end!
+(def: .public end
(Parser Any)
(function (_ tokens)
(case tokens
@@ -111,15 +111,15 @@
_
(exception.except ..cannot_parse input))))))]
- [bit bit! /.bit Bit bit.equivalence]
- [nat nat! /.nat Nat nat.equivalence]
- [int int! /.int Int int.equivalence]
- [rev rev! /.rev Rev rev.equivalence]
- [frac frac! /.frac Frac frac.equivalence]
- [text text! /.text Text text.equivalence]
- [local local! /.local Nat nat.equivalence]
- [foreign foreign! /.foreign Nat nat.equivalence]
- [constant constant! /.constant Symbol symbol.equivalence]
+ [bit this_bit /.bit Bit bit.equivalence]
+ [nat this_nat /.nat Nat nat.equivalence]
+ [int this_int /.int Int int.equivalence]
+ [rev this_rev /.rev Rev rev.equivalence]
+ [frac this_frac /.frac Frac frac.equivalence]
+ [text this_text /.text Text text.equivalence]
+ [local this_local /.local Nat nat.equivalence]
+ [foreign this_foreign /.foreign Nat nat.equivalence]
+ [constant this_constant /.constant Symbol symbol.equivalence]
)
(def: .public (tuple parser)
diff --git a/stdlib/source/library/lux/control/parser/code.lux b/stdlib/source/library/lux/control/parser/code.lux
index 910d7f449..6b76cd137 100644
--- a/stdlib/source/library/lux/control/parser/code.lux
+++ b/stdlib/source/library/lux/control/parser/code.lux
@@ -1,6 +1,6 @@
(.using
[library
- [lux {"-" nat int rev local not symbol}
+ [lux {"-" nat int rev local not symbol local global}
[abstract
["[0]" monad {"+" do}]]
[control
@@ -81,16 +81,16 @@
_
<failure>))))]
- [bit bit! Bit .#Bit bit.equivalence "bit"]
- [nat nat! Nat .#Nat nat.equivalence "nat"]
- [int int! Int .#Int int.equivalence "int"]
- [rev rev! Rev .#Rev rev.equivalence "rev"]
- [frac frac! Frac .#Frac frac.equivalence "frac"]
- [text text! Text .#Text text.equivalence "text"]
- [symbol symbol! Symbol .#Symbol symbol.equivalence "symbol"]
+ [bit this_bit Bit .#Bit bit.equivalence "bit"]
+ [nat this_nat Nat .#Nat nat.equivalence "nat"]
+ [int this_int Int .#Int int.equivalence "int"]
+ [rev this_rev Rev .#Rev rev.equivalence "rev"]
+ [frac this_frac Frac .#Frac frac.equivalence "frac"]
+ [text this_text Text .#Text text.equivalence "text"]
+ [symbol this_symbol Symbol .#Symbol symbol.equivalence "symbol"]
)
-(def: .public (this! code)
+(def: .public (this code)
(-> Code (Parser Any))
(function (_ tokens)
(case tokens
@@ -104,7 +104,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))})]
- (def: .public local_symbol
+ (def: .public local
(Parser Text)
(function (_ tokens)
(case tokens
@@ -114,7 +114,7 @@
_
<failure>)))
- (def: .public (local_symbol! expected)
+ (def: .public (this_local expected)
(-> Text (Parser Any))
(function (_ tokens)
(case tokens
@@ -127,7 +127,7 @@
<failure>))))
(with_expansions [<failure> (as_is {try.#Failure ($_ text#composite "Cannot parse local symbol" (remaining_inputs tokens))})]
- (def: .public global_symbol
+ (def: .public global
(Parser Symbol)
(function (_ tokens)
(case tokens
@@ -140,7 +140,7 @@
_
<failure>)))
- (def: .public (global_symbol! expected)
+ (def: .public (this_global expected)
(-> Symbol (Parser Any))
(function (_ tokens)
(case tokens
@@ -174,7 +174,7 @@
[tuple .#Tuple "tuple"]
)
-(def: .public end!
+(def: .public end
(Parser Any)
(function (_ tokens)
(case tokens
@@ -205,7 +205,7 @@
(text.interposed ", ")
(text#composite "Unconsumed inputs: "))})))
-(def: .public (local inputs parser)
+(def: .public (locally inputs parser)
(All (_ a) (-> (List Code) (Parser a) (Parser a)))
(function (_ real)
(do try.monad
diff --git a/stdlib/source/library/lux/control/parser/json.lux b/stdlib/source/library/lux/control/parser/json.lux
index c146ec5d3..130c04815 100644
--- a/stdlib/source/library/lux/control/parser/json.lux
+++ b/stdlib/source/library/lux/control/parser/json.lux
@@ -108,9 +108,9 @@
_
(//.failure (exception.error ..unexpected_value [head])))))]
- [boolean? boolean! /.Boolean bit.equivalence /.#Boolean]
- [number? number! /.Number frac.equivalence /.#Number]
- [string? string! /.String text.equivalence /.#String]
+ [boolean? this_boolean /.Boolean bit.equivalence /.#Boolean]
+ [number? this_number /.Number frac.equivalence /.#Number]
+ [string? this_string /.String text.equivalence /.#String]
)
(def: .public (nullable parser)
diff --git a/stdlib/source/library/lux/control/parser/synthesis.lux b/stdlib/source/library/lux/control/parser/synthesis.lux
index 6f59a9680..e45f311da 100644
--- a/stdlib/source/library/lux/control/parser/synthesis.lux
+++ b/stdlib/source/library/lux/control/parser/synthesis.lux
@@ -73,7 +73,7 @@
{.#Item [head tail]}
{try.#Success [tail head]})))
-(def: .public end!
+(def: .public end
(Parser Any)
(.function (_ tokens)
(case tokens
@@ -110,13 +110,13 @@
_
(exception.except ..cannot_parse input)))))]
- [bit bit! /.bit Bit bit.equivalence]
- [i64 i64! /.i64 I64 i64.equivalence]
- [f64 f64! /.f64 Frac frac.equivalence]
- [text text! /.text Text text.equivalence]
- [local local! /.variable/local Nat n.equivalence]
- [foreign foreign! /.variable/foreign Nat n.equivalence]
- [constant constant! /.constant Symbol symbol.equivalence]
+ [bit this_bit /.bit Bit bit.equivalence]
+ [i64 this_i64 /.i64 I64 i64.equivalence]
+ [f64 this_f64 /.f64 Frac frac.equivalence]
+ [text this_text /.text Text text.equivalence]
+ [local this_local /.variable/local Nat n.equivalence]
+ [foreign this_foreign /.variable/foreign Nat n.equivalence]
+ [constant this_constant /.constant Symbol symbol.equivalence]
)
(def: .public (tuple parser)
diff --git a/stdlib/source/library/lux/control/parser/text.lux b/stdlib/source/library/lux/control/parser/text.lux
index 239ddf3bc..1e380a218 100644
--- a/stdlib/source/library/lux/control/parser/text.lux
+++ b/stdlib/source/library/lux/control/parser/text.lux
@@ -24,10 +24,13 @@
(type: .public Offset
Nat)
-(def: start_offset
+(def: beginning
Offset
0)
+(exception: .public cannot_parse)
+(exception: .public cannot_slice)
+
(type: .public Parser
(//.Parser [Offset Text]))
@@ -36,6 +39,18 @@
[#basis Offset
#distance Offset]))
+(def: .public (slice parser)
+ (-> (Parser Slice) (Parser Text))
+ (do //.monad
+ [[basis distance] parser]
+ (function (_ (^.let input [offset tape]))
+ (case (/.clip basis distance tape)
+ {.#Some output}
+ {try.#Success [input output]}
+
+ {.#None}
+ (exception.except ..cannot_slice [])))))
+
(def: (left_over offset tape)
(-> Offset Text Text)
(|> tape (/.clip_since offset) maybe.trusted))
@@ -53,12 +68,9 @@
"Offset" (n#encoded offset)
"Input" (..left_over offset tape)))
-(exception: .public cannot_parse)
-(exception: .public cannot_slice)
-
(def: .public (result parser input)
(All (_ a) (-> (Parser a) Text (Try a)))
- (case (parser [start_offset input])
+ (case (parser [..beginning input])
{try.#Failure msg}
{try.#Failure msg}
@@ -138,7 +150,7 @@
_
(exception.except ..cannot_match [reference]))))
-(def: .public end!
+(def: .public end
(Parser Any)
(function (_ (^.let input [offset tape]))
(if (n.= offset (/.size tape))
@@ -170,31 +182,51 @@
(n.<= top char')))]
(in char)))
-(template [<name> <bottom> <top> <desc>]
- [(def: .public <name>
- (Parser Text)
- (..range (char <bottom>) (char <top>)))]
+(def: .public (range! bottom top)
+ (-> Nat Nat (Parser Slice))
+ (do //.monad
+ [it ..any!
+ char (..slice (in it))
+ .let [char' (maybe.trusted (/.char 0 char))]
+ _ (//.assertion ($_ /#composite "Character is not within range: " (/.of_char bottom) "-" (/.of_char top))
+ (.and (n.>= bottom char')
+ (n.<= top char')))]
+ (in it)))
- [upper "A" "Z" "uppercase"]
- [lower "a" "z" "lowercase"]
- [decimal "0" "9" "decimal"]
- [octal "0" "7" "octal"]
+(template [<bottom> <top> <text> <slice>]
+ [(def: .public <text>
+ (Parser Text)
+ (..range (char <bottom>) (char <top>)))
+
+ (def: .public <slice>
+ (Parser Slice)
+ (..range! (char <bottom>) (char <top>)))]
+
+ ["A" "Z" upper upper!]
+ ["a" "z" lower lower!]
+ ["0" "9" decimal decimal!]
+ ["0" "7" octal octal!]
)
-(def: .public alpha
- (Parser Text)
- (//.either lower upper))
+(def: .public alpha (Parser Text) (//.either ..lower ..upper))
+(def: .public alpha! (Parser Slice) (//.either ..lower! ..upper!))
-(def: .public alpha_num
- (Parser Text)
- (//.either alpha decimal))
+(def: .public alpha_num (Parser Text) (//.either ..alpha ..decimal))
+(def: .public alpha_num! (Parser Slice) (//.either ..alpha! ..decimal!))
(def: .public hexadecimal
(Parser Text)
($_ //.either
- decimal
- (range (char "a") (char "f"))
- (range (char "A") (char "F"))))
+ ..decimal
+ (..range (char "a") (char "f"))
+ (..range (char "A") (char "F"))))
+
+(def: .public hexadecimal!
+ (Parser Slice)
+ ($_ //.either
+ ..decimal!
+ (..range! (char "a") (char "f"))
+ (..range! (char "A") (char "F"))))
(template [<name>]
[(exception: .public (<name> [options Text
@@ -261,10 +293,27 @@
_
(exception.except ..cannot_parse []))))
+(def: .public (satisfies! parser)
+ (-> (-> Char Bit) (Parser Slice))
+ (function (_ [offset tape])
+ (case (/.char offset tape)
+ {.#Some output}
+ (if (parser output)
+ {try.#Success [[("lux i64 +" 1 offset) tape]
+ [#basis offset #distance 1]]}
+ (exception.except ..character_does_not_satisfy_predicate [output]))
+
+ _
+ (exception.except ..cannot_parse []))))
+
(def: .public space
(Parser Text)
(..satisfies /.space?))
+(def: .public space!
+ (Parser Slice)
+ (..satisfies! /.space?))
+
(def: .public (and left right)
(-> (Parser Text) (Parser Text) (Parser Text))
(do //.monad
@@ -275,9 +324,9 @@
(def: .public (and! left right)
(-> (Parser Slice) (Parser Slice) (Parser Slice))
(do //.monad
- [[left::basis left::distance] left
- [right::basis right::distance] right]
- (in [left::basis ("lux i64 +" left::distance right::distance)])))
+ [(open "left[0]") left
+ (open "right[0]") right]
+ (in [left#basis ("lux i64 +" left#distance right#distance)])))
(template [<name> <base> <doc_modifier>]
[(def: .public (<name> parser)
@@ -347,18 +396,6 @@
{try.#Success value}
{try.#Success [real_input value]})))
-(def: .public (slice parser)
- (-> (Parser Slice) (Parser Text))
- (do //.monad
- [[basis distance] parser]
- (function (_ (^.let input [offset tape]))
- (case (/.clip basis distance tape)
- {.#Some output}
- {try.#Success [input output]}
-
- {.#None}
- (exception.except ..cannot_slice [])))))
-
(def: .public (then structured text)
(All (_ s a)
(-> (Parser a)
diff --git a/stdlib/source/library/lux/control/parser/type.lux b/stdlib/source/library/lux/control/parser/type.lux
index 3e772e237..d13f44b21 100644
--- a/stdlib/source/library/lux/control/parser/type.lux
+++ b/stdlib/source/library/lux/control/parser/type.lux
@@ -137,7 +137,7 @@
(def: (label idx)
(-> Nat Code)
- (code.local_symbol ($_ text#composite "label" text.tab (n#encoded idx))))
+ (code.local ($_ text#composite "label" text.tab (n#encoded idx))))
(def: .public (with_extension type poly)
(All (_ a) (-> Type (Parser a) (Parser [Code a])))
@@ -270,7 +270,7 @@
_
(//.failure (exception.error ..not_parameter headT)))))
-(def: .public (parameter! id)
+(def: .public (this_parameter id)
(-> Nat (Parser Any))
(do //.monad
[env ..env
@@ -341,7 +341,7 @@
(do [! //.monad]
[env ..env
[funcT argsT] (..applied (//.and any (//.many any)))
- _ (local (list funcT) (..parameter! 0))
+ _ (local (list funcT) (..this_parameter 0))
allC (let [allT (list& funcT argsT)]
(|> allT
(monad.each ! (function.constant ..parameter))
diff --git a/stdlib/source/library/lux/control/security/capability.lux b/stdlib/source/library/lux/control/security/capability.lux
index b23ddf2e6..322f2cf5b 100644
--- a/stdlib/source/library/lux/control/security/capability.lux
+++ b/stdlib/source/library/lux/control/security/capability.lux
@@ -43,7 +43,7 @@
(|export|.parser
($_ <>.and
|declaration|.parser
- (<c>.form ($_ <>.and <c>.local_symbol <c>.any <c>.any))))])
+ (<c>.form ($_ <>.and <c>.local <c>.any <c>.any))))])
(macro.with_symbols [g!_]
(do [! meta.monad]
[this_module meta.current_module_name
@@ -54,8 +54,8 @@
(in (list (` (type: (~ export_policy)
(~ (|declaration|.format declaration))
(~ capability)))
- (` (def: (~ (code.local_symbol forger))
- (All ((~ g!_) (~+ (list#each code.local_symbol vars)))
+ (` (def: (~ (code.local forger))
+ (All ((~ g!_) (~+ (list#each code.local vars)))
(-> (-> (~ input) (~ output))
(~ capability)))
(~! ..capability)))
diff --git a/stdlib/source/library/lux/data/format/css/property.lux b/stdlib/source/library/lux/data/format/css/property.lux
index 65b4bfd5f..944701b7a 100644
--- a/stdlib/source/library/lux/data/format/css/property.lux
+++ b/stdlib/source/library/lux/data/format/css/property.lux
@@ -55,7 +55,7 @@
Z_Index}]])
(syntax: (text_symbol [symbol s.text])
- (in (list (code.local_symbol (text.replaced "-" "_" symbol)))))
+ (in (list (code.local (text.replaced "-" "_" symbol)))))
(abstract: .public (Property brand)
Text
diff --git a/stdlib/source/library/lux/data/format/css/query.lux b/stdlib/source/library/lux/data/format/css/query.lux
index 7e2272c4a..afcd0740b 100644
--- a/stdlib/source/library/lux/data/format/css/query.lux
+++ b/stdlib/source/library/lux/data/format/css/query.lux
@@ -22,7 +22,7 @@
Light Scripting Motion Color_Scheme}]])
(syntax: (text_symbol [symbol s.text])
- (in (list (code.local_symbol (text.replaced "-" "_" symbol)))))
+ (in (list (code.local (text.replaced "-" "_" symbol)))))
(abstract: .public Media
Text
diff --git a/stdlib/source/library/lux/data/format/css/value.lux b/stdlib/source/library/lux/data/format/css/value.lux
index dad95e9b8..8318ffe71 100644
--- a/stdlib/source/library/lux/data/format/css/value.lux
+++ b/stdlib/source/library/lux/data/format/css/value.lux
@@ -30,7 +30,7 @@
[selector {"+" Label}]])
(syntax: (text_symbol [symbol <code>.text])
- (in (list (code.local_symbol (text.replaced "-" "_" symbol)))))
+ (in (list (code.local (text.replaced "-" "_" symbol)))))
(template: (enumeration: <abstraction> <representation> <out> <sample>+ <definition>+)
[(abstract: .public <abstraction>
diff --git a/stdlib/source/library/lux/data/format/xml.lux b/stdlib/source/library/lux/data/format/xml.lux
index 2459936a2..b7e3fd2e3 100644
--- a/stdlib/source/library/lux/data/format/xml.lux
+++ b/stdlib/source/library/lux/data/format/xml.lux
@@ -8,7 +8,7 @@
[control
[try {"+" Try}]
["<>" parser ("[1]#[0]" monad)
- ["<[0]>" text {"+" Parser}]]]
+ ["<[0]>" text {"+" Parser Slice}]]]
[data
["[0]" product]
["[0]" text {"+" \n} ("[1]#[0]" equivalence monoid)]
@@ -56,15 +56,18 @@
(def: xml_unicode_escape_char^
(Parser Text)
- (|> (do <>.monad
- [hex? (<>.maybe (<text>.this "x"))
- code (case hex?
- {.#None}
- (<>.codec int.decimal (<text>.many <text>.decimal))
-
- {.#Some _}
- (<>.codec int.decimal (<text>.many <text>.hexadecimal)))]
- (in (|> code .nat text.of_char)))
+ (|> (do [! <>.monad]
+ [hex? (<>.maybe (<text>.this "x"))]
+ (<| (# ! each (|>> .nat text.of_char))
+ (<>.codec int.decimal)
+ <text>.slice
+ <text>.many!
+ (case hex?
+ {.#None}
+ <text>.decimal!
+
+ {.#Some _}
+ <text>.hexadecimal!)))
(<>.before (<text>.this ";"))
(<>.after (<text>.this "&#"))))
@@ -80,12 +83,12 @@
(def: xml_identifier
(Parser Text)
- (do <>.monad
- [head (<>.either (<text>.one_of "_")
- <text>.alpha)
- tail (<text>.some (<>.either (<text>.one_of "_.-")
- <text>.alpha_num))]
- (in ($_ text#composite head tail))))
+ (<text>.slice
+ ($_ <text>.and!
+ (<>.either (<text>.one_of! "_")
+ <text>.alpha!)
+ (<text>.some! (<>.either (<text>.one_of! "_.-")
+ <text>.alpha_num!)))))
(def: namespaced_symbol^
(Parser Symbol)
@@ -135,9 +138,9 @@
(symbol#= expected actual))))
(def: comment^
- (Parser Text)
- (|> (<text>.not (<text>.this "--"))
- <text>.some
+ (Parser Slice)
+ (|> (<text>.not! (<text>.this "--"))
+ <text>.some!
(<text>.enclosed ["<!--" "-->"])
..spaced^))
@@ -149,9 +152,9 @@
..spaced^))
(def: cdata^
- (Parser Text)
+ (Parser Slice)
(let [end (<text>.this "]]>")]
- (|> (<text>.some (<text>.not end))
+ (|> (<text>.some! (<text>.not! end))
(<>.after end)
(<>.after (<text>.this "<![CDATA["))
..spaced^)))
@@ -159,7 +162,7 @@
(def: text^
(Parser XML)
(|> (..spaced^ (<text>.many xml_char^))
- (<>.either cdata^)
+ (<>.either (<text>.slice cdata^))
(<>#each (|>> {#Text}))))
(def: null^
@@ -180,7 +183,7 @@
(in {#Node tag attrs (list)}))
(do <>.monad
[_ (<text>.this ">")
- _ (<>.some (<>.either <text>.space
+ _ (<>.some (<>.either <text>.space!
..comment^))
_ (..close_tag^ tag)]
(in {#Node tag attrs (list)})))
diff --git a/stdlib/source/library/lux/debug.lux b/stdlib/source/library/lux/debug.lux
index 987a25120..79a8b16e1 100644
--- a/stdlib/source/library/lux/debug.lux
+++ b/stdlib/source/library/lux/debug.lux
@@ -549,9 +549,9 @@
(def: target
(<code>.Parser Target)
- (<>.either (<>.and <code>.local_symbol
+ (<>.either (<>.and <code>.local
(# <>.monad in {.#None}))
- (<code>.tuple (<>.and <code>.local_symbol
+ (<code>.tuple (<>.and <code>.local
(# <>.monad each (|>> {.#Some}) <code>.any)))))
(exception: .public (unknown_local_binding [name Text])
@@ -597,5 +597,5 @@
{.#Some format}
format)]
(list (code.text name)
- (` ((~ format) (~ (code.local_symbol name))))))))
+ (` ((~ format) (~ (code.local name))))))))
list#conjoint))))))))))
diff --git a/stdlib/source/library/lux/documentation.lux b/stdlib/source/library/lux/documentation.lux
index 3d4cdcced..8a78ca8e6 100644
--- a/stdlib/source/library/lux/documentation.lux
+++ b/stdlib/source/library/lux/documentation.lux
@@ -447,7 +447,7 @@
(def: description
(Parser (Maybe Code))
- (<>.or (<code>.text! "")
+ (<>.or (<code>.this_text "")
<code>.any))
(exception: .public (unqualified_symbol [name Symbol])
@@ -496,7 +496,7 @@
(Parser Declaration)
(<>.either (<>.and ..qualified_symbol (<>#in (list)))
(<code>.form (<>.and ..qualified_symbol
- (<>.some (<code>.local_symbol))))))
+ (<>.some (<code>.local))))))
(syntax: (minimal_definition_documentation
[[name parameters] ..declaration])
@@ -509,13 +509,13 @@
(in (list (` ($_ ((~! md.then))
... Name
(<| ((~! md.heading/3))
- (~ (code.text (%.code (let [g!name (|> name product.right code.local_symbol)]
+ (~ (code.text (%.code (let [g!name (|> name product.right code.local)]
(case parameters
{.#End}
g!name
_
- (` ((~ g!name) (~+ (list#each code.local_symbol parameters))))))))))
+ (` ((~ g!name) (~+ (list#each code.local parameters))))))))))
... Type
(let [(~ g!type) ("lux in-module"
(~ g!module)
@@ -545,7 +545,7 @@
(in (list (` ($_ ((~! md.then))
((~! ..minimal_definition_documentation)
((~ (code.symbol name))
- (~+ (list#each code.local_symbol parameters))))
+ (~+ (list#each code.local parameters))))
... Description
(~+ (case description
{.#Some description}
@@ -586,17 +586,17 @@
(list [..#definition (~ (code.text short))
..#documentation ((~! ..minimal_definition_documentation)
((~ (code.symbol name))
- (~+ (list#each code.local_symbol parameters))))])))))))
+ (~+ (list#each code.local parameters))))])))))))
(syntax: .public (documentation: [[name parameters] ..declaration
extra (<>.some <code>.any)])
(let [[_ short] name]
- (in (list (` (.def: .public (~ (code.local_symbol short))
+ (in (list (` (.def: .public (~ (code.local short))
(.List ..Definition)
(.list [..#definition (~ (code.text short))
..#documentation ((~! ..definition_documentation)
((~ (code.symbol name))
- (~+ (list#each code.local_symbol parameters)))
+ (~+ (list#each code.local parameters)))
(~+ extra))])))))))
(def: definitions_documentation
diff --git a/stdlib/source/library/lux/extension.lux b/stdlib/source/library/lux/extension.lux
index 2e2c74f23..b41d45138 100644
--- a/stdlib/source/library/lux/extension.lux
+++ b/stdlib/source/library/lux/extension.lux
@@ -31,17 +31,17 @@
(-> Code (Parser Declaration))
(<c>.form ($_ <>.and
<c>.any
- <c>.local_symbol
- <c>.local_symbol
- <c>.local_symbol
+ <c>.local
+ <c>.local
+ <c>.local
(<c>.tuple (<>.some <c>.any)))))
(template [<any> <end> <and> <result> <extension> <name>]
[(syntax: .public (<name> [[name extension phase archive inputs] (..declaration (` <any>))
body <c>.any])
- (let [g!name (code.local_symbol extension)
- g!phase (code.local_symbol phase)
- g!archive (code.local_symbol archive)]
+ (let [g!name (code.local extension)
+ g!phase (code.local phase)
+ g!archive (code.local archive)]
(with_symbols [g!handler g!inputs g!error g!_]
(in (list (` (<extension> (~ name)
(.function ((~ g!handler) (~ g!name) (~ g!phase) (~ g!archive) (~ g!inputs))
@@ -58,8 +58,8 @@
((~! phase.failure) (~ g!error)))
))))))))]
- [<c>.any <c>.end! <c>.and <c>.result "lux def analysis" analysis:]
- [<a>.any <a>.end! <a>.and <a>.result "lux def synthesis" synthesis:]
- [<s>.any <s>.end! <s>.and <s>.result "lux def generation" generation:]
- [<c>.any <c>.end! <c>.and <c>.result "lux def directive" directive:]
+ [<c>.any <c>.end <c>.and <c>.result "lux def analysis" analysis:]
+ [<a>.any <a>.end <a>.and <a>.result "lux def synthesis" synthesis:]
+ [<s>.any <s>.end <s>.and <s>.result "lux def generation" generation:]
+ [<c>.any <c>.end <c>.and <c>.result "lux def directive" directive:]
)
diff --git a/stdlib/source/library/lux/ffi.jvm.lux b/stdlib/source/library/lux/ffi.jvm.lux
index 446f2e738..67932ee7c 100644
--- a/stdlib/source/library/lux/ffi.jvm.lux
+++ b/stdlib/source/library/lux/ffi.jvm.lux
@@ -410,27 +410,27 @@
(-> Text Text (Parser Code))
(do <>.monad
[.let [dotted_name (format "::" field_name)]
- _ (<code>.this! (code.symbol ["" dotted_name]))]
+ _ (<code>.this (code.symbol ["" dotted_name]))]
(in (get_static_field class_name field_name))))
(def: (get_var_parser class_name field_name self_name)
(-> Text Text Text (Parser Code))
(do <>.monad
[.let [dotted_name (format "::" field_name)]
- _ (<code>.this! (code.symbol ["" dotted_name]))]
- (in (get_virtual_field class_name field_name (code.local_symbol self_name)))))
+ _ (<code>.this (code.symbol ["" dotted_name]))]
+ (in (get_virtual_field class_name field_name (code.local self_name)))))
(def: (put_var_parser class_name field_name self_name)
(-> Text Text Text (Parser Code))
(do <>.monad
[.let [dotted_name (format "::" field_name)]
[_ _ value] (is (Parser [Any Any Code])
- (<code>.form ($_ <>.and (<code>.this! (' :=)) (<code>.this! (code.symbol ["" dotted_name])) <code>.any)))]
+ (<code>.form ($_ <>.and (<code>.this (' :=)) (<code>.this (code.symbol ["" dotted_name])) <code>.any)))]
(in (`' ("jvm member put virtual"
(~ (code.text class_name))
(~ (code.text field_name))
(~ value)
- (~ (code.local_symbol self_name)))))))
+ (~ (code.local self_name)))))))
(def: (replaced f input)
(-> (-> Code Code) Code Code)
@@ -473,7 +473,7 @@
(-> Text (List Argument) (Parser Code))
(do <>.monad
[args (is (Parser (List Code))
- (<code>.form (<>.after (<code>.this! (' ::new!))
+ (<code>.form (<>.after (<code>.this (' ::new!))
(<code>.tuple (<>.exactly (list.size arguments) <code>.any)))))]
(in (` ("jvm member invoke constructor" (~ (code.text class_name))
(~+ (|> args
@@ -485,7 +485,7 @@
(do <>.monad
[.let [dotted_name (format "::" method_name "!")]
args (is (Parser (List Code))
- (<code>.form (<>.after (<code>.this! (code.symbol ["" dotted_name]))
+ (<code>.form (<>.after (<code>.this (code.symbol ["" dotted_name]))
(<code>.tuple (<>.exactly (list.size arguments) <code>.any)))))]
(in (` ("jvm member invoke static" (~ (code.text class_name)) (~ (code.text method_name))
(~+ (|> args
@@ -498,12 +498,12 @@
(do <>.monad
[.let [dotted_name (format "::" method_name "!")]
args (is (Parser (List Code))
- (<code>.form (<>.after (<code>.this! (code.symbol ["" dotted_name]))
+ (<code>.form (<>.after (<code>.this (code.symbol ["" dotted_name]))
(<code>.tuple (<>.exactly (list.size arguments) <code>.any)))))]
(in (` (<jvm_op> [(~+ (list#each (|>> ..signature code.text) class_vars))]
(~ (code.text class_name)) (~ (code.text method_name))
[(~+ (list#each (|>> ..signature code.text) type_vars))]
- (~ (code.local_symbol self_name))
+ (~ (code.local self_name))
(~+ (|> args
(list.zipped/2 (list#each product.right arguments))
(list#each ..decorate_input))))))))]
@@ -537,17 +537,17 @@
(Parser Privacy)
(let [(open "[0]") <>.monad]
($_ <>.or
- (<code>.this! (' "public"))
- (<code>.this! (' "private"))
- (<code>.this! (' "protected"))
+ (<code>.this (' "public"))
+ (<code>.this (' "private"))
+ (<code>.this (' "protected"))
(in []))))
(def: inheritance_modifier^
(Parser Inheritance)
(let [(open "[0]") <>.monad]
($_ <>.or
- (<code>.this! (' "final"))
- (<code>.this! (' "abstract"))
+ (<code>.this (' "final"))
+ (<code>.this (' "abstract"))
(in []))))
(exception: .public (class_names_cannot_contain_periods [name Text])
@@ -568,7 +568,7 @@
(def: (valid_class_name type_vars)
(-> (List (Type Var)) (Parser External))
(do <>.monad
- [name <code>.local_symbol
+ [name <code>.local
_ (..assertion ..class_names_cannot_contain_periods [name]
(not (text.contains? name.external_separator name)))
_ (..assertion ..class_name_cannot_be_a_type_variable [name type_vars]
@@ -597,7 +597,7 @@
(def: (type_variable options)
(-> (List (Type Var)) (Parser (Type Parameter)))
(do <>.monad
- [name <code>.local_symbol
+ [name <code>.local
_ (..assertion ..unknown_type_variable [name options]
(list.member? text.equivalence (list#each parser.name options) name))]
(in (jvm.var name))))
@@ -605,13 +605,13 @@
(def: wildcard^
(Parser (Type Parameter))
(do <>.monad
- [_ (<code>.this! (' ?))]
+ [_ (<code>.this (' ?))]
(in jvm.wildcard)))
(template [<name> <comparison> <constructor>]
[(def: <name>
(-> (Parser (Type Class)) (Parser (Type Parameter)))
- (|>> (<>.after (<code>.this! (' <comparison>)))
+ (|>> (<>.after (<code>.this (' <comparison>)))
(<>.after ..wildcard^)
<code>.tuple
(# <>.monad each <constructor>)))]
@@ -638,7 +638,7 @@
(-> (Type (<| Return' Value' category))
(Parser (Type (<| Return' Value' category)))))
(do <>.monad
- [_ (<code>.symbol! ["" (..reflection type)])]
+ [_ (<code>.this_symbol ["" (..reflection type)])]
(in type)))
(def: primitive^
@@ -672,7 +672,7 @@
(def: void^
(Parser (Type Void))
(do <>.monad
- [_ (<code>.symbol! ["" (reflection.reflection reflection.void)])]
+ [_ (<code>.this_symbol ["" (reflection.reflection reflection.void)])]
(in jvm.void)))
(def: (return^ type_vars)
@@ -682,7 +682,7 @@
(def: var^
(Parser (Type Var))
- (# <>.monad each jvm.var <code>.local_symbol))
+ (# <>.monad each jvm.var <code>.local))
(def: vars^
(Parser (List (Type Var)))
@@ -710,23 +710,23 @@
(def: annotation^
(Parser Annotation)
(<>.either (do <>.monad
- [ann_name <code>.local_symbol]
+ [ann_name <code>.local]
(in [ann_name (list)]))
- (<code>.form (<>.and <code>.local_symbol
+ (<code>.form (<>.and <code>.local
annotation_parameters^))))
(def: annotations^
(Parser (List Annotation))
(<| (<>.else (list))
(do <>.monad
- [_ (<code>.this! (' "ann"))]
+ [_ (<code>.this (' "ann"))]
(<code>.tuple (<>.some ..annotation^)))))
(def: (throws_decl^ type_vars)
(-> (List (Type Var)) (Parser (List (Type Class))))
(<| (<>.else (list))
(do <>.monad
- [_ (<code>.this! (' "throws"))]
+ [_ (<code>.this (' "throws"))]
(<code>.tuple (<>.some (..class^ type_vars))))))
(def: (method_decl^ type_vars)
@@ -734,7 +734,7 @@
(<code>.form (do <>.monad
[tvars (<>.else (list) ..vars^)
.let [total_vars (list#composite tvars type_vars)]
- name <code>.local_symbol
+ name <code>.local
anns ..annotations^
inputs (<code>.tuple (<>.some (..type^ total_vars)))
output (..return^ total_vars)
@@ -747,15 +747,15 @@
(def: state_modifier^
(Parser State)
($_ <>.or
- (<code>.this! (' "volatile"))
- (<code>.this! (' "final"))
+ (<code>.this (' "volatile"))
+ (<code>.this (' "final"))
(# <>.monad in [])))
(def: (field_decl^ type_vars)
(-> (List (Type Var)) (Parser [Member_Declaration FieldDecl]))
(<>.either (<code>.form (do <>.monad
- [_ (<code>.this! (' "const"))
- name <code>.local_symbol
+ [_ (<code>.this (' "const"))
+ name <code>.local
anns ..annotations^
type (..type^ type_vars)
body <code>.any]
@@ -763,15 +763,15 @@
(<code>.form (do <>.monad
[pm privacy_modifier^
sm state_modifier^
- static? (<>.parses? (<code>.this! (' "static")))
- name <code>.local_symbol
+ static? (<>.parses? (<code>.this (' "static")))
+ name <code>.local
anns ..annotations^
type (..type^ type_vars)]
(in [[name pm anns] {#VariableField [sm static? type]}])))))
(def: (argument^ type_vars)
(-> (List (Type Var)) (Parser Argument))
- (<>.and <code>.local_symbol
+ (<>.and <code>.local
(..type^ type_vars)))
(def: (arguments^ type_vars)
@@ -790,12 +790,12 @@
(-> (List (Type Var)) (Parser [Member_Declaration Method_Definition]))
(<code>.form (do <>.monad
[pm privacy_modifier^
- strict_fp? (<>.parses? (<code>.text! "strict"))
+ strict_fp? (<>.parses? (<code>.this_text "strict"))
method_vars (<>.else (list) ..vars^)
.let [total_vars (list#composite class_vars method_vars)]
[_ self_name arguments] (<code>.form ($_ <>.and
- (<code>.this! (' new))
- <code>.local_symbol
+ (<code>.this (' new))
+ <code>.local
(..arguments^ total_vars)))
constructor_args (..constructor_args^ total_vars)
exs (throws_decl^ total_vars)
@@ -810,13 +810,13 @@
(-> (List (Type Var)) (Parser [Member_Declaration Method_Definition]))
(<code>.form (do <>.monad
[pm privacy_modifier^
- strict_fp? (<>.parses? (<code>.this! (' "strict")))
- final? (<>.parses? (<code>.this! (' "final")))
+ strict_fp? (<>.parses? (<code>.this (' "strict")))
+ final? (<>.parses? (<code>.this (' "final")))
method_vars (<>.else (list) ..vars^)
.let [total_vars (list#composite class_vars method_vars)]
[name self_name arguments] (<code>.form ($_ <>.and
- <code>.local_symbol
- <code>.local_symbol
+ <code>.local
+ <code>.local
(..arguments^ total_vars)))
return_type (..return^ total_vars)
exs (throws_decl^ total_vars)
@@ -830,14 +830,14 @@
(def: overriden_method_def^
(Parser [Member_Declaration Method_Definition])
(<code>.form (do <>.monad
- [strict_fp? (<>.parses? (<code>.this! (' "strict")))
+ [strict_fp? (<>.parses? (<code>.this (' "strict")))
owner_class ..declaration^
method_vars (<>.else (list) ..vars^)
.let [total_vars (list#composite (product.right (parser.declaration owner_class))
method_vars)]
[name self_name arguments] (<code>.form ($_ <>.and
- <code>.local_symbol
- <code>.local_symbol
+ <code>.local
+ <code>.local
(..arguments^ total_vars)))
return_type (..return^ total_vars)
exs (throws_decl^ total_vars)
@@ -852,11 +852,11 @@
(Parser [Member_Declaration Method_Definition])
(<code>.form (do <>.monad
[pm privacy_modifier^
- strict_fp? (<>.parses? (<code>.this! (' "strict")))
- _ (<code>.this! (' "static"))
+ strict_fp? (<>.parses? (<code>.this (' "strict")))
+ _ (<code>.this (' "static"))
method_vars (<>.else (list) ..vars^)
.let [total_vars method_vars]
- [name arguments] (<code>.form (<>.and <code>.local_symbol
+ [name arguments] (<code>.form (<>.and <code>.local
(..arguments^ total_vars)))
return_type (..return^ total_vars)
exs (throws_decl^ total_vars)
@@ -871,10 +871,10 @@
(Parser [Member_Declaration Method_Definition])
(<code>.form (do <>.monad
[pm privacy_modifier^
- _ (<code>.this! (' "abstract"))
+ _ (<code>.this (' "abstract"))
method_vars (<>.else (list) ..vars^)
.let [total_vars method_vars]
- [name arguments] (<code>.form (<>.and <code>.local_symbol
+ [name arguments] (<code>.form (<>.and <code>.local
(..arguments^ total_vars)))
return_type (..return^ total_vars)
exs (throws_decl^ total_vars)
@@ -888,10 +888,10 @@
(Parser [Member_Declaration Method_Definition])
(<code>.form (do <>.monad
[pm privacy_modifier^
- _ (<code>.this! (' "native"))
+ _ (<code>.this (' "native"))
method_vars (<>.else (list) ..vars^)
.let [total_vars method_vars]
- [name arguments] (<code>.form (<>.and <code>.local_symbol
+ [name arguments] (<code>.form (<>.and <code>.local
(..arguments^ total_vars)))
return_type (..return^ total_vars)
exs (throws_decl^ total_vars)
@@ -918,36 +918,36 @@
(def: import_member_alias^
(Parser (Maybe Text))
(<>.maybe (do <>.monad
- [_ (<code>.this! (' "as"))]
- <code>.local_symbol)))
+ [_ (<code>.this (' "as"))]
+ <code>.local)))
(def: (import_member_args^ type_vars)
(-> (List (Type Var)) (Parser (List [Bit (Type Value)])))
- (<code>.tuple (<>.some (<>.and (<>.parses? (<code>.this! (' "?")))
+ (<code>.tuple (<>.some (<>.and (<>.parses? (<code>.this (' "?")))
(..type^ type_vars)))))
(def: import_member_return_flags^
(Parser [Bit Bit Bit])
($_ <>.and
- (<>.parses? (<code>.this! (' "io")))
- (<>.parses? (<code>.this! (' "try")))
- (<>.parses? (<code>.this! (' "?")))))
+ (<>.parses? (<code>.this (' "io")))
+ (<>.parses? (<code>.this (' "try")))
+ (<>.parses? (<code>.this (' "?")))))
(def: primitive_mode^
(Parser Primitive_Mode)
- (<>.or (<code>.this! (' "manual"))
- (<code>.this! (' "auto"))))
+ (<>.or (<code>.this (' "manual"))
+ (<code>.this (' "auto"))))
(def: (import_member_decl^ owner_vars)
(-> (List (Type Var)) (Parser Import_Member_Declaration))
($_ <>.either
(<code>.form (do <>.monad
- [_ (<code>.this! (' "enum"))
- enum_members (<>.some <code>.local_symbol)]
+ [_ (<code>.this (' "enum"))
+ enum_members (<>.some <code>.local)]
(in {#EnumDecl enum_members})))
(<code>.form (do <>.monad
[tvars (<>.else (list) ..vars^)
- _ (<code>.symbol! ["" "new"])
+ _ (<code>.this_symbol ["" "new"])
?alias import_member_alias^
.let [total_vars (list#composite owner_vars tvars)]
?prim_mode (<>.maybe primitive_mode^)
@@ -965,10 +965,10 @@
))
(<code>.form (do <>.monad
[kind (is (Parser ImportMethodKind)
- (<>.or (<code>.this! (' "static"))
+ (<>.or (<code>.this (' "static"))
(in [])))
tvars (<>.else (list) ..vars^)
- name <code>.local_symbol
+ name <code>.local
?alias import_member_alias^
.let [total_vars (list#composite owner_vars tvars)]
?prim_mode (<>.maybe primitive_mode^)
@@ -986,12 +986,12 @@
[#import_method_name name
#import_method_return return]]})))
(<code>.form (do <>.monad
- [static? (<>.parses? (<code>.this! (' "static")))
- name <code>.local_symbol
+ [static? (<>.parses? (<code>.this (' "static")))
+ name <code>.local
?prim_mode (<>.maybe primitive_mode^)
gtype (..type^ owner_vars)
- maybe? (<>.parses? (<code>.this! (' "?")))
- setter? (<>.parses? (<code>.this! (' #!)))]
+ maybe? (<>.parses? (<code>.this (' "?")))
+ setter? (<>.parses? (<code>.this (' #!)))]
(in {#FieldAccessDecl [#import_field_mode (maybe.else {#AutoPrM} ?prim_mode)
#import_field_name name
#import_field_static? static?
@@ -1038,7 +1038,7 @@
(def: var$'
(-> (Type Var) Code)
- (|>> ..signature code.local_symbol))
+ (|>> ..signature code.local))
(def: (method_decl$ [[name pm anns] method_decl])
(-> [Member_Declaration MethodDecl] Code)
@@ -1128,14 +1128,14 @@
(list#mix <>.either method_parser)
parser->replacer)
super_replacer (parser->replacer (<code>.form (do <>.monad
- [_ (<code>.this! (' ::super!))
+ [_ (<code>.this (' ::super!))
args (<code>.tuple (<>.exactly (list.size arguments) <code>.any))]
(in (` ("jvm member invoke special"
[(~+ (list#each (|>> ..signature code.text) (product.right (parser.declaration declaration))))]
(~ (code.text (product.left (parser.read_class super_class))))
(~ (code.text name))
[(~+ (list#each (|>> ..signature code.text) type_vars))]
- ("jvm object cast" (~ (code.local_symbol self_name)))
+ ("jvm object cast" (~ (code.local self_name)))
(~+ (|> args
(list#each (|>> ~ "jvm object cast" `))
(list.zipped/2 (list#each product.right arguments))
diff --git a/stdlib/source/library/lux/ffi.lux b/stdlib/source/library/lux/ffi.lux
index 6554a4082..8a9c74362 100644
--- a/stdlib/source/library/lux/ffi.lux
+++ b/stdlib/source/library/lux/ffi.lux
@@ -1,6 +1,6 @@
(.using
[library
- [lux {"-" Symbol Alias Global global function}
+ [lux {"-" Symbol Alias Global global function type_of}
["@" target]
["[0]" meta]
[abstract
@@ -21,7 +21,7 @@
["[0]" code]
["[0]" template]]
[type
- abstract]]])
+ [abstract {"-" pattern}]]]])
(with_expansions [<constant> (for @.js "js constant"
@.python "python constant"
@@ -96,7 +96,7 @@
(def: alias
(Parser Alias)
- (<>.maybe (<>.after (<code>.this! (' "as")) <code>.local_symbol)))
+ (<>.maybe (<>.after (<code>.this (' "as")) <code>.local)))
(type: Optional
(Record
@@ -106,8 +106,8 @@
(def: optional
(Parser Optional)
(let [token "?"]
- (<| (<>.and (<>.parses? (<code>.text! token)))
- (<>.after (<>.not (<code>.text! token)))
+ (<| (<>.and (<>.parses? (<code>.this_text token)))
+ (<>.after (<>.not (<code>.this_text token)))
<code>.any)))
(type: (Named a)
@@ -124,7 +124,7 @@
..alias
)))]
- [named <code>.local_symbol]
+ [named <code>.local]
[anonymous (<>#in "")]
)
@@ -140,7 +140,7 @@
(def: variables
(Parser (List Text))
- (<>.else (list) (<code>.tuple (<>.some <code>.local_symbol))))
+ (<>.else (list) (<code>.tuple (<>.some <code>.local))))
(def: (generalized $ it)
(All (_ a)
@@ -163,8 +163,8 @@
($_ <>.and
(<>#in (list))
(<code>.tuple (<>.some ..optional))
- (<>.parses? (<code>.text! "io"))
- (<>.parses? (<code>.text! "try"))))
+ (<>.parses? (<code>.this_text "io"))
+ (<>.parses? (<code>.this_text "try"))))
(type: Constructor
(Named Input))
@@ -173,7 +173,7 @@
(Parser Constructor)
(<| <code>.form
(..generalized (has [#anonymous #variables]))
- (<>.after (<code>.this! (' new)))
+ (<>.after (<code>.this (' new)))
(..anonymous ..input)))
(type: (Member a)
@@ -183,7 +183,7 @@
(def: static!
(Parser Any)
- (<code>.text! "static"))
+ (<code>.this_text "static"))
(def: (member it)
(All (_ a)
@@ -252,7 +252,7 @@
(|>> list.enumeration
(list#each (.function (_ [idx [optional? type]])
[#optional? optional?
- #mandatory (|> idx %.nat code.local_symbol)]))))
+ #mandatory (|> idx %.nat code.local)]))))
(def: (output_type it)
(-> Optional Code)
@@ -320,10 +320,10 @@
(def: class
(Parser Class)
($_ <>.and
- (<>.either (<>.and <code>.local_symbol
+ (<>.either (<>.and <code>.local
(<>#in (list)))
- (<code>.form (<>.and <code>.local_symbol
- (<>.some <code>.local_symbol))))
+ (<code>.form (<>.and <code>.local
+ (<>.some <code>.local))))
..alias
<code>.text
(<>.some ..sub)))
@@ -363,8 +363,8 @@
(-> (List Code) Code (Named Procedure) Code)
(let [g!it (|> (the #alias it)
(maybe.else (the #name it))
- code.local_symbol)
- g!variables (list#each code.local_symbol (the [#anonymous #input #variables] it))
+ code.local)
+ g!variables (list#each code.local (the [#anonymous #input #variables] it))
input (the [#anonymous #input] it)
:parameters: (the #parameters input)
g!parameters (..parameters :parameters:)
@@ -421,7 +421,7 @@
(-> (List Code) Global Code)
(let [g!name (|> (the #alias it)
(maybe.else (the #name it))
- code.local_symbol)
+ code.local)
:output: (the #anonymous it)]
(` (.def: (~ g!name)
(~ (..output_type :output:))
@@ -439,13 +439,13 @@
(the #alias)
(maybe.else "new")
(..namespaced namespace class_name alias)
- code.local_symbol)
+ code.local)
input (the #anonymous it)
- g!input_variables (list#each code.local_symbol (the #variables input))
+ g!input_variables (list#each code.local (the #variables input))
:parameters: (the #parameters input)
g!parameters (..parameters :parameters:)
- g!class_variables (list#each code.local_symbol class_parameters)
- g!class (` ((~ (code.local_symbol (maybe.else class_name alias))) (~+ g!class_variables)))
+ g!class_variables (list#each code.local class_parameters)
+ g!class (` ((~ (code.local (maybe.else class_name alias))) (~+ g!class_variables)))
:output: [#optional? false #mandatory g!class]]
(` (.def: ((~ g!it) (~+ (case g!parameters
{.#End} (list g!it)
@@ -469,7 +469,7 @@
g!it (|> (the #alias it)
(maybe.else field)
(..namespaced namespace class_name alias)
- code.local_symbol)
+ code.local)
:field: (the #anonymous it)]
(` ((~! syntax:) ((~ g!it) [])
(.# (~! meta.monad) (~' in)
@@ -488,11 +488,11 @@
g!it (|> (the #alias it)
(maybe.else name)
(..namespaced namespace class_name alias)
- code.local_symbol)
+ code.local)
path (%.format (..host_path class_name) "." name)
:field: (the #anonymous it)
- g!variables (list#each code.local_symbol class_parameters)
- g!class (` ((~ (code.local_symbol (maybe.else class_name alias))) (~+ g!variables)))]
+ g!variables (list#each code.local class_parameters)
+ g!class (` ((~ (code.local (maybe.else class_name alias))) (~+ g!variables)))]
(` (.def: ((~ g!it) (~ g!it))
(.All ((~ g!it) (~+ g!variables))
(.-> (~ g!class)
@@ -528,14 +528,14 @@
g!it (|> (the #alias it)
(maybe.else method)
(..namespaced namespace class_name alias)
- code.local_symbol)
+ code.local)
procedure (the #anonymous it)
input (the #input procedure)
- g!input_variables (list#each code.local_symbol (the #variables input))
+ g!input_variables (list#each code.local (the #variables input))
:parameters: (the #parameters input)
g!parameters (..parameters :parameters:)
- g!class_variables (list#each code.local_symbol class_parameters)
- g!class (` ((~ (code.local_symbol (maybe.else class_name alias))) (~+ g!class_variables)))
+ g!class_variables (list#each code.local class_parameters)
+ g!class (` ((~ (code.local (maybe.else class_name alias))) (~+ g!class_variables)))
:output: (the #output procedure)]
(` (.def: ((~ g!it) (~+ (list#each (the #mandatory) g!parameters)) (~ g!it))
(.All ((~ g!it) (~+ g!class_variables) (~+ g!input_variables))
@@ -580,8 +580,8 @@
alias (the #class_alias it)
[class_name class_parameters] class
namespace (the #namespace it)
- g!class_variables (list#each code.local_symbol class_parameters)
- declaration (` ((~ (code.local_symbol (maybe.else class_name alias)))
+ g!class_variables (list#each code.local class_parameters)
+ declaration (` ((~ (code.local (maybe.else class_name alias)))
(~+ g!class_variables)))]
(in (list& (` (.type: (~ declaration)
(..Object (.Primitive (~ (code.text (..host_path class_name)))
@@ -604,7 +604,7 @@
(for @.ruby (as_is)
(syntax: .public (function [[self inputs] (<code>.form
($_ <>.and
- <code>.local_symbol
+ <code>.local
(<code>.tuple (<>.some (<>.and <code>.any <code>.any)))))
type <code>.any
term <code>.any])
@@ -614,14 +614,14 @@
.Any))
(.is (.-> [(~+ (list#each product.right inputs))]
(~ type)))
- (.function ((~ (code.local_symbol self)) [(~+ (list#each product.left inputs))])
+ (.function ((~ (code.local self)) [(~+ (list#each product.left inputs))])
(~ term))))))))
(for @.js (as_is (template: .public (type_of object)
[("js type-of" object)])
(syntax: .public (global [type <code>.any
- [head tail] (<code>.tuple (<>.and <code>.local_symbol (<>.some <code>.local_symbol)))])
+ [head tail] (<code>.tuple (<>.and <code>.local (<>.some <code>.local)))])
(with_symbols [g!_]
(let [global (` ("js constant" (~ (code.text head))))]
(case tail
@@ -642,8 +642,8 @@
{.#None}
(~ g!_)
- (..global (~ type) [(~ (code.local_symbol (%.format head "." next)))
- (~+ (list#each code.local_symbol tail))])))))))))))
+ (..global (~ type) [(~ (code.local (%.format head "." next)))
+ (~+ (list#each code.local tail))])))))))))))
(template: (!defined? <global>)
[(.case (..global Any <global>)
diff --git a/stdlib/source/library/lux/ffi.old.lux b/stdlib/source/library/lux/ffi.old.lux
index 697177697..f6822f72a 100644
--- a/stdlib/source/library/lux/ffi.old.lux
+++ b/stdlib/source/library/lux/ffi.old.lux
@@ -443,14 +443,14 @@
(-> Text Text (Parser Code))
(do <>.monad
[.let [dotted_name (format "::" field_name)]
- _ (<code>.this! (code.symbol ["" dotted_name]))]
+ _ (<code>.this (code.symbol ["" dotted_name]))]
(in (`' ((~ (code.text (format "jvm getstatic" ":" class_name ":" field_name))))))))
(def: (get_var_parser class_name field_name)
(-> Text Text (Parser Code))
(do <>.monad
[.let [dotted_name (format "::" field_name)]
- _ (<code>.this! (code.symbol ["" dotted_name]))]
+ _ (<code>.this (code.symbol ["" dotted_name]))]
(in (`' ((~ (code.text (format "jvm getfield" ":" class_name ":" field_name))) _jvm_this)))))
(def: (put_var_parser class_name field_name)
@@ -458,7 +458,7 @@
(do <>.monad
[.let [dotted_name (format "::" field_name)]
[_ _ value] (is (Parser [Any Any Code])
- (<code>.form ($_ <>.and (<code>.this! (' :=)) (<code>.this! (code.symbol ["" dotted_name])) <code>.any)))]
+ (<code>.form ($_ <>.and (<code>.this (' :=)) (<code>.this (code.symbol ["" dotted_name])) <code>.any)))]
(in (`' ((~ (code.text (format "jvm putfield" ":" class_name ":" field_name))) _jvm_this (~ value))))))
(def: (pre_walk_replace f input)
@@ -498,7 +498,7 @@
(-> (List Type_Parameter) Text (List ArgDecl) (Parser Code))
(do <>.monad
[args (is (Parser (List Code))
- (<code>.form (<>.after (<code>.this! (' ::new!))
+ (<code>.form (<>.after (<code>.this (' ::new!))
(<code>.tuple (<>.exactly (list.size arg_decls) <code>.any)))))
.let [arg_decls' (is (List Text) (list#each (|>> product.right (simple_class$ params)) arg_decls))]]
(in (` ((~ (code.text (format "jvm new" ":" class_name ":" (text.interposed "," arg_decls'))))
@@ -509,7 +509,7 @@
(do <>.monad
[.let [dotted_name (format "::" method_name "!")]
args (is (Parser (List Code))
- (<code>.form (<>.after (<code>.this! (code.symbol ["" dotted_name]))
+ (<code>.form (<>.after (<code>.this (code.symbol ["" dotted_name]))
(<code>.tuple (<>.exactly (list.size arg_decls) <code>.any)))))
.let [arg_decls' (is (List Text) (list#each (|>> product.right (simple_class$ params)) arg_decls))]]
(in (`' ((~ (code.text (format "jvm invokestatic" ":" class_name ":" method_name ":" (text.interposed "," arg_decls'))))
@@ -521,7 +521,7 @@
(do <>.monad
[.let [dotted_name (format "::" method_name "!")]
args (is (Parser (List Code))
- (<code>.form (<>.after (<code>.this! (code.symbol ["" dotted_name]))
+ (<code>.form (<>.after (<code>.this (code.symbol ["" dotted_name]))
(<code>.tuple (<>.exactly (list.size arg_decls) <code>.any)))))
.let [arg_decls' (is (List Text) (list#each (|>> product.right (simple_class$ params)) arg_decls))]]
(in (`' ((~ (code.text (format <jvm_op> ":" class_name ":" method_name ":" (text.interposed "," arg_decls'))))
@@ -555,23 +555,23 @@
(Parser Privacy)
(let [(open "[0]") <>.monad]
($_ <>.or
- (<code>.this! (' "public"))
- (<code>.this! (' "private"))
- (<code>.this! (' "protected"))
+ (<code>.this (' "public"))
+ (<code>.this (' "private"))
+ (<code>.this (' "protected"))
(in []))))
(def: inheritance_modifier^
(Parser Inheritance)
(let [(open "[0]") <>.monad]
($_ <>.or
- (<code>.this! (' "final"))
- (<code>.this! (' "abstract"))
+ (<code>.this (' "final"))
+ (<code>.this (' "abstract"))
(in []))))
(def: bound_kind^
(Parser BoundKind)
- (<>.or (<code>.this! (' <))
- (<code>.this! (' >))))
+ (<>.or (<code>.this (' <))
+ (<code>.this (' >))))
(def: (no_periods_assertion name)
(-> Text (Parser Any))
@@ -584,15 +584,15 @@
(function (_ again^)
($_ <>.either
(do <>.monad
- [_ (<code>.this! (' ?))]
+ [_ (<code>.this (' ?))]
(in {#GenericWildcard {.#None}}))
(<code>.tuple (do <>.monad
- [_ (<code>.this! (' ?))
+ [_ (<code>.this (' ?))
bound_kind bound_kind^
bound again^]
(in {#GenericWildcard {.#Some [bound_kind bound]}})))
(do <>.monad
- [name <code>.local_symbol
+ [name <code>.local
_ (no_periods_assertion name)]
(if (list.member? text.equivalence (list#each product.left type_vars) name)
(in {#GenericTypeVar name})
@@ -615,7 +615,7 @@
_
(in {#GenericArray component}))))
(<code>.form (do <>.monad
- [name <code>.local_symbol
+ [name <code>.local
_ (no_periods_assertion name)
params (<>.some again^)
_ (<>.assertion (format name " cannot be a type-parameter!")
@@ -626,11 +626,11 @@
(def: type_param^
(Parser Type_Parameter)
(<>.either (do <>.monad
- [param_name <code>.local_symbol]
+ [param_name <code>.local]
(in [param_name (list)]))
(<code>.tuple (do <>.monad
- [param_name <code>.local_symbol
- _ (<code>.this! (' <))
+ [param_name <code>.local
+ _ (<code>.this (' <))
bounds (<>.many (..generic_type^ (list)))]
(in [param_name bounds])))))
@@ -644,11 +644,11 @@
(def: class_decl^
(Parser Class_Declaration)
(<>.either (do <>.monad
- [name <code>.local_symbol
+ [name <code>.local
_ (no_periods_assertion name)]
(in [name (list)]))
(<code>.form (do <>.monad
- [name <code>.local_symbol
+ [name <code>.local
_ (no_periods_assertion name)
params (<>.some ..type_param^)]
(in [name params])))
@@ -657,11 +657,11 @@
(def: (super_class_decl^ type_vars)
(-> (List Type_Parameter) (Parser Super_Class_Decl))
(<>.either (do <>.monad
- [name <code>.local_symbol
+ [name <code>.local
_ (no_periods_assertion name)]
(in [name (list)]))
(<code>.form (do <>.monad
- [name <code>.local_symbol
+ [name <code>.local
_ (no_periods_assertion name)
params (<>.some (..generic_type^ type_vars))]
(in [name params])))))
@@ -673,15 +673,15 @@
(def: annotation^
(Parser Annotation)
(<>.either (do <>.monad
- [ann_name <code>.local_symbol]
+ [ann_name <code>.local]
(in [ann_name (list)]))
- (<code>.form (<>.and <code>.local_symbol
+ (<code>.form (<>.and <code>.local
annotation_params^))))
(def: annotations^'
(Parser (List Annotation))
(do <>.monad
- [_ (<code>.this! (' "ann"))]
+ [_ (<code>.this (' "ann"))]
(<code>.tuple (<>.some ..annotation^))))
(def: annotations^
@@ -693,7 +693,7 @@
(def: (throws_decl'^ type_vars)
(-> (List Type_Parameter) (Parser (List GenericType)))
(do <>.monad
- [_ (<code>.this! (' "throws"))]
+ [_ (<code>.this (' "throws"))]
(<code>.tuple (<>.some (..generic_type^ type_vars)))))
(def: (throws_decl^ type_vars)
@@ -706,7 +706,7 @@
(-> (List Type_Parameter) (Parser [Member_Declaration MethodDecl]))
(<code>.form (do <>.monad
[tvars ..type_params^
- name <code>.local_symbol
+ name <code>.local
anns ..annotations^
inputs (<code>.tuple (<>.some (..generic_type^ type_vars)))
output (..generic_type^ type_vars)
@@ -719,15 +719,15 @@
(def: state_modifier^
(Parser State)
($_ <>.or
- (<code>.this! (' "volatile"))
- (<code>.this! (' "final"))
+ (<code>.this (' "volatile"))
+ (<code>.this (' "final"))
(# <>.monad in [])))
(def: (field_decl^ type_vars)
(-> (List Type_Parameter) (Parser [Member_Declaration FieldDecl]))
(<>.either (<code>.form (do <>.monad
- [_ (<code>.this! (' "const"))
- name <code>.local_symbol
+ [_ (<code>.this (' "const"))
+ name <code>.local
anns ..annotations^
type (..generic_type^ type_vars)
body <code>.any]
@@ -735,14 +735,14 @@
(<code>.form (do <>.monad
[pm privacy_modifier^
sm state_modifier^
- name <code>.local_symbol
+ name <code>.local
anns ..annotations^
type (..generic_type^ type_vars)]
(in [[name pm anns] {#VariableField [sm type]}])))))
(def: (arg_decl^ type_vars)
(-> (List Type_Parameter) (Parser ArgDecl))
- (<>.and <code>.local_symbol
+ (<>.and <code>.local
(..generic_type^ type_vars)))
(def: (arg_decls^ type_vars)
@@ -761,10 +761,10 @@
(-> (List Type_Parameter) (Parser [Member_Declaration Method_Definition]))
(<code>.form (do <>.monad
[pm privacy_modifier^
- strict_fp? (<>.parses? (<code>.this! (' "strict")))
+ strict_fp? (<>.parses? (<code>.this (' "strict")))
method_vars ..type_params^
.let [total_vars (list#composite class_vars method_vars)]
- [_ arg_decls] (<code>.form (<>.and (<code>.this! (' new))
+ [_ arg_decls] (<code>.form (<>.and (<code>.this (' new))
(..arg_decls^ total_vars)))
constructor_args (..constructor_args^ total_vars)
exs (..throws_decl^ total_vars)
@@ -779,13 +779,13 @@
(-> (List Type_Parameter) (Parser [Member_Declaration Method_Definition]))
(<code>.form (do <>.monad
[pm privacy_modifier^
- strict_fp? (<>.parses? (<code>.this! (' "strict")))
- final? (<>.parses? (<code>.this! (' "final")))
+ strict_fp? (<>.parses? (<code>.this (' "strict")))
+ final? (<>.parses? (<code>.this (' "final")))
method_vars ..type_params^
.let [total_vars (list#composite class_vars method_vars)]
[name this_name arg_decls] (<code>.form ($_ <>.and
- <code>.local_symbol
- <code>.local_symbol
+ <code>.local
+ <code>.local
(..arg_decls^ total_vars)))
return_type (..generic_type^ total_vars)
exs (..throws_decl^ total_vars)
@@ -802,13 +802,13 @@
(def: overriden_method_def^
(Parser [Member_Declaration Method_Definition])
(<code>.form (do <>.monad
- [strict_fp? (<>.parses? (<code>.this! (' "strict")))
+ [strict_fp? (<>.parses? (<code>.this (' "strict")))
owner_class ..class_decl^
method_vars ..type_params^
.let [total_vars (list#composite (product.right owner_class) method_vars)]
[name this_name arg_decls] (<code>.form ($_ <>.and
- <code>.local_symbol
- <code>.local_symbol
+ <code>.local
+ <code>.local
(..arg_decls^ total_vars)))
return_type (..generic_type^ total_vars)
exs (..throws_decl^ total_vars)
@@ -826,11 +826,11 @@
(Parser [Member_Declaration Method_Definition])
(<code>.form (do <>.monad
[pm privacy_modifier^
- strict_fp? (<>.parses? (<code>.this! (' "strict")))
- _ (<code>.this! (' "static"))
+ strict_fp? (<>.parses? (<code>.this (' "strict")))
+ _ (<code>.this (' "static"))
method_vars ..type_params^
.let [total_vars method_vars]
- [name arg_decls] (<code>.form (<>.and <code>.local_symbol
+ [name arg_decls] (<code>.form (<>.and <code>.local
(..arg_decls^ total_vars)))
return_type (..generic_type^ total_vars)
exs (..throws_decl^ total_vars)
@@ -845,10 +845,10 @@
(Parser [Member_Declaration Method_Definition])
(<code>.form (do <>.monad
[pm privacy_modifier^
- _ (<code>.this! (' "abstract"))
+ _ (<code>.this (' "abstract"))
method_vars ..type_params^
.let [total_vars method_vars]
- [name arg_decls] (<code>.form (<>.and <code>.local_symbol
+ [name arg_decls] (<code>.form (<>.and <code>.local
(..arg_decls^ total_vars)))
return_type (..generic_type^ total_vars)
exs (..throws_decl^ total_vars)
@@ -862,10 +862,10 @@
(Parser [Member_Declaration Method_Definition])
(<code>.form (do <>.monad
[pm privacy_modifier^
- _ (<code>.this! (' "native"))
+ _ (<code>.this (' "native"))
method_vars ..type_params^
.let [total_vars method_vars]
- [name arg_decls] (<code>.form (<>.and <code>.local_symbol
+ [name arg_decls] (<code>.form (<>.and <code>.local
(..arg_decls^ total_vars)))
return_type (..generic_type^ total_vars)
exs (..throws_decl^ total_vars)
@@ -892,32 +892,32 @@
(def: import_member_alias^
(Parser (Maybe Text))
(<>.maybe (do <>.monad
- [_ (<code>.this! (' "as"))]
- <code>.local_symbol)))
+ [_ (<code>.this (' "as"))]
+ <code>.local)))
(def: (import_member_args^ type_vars)
(-> (List Type_Parameter) (Parser (List [Bit GenericType])))
- (<code>.tuple (<>.some (<>.and (<>.parses? (<code>.this! (' "?"))) (..generic_type^ type_vars)))))
+ (<code>.tuple (<>.some (<>.and (<>.parses? (<code>.this (' "?"))) (..generic_type^ type_vars)))))
(def: import_member_return_flags^
(Parser [Bit Bit Bit])
- ($_ <>.and (<>.parses? (<code>.this! (' "io"))) (<>.parses? (<code>.this! (' "try"))) (<>.parses? (<code>.this! (' "?")))))
+ ($_ <>.and (<>.parses? (<code>.this (' "io"))) (<>.parses? (<code>.this (' "try"))) (<>.parses? (<code>.this (' "?")))))
(def: primitive_mode^
(Parser Primitive_Mode)
- (<>.or (<code>.this! (' "manual"))
- (<code>.this! (' "auto"))))
+ (<>.or (<code>.this (' "manual"))
+ (<code>.this (' "auto"))))
(def: (import_member_decl^ owner_vars)
(-> (List Type_Parameter) (Parser Import_Member_Declaration))
($_ <>.either
(<code>.form (do <>.monad
- [_ (<code>.this! (' "enum"))
- enum_members (<>.some <code>.local_symbol)]
+ [_ (<code>.this (' "enum"))
+ enum_members (<>.some <code>.local)]
(in {#EnumDecl enum_members})))
(<code>.form (do <>.monad
[tvars ..type_params^
- _ (<code>.this! (' new))
+ _ (<code>.this (' new))
?alias import_member_alias^
.let [total_vars (list#composite owner_vars tvars)]
?prim_mode (<>.maybe primitive_mode^)
@@ -934,10 +934,10 @@
[]]})))
(<code>.form (do <>.monad
[kind (is (Parser ImportMethodKind)
- (<>.or (<code>.this! (' "static"))
+ (<>.or (<code>.this (' "static"))
(in [])))
tvars ..type_params^
- name <code>.local_symbol
+ name <code>.local
?alias import_member_alias^
.let [total_vars (list#composite owner_vars tvars)]
?prim_mode (<>.maybe primitive_mode^)
@@ -955,12 +955,12 @@
[#import_method_name name
#import_method_return return]]})))
(<code>.form (do <>.monad
- [static? (<>.parses? (<code>.this! (' "static")))
- name <code>.local_symbol
+ [static? (<>.parses? (<code>.this (' "static")))
+ name <code>.local
?prim_mode (<>.maybe primitive_mode^)
gtype (..generic_type^ owner_vars)
- maybe? (<>.parses? (<code>.this! (' "?")))
- setter? (<>.parses? (<code>.this! (' "!")))]
+ maybe? (<>.parses? (<code>.this (' "?")))
+ setter? (<>.parses? (<code>.this (' "!")))]
(in {#FieldAccessDecl [#import_field_mode (maybe.else {#AutoPrM} ?prim_mode)
#import_field_name name
#import_field_static? static?
@@ -1121,12 +1121,12 @@
(with_brackets (spaced (list#each generic_type$ exs)))
(with_brackets (spaced (list#each arg_decl$ arg_decls)))
(generic_type$ return_type)
- (code.format (pre_walk_replace replacer (` (let [(~ (code.local_symbol this_name)) (~' _jvm_this)]
+ (code.format (pre_walk_replace replacer (` (let [(~ (code.local this_name)) (~' _jvm_this)]
(~ body))))))))
{#OverridenMethod strict_fp? class_decl type_vars this_name arg_decls return_type body exs}
(let [super_replacer (parser_replacer (<code>.form (do <>.monad
- [_ (<code>.this! (' ::super!))
+ [_ (<code>.this (' ::super!))
args (<code>.tuple (<>.exactly (list.size arg_decls) <code>.any))
.let [arg_decls' (is (List Text) (list#each (|>> product.right (simple_class$ (list)))
arg_decls))]]
@@ -1145,7 +1145,7 @@
(with_brackets (spaced (list#each generic_type$ exs)))
(with_brackets (spaced (list#each arg_decl$ arg_decls)))
(generic_type$ return_type)
- (|> (` (let [(~ (code.local_symbol this_name)) (~' _jvm_this)]
+ (|> (` (let [(~ (code.local this_name)) (~' _jvm_this)]
(~ body)))
(pre_walk_replace replacer)
(pre_walk_replace super_replacer)
@@ -1312,7 +1312,7 @@
(def: (class_import$ [full_name params])
(-> Class_Declaration Code)
- (let [params' (list#each (|>> product.left code.local_symbol) params)]
+ (let [params' (list#each (|>> product.left code.local) params)]
(template.with_locals [g!_]
(` (def: (~ (code.symbol ["" full_name]))
Type
diff --git a/stdlib/source/library/lux/ffi.php.lux b/stdlib/source/library/lux/ffi.php.lux
index cb2c6a615..2c71beed1 100644
--- a/stdlib/source/library/lux/ffi.php.lux
+++ b/stdlib/source/library/lux/ffi.php.lux
@@ -51,8 +51,8 @@
(def: nullable
(Parser Nullable)
(let [token (' "?")]
- (<| (<>.and (<>.parses? (<code>.this! token)))
- (<>.after (<>.not (<code>.this! token)))
+ (<| (<>.and (<>.parses? (<code>.this token)))
+ (<>.after (<>.not (<code>.this token)))
<code>.any)))
(type: Alias
@@ -60,20 +60,20 @@
(def: alias
(Parser Alias)
- (<>.after (<code>.this! (' "as")) <code>.local_symbol))
+ (<>.after (<code>.this (' "as")) <code>.local))
(type: Field
[Bit Text (Maybe Alias) Nullable])
(def: static!
(Parser Any)
- (<code>.this! (' "static")))
+ (<code>.this (' "static")))
(def: field
(Parser Field)
(<code>.form ($_ <>.and
(<>.parses? ..static!)
- <code>.local_symbol
+ <code>.local
(<>.maybe ..alias)
..nullable)))
@@ -81,7 +81,7 @@
(Parser Field)
(<code>.form ($_ <>.and
(<>#in true)
- <code>.local_symbol
+ <code>.local
(<>.maybe ..alias)
..nullable)))
@@ -105,11 +105,11 @@
(def: common_method
(Parser Common_Method)
($_ <>.and
- <code>.local_symbol
+ <code>.local
(<>.maybe ..alias)
(<code>.tuple (<>.some ..nullable))
- (<>.parses? (<code>.this! (' "io")))
- (<>.parses? (<code>.this! (' "try")))
+ (<>.parses? (<code>.this (' "io")))
+ (<>.parses? (<code>.this (' "try")))
..nullable))
(def: static_method
@@ -136,7 +136,7 @@
(-> (List Nullable) (List [Bit Code]))
(|>> list.enumeration
(list#each (function (_ [idx [nullable? type]])
- [nullable? (|> idx %.nat code.local_symbol)]))))
+ [nullable? (|> idx %.nat code.local)]))))
(def: (nullable_type [nullable? type])
(-> Nullable Code)
@@ -177,7 +177,7 @@
(Parser Import)
($_ <>.or
($_ <>.and
- <code>.local_symbol
+ <code>.local
(<>.maybe ..alias)
(<>.else ["" (list)]
(<code>.tuple (<>.and <code>.text
@@ -246,8 +246,8 @@
(|> format
(text.replaced "[1]" (maybe.else class alias))
(text.replaced "[0]" member_name)
- code.local_symbol)))
- g!type (code.local_symbol (maybe.else class alias))
+ code.local)))
+ g!type (code.local (maybe.else class alias))
class_import (` ("php constant" (~ (code.text class))))]
(in (list& (` (type: (~ g!type)
(..Object (Primitive (~ (code.text class))))))
@@ -302,7 +302,7 @@
{#Function [name alias inputsT io? try? outputT]}
(let [imported (` ("php constant" (~ (code.text name))))]
- (in (list (..make_function (code.local_symbol (maybe.else name alias))
+ (in (list (..make_function (code.local (maybe.else name alias))
g!temp
imported
inputsT
@@ -312,7 +312,7 @@
{#Constant [_ name alias fieldT]}
(let [imported (` ("php constant" (~ (code.text name))))]
- (in (list (` ((~! syntax:) ((~ (code.local_symbol (maybe.else name alias))) [])
+ (in (list (` ((~! syntax:) ((~ (code.local (maybe.else name alias))) [])
(# (~! meta.monad) (~' in)
(list (` (.as (~ (nullable_type fieldT)) (~ imported))))))))))
)))
diff --git a/stdlib/source/library/lux/ffi.scm.lux b/stdlib/source/library/lux/ffi.scm.lux
index 93fe11d15..7b338dfd4 100644
--- a/stdlib/source/library/lux/ffi.scm.lux
+++ b/stdlib/source/library/lux/ffi.scm.lux
@@ -51,8 +51,8 @@
(def: nilable
(Parser Nilable)
(let [token (' "?")]
- (<| (<>.and (<>.parses? (<code>.this! token)))
- (<>.after (<>.not (<code>.this! token)))
+ (<| (<>.and (<>.parses? (<code>.this token)))
+ (<>.after (<>.not (<code>.this token)))
<code>.any)))
(type: Alias
@@ -60,20 +60,20 @@
(def: alias
(Parser Alias)
- (<>.after (<code>.this! (' "as")) <code>.local_symbol))
+ (<>.after (<code>.this (' "as")) <code>.local))
(type: Field
[Bit Text (Maybe Alias) Nilable])
(def: static!
(Parser Any)
- (<code>.this! (' "static")))
+ (<code>.this (' "static")))
(def: field
(Parser Field)
(<code>.form ($_ <>.and
(<>.parses? ..static!)
- <code>.local_symbol
+ <code>.local
(<>.maybe ..alias)
..nilable)))
@@ -81,7 +81,7 @@
(Parser Field)
(<code>.form ($_ <>.and
(<>#in true)
- <code>.local_symbol
+ <code>.local
(<>.maybe ..alias)
..nilable)))
@@ -97,18 +97,18 @@
(def: common_method
(Parser Common_Method)
($_ <>.and
- <code>.local_symbol
+ <code>.local
(<>.maybe ..alias)
(<code>.tuple (<>.some ..nilable))
- (<>.parses? (<code>.this! (' "io")))
- (<>.parses? (<code>.this! (' "try")))
+ (<>.parses? (<code>.this (' "io")))
+ (<>.parses? (<code>.this (' "try")))
..nilable))
(def: input_variables
(-> (List Nilable) (List [Bit Code]))
(|>> list.enumeration
(list#each (function (_ [idx [nilable? type]])
- [nilable? (|> idx %.nat code.local_symbol)]))))
+ [nilable? (|> idx %.nat code.local)]))))
(def: (nilable_type [nilable? type])
(-> Nilable Code)
@@ -206,7 +206,7 @@
(case import
{#Function [name alias inputsT io? try? outputT]}
(let [imported (` ("scheme constant" (~ (code.text name))))]
- (in (list (..make_function (code.local_symbol (maybe.else name alias))
+ (in (list (..make_function (code.local (maybe.else name alias))
g!temp
imported
inputsT
@@ -216,7 +216,7 @@
{#Constant [_ name alias fieldT]}
(let [imported (` ("scheme constant" (~ (code.text name))))]
- (in (list (` ((~! syntax:) ((~ (code.local_symbol (maybe.else name alias))))
+ (in (list (` ((~! syntax:) ((~ (code.local (maybe.else name alias))))
(# (~! meta.monad) (~' in)
(list (` (.as (~ (nilable_type fieldT)) (~ imported))))))))))
)))
diff --git a/stdlib/source/library/lux/ffi/export.js.lux b/stdlib/source/library/lux/ffi/export.js.lux
index a73437f72..ffe1daa6a 100644
--- a/stdlib/source/library/lux/ffi/export.js.lux
+++ b/stdlib/source/library/lux/ffi/export.js.lux
@@ -40,10 +40,10 @@
(-> Code (Meta [Text Code]))
(|>> (list)
(<code>.result (<| <code>.form
- (<>.after (<code>.text! "lux def"))
+ (<>.after (<code>.this_text "lux def"))
(<>.before <code>.any)
($_ <>.and
- <code>.local_symbol
+ <code>.local
<code>.any)))
meta.lifted))
diff --git a/stdlib/source/library/lux/ffi/export.jvm.lux b/stdlib/source/library/lux/ffi/export.jvm.lux
index 3368f1671..fa1631922 100644
--- a/stdlib/source/library/lux/ffi/export.jvm.lux
+++ b/stdlib/source/library/lux/ffi/export.jvm.lux
@@ -32,7 +32,7 @@
(def: constant
(Parser Constant)
- <code>.local_symbol)
+ <code>.local)
(type: Function
(Record
@@ -44,10 +44,10 @@
(Parser Function)
(<code>.form
($_ <>.and
- (<>.else (list) (<code>.tuple (<>.some <code>.local_symbol)))
- <code>.local_symbol
+ (<>.else (list) (<code>.tuple (<>.some <code>.local)))
+ <code>.local
(<code>.tuple (<>.some ($_ <>.and
- <code>.local_symbol
+ <code>.local
<code>.any
)))
)))
@@ -64,7 +64,7 @@
(..api ..function)
))
-(syntax: .public (export: [api <code>.local_symbol
+(syntax: .public (export: [api <code>.local
exports (<>.many ..export)])
(let [initialization (is (List (API Constant))
(list.all (.function (_ it)
@@ -75,19 +75,19 @@
_
{.#None}))
exports))]
- (in (list (` (//.class: "final" (~ (code.local_symbol api))
+ (in (list (` (//.class: "final" (~ (code.local api))
(~+ (list#each (.function (_ it)
(case it
{#Constant [name type term]}
- (` ("public" "final" "static" (~ (code.local_symbol name)) (~ type)))
+ (` ("public" "final" "static" (~ (code.local name)) (~ type)))
{#Function [[variables name requirements] type term]}
(` ("public" "strict" "static"
- [(~+ (list#each code.local_symbol variables))]
- ((~ (code.local_symbol name))
+ [(~+ (list#each code.local variables))]
+ ((~ (code.local name))
[(~+ (|> requirements
(list#each (.function (_ [name type])
- (list (code.local_symbol name)
+ (list (code.local name)
type)))
list#conjoint))])
(~ type)
diff --git a/stdlib/source/library/lux/ffi/export.lua.lux b/stdlib/source/library/lux/ffi/export.lua.lux
index 1c53e9153..33601347b 100644
--- a/stdlib/source/library/lux/ffi/export.lua.lux
+++ b/stdlib/source/library/lux/ffi/export.lua.lux
@@ -40,10 +40,10 @@
(-> Code (Meta [Text Code]))
(|>> (list)
(<code>.result (<| <code>.form
- (<>.after (<code>.text! "lux def"))
+ (<>.after (<code>.this_text "lux def"))
(<>.before <code>.any)
($_ <>.and
- <code>.local_symbol
+ <code>.local
<code>.any)))
meta.lifted))
diff --git a/stdlib/source/library/lux/ffi/export.py.lux b/stdlib/source/library/lux/ffi/export.py.lux
index 4d820443e..febcdaf89 100644
--- a/stdlib/source/library/lux/ffi/export.py.lux
+++ b/stdlib/source/library/lux/ffi/export.py.lux
@@ -40,10 +40,10 @@
(-> Code (Meta [Text Code]))
(|>> (list)
(<code>.result (<| <code>.form
- (<>.after (<code>.text! "lux def"))
+ (<>.after (<code>.this_text "lux def"))
(<>.before <code>.any)
($_ <>.and
- <code>.local_symbol
+ <code>.local
<code>.any)))
meta.lifted))
diff --git a/stdlib/source/library/lux/ffi/export.rb.lux b/stdlib/source/library/lux/ffi/export.rb.lux
index 51aab7008..59fba650f 100644
--- a/stdlib/source/library/lux/ffi/export.rb.lux
+++ b/stdlib/source/library/lux/ffi/export.rb.lux
@@ -78,10 +78,10 @@
(-> Code (Meta [Name Code]))
(|>> (list)
(<code>.result (<| <code>.form
- (<>.after (<code>.text! "lux def"))
+ (<>.after (<code>.this_text "lux def"))
(<>.before <code>.any)
($_ <>.and
- (<text>.then ..name <code>.local_symbol)
+ (<text>.then ..name <code>.local)
<code>.any)))
meta.lifted))
diff --git a/stdlib/source/library/lux/macro.lux b/stdlib/source/library/lux/macro.lux
index eb8fd2531..d0df9fc7b 100644
--- a/stdlib/source/library/lux/macro.lux
+++ b/stdlib/source/library/lux/macro.lux
@@ -1,6 +1,6 @@
(.using
[library
- [lux {"-" symbol}
+ [lux {"-" local symbol}
[abstract
["[0]" monad {"+" do}]]
[data
@@ -100,7 +100,7 @@
($_ text#composite "__gensym__" prefix)
[""] code.symbol))))
-(def: (local_symbol ast)
+(def: (local ast)
(-> Code (Meta Text))
(case ast
[_ {.#Symbol [_ name]}]
@@ -119,7 +119,7 @@
(case tokens
(pattern (list [_ {.#Tuple symbols}] body))
(do [! //.monad]
- [symbol_names (monad.each ! ..local_symbol symbols)
+ [symbol_names (monad.each ! ..local symbols)
.let [symbol_defs (list#conjoint (list#each (is (-> Text (List Code))
(function (_ name) (list (code.symbol ["" name]) (` (..symbol (~ (code.text name)))))))
symbol_names))]]
diff --git a/stdlib/source/library/lux/macro/code.lux b/stdlib/source/library/lux/macro/code.lux
index 0ced45d10..4df6d86e0 100644
--- a/stdlib/source/library/lux/macro/code.lux
+++ b/stdlib/source/library/lux/macro/code.lux
@@ -1,6 +1,6 @@
(.using
[library
- [lux {"-" nat int rev symbol}
+ [lux {"-" nat int rev local global symbol}
[abstract
[equivalence {"+" Equivalence}]]
[data
@@ -58,7 +58,7 @@
(-> Text Code)
[location.dummy {<tag> ["" name]}])]
- [local_symbol .#Symbol])
+ [local .#Symbol])
(implementation: .public equivalence
(Equivalence Code)
diff --git a/stdlib/source/library/lux/macro/pattern.lux b/stdlib/source/library/lux/macro/pattern.lux
index 1b237996e..62d829875 100644
--- a/stdlib/source/library/lux/macro/pattern.lux
+++ b/stdlib/source/library/lux/macro/pattern.lux
@@ -57,7 +57,7 @@
[expected_type]
[wrong_syntax_error]
- [local_symbol$]
+ [local$]
[list#reversed]
[untemplated_list]
@@ -146,7 +146,7 @@
(macro: .public (let tokens)
(case tokens
(pattern (list& [_meta {.#Form (list [_ {.#Symbol ["" name]}] pattern)}] body branches))
- (.let [g!whole (local_symbol$ name)]
+ (.let [g!whole (local$ name)]
(meta#in (list& g!whole
(.` (case (~ g!whole) (~ pattern) (~ body)))
branches)))
@@ -157,7 +157,7 @@
(macro: .public (|> tokens)
(case tokens
(pattern (list& [_meta {.#Form (list [_ {.#Symbol ["" name]}] [_ {.#Tuple steps}])}] body branches))
- (.let [g!name (local_symbol$ name)]
+ (.let [g!name (local$ name)]
(meta#in (list& g!name
(.` (.let [(~ g!name) (.|> (~ g!name) (~+ steps))]
(~ body)))
diff --git a/stdlib/source/library/lux/macro/syntax.lux b/stdlib/source/library/lux/macro/syntax.lux
index 8530307be..7f76debb1 100644
--- a/stdlib/source/library/lux/macro/syntax.lux
+++ b/stdlib/source/library/lux/macro/syntax.lux
@@ -48,7 +48,7 @@
(/export.parser
($_ <>.and
(</>.form ($_ <>.and
- </>.local_symbol
+ </>.local
(</>.tuple (<>.some </>.any))))
</>.any)))
diff --git a/stdlib/source/library/lux/macro/syntax/check.lux b/stdlib/source/library/lux/macro/syntax/check.lux
index 00f01aa3f..da0ad9ca1 100644
--- a/stdlib/source/library/lux/macro/syntax/check.lux
+++ b/stdlib/source/library/lux/macro/syntax/check.lux
@@ -38,6 +38,6 @@
(def: .public parser
(Parser Check)
(<| <code>.form
- (<>.after (<code>.text! ..extension))
+ (<>.after (<code>.this_text ..extension))
(<>.and <code>.any
<code>.any)))
diff --git a/stdlib/source/library/lux/macro/syntax/declaration.lux b/stdlib/source/library/lux/macro/syntax/declaration.lux
index d817fa193..f6c92855e 100644
--- a/stdlib/source/library/lux/macro/syntax/declaration.lux
+++ b/stdlib/source/library/lux/macro/syntax/declaration.lux
@@ -28,17 +28,17 @@
(def: .public parser
(Parser Declaration)
- (<>.either (<>.and <code>.local_symbol
+ (<>.either (<>.and <code>.local
(<>#in (list)))
- (<code>.form (<>.and <code>.local_symbol
- (<>.some <code>.local_symbol)))))
+ (<code>.form (<>.and <code>.local
+ (<>.some <code>.local)))))
(def: .public (format value)
(-> Declaration Code)
- (let [g!name (code.local_symbol (the #name value))]
+ (let [g!name (code.local (the #name value))]
(case (the #arguments value)
{.#End}
g!name
arguments
- (` ((~ g!name) (~+ (list#each code.local_symbol arguments)))))))
+ (` ((~ g!name) (~+ (list#each code.local arguments)))))))
diff --git a/stdlib/source/library/lux/macro/syntax/definition.lux b/stdlib/source/library/lux/macro/syntax/definition.lux
index c6b914bf3..af8e3baf0 100644
--- a/stdlib/source/library/lux/macro/syntax/definition.lux
+++ b/stdlib/source/library/lux/macro/syntax/definition.lux
@@ -53,7 +53,7 @@
(def: .public (format (open "_[0]"))
(-> Definition Code)
(` ((~ (code.text ..extension))
- (~ (code.local_symbol _#name))
+ (~ (code.local _#name))
(~ (case _#value
{.#Left check}
(//check.format check)
@@ -70,11 +70,11 @@
macro.full_expansion
(meta.result compiler)
<>.lifted)]
- (<| (<code>.local me_raw)
+ (<| (<code>.locally me_raw)
<code>.form
- (<>.after (<code>.text! ..extension))
+ (<>.after (<code>.this_text ..extension))
($_ <>.and
- <code>.local_symbol
+ <code>.local
(<>.or //check.parser
<code>.any)
<code>.bit
diff --git a/stdlib/source/library/lux/macro/syntax/type/variable.lux b/stdlib/source/library/lux/macro/syntax/type/variable.lux
index 5bb62d302..88dbd1be4 100644
--- a/stdlib/source/library/lux/macro/syntax/type/variable.lux
+++ b/stdlib/source/library/lux/macro/syntax/type/variable.lux
@@ -20,8 +20,8 @@
(def: .public format
(-> Variable Code)
- code.local_symbol)
+ code.local)
(def: .public parser
(Parser Variable)
- <code>.local_symbol)
+ <code>.local)
diff --git a/stdlib/source/library/lux/macro/template.lux b/stdlib/source/library/lux/macro/template.lux
index d2260f584..778a5fe44 100644
--- a/stdlib/source/library/lux/macro/template.lux
+++ b/stdlib/source/library/lux/macro/template.lux
@@ -34,7 +34,7 @@
(syntax: .public (amount [parts (<code>.tuple (<>.some <code>.any))])
(in (list (code.nat (list.size parts)))))
-(syntax: .public (with_locals [locals (<code>.tuple (<>.some <code>.local_symbol))
+(syntax: .public (with_locals [locals (<code>.tuple (<>.some <code>.local))
body <code>.any])
(do [! meta.monad]
[g!locals (|> locals
@@ -42,7 +42,7 @@
(monad.all !))]
(in (list (` (.with_expansions [(~+ (|> (list.zipped/2 locals g!locals)
(list#each (function (_ [name symbol])
- (list (code.local_symbol name) (as_is symbol))))
+ (list (code.local name) (as_is symbol))))
list#conjoint))]
(~ body)))))))
@@ -63,7 +63,7 @@
<code>.text
(if module_side?
full_symbol
- (<>.either <code>.local_symbol
+ (<>.either <code>.local
full_symbol))
(<>#each bit#encoded <code>.bit)
(<>#each nat#encoded <code>.nat)
@@ -90,7 +90,7 @@
{.#Right simple}
(in (list (|> simple (text.interposed "") <simple>)))))]
- [symbol code.local_symbol code.symbol]
+ [symbol code.local code.symbol]
)
(type: Environment
@@ -145,8 +145,8 @@
(def: local
(Parser Local)
(do <>.monad
- [[name parameters] (<code>.form (<>.and <code>.local_symbol
- (<>.many <code>.local_symbol)))
+ [[name parameters] (<code>.form (<>.and <code>.local
+ (<>.many <code>.local)))
template (<code>.tuple (<>.some <code>.any))]
(in [#name name
#parameters parameters
diff --git a/stdlib/source/library/lux/program.lux b/stdlib/source/library/lux/program.lux
index 4b25a55b2..c4a3b34a4 100644
--- a/stdlib/source/library/lux/program.lux
+++ b/stdlib/source/library/lux/program.lux
@@ -22,7 +22,7 @@
(def: arguments^
(<code>.Parser Arguments)
- (<>.or <code>.local_symbol
+ (<>.or <code>.local
(<code>.tuple (<>.some <code>.any))))
(syntax: .public (program: [args ..arguments^
diff --git a/stdlib/source/library/lux/target/js.lux b/stdlib/source/library/lux/target/js.lux
index 6243e3f11..d101afd55 100644
--- a/stdlib/source/library/lux/target/js.lux
+++ b/stdlib/source/library/lux/target/js.lux
@@ -181,7 +181,7 @@
(text.enclosed ["{"
close]))))
- (def: .public (function! name inputs body)
+ (def: .public (function_definition name inputs body)
(-> Var (List Var) Statement Statement)
(|> body
..block
@@ -195,7 +195,7 @@
(def: .public (function name inputs body)
(-> Var (List Var) Statement Computation)
- (|> (..function! name inputs body)
+ (|> (..function_definition name inputs body)
representation
..expression
abstraction))
diff --git a/stdlib/source/library/lux/target/lua.lux b/stdlib/source/library/lux/target/lua.lux
index 2269e015b..a6e63c04c 100644
--- a/stdlib/source/library/lux/target/lua.lux
+++ b/stdlib/source/library/lux/target/lua.lux
@@ -378,7 +378,7 @@
0 (.list)
_ (|> (-- arity)
(enum.range n.enum 0)
- (list#each (|>> %.nat code.local_symbol))))))
+ (list#each (|>> %.nat code.local))))))
(syntax: (arity_types [arity <code>.nat])
(in (list.repeated arity (` ..Expression))))
diff --git a/stdlib/source/library/lux/target/php.lux b/stdlib/source/library/lux/target/php.lux
index f0a2d560c..a8bfa37a1 100644
--- a/stdlib/source/library/lux/target/php.lux
+++ b/stdlib/source/library/lux/target/php.lux
@@ -237,7 +237,7 @@
0 (.list)
_ (|> (-- arity)
(enum.range n.enum 0)
- (list#each (|>> %.nat code.local_symbol))))))
+ (list#each (|>> %.nat code.local))))))
(syntax: (arity_types [arity <code>.nat])
(in (list.repeated arity (` ..Expression))))
diff --git a/stdlib/source/library/lux/target/python.lux b/stdlib/source/library/lux/target/python.lux
index 0e4e279cb..277e2c947 100644
--- a/stdlib/source/library/lux/target/python.lux
+++ b/stdlib/source/library/lux/target/python.lux
@@ -456,7 +456,7 @@
0 (.list)
_ (|> (-- arity)
(enum.range n.enum 0)
- (list#each (|>> %.nat code.local_symbol))))))
+ (list#each (|>> %.nat code.local))))))
(syntax: (arity_types [arity <code>.nat])
(in (list.repeated arity (` (Expression Any)))))
diff --git a/stdlib/source/library/lux/target/r.lux b/stdlib/source/library/lux/target/r.lux
index c4fa1d87a..631b0b74d 100644
--- a/stdlib/source/library/lux/target/r.lux
+++ b/stdlib/source/library/lux/target/r.lux
@@ -214,7 +214,7 @@
0 (.list)
_ (|> arity
list.indices
- (list#each (|>> %.nat code.local_symbol))))))
+ (list#each (|>> %.nat code.local))))))
(syntax: (arity_types [arity <code>.nat])
(in (list.repeated arity (` ..Expression))))
diff --git a/stdlib/source/library/lux/target/ruby.lux b/stdlib/source/library/lux/target/ruby.lux
index a89537de1..ba29eb81a 100644
--- a/stdlib/source/library/lux/target/ruby.lux
+++ b/stdlib/source/library/lux/target/ruby.lux
@@ -486,7 +486,7 @@
0 (.list)
_ (|> (-- arity)
(enum.range n.enum 0)
- (list#each (|>> %.nat code.local_symbol))))))
+ (list#each (|>> %.nat code.local))))))
(syntax: (arity_types [arity <code>.nat])
(in (list.repeated arity (` ..Expression))))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/jvm.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/jvm.lux
index 999331c91..49d9df8ca 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/jvm.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/jvm.lux
@@ -1351,8 +1351,8 @@
_
{.#None})))]
- [pass! #Pass]
- [hint! #Hint]
+ [pass #Pass]
+ [hint #Hint]
)
(template [<name> <type> <method>]
@@ -1426,12 +1426,12 @@
(|>> {#Pass})
(|>> {#Hint}))
(method_signature method_style method)))))))]
- (case (list.all pass! candidates)
+ (case (list.all pass candidates)
{.#Item method {.#End}}
(in method)
{.#End}
- (/////analysis.except ..no_candidates [actual_class_tvars class_name method_name actual_method_tvars inputsJT (list.all hint! candidates)])
+ (/////analysis.except ..no_candidates [actual_class_tvars class_name method_name actual_method_tvars inputsJT (list.all hint candidates)])
{.#Item method alternatives}
(if allow_inheritance?
@@ -1460,12 +1460,12 @@
(|>> {#Pass})
(|>> {#Hint}))
(constructor_signature constructor))))))]
- (case (list.all pass! candidates)
+ (case (list.all pass candidates)
{.#Item constructor {.#End}}
(in constructor)
{.#End}
- (/////analysis.except ..no_candidates [actual_class_tvars class_name ..constructor_method actual_method_tvars inputsJT (list.all hint! candidates)])
+ (/////analysis.except ..no_candidates [actual_class_tvars class_name ..constructor_method actual_method_tvars inputsJT (list.all hint candidates)])
candidates
(/////analysis.except ..too_many_candidates [actual_class_tvars class_name ..constructor_method actual_method_tvars inputsJT candidates]))))
@@ -1807,7 +1807,7 @@
(def: .public abstract_method_definition
(Parser (Abstract_Method Code))
(<| <code>.form
- (<>.after (<code>.text! ..abstract_tag))
+ (<>.after (<code>.this_text ..abstract_tag))
($_ <>.and
<code>.text
..visibility
@@ -1869,7 +1869,7 @@
(def: .public constructor_definition
(Parser (Constructor Code))
(<| <code>.form
- (<>.after (<code>.text! ..constructor_tag))
+ (<>.after (<code>.this_text ..constructor_tag))
($_ <>.and
..visibility
<code>.bit
@@ -1949,7 +1949,7 @@
(def: .public virtual_method_definition
(Parser (Virtual_Method Code))
(<| <code>.form
- (<>.after (<code>.text! ..virtual_tag))
+ (<>.after (<code>.this_text ..virtual_tag))
($_ <>.and
<code>.text
..visibility
@@ -2047,7 +2047,7 @@
(def: .public static_method_definition
(Parser (Static_Method Code))
(<| <code>.form
- (<>.after (<code>.text! ..static_tag))
+ (<>.after (<code>.this_text ..static_tag))
($_ <>.and
<code>.text
..visibility
@@ -2121,7 +2121,7 @@
(def: .public overriden_method_definition
(Parser (Overriden_Method Code))
(<| <code>.form
- (<>.after (<code>.text! ..overriden_tag))
+ (<>.after (<code>.this_text ..overriden_tag))
($_ <>.and
..class
<code>.text
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/jvm.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/jvm.lux
index 0ec22f549..ab72fe131 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/jvm.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/jvm.lux
@@ -128,7 +128,7 @@
(Parser (Modifier class.Class))
(`` ($_ <>.either
(~~ (template [<label> <modifier>]
- [(<>.after (<code>.text! <label>) (<>#in <modifier>))]
+ [(<>.after (<code>.this_text <label>) (<>#in <modifier>))]
["final" class.final]
["abstract" class.abstract]
@@ -138,7 +138,7 @@
(Parser (Modifier field.Field))
(`` ($_ <>.either
(~~ (template [<label> <modifier>]
- [(<>.after (<code>.text! <label>) (<>#in <modifier>))]
+ [(<>.after (<code>.this_text <label>) (<>#in <modifier>))]
["volatile" field.volatile]
["final" field.final]
@@ -160,7 +160,7 @@
(def: constant
(Parser Constant)
(<| <code>.form
- (<>.after (<code>.text! "constant"))
+ (<>.after (<code>.this_text "constant"))
($_ <>.and
<code>.text
(<code>.tuple (<>.some ..annotation))
@@ -174,12 +174,12 @@
(def: variable
(Parser Variable)
(<| <code>.form
- (<>.after (<code>.text! "variable"))
+ (<>.after (<code>.this_text "variable"))
($_ <>.and
<code>.text
..visibility
..state
- (<>.parses? (<code>.text! jvm.static_tag))
+ (<>.parses? (<code>.this_text jvm.static_tag))
(<code>.tuple (<>.some ..annotation))
..field_type
)))
@@ -296,7 +296,7 @@
(<synthesis>.loop (<>.exactly 0 <synthesis>.any))
<synthesis>.tuple
($_ <>.either
- (<| (<>.after (<synthesis>.text! ""))
+ (<| (<>.after (<synthesis>.this_text ""))
(<>#each (host.hidden_method_body arity))
<synthesis>.any)
<synthesis>.any)))
@@ -304,7 +304,7 @@
(def: constructor_synthesis
(<synthesis>.Parser (jvm.Constructor Synthesis))
(<| <synthesis>.tuple
- (<>.after (<synthesis>.text! jvm.constructor_tag))
+ (<>.after (<synthesis>.this_text jvm.constructor_tag))
($_ <>.and
(<text>.then jvm.visibility' <synthesis>.text)
<synthesis>.bit
@@ -323,7 +323,7 @@
(def: overriden_method_synthesis
(<synthesis>.Parser (jvm.Overriden_Method Synthesis))
(<| <synthesis>.tuple
- (<>.after (<synthesis>.text! jvm.overriden_tag))
+ (<>.after (<synthesis>.this_text jvm.overriden_tag))
($_ <>.and
..class_type_synthesis
<synthesis>.text
@@ -343,7 +343,7 @@
(def: virtual_method_synthesis
(<synthesis>.Parser (jvm.Virtual_Method Synthesis))
(<| <synthesis>.tuple
- (<>.after (<synthesis>.text! jvm.virtual_tag))
+ (<>.after (<synthesis>.this_text jvm.virtual_tag))
($_ <>.and
<synthesis>.text
(<text>.then jvm.visibility' <synthesis>.text)
@@ -364,7 +364,7 @@
(def: static_method_synthesis
(<synthesis>.Parser (jvm.Static_Method Synthesis))
(<| <synthesis>.tuple
- (<>.after (<synthesis>.text! jvm.static_tag))
+ (<>.after (<synthesis>.this_text jvm.static_tag))
($_ <>.and
<synthesis>.text
(<text>.then jvm.visibility' <synthesis>.text)
@@ -383,7 +383,7 @@
(def: abstract_method_synthesis
(<synthesis>.Parser (jvm.Abstract_Method Synthesis))
(<| <synthesis>.tuple
- (<>.after (<synthesis>.text! jvm.abstract_tag))
+ (<>.after (<synthesis>.this_text jvm.abstract_tag))
($_ <>.and
<synthesis>.text
(<text>.then jvm.visibility' <synthesis>.text)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/lux.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/lux.lux
index 16bd430fa..8a7f95cee 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/lux.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/lux.lux
@@ -274,7 +274,7 @@
(def: (def::type_tagged expander host_analysis)
(-> Expander /////analysis.Bundle Handler)
(..custom
- [($_ <>.and <code>.local_symbol <code>.any
+ [($_ <>.and <code>.local <code>.any
(<>.or (<code>.variant (<>.some <code>.text))
(<code>.tuple (<>.some <code>.text)))
<code>.any)
@@ -366,7 +366,7 @@
(def: def::alias
Handler
(..custom
- [($_ <>.and <code>.local_symbol <code>.symbol)
+ [($_ <>.and <code>.local <code>.symbol)
(function (_ extension_name phase archive [alias def_name])
(do phase.monad
[_ (///.lifted
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/jvm/host.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/jvm/host.lux
index 93435b43b..91d72f959 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/jvm/host.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/jvm/host.lux
@@ -849,7 +849,7 @@
(def: overriden_method_definition
(Parser [(Environment Synthesis) (/.Overriden_Method Synthesis)])
(<synthesis>.tuple (do <>.monad
- [_ (<synthesis>.text! /.overriden_tag)
+ [_ (<synthesis>.this_text /.overriden_tag)
ownerT ..class
name <synthesis>.text
strict_fp? <synthesis>.bit
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 2f9e8476e..8579b8865 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
@@ -1,42 +1,42 @@
(.using
- [library
- [lux {"-" Location}
- ["[0]" meta]
- [abstract
- ["[0]" monad {"+" do}]]
- [control
- ["[0]" function]
- ["<>" parser
- ["<[0]>" code]]]
- [data
- ["[0]" product]
- ["[0]" text ("[1]#[0]" hash)
- ["%" format {"+" format}]
- ["[0]" encoding]]
- [collection
- ["[0]" list ("[1]#[0]" functor monoid)]
- ["[0]" sequence]]]
- ["[0]" macro
- [syntax {"+" syntax:}]
- ["[0]" code]]
- [math
- [number {"+" hex}
- ["[0]" i64]]]
- ["@" target
- ["_" common_lisp {"+" Expression Computation Literal}]]]]
- ["[0]" /// "_"
- ["[1][0]" reference]
- ["//[1]" /// "_"
- [analysis {"+" Variant}]
- ["[1][0]" synthesis {"+" Synthesis}]
- ["[1][0]" generation]
- ["//[1]" ///
- ["[1][0]" phase]
- [reference
- [variable {"+" Register}]]
- [meta
- [archive {"+" Output Archive}
- ["[0]" artifact {"+" Registry}]]]]]])
+ [library
+ [lux {"-" Location}
+ ["[0]" meta]
+ [abstract
+ ["[0]" monad {"+" do}]]
+ [control
+ ["[0]" function]
+ ["<>" parser
+ ["<[0]>" code]]]
+ [data
+ ["[0]" product]
+ ["[0]" text ("[1]#[0]" hash)
+ ["%" format {"+" format}]
+ ["[0]" encoding]]
+ [collection
+ ["[0]" list ("[1]#[0]" functor monoid)]
+ ["[0]" sequence]]]
+ ["[0]" macro
+ [syntax {"+" syntax:}]
+ ["[0]" code]]
+ [math
+ [number {"+" hex}
+ ["[0]" i64]]]
+ ["@" target
+ ["_" common_lisp {"+" Expression Computation Literal}]]]]
+ ["[0]" /// "_"
+ ["[1][0]" reference]
+ ["//[1]" /// "_"
+ [analysis {"+" Variant}]
+ ["[1][0]" synthesis {"+" Synthesis}]
+ ["[1][0]" generation]
+ ["//[1]" ///
+ ["[1][0]" phase]
+ [reference
+ [variable {"+" Register}]]
+ [meta
+ [archive {"+" Output Archive}
+ ["[0]" artifact {"+" Registry}]]]]]])
(def: module_id
0)
@@ -87,31 +87,31 @@
(-> (Expression Any) (Computation Any))
(|>> [1 #1] ..variant))
-(syntax: .public (with_vars [vars (<code>.tuple (<>.some <code>.local_symbol))
+(syntax: .public (with_vars [vars (<code>.tuple (<>.some <code>.local))
body <code>.any])
(do [! meta.monad]
[ids (monad.all ! (list.repeated (list.size vars) meta.seed))]
(in (list (` (let [(~+ (|> vars
(list.zipped/2 ids)
(list#each (function (_ [id var])
- (list (code.local_symbol var)
+ (list (code.local var)
(` (_.var (~ (code.text (format "v" (%.nat id)))))))))
list.together))]
(~ body)))))))
-(syntax: (runtime: [declaration (<>.or <code>.local_symbol
- (<code>.form (<>.and <code>.local_symbol
- (<>.some <code>.local_symbol))))
+(syntax: (runtime: [declaration (<>.or <code>.local
+ (<code>.form (<>.and <code>.local
+ (<>.some <code>.local))))
code <code>.any])
(do meta.monad
[runtime_id meta.seed]
(macro.with_symbols [g!_]
- (let [runtime (code.local_symbol (///reference.artifact [..module_id runtime_id]))
+ (let [runtime (code.local (///reference.artifact [..module_id runtime_id]))
runtime_name (` (_.var (~ (code.text (%.code runtime)))))]
(case declaration
{.#Left name}
- (let [g!name (code.local_symbol name)
- code_nameC (code.local_symbol (format "@" name))]
+ (let [g!name (code.local name)
+ code_nameC (code.local (format "@" name))]
(in (list (` (def: .public (~ g!name)
_.Var/1
(~ runtime_name)))
@@ -121,10 +121,10 @@
(_.defparameter (~ runtime_name) (~ code)))))))
{.#Right [name inputs]}
- (let [g!name (code.local_symbol name)
- code_nameC (code.local_symbol (format "@" name))
+ (let [g!name (code.local name)
+ code_nameC (code.local (format "@" name))
- inputsC (list#each code.local_symbol inputs)
+ inputsC (list#each code.local inputs)
inputs_typesC (list#each (function.constant (` (_.Expression Any)))
inputs)]
(in (list (` (def: .public ((~ g!name) (~+ inputsC))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/extension.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/extension.lux
index 7a28610fb..a260ec3c8 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/extension.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/extension.lux
@@ -32,12 +32,12 @@
(type: .public (Variadic of) (-> (List of) of))
(syntax: (arity: [arity <code>.nat
- name <code>.local_symbol
+ name <code>.local
type <code>.any])
(with_symbols [g!_ g!extension g!name g!phase g!archive g!inputs g!of g!anchor g!expression g!directive]
(do [! meta.monad]
[g!input+ (monad.all ! (list.repeated arity (macro.symbol "input")))]
- (in (list (` (def: .public ((~ (code.local_symbol name)) (~ g!extension))
+ (in (list (` (def: .public ((~ (code.local name)) (~ g!extension))
(All ((~ g!_) (~ g!anchor) (~ g!expression) (~ g!directive))
(-> ((~ type) (~ g!expression))
(generation.Handler (~ g!anchor) (~ g!expression) (~ g!directive))))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/function.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/function.lux
index 26ac01808..06f2a1884 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/function.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/function.lux
@@ -48,14 +48,14 @@
(-> Var (List Expression) Statement [Statement Expression])
(case inits
{.#End}
- [(_.function! @self (list) body!)
+ [(_.function_definition @self (list) body!)
@self]
_
- [(_.function! @self
- (|> (list.enumeration inits)
- (list#each (|>> product.left ..capture)))
- (_.return (_.function @self (list) body!)))
+ [(_.function_definition @self
+ (|> (list.enumeration inits)
+ (list#each (|>> product.left ..capture)))
+ (_.return (_.function @self (list) body!)))
(_.apply/* @self inits)]))
(def: @curried
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 2a53e6cf3..761a1c668 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
@@ -81,46 +81,46 @@
(-> Var (-> Var Expression) Statement)
(_.define name (definition name)))
-(syntax: .public (with_vars [vars (<code>.tuple (<>.some <code>.local_symbol))
+(syntax: .public (with_vars [vars (<code>.tuple (<>.some <code>.local))
body <code>.any])
(do [! meta.monad]
[ids (monad.all ! (list.repeated (list.size vars) meta.seed))]
(in (list (` (let [(~+ (|> vars
(list.zipped/2 ids)
(list#each (function (_ [id var])
- (list (code.local_symbol var)
+ (list (code.local var)
(` (_.var (~ (code.text (format "v" (%.nat id)))))))))
list.together))]
(~ body)))))))
-(syntax: (runtime: [declaration (<>.or <code>.local_symbol
- (<code>.form (<>.and <code>.local_symbol
- (<>.some <code>.local_symbol))))
+(syntax: (runtime: [declaration (<>.or <code>.local
+ (<code>.form (<>.and <code>.local
+ (<>.some <code>.local))))
code <code>.any])
(macro.with_symbols [g!_ runtime]
(let [runtime_name (` (_.var (~ (code.text (%.code runtime)))))]
(case declaration
{.#Left name}
- (let [g!name (code.local_symbol name)]
+ (let [g!name (code.local name)]
(in (list (` (def: .public (~ g!name)
Var
(~ runtime_name)))
- (` (def: (~ (code.local_symbol (format "@" name)))
+ (` (def: (~ (code.local (format "@" name)))
Statement
(..feature (~ runtime_name)
(function ((~ g!_) (~ g!name))
(~ code))))))))
{.#Right [name inputs]}
- (let [g!name (code.local_symbol name)
- inputsC (list#each code.local_symbol inputs)
+ (let [g!name (code.local name)
+ inputsC (list#each code.local inputs)
inputs_typesC (list#each (function.constant (` _.Expression)) inputs)]
(in (list (` (def: .public ((~ g!name) (~+ inputsC))
(-> (~+ inputs_typesC) Computation)
(_.apply/* (~ runtime_name) (list (~+ inputsC)))))
- (` (def: (~ (code.local_symbol (format "@" name)))
+ (` (def: (~ (code.local (format "@" name)))
Statement
(..feature (~ runtime_name)
(function ((~ g!_) (~ g!_))
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 6cf9f2ff0..99378b28c 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
@@ -103,14 +103,14 @@
(-> Var (-> Var Statement) Statement)
(definition name))
-(syntax: .public (with_vars [vars (<code>.tuple (<>.some <code>.local_symbol))
+(syntax: .public (with_vars [vars (<code>.tuple (<>.some <code>.local))
body <code>.any])
(do [! meta.monad]
[ids (monad.all ! (list.repeated (list.size vars) meta.seed))]
(in (list (` (let [(~+ (|> vars
(list.zipped/2 ids)
(list#each (function (_ [id var])
- (list (code.local_symbol var)
+ (list (code.local var)
(` (_.var (~ (code.text (format "v" (%.nat id)))))))))
list.together))]
(~ body)))))))
@@ -118,24 +118,24 @@
(def: module_id
0)
-(syntax: (runtime: [declaration (<>.or <code>.local_symbol
- (<code>.form (<>.and <code>.local_symbol
- (<>.some <code>.local_symbol))))
+(syntax: (runtime: [declaration (<>.or <code>.local
+ (<code>.form (<>.and <code>.local
+ (<>.some <code>.local))))
code <code>.any])
(do meta.monad
[runtime_id meta.seed]
(macro.with_symbols [g!_]
- (let [runtime (code.local_symbol (///reference.artifact [..module_id runtime_id]))
+ (let [runtime (code.local (///reference.artifact [..module_id runtime_id]))
runtime_name (` (_.var (~ (code.text (%.code runtime)))))]
(case declaration
{.#Left name}
(macro.with_symbols [g!_]
- (let [g!name (code.local_symbol name)]
+ (let [g!name (code.local name)]
(in (list (` (def: .public (~ g!name)
Var
(~ runtime_name)))
- (` (def: (~ (code.local_symbol (format "@" name)))
+ (` (def: (~ (code.local (format "@" name)))
Statement
(..feature (~ runtime_name)
(function ((~ g!_) (~ g!name))
@@ -143,15 +143,15 @@
{.#Right [name inputs]}
(macro.with_symbols [g!_]
- (let [g!name (code.local_symbol name)
- inputsC (list#each code.local_symbol inputs)
+ (let [g!name (code.local name)
+ inputsC (list#each code.local inputs)
inputs_typesC (list#each (function.constant (` _.Expression))
inputs)]
(in (list (` (def: .public ((~ g!name) (~+ inputsC))
(-> (~+ inputs_typesC) Computation)
(_.apply (list (~+ inputsC)) (~ runtime_name))))
- (` (def: (~ (code.local_symbol (format "@" name)))
+ (` (def: (~ (code.local (format "@" name)))
Statement
(..feature (~ runtime_name)
(function ((~ g!_) (~ g!_))
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 10489ccc3..25bbcfe47 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
@@ -1,42 +1,42 @@
(.using
- [library
- [lux {"-" Location}
- ["[0]" meta]
- [abstract
- ["[0]" monad {"+" do}]]
- [control
- ["[0]" function]
- ["<>" parser
- ["<[0]>" code]]]
- [data
- ["[0]" product]
- ["[0]" text ("[1]#[0]" hash)
- ["%" format {"+" format}]
- [encoding
- ["[0]" utf8]]]
- [collection
- ["[0]" list ("[1]#[0]" functor)]
- ["[0]" sequence]]]
- ["[0]" macro
- [syntax {"+" syntax:}]
- ["[0]" code]]
- [math
- [number {"+" hex}
- ["[0]" i64]]]
- ["@" target
- ["_" php {"+" Expression Label Constant Var Computation Literal Statement}]]]]
- ["[0]" /// "_"
- ["[1][0]" reference]
- ["//[1]" /// "_"
- ["[1][0]" synthesis {"+" Synthesis}]
- ["[1][0]" generation]
- ["//[1]" ///
- ["[1][0]" phase]
- [reference
- [variable {"+" Register}]]
- [meta
- [archive {"+" Output Archive}
- ["[0]" artifact {"+" Registry}]]]]]])
+ [library
+ [lux {"-" Location}
+ ["[0]" meta]
+ [abstract
+ ["[0]" monad {"+" do}]]
+ [control
+ ["[0]" function]
+ ["<>" parser
+ ["<[0]>" code]]]
+ [data
+ ["[0]" product]
+ ["[0]" text ("[1]#[0]" hash)
+ ["%" format {"+" format}]
+ [encoding
+ ["[0]" utf8]]]
+ [collection
+ ["[0]" list ("[1]#[0]" functor)]
+ ["[0]" sequence]]]
+ ["[0]" macro
+ [syntax {"+" syntax:}]
+ ["[0]" code]]
+ [math
+ [number {"+" hex}
+ ["[0]" i64]]]
+ ["@" target
+ ["_" php {"+" Expression Label Constant Var Computation Literal Statement}]]]]
+ ["[0]" /// "_"
+ ["[1][0]" reference]
+ ["//[1]" /// "_"
+ ["[1][0]" synthesis {"+" Synthesis}]
+ ["[1][0]" generation]
+ ["//[1]" ///
+ ["[1][0]" phase]
+ [reference
+ [variable {"+" Register}]]
+ [meta
+ [archive {"+" Output Archive}
+ ["[0]" artifact {"+" Registry}]]]]]])
(template [<name> <base>]
[(type: .public <name>
@@ -70,14 +70,14 @@
(-> Constant (-> Constant Statement) Statement)
(definition name))
-(syntax: .public (with_vars [vars (<code>.tuple (<>.some <code>.local_symbol))
+(syntax: .public (with_vars [vars (<code>.tuple (<>.some <code>.local))
body <code>.any])
(do [! meta.monad]
[ids (monad.all ! (list.repeated (list.size vars) meta.seed))]
(in (list (` (let [(~+ (|> vars
(list.zipped/2 ids)
(list#each (function (_ [id var])
- (list (code.local_symbol var)
+ (list (code.local var)
(` (_.var (~ (code.text (format "v" (%.nat id)))))))))
list.together))]
(~ body)))))))
@@ -85,24 +85,24 @@
(def: module_id
0)
-(syntax: (runtime: [declaration (<>.or <code>.local_symbol
- (<code>.form (<>.and <code>.local_symbol
- (<>.some <code>.local_symbol))))
+(syntax: (runtime: [declaration (<>.or <code>.local
+ (<code>.form (<>.and <code>.local
+ (<>.some <code>.local))))
code <code>.any])
(do meta.monad
[runtime_id meta.seed]
(macro.with_symbols [g!_]
- (let [runtime (code.local_symbol (///reference.artifact [..module_id runtime_id]))
+ (let [runtime (code.local (///reference.artifact [..module_id runtime_id]))
runtime_name (` (_.constant (~ (code.text (%.code runtime)))))]
(case declaration
{.#Left name}
(macro.with_symbols [g!_]
- (let [g!name (code.local_symbol name)]
+ (let [g!name (code.local name)]
(in (list (` (def: .public (~ g!name)
Var
(~ runtime_name)))
- (` (def: (~ (code.local_symbol (format "@" name)))
+ (` (def: (~ (code.local (format "@" name)))
Statement
(..feature (~ runtime_name)
(function ((~ g!_) (~ g!name))
@@ -110,15 +110,15 @@
{.#Right [name inputs]}
(macro.with_symbols [g!_]
- (let [g!name (code.local_symbol name)
- inputsC (list#each code.local_symbol inputs)
+ (let [g!name (code.local name)
+ inputsC (list#each code.local inputs)
inputs_typesC (list#each (function.constant (` _.Expression))
inputs)]
(in (list (` (def: .public ((~ g!name) (~+ inputsC))
(-> (~+ inputs_typesC) Computation)
(_.apply/* (list (~+ inputsC)) (~ runtime_name))))
- (` (def: (~ (code.local_symbol (format "@" name)))
+ (` (def: (~ (code.local (format "@" name)))
Statement
(..feature (~ runtime_name)
(function ((~ g!_) (~ g!_))
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 13b55ccbd..a9e12aede 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
@@ -109,27 +109,27 @@
(-> SVar (-> SVar (Statement Any)) (Statement Any))
(definition name))
-(syntax: .public (with_vars [vars (<code>.tuple (<>.some <code>.local_symbol))
+(syntax: .public (with_vars [vars (<code>.tuple (<>.some <code>.local))
body <code>.any])
(do [! meta.monad]
[ids (monad.all ! (list.repeated (list.size vars) meta.seed))]
(in (list (` (let [(~+ (|> vars
(list.zipped/2 ids)
(list#each (function (_ [id var])
- (list (code.local_symbol var)
+ (list (code.local var)
(` (_.var (~ (code.text (format "v" (%.nat id)))))))))
list.together))]
(~ body)))))))
-(syntax: (runtime: [declaration (<>.or <code>.local_symbol
- (<code>.form (<>.and <code>.local_symbol
- (<>.some <code>.local_symbol))))
+(syntax: (runtime: [declaration (<>.or <code>.local
+ (<code>.form (<>.and <code>.local
+ (<>.some <code>.local))))
code <code>.any])
(case declaration
{.#Left name}
(macro.with_symbols [g!_]
- (let [nameC (code.local_symbol name)
- code_nameC (code.local_symbol (format "@" name))
+ (let [nameC (code.local name)
+ code_nameC (code.local (format "@" name))
runtime_nameC (` (runtime_name (~ (code.text name))))]
(in (list (` (def: .public (~ nameC) SVar (~ runtime_nameC)))
(` (def: (~ code_nameC)
@@ -140,10 +140,10 @@
{.#Right [name inputs]}
(macro.with_symbols [g!_]
- (let [nameC (code.local_symbol name)
- code_nameC (code.local_symbol (format "@" name))
+ (let [nameC (code.local name)
+ code_nameC (code.local (format "@" name))
runtime_nameC (` (runtime_name (~ (code.text name))))
- inputsC (list#each code.local_symbol inputs)
+ inputsC (list#each code.local inputs)
inputs_typesC (list#each (function.constant (` (_.Expression Any)))
inputs)]
(in (list (` (def: .public ((~ nameC) (~+ inputsC))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/procedure/common.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/procedure/common.lux
index e0800d768..5869ff984 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/procedure/common.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/procedure/common.lux
@@ -63,12 +63,12 @@
"Expected: " (|> expected .int %i) "\n"
" Actual: " (|> actual .int %i)))
-(syntax: (arity: [name s.local_symbol
+(syntax: (arity: [name s.local
arity s.nat])
(with_symbols [g!_ g!proc g!name g!translate g!inputs]
(do [@ macro.monad]
[g!input+ (monad.all @ (list.repeated arity (macro.symbol "input")))]
- (in (list (` (def: .public ((~ (code.local_symbol name)) (~ g!proc))
+ (in (list (` (def: .public ((~ (code.local name)) (~ g!proc))
(-> (-> (..Vector (~ (code.nat arity)) Expression) Expression)
(-> Text ..Proc))
(function ((~ g!_) (~ g!name))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/runtime.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/runtime.lux
index 6968c5618..02c38d130 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/runtime.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/runtime.lux
@@ -76,48 +76,48 @@
... else
(.int input)))
-(syntax: .public (with_vars [vars (<code>.tuple (<>.some <code>.local_symbol))
+(syntax: .public (with_vars [vars (<code>.tuple (<>.some <code>.local))
body <code>.any])
(do [! meta.monad]
[ids (monad.all ! (list.repeated (list.size vars) meta.seed))]
(in (list (` (let [(~+ (|> vars
(list.zipped/2 ids)
(list#each (function (_ [id var])
- (list (code.local_symbol var)
+ (list (code.local var)
(` (_.var (~ (code.text (format "v" (%.nat id)))))))))
list.together))]
(~ body)))))))
-(syntax: (runtime: [declaration (<>.or <code>.local_symbol
- (<code>.form (<>.and <code>.local_symbol
- (<>.some <code>.local_symbol))))
+(syntax: (runtime: [declaration (<>.or <code>.local
+ (<code>.form (<>.and <code>.local
+ (<>.some <code>.local))))
code <code>.any])
(do meta.monad
[runtime_id meta.seed]
(macro.with_symbols [g!_]
- (let [runtime (code.local_symbol (///reference.artifact [..module_id runtime_id]))
+ (let [runtime (code.local (///reference.artifact [..module_id runtime_id]))
runtime_name (` (_.var (~ (code.text (%.code runtime)))))]
(case declaration
{.#Left name}
- (let [g!name (code.local_symbol name)]
+ (let [g!name (code.local name)]
(in (list (` (def: .public (~ g!name)
_.SVar
(~ runtime_name)))
- (` (def: (~ (code.local_symbol (format "@" name)))
+ (` (def: (~ (code.local (format "@" name)))
_.Expression
(_.set! (~ runtime_name) (~ code)))))))
{.#Right [name inputs]}
- (let [g!name (code.local_symbol name)
- inputsC (list#each code.local_symbol inputs)
+ (let [g!name (code.local name)
+ inputsC (list#each code.local inputs)
inputs_typesC (list#each (function.constant (` _.Expression))
inputs)]
(in (list (` (def: .public ((~ g!name) (~+ inputsC))
(-> (~+ inputs_typesC) _.Expression)
(_.apply (list (~+ inputsC)) (~ runtime_name))))
- (` (def: (~ (code.local_symbol (format "@" name)))
+ (` (def: (~ (code.local (format "@" name)))
_.Expression
(..with_vars [(~+ inputsC)]
(_.set! (~ runtime_name)
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 99a2784cb..94005f819 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
@@ -68,14 +68,14 @@
..unit
_.nil))
-(syntax: .public (with_vars [vars (<code>.tuple (<>.some <code>.local_symbol))
+(syntax: .public (with_vars [vars (<code>.tuple (<>.some <code>.local))
body <code>.any])
(do [! meta.monad]
[ids (monad.all ! (list.repeated (list.size vars) meta.seed))]
(in (list (` (let [(~+ (|> vars
(list.zipped/2 ids)
(list#each (function (_ [id var])
- (list (code.local_symbol var)
+ (list (code.local var)
(` (_.local (~ (code.text (format "v" (%.nat id)))))))))
list.together))]
(~ body)))))))
@@ -102,9 +102,9 @@
... (_.do "const_defined?" (list (_.string "Encoding")) {.#None}))
)
-(syntax: (runtime: [declaration (<>.or <code>.local_symbol
- (<code>.form (<>.and <code>.local_symbol
- (<>.some <code>.local_symbol))))
+(syntax: (runtime: [declaration (<>.or <code>.local
+ (<code>.form (<>.and <code>.local
+ (<>.some <code>.local))))
conditional_implementations (<>.some (<code>.tuple (<>.and <code>.any <code>.any)))
default_implementation <code>.any])
(do meta.monad
@@ -113,11 +113,11 @@
(case declaration
{.#Left name}
(macro.with_symbols [g!_]
- (let [runtime (code.local_symbol (///reference.artifact [..module_id runtime_id]))
+ (let [runtime (code.local (///reference.artifact [..module_id runtime_id]))
runtime_name (` (_.constant (~ (code.text (%.code runtime)))))
- g!name (code.local_symbol name)]
+ g!name (code.local name)]
(in (list (` (def: .public (~ g!name) _.CVar (~ runtime_name)))
- (` (def: (~ (code.local_symbol (format "@" name)))
+ (` (def: (~ (code.local (format "@" name)))
Statement
(~ (list#mix (function (_ [when then] else)
(` (_.if (~ when)
@@ -128,10 +128,10 @@
{.#Right [name inputs]}
(macro.with_symbols [g!_]
- (let [runtime (code.local_symbol (///reference.artifact [..module_id runtime_id]))
+ (let [runtime (code.local (///reference.artifact [..module_id runtime_id]))
runtime_name (` (_.local (~ (code.text (%.code runtime)))))
- g!name (code.local_symbol name)
- inputsC (list#each code.local_symbol inputs)
+ g!name (code.local name)
+ inputsC (list#each code.local inputs)
inputs_typesC (list#each (function.constant (` _.Expression))
inputs)]
(in (list (` (def: .public ((~ g!name) (~+ inputsC))
@@ -139,7 +139,7 @@
(_.apply/* (list (~+ inputsC)) {.#None}
(~ runtime_name))))
- (` (def: (~ (code.local_symbol (format "@" name)))
+ (` (def: (~ (code.local (format "@" name)))
Statement
(..with_vars [(~+ inputsC)]
(~ (list#mix (function (_ [when then] else)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/extension/common.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/extension/common.lux
index b588619b7..062aa6c59 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/extension/common.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/extension/common.lux
@@ -38,12 +38,12 @@
(type: .public Trinary (-> (Vector 3 Expression) Computation))
(type: .public Variadic (-> (List Expression) Computation))
-(syntax: (arity: [name <code>.local_symbol
+(syntax: (arity: [name <code>.local
arity <code>.nat])
(with_symbols [g!_ g!extension g!name g!phase g!inputs]
(do [! macro.monad]
[g!input+ (monad.all ! (list.repeated arity (macro.symbol "input")))]
- (in (list (` (def: .public ((~ (code.local_symbol name)) (~ g!extension))
+ (in (list (` (def: .public ((~ (code.local name)) (~ g!extension))
(-> (-> (..Vector (~ (code.nat arity)) Expression) Computation)
Handler)
(function ((~ g!_) (~ g!name) (~ g!phase) (~ g!inputs))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/runtime.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/runtime.lux
index b13500596..bc785f38d 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/runtime.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/runtime.lux
@@ -1,43 +1,43 @@
(.using
- [library
- [lux {"-" Location}
- ["[0]" meta]
- [abstract
- ["[0]" monad {"+" do}]]
- [control
- ["[0]" function]
- ["<>" parser
- ["<[0]>" code]]]
- [data
- ["[0]" product]
- ["[0]" text ("[1]#[0]" hash)
- ["%" format {"+" format}]
- [encoding
- ["[0]" utf8]]]
- [collection
- ["[0]" list ("[1]#[0]" functor)]
- ["[0]" sequence]]]
- ["[0]" macro
- [syntax {"+" syntax:}]
- ["[0]" code]]
- [math
- [number {"+" hex}
- ["[0]" i64]]]
- ["@" target
- ["_" scheme {"+" Expression Computation Var}]]]]
- ["[0]" /// "_"
- ["[1][0]" reference]
- ["//[1]" /// "_"
- [analysis {"+" Variant}]
- ["[1][0]" synthesis {"+" Synthesis}]
- ["[1][0]" generation]
- ["//[1]" ///
- ["[1][0]" phase]
- [reference
- [variable {"+" Register}]]
- [meta
- [archive {"+" Output Archive}
- ["[0]" artifact {"+" Registry}]]]]]])
+ [library
+ [lux {"-" Location}
+ ["[0]" meta]
+ [abstract
+ ["[0]" monad {"+" do}]]
+ [control
+ ["[0]" function]
+ ["<>" parser
+ ["<[0]>" code]]]
+ [data
+ ["[0]" product]
+ ["[0]" text ("[1]#[0]" hash)
+ ["%" format {"+" format}]
+ [encoding
+ ["[0]" utf8]]]
+ [collection
+ ["[0]" list ("[1]#[0]" functor)]
+ ["[0]" sequence]]]
+ ["[0]" macro
+ [syntax {"+" syntax:}]
+ ["[0]" code]]
+ [math
+ [number {"+" hex}
+ ["[0]" i64]]]
+ ["@" target
+ ["_" scheme {"+" Expression Computation Var}]]]]
+ ["[0]" /// "_"
+ ["[1][0]" reference]
+ ["//[1]" /// "_"
+ [analysis {"+" Variant}]
+ ["[1][0]" synthesis {"+" Synthesis}]
+ ["[1][0]" generation]
+ ["//[1]" ///
+ ["[1][0]" phase]
+ [reference
+ [variable {"+" Register}]]
+ [meta
+ [archive {"+" Output Archive}
+ ["[0]" artifact {"+" Registry}]]]]]])
(def: module_id
0)
@@ -58,48 +58,48 @@
(def: .public unit
(_.string /////synthesis.unit))
-(syntax: .public (with_vars [vars (<code>.tuple (<>.some <code>.local_symbol))
+(syntax: .public (with_vars [vars (<code>.tuple (<>.some <code>.local))
body <code>.any])
(do [! meta.monad]
[ids (monad.all ! (list.repeated (list.size vars) meta.seed))]
(in (list (` (let [(~+ (|> vars
(list.zipped/2 ids)
(list#each (function (_ [id var])
- (list (code.local_symbol var)
+ (list (code.local var)
(` (_.var (~ (code.text (format "v" (%.nat id)))))))))
list.together))]
(~ body)))))))
-(syntax: (runtime: [declaration (<>.or <code>.local_symbol
- (<code>.form (<>.and <code>.local_symbol
- (<>.some <code>.local_symbol))))
+(syntax: (runtime: [declaration (<>.or <code>.local
+ (<code>.form (<>.and <code>.local
+ (<>.some <code>.local))))
code <code>.any])
(do meta.monad
[runtime_id meta.seed]
(macro.with_symbols [g!_]
- (let [runtime (code.local_symbol (///reference.artifact [..module_id runtime_id]))
+ (let [runtime (code.local (///reference.artifact [..module_id runtime_id]))
runtime_name (` (_.var (~ (code.text (%.code runtime)))))]
(case declaration
{.#Left name}
- (let [g!name (code.local_symbol name)]
+ (let [g!name (code.local name)]
(in (list (` (def: .public (~ g!name)
Var
(~ runtime_name)))
- (` (def: (~ (code.local_symbol (format "@" name)))
+ (` (def: (~ (code.local (format "@" name)))
_.Computation
(_.define_constant (~ runtime_name) (~ code)))))))
{.#Right [name inputs]}
- (let [g!name (code.local_symbol name)
- inputsC (list#each code.local_symbol inputs)
+ (let [g!name (code.local name)
+ inputsC (list#each code.local inputs)
inputs_typesC (list#each (function.constant (` _.Expression))
inputs)]
(in (list (` (def: .public ((~ g!name) (~+ inputsC))
(-> (~+ inputs_typesC) _.Computation)
(_.apply/* (list (~+ inputsC)) (~ runtime_name))))
- (` (def: (~ (code.local_symbol (format "@" name)))
+ (` (def: (~ (code.local (format "@" name)))
_.Computation
(..with_vars [(~+ inputsC)]
(_.define_function (~ runtime_name) [(list (~+ inputsC)) {.#None}]
diff --git a/stdlib/source/library/lux/type.lux b/stdlib/source/library/lux/type.lux
index 8e7541755..629947eb0 100644
--- a/stdlib/source/library/lux/type.lux
+++ b/stdlib/source/library/lux/type.lux
@@ -390,7 +390,7 @@
(`` (symbol (~~ (new_secret_marker)))))
(syntax: .public (log! [input (<>.or (<>.and <code>.symbol
- (<>.maybe (<>.after (<code>.symbol! ..secret_marker) <code>.any)))
+ (<>.maybe (<>.after (<code>.this_symbol ..secret_marker) <code>.any)))
<code>.any)])
(case input
{.#Left [valueN valueC]}
@@ -417,14 +417,14 @@
(def: type_parameters
(Parser (List Text))
- (<code>.tuple (<>.some <code>.local_symbol)))
+ (<code>.tuple (<>.some <code>.local)))
(syntax: .public (as [type_vars type_parameters
input <code>.any
output <code>.any
value (<>.maybe <code>.any)])
(macro.with_symbols [g!_]
- (.let [casterC (` (is (All ((~ g!_) (~+ (list#each code.local_symbol type_vars)))
+ (.let [casterC (` (is (All ((~ g!_) (~+ (list#each code.local type_vars)))
(-> (~ input) (~ output)))
(|>> as_expected)))]
(case value
@@ -448,7 +448,7 @@
exemplar ..typed
computation ..typed])
(macro.with_symbols [g!_]
- (.let [typeC (` (All ((~ g!_) (~+ (list#each code.local_symbol type_vars)))
+ (.let [typeC (` (All ((~ g!_) (~+ (list#each code.local type_vars)))
(-> (~ (the #type exemplar))
(~ (the #type computation)))))
shareC (` (is (~ typeC)
@@ -460,7 +460,7 @@
exemplar ..typed
extraction <code>.any])
(in (list (` (.type_of ((~! ..sharing)
- [(~+ (list#each code.local_symbol type_vars))]
+ [(~+ (list#each code.local type_vars))]
(~ (the #type exemplar))
(~ (the #expression exemplar))
diff --git a/stdlib/source/library/lux/type/abstract.lux b/stdlib/source/library/lux/type/abstract.lux
index 8ef8c93a1..e5eecf50b 100644
--- a/stdlib/source/library/lux/type/abstract.lux
+++ b/stdlib/source/library/lux/type/abstract.lux
@@ -181,7 +181,7 @@
(def: cast
(Parser [(Maybe Text) Code])
- (<>.either (<>.and (<>.maybe <code>.local_symbol) <code>.any)
+ (<>.either (<>.and (<>.maybe <code>.local) <code>.any)
(<>.and (<>#in {.#None}) <code>.any)))
(template [<name> <from> <to>]
@@ -207,8 +207,8 @@
(def: declaration
(Parser [Text (List Text)])
- (<>.either (<code>.form (<>.and <code>.local_symbol (<>.some <code>.local_symbol)))
- (<>.and <code>.local_symbol (# <>.monad in (list)))))
+ (<>.either (<code>.form (<>.and <code>.local (<>.some <code>.local)))
+ (<>.and <code>.local (# <>.monad in (list)))))
(def: abstract
(Parser [Code [Text (List Text)] Code (List Code)])
@@ -225,9 +225,9 @@
..abstract])
(do meta.monad
[current_module meta.current_module_name
- .let [type_varsC (list#each code.local_symbol type_vars)
- abstraction_declaration (` ((~ (code.local_symbol name)) (~+ type_varsC)))
- representation_declaration (` ((~ (code.local_symbol (representation_definition_name name)))
+ .let [type_varsC (list#each code.local type_vars)
+ abstraction_declaration (` ((~ (code.local name)) (~+ type_varsC)))
+ representation_declaration (` ((~ (code.local (representation_definition_name name)))
(~+ type_varsC)))]
_ (..push! [name
type_varsC
@@ -262,19 +262,19 @@
{#Current value}
(in (list (` (.|> (~ value) ..representation ..abstraction))))))
-(syntax: .public (pattern [selection (<code>.form (..selection <code>.local_symbol))
+(syntax: .public (pattern [selection (<code>.form (..selection <code>.local))
body <code>.any
branches (<>.some <code>.any)])
(case selection
{#Specific specific name}
- (let [g!var (code.local_symbol name)]
+ (let [g!var (code.local name)]
(in (list& g!var
(` (.let [(~ g!var) (..representation (~ specific) (~ g!var))]
(~ body)))
branches)))
{#Current name}
- (let [g!var (code.local_symbol name)]
+ (let [g!var (code.local name)]
(in (list& g!var
(` (.let [(~ g!var) (..representation (~ g!var))]
(~ body)))
diff --git a/stdlib/source/library/lux/type/implicit.lux b/stdlib/source/library/lux/type/implicit.lux
index 828656a46..19d3f17cf 100644
--- a/stdlib/source/library/lux/type/implicit.lux
+++ b/stdlib/source/library/lux/type/implicit.lux
@@ -335,8 +335,8 @@
(` ((~ (code.symbol constructor)) (~+ (list#each instance$ dependencies))))))
(syntax: .public (## [member <code>.symbol
- args (<>.or (<>.and (<>.some <code>.symbol) <code>.end!)
- (<>.and (<>.some <code>.any) <code>.end!))])
+ args (<>.or (<>.and (<>.some <code>.symbol) <code>.end)
+ (<>.and (<>.some <code>.any) <code>.end))])
(case args
{.#Left [args _]}
(do [! meta.monad]
@@ -350,7 +350,7 @@
{.#Item chosen {.#End}}
(in (list (` (# (~ (instance$ chosen))
- (~ (code.local_symbol (product.right member)))
+ (~ (code.local (product.right member)))
(~+ (list#each code.symbol args))))))
_
diff --git a/stdlib/source/library/lux/type/poly.lux b/stdlib/source/library/lux/type/poly.lux
index de4a5ac58..1533e2f3b 100644
--- a/stdlib/source/library/lux/type/poly.lux
+++ b/stdlib/source/library/lux/type/poly.lux
@@ -27,7 +27,7 @@
(def: polyP
(Parser [Code Text Code])
(let [private ($_ <>.and
- <code>.local_symbol
+ <code>.local
<code>.any)]
(<>.either (<>.and <code>.any private)
(<>.and (<>#in (` .private)) private))))
diff --git a/stdlib/source/library/lux/type/unit.lux b/stdlib/source/library/lux/type/unit.lux
index 08fc7770f..4527a5160 100644
--- a/stdlib/source/library/lux/type/unit.lux
+++ b/stdlib/source/library/lux/type/unit.lux
@@ -88,15 +88,15 @@
(syntax: .public (unit: [[export_policy type_name unit_name]
(|export|.parser
($_ <>.and
- <code>.local_symbol
- <code>.local_symbol))])
+ <code>.local
+ <code>.local))])
(do meta.monad
[@ meta.current_module_name
- .let [g!type (code.local_symbol type_name)]]
+ .let [g!type (code.local type_name)]]
(in (list (` (type: (~ export_policy) (~ g!type)
(Primitive (~ (code.text (%.symbol [@ type_name]))))))
- (` (implementation: (~ export_policy) (~ (code.local_symbol unit_name))
+ (` (implementation: (~ export_policy) (~ (code.local unit_name))
(..Unit (~ g!type))
(def: (~' in) (~! ..in'))
@@ -117,17 +117,17 @@
(syntax: .public (scale: [[export_policy type_name scale_name ratio]
(|export|.parser
($_ <>.and
- <code>.local_symbol
- <code>.local_symbol
+ <code>.local
+ <code>.local
..scaleP))])
(do meta.monad
[.let [(open "_[0]") ratio]
@ meta.current_module_name
- .let [g!scale (code.local_symbol type_name)]]
+ .let [g!scale (code.local type_name)]]
(in (list (` (type: (~ export_policy) ((~ g!scale) (~' u))
(Primitive (~ (code.text (%.symbol [@ type_name]))) [(~' u)])))
- (` (implementation: (~ export_policy) (~ (code.local_symbol scale_name))
+ (` (implementation: (~ export_policy) (~ (code.local scale_name))
(..Scale (~ g!scale))
(def: (~' scale)
@@ -155,8 +155,8 @@
(i./ (.int denominator))
in')))
-(syntax: (implementation_name [type_name <code>.local_symbol])
- (in (list (code.local_symbol (text.lower_cased type_name)))))
+(syntax: (implementation_name [type_name <code>.local])
+ (in (list (code.local (text.lower_cased type_name)))))
(template [<type> <from> <to>]
[(`` (scale: .public <type>
diff --git a/stdlib/source/library/lux/world/net/http/client.lux b/stdlib/source/library/lux/world/net/http/client.lux
index 4702436f2..ce2bbc6c3 100644
--- a/stdlib/source/library/lux/world/net/http/client.lux
+++ b/stdlib/source/library/lux/world/net/http/client.lux
@@ -37,7 +37,7 @@
request)))
(syntax: (method_function [[_ name] <code>.symbol])
- (in (list (code.local_symbol (text.replaced "#" "" (text.lower_cased name))))))
+ (in (list (code.local (text.replaced "#" "" (text.lower_cased name))))))
(template [<method>]
[(with_expansions [<name> (method_function <method>)]