aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/library')
-rw-r--r--stdlib/source/library/lux.lux452
-rw-r--r--stdlib/source/library/lux/abstract/comonad.lux18
-rw-r--r--stdlib/source/library/lux/abstract/monad.lux18
-rw-r--r--stdlib/source/library/lux/abstract/monad/indexed.lux14
-rw-r--r--stdlib/source/library/lux/control/concatenative.lux20
-rw-r--r--stdlib/source/library/lux/control/concurrency/actor.lux48
-rw-r--r--stdlib/source/library/lux/control/continuation.lux4
-rw-r--r--stdlib/source/library/lux/control/exception.lux8
-rw-r--r--stdlib/source/library/lux/control/function/contract.lux4
-rw-r--r--stdlib/source/library/lux/control/function/mutual.lux16
-rw-r--r--stdlib/source/library/lux/control/io.lux4
-rw-r--r--stdlib/source/library/lux/control/lazy.lux4
-rw-r--r--stdlib/source/library/lux/control/maybe.lux2
-rw-r--r--stdlib/source/library/lux/control/parser/binary.lux2
-rw-r--r--stdlib/source/library/lux/control/parser/code.lux18
-rw-r--r--stdlib/source/library/lux/control/parser/json.lux2
-rw-r--r--stdlib/source/library/lux/control/parser/type.lux2
-rw-r--r--stdlib/source/library/lux/control/pipe.lux12
-rw-r--r--stdlib/source/library/lux/control/security/capability.lux10
-rw-r--r--stdlib/source/library/lux/control/try.lux2
-rw-r--r--stdlib/source/library/lux/data/collection/list.lux32
-rw-r--r--stdlib/source/library/lux/data/collection/sequence.lux4
-rw-r--r--stdlib/source/library/lux/data/format/binary.lux2
-rw-r--r--stdlib/source/library/lux/data/format/css/property.lux6
-rw-r--r--stdlib/source/library/lux/data/format/css/query.lux8
-rw-r--r--stdlib/source/library/lux/data/format/css/value.lux6
-rw-r--r--stdlib/source/library/lux/data/format/xml.lux2
-rw-r--r--stdlib/source/library/lux/data/text/regex.lux18
-rw-r--r--stdlib/source/library/lux/debug.lux10
-rw-r--r--stdlib/source/library/lux/documentation.lux44
-rw-r--r--stdlib/source/library/lux/extension.lux16
-rw-r--r--stdlib/source/library/lux/ffi.js.lux38
-rw-r--r--stdlib/source/library/lux/ffi.jvm.lux120
-rw-r--r--stdlib/source/library/lux/ffi.lua.lux28
-rw-r--r--stdlib/source/library/lux/ffi.old.lux120
-rw-r--r--stdlib/source/library/lux/ffi.php.lux28
-rw-r--r--stdlib/source/library/lux/ffi.py.lux24
-rw-r--r--stdlib/source/library/lux/ffi.rb.lux28
-rw-r--r--stdlib/source/library/lux/ffi.scm.lux20
-rw-r--r--stdlib/source/library/lux/macro.lux40
-rw-r--r--stdlib/source/library/lux/macro/code.lux52
-rw-r--r--stdlib/source/library/lux/macro/local.lux2
-rw-r--r--stdlib/source/library/lux/macro/syntax.lux14
-rw-r--r--stdlib/source/library/lux/macro/syntax/declaration.lux10
-rw-r--r--stdlib/source/library/lux/macro/syntax/definition.lux4
-rw-r--r--stdlib/source/library/lux/macro/syntax/export.lux4
-rw-r--r--stdlib/source/library/lux/macro/syntax/type/variable.lux4
-rw-r--r--stdlib/source/library/lux/macro/template.lux28
-rw-r--r--stdlib/source/library/lux/math/infix.lux2
-rw-r--r--stdlib/source/library/lux/program.lux8
-rw-r--r--stdlib/source/library/lux/target/common_lisp.lux4
-rw-r--r--stdlib/source/library/lux/target/js.lux4
-rw-r--r--stdlib/source/library/lux/target/jvm/bytecode/instruction.lux4
-rw-r--r--stdlib/source/library/lux/target/jvm/encoding/signed.lux2
-rw-r--r--stdlib/source/library/lux/target/jvm/encoding/unsigned.lux2
-rw-r--r--stdlib/source/library/lux/target/jvm/modifier.lux4
-rw-r--r--stdlib/source/library/lux/target/jvm/type/category.lux2
-rw-r--r--stdlib/source/library/lux/target/lua.lux10
-rw-r--r--stdlib/source/library/lux/target/php.lux10
-rw-r--r--stdlib/source/library/lux/target/python.lux10
-rw-r--r--stdlib/source/library/lux/target/r.lux10
-rw-r--r--stdlib/source/library/lux/target/ruby.lux10
-rw-r--r--stdlib/source/library/lux/test.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/generation.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis.lux8
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/case.lux4
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/structure.lux12
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/lux.lux6
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/common_lisp/common.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/js/host.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/lua/common.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/lua/host.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/php/common.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/python/common.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/python/host.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/r/common.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/ruby/common.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/scheme/common.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/function.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/runtime.lux24
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/extension.lux10
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/runtime.lux22
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/runtime.lux28
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/runtime.lux28
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/case.lux8
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/loop.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/runtime.lux32
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/loop.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/procedure/common.lux10
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/runtime.lux24
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/case.lux12
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/loop.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/runtime.lux28
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/extension/common.lux10
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/runtime.lux24
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/syntax.lux20
-rw-r--r--stdlib/source/library/lux/type.lux26
-rw-r--r--stdlib/source/library/lux/type/abstract.lux18
-rw-r--r--stdlib/source/library/lux/type/dynamic.lux6
-rw-r--r--stdlib/source/library/lux/type/implicit.lux20
-rw-r--r--stdlib/source/library/lux/type/poly.lux10
-rw-r--r--stdlib/source/library/lux/type/quotient.lux4
-rw-r--r--stdlib/source/library/lux/type/refinement.lux2
-rw-r--r--stdlib/source/library/lux/type/resource.lux8
-rw-r--r--stdlib/source/library/lux/type/unit.lux20
-rw-r--r--stdlib/source/library/lux/world/net/http/client.lux4
106 files changed, 959 insertions, 959 deletions
diff --git a/stdlib/source/library/lux.lux b/stdlib/source/library/lux.lux
index 862c84fff..c5d4a40f6 100644
--- a/stdlib/source/library/lux.lux
+++ b/stdlib/source/library/lux.lux
@@ -224,7 +224,7 @@
... {#Rev Rev}
... {#Frac Frac}
... {#Text Text}
-... {#Identifier Symbol}
+... {#Symbol Symbol}
... {#Form (List (w (Code' w)))}
... {#Variant (List (w (Code' w)))}
... {#Tuple (List (w (Code' w)))})
@@ -252,7 +252,7 @@
... Text
Text
{#Sum
- ... Identifier
+ ... Symbol
Symbol
{#Sum
... Form
@@ -268,7 +268,7 @@
("lux type check type" {#Apply {#Apply {#Parameter 1}
{#Parameter 0}}
{#Parameter 1}}))}
- {"#Bit" "#Nat" "#Int" "#Rev" "#Frac" "#Text" "#Identifier" "#Form" "#Variant" "#Tuple"}
+ {"#Bit" "#Nat" "#Int" "#Rev" "#Frac" "#Text" "#Symbol" "#Form" "#Variant" "#Tuple"}
#1)
... (type: .public Code
@@ -335,14 +335,14 @@
([_ text] (_ann {#Text text})))
#0)
-("lux def" identifier$
+("lux def" symbol$
("lux type check" {#Function Symbol Code}
- ([_ name] (_ann {#Identifier name})))
+ ([_ name] (_ann {#Symbol name})))
#0)
-("lux def" local_identifier$
+("lux def" local_symbol$
("lux type check" {#Function Text Code}
- ([_ name] (_ann {#Identifier ["" name]})))
+ ([_ name] (_ann {#Symbol ["" name]})))
#0)
("lux def" form$
@@ -710,27 +710,27 @@
("lux macro"
([_ tokens]
({{#Item [_ {#Tuple {#Item arg args'}}] {#Item body {#End}}}
- (in_meta {#Item (_ann {#Form {#Item (_ann {#Tuple {#Item (_ann {#Identifier ["" ""]})
+ (in_meta {#Item (_ann {#Form {#Item (_ann {#Tuple {#Item (_ann {#Symbol ["" ""]})
{#Item arg {#End}}}})
{#Item ({{#End}
body
_
- (_ann {#Form {#Item (_ann {#Identifier [..prelude_module "function''"]})
+ (_ann {#Form {#Item (_ann {#Symbol [..prelude_module "function''"]})
{#Item (_ann {#Tuple args'})
{#Item body {#End}}}}})}
args')
{#End}}}})
{#End}})
- {#Item [_ {#Identifier ["" self]}] {#Item [_ {#Tuple {#Item arg args'}}] {#Item body {#End}}}}
- (in_meta {#Item (_ann {#Form {#Item (_ann {#Tuple {#Item (_ann {#Identifier ["" self]})
+ {#Item [_ {#Symbol ["" self]}] {#Item [_ {#Tuple {#Item arg args'}}] {#Item body {#End}}}}
+ (in_meta {#Item (_ann {#Form {#Item (_ann {#Tuple {#Item (_ann {#Symbol ["" self]})
{#Item arg {#End}}}})
{#Item ({{#End}
body
_
- (_ann {#Form {#Item (_ann {#Identifier [..prelude_module "function''"]})
+ (_ann {#Form {#Item (_ann {#Symbol [..prelude_module "function''"]})
{#Item (_ann {#Tuple args'})
{#Item body {#End}}}}})}
args')
@@ -757,7 +757,7 @@
("lux def" as_function
("lux type check" {#Function Code {#Function {#Apply Code List} {#Function Code Code}}}
(function'' [self inputs output]
- (form$ {#Item (identifier$ [..prelude_module "function''"])
+ (form$ {#Item (symbol$ [..prelude_module "function''"])
{#Item self
{#Item (tuple$ inputs)
{#Item output {#End}}}}})))
@@ -813,8 +813,8 @@
(in_meta tokens)
{#Item x {#Item y xs}}
- (in_meta {#Item (form$ {#Item (identifier$ [..prelude_module "$'"])
- {#Item (variant$ {#Item (identifier$ [..prelude_module "#Apply"])
+ (in_meta {#Item (form$ {#Item (symbol$ [..prelude_module "$'"])
+ {#Item (variant$ {#Item (symbol$ [..prelude_module "#Apply"])
{#Item y {#Item x {#End}}}})
xs}})
{#End}})
@@ -869,7 +869,7 @@
(def:'' .private (with_replacements reps syntax)
{#Function Replacement_Environment {#Function Code Code}}
- ({[_ {#Identifier "" name}]
+ ({[_ {#Symbol "" name}]
({{#Some replacement}
replacement
@@ -924,22 +924,22 @@
(def:'' .private |#End|
Code
- (variant$ {#Item (identifier$ [..prelude_module "#End"]) {#End}}))
+ (variant$ {#Item (symbol$ [..prelude_module "#End"]) {#End}}))
(def:'' .private (|#Item| head tail)
{#Function Code {#Function Code Code}}
- (variant$ {#Item (identifier$ [..prelude_module "#Item"])
+ (variant$ {#Item (symbol$ [..prelude_module "#Item"])
{#Item head
{#Item tail
{#End}}}}))
(def:'' .private (UnivQ$ body)
{#Function Code Code}
- (variant$ {#Item (identifier$ [..prelude_module "#UnivQ"]) {#Item ..|#End| {#Item body {#End}}}}))
+ (variant$ {#Item (symbol$ [..prelude_module "#UnivQ"]) {#Item ..|#End| {#Item body {#End}}}}))
(def:'' .private (ExQ$ body)
{#Function Code Code}
- (variant$ {#Item (identifier$ [..prelude_module "#ExQ"]) {#Item ..|#End| {#Item body {#End}}}}))
+ (variant$ {#Item (symbol$ [..prelude_module "#ExQ"]) {#Item ..|#End| {#Item body {#End}}}}))
(def:'' .private quantification_level
Text
@@ -949,13 +949,13 @@
(def:'' .private quantified
{#Function Code Code}
- (let$ (local_identifier$ ..quantification_level) (nat$ 0)))
+ (let$ (local_symbol$ ..quantification_level) (nat$ 0)))
(def:'' .private (quantified_type_parameter idx)
{#Function Nat Code}
- (variant$ {#Item (identifier$ [..prelude_module "#Parameter"])
+ (variant$ {#Item (symbol$ [..prelude_module "#Parameter"])
{#Item (form$ {#Item (text$ "lux i64 +")
- {#Item (local_identifier$ ..quantification_level)
+ {#Item (local_symbol$ ..quantification_level)
{#Item (nat$ idx)
{#End}}}})
{#End}}}))
@@ -1024,8 +1024,8 @@
(def:'' .private (with_correct_quantification body)
{#Function Code Code}
- (form$ {#Item (identifier$ [prelude_module "__adjusted_quantified_type__"])
- {#Item (local_identifier$ ..quantification_level)
+ (form$ {#Item (symbol$ [prelude_module "__adjusted_quantified_type__"])
+ {#Item (local_symbol$ ..quantification_level)
{#Item (nat$ 0)
{#Item body
{#End}}}}}))
@@ -1042,7 +1042,7 @@
depth))))
{#End}}}})
body)}
- (local_identifier$ ..quantification_level)))
+ (local_symbol$ ..quantification_level)))
(def:'' .private (initialized_quantification? lux)
{#Function Lux Bit}
@@ -1144,7 +1144,7 @@
(macro:' .public (-> tokens)
({{#Item output inputs}
(in_meta {#Item (list#mix ("lux type check" {#Function Code {#Function Code Code}}
- (function'' [i o] (variant$ {#Item (identifier$ [..prelude_module "#Function"]) {#Item i {#Item o {#End}}}})))
+ (function'' [i o] (variant$ {#Item (symbol$ [..prelude_module "#Function"]) {#Item i {#Item o {#End}}}})))
output
inputs)
{#End}})
@@ -1167,26 +1167,26 @@
(macro:' .public (Union tokens)
({{#End}
- (in_meta (list (identifier$ [..prelude_module "Nothing"])))
+ (in_meta (list (symbol$ [..prelude_module "Nothing"])))
{#Item last prevs}
- (in_meta (list (list#mix (function'' [left right] (variant$ (list (identifier$ [..prelude_module "#Sum"]) left right)))
+ (in_meta (list (list#mix (function'' [left right] (variant$ (list (symbol$ [..prelude_module "#Sum"]) left right)))
last
prevs)))}
(list#reversed tokens)))
(macro:' .public (Tuple tokens)
({{#End}
- (in_meta (list (identifier$ [..prelude_module "Any"])))
+ (in_meta (list (symbol$ [..prelude_module "Any"])))
{#Item last prevs}
- (in_meta (list (list#mix (function'' [left right] (variant$ (list (identifier$ [..prelude_module "#Product"]) left right)))
+ (in_meta (list (list#mix (function'' [left right] (variant$ (list (symbol$ [..prelude_module "#Product"]) left right)))
last
prevs)))}
(list#reversed tokens)))
(macro:' .private (function' tokens)
- (let'' [name tokens'] ({{#Item [[_ {#Identifier ["" name]}] tokens']}
+ (let'' [name tokens'] ({{#Item [[_ {#Symbol ["" name]}] tokens']}
[name tokens']
_
@@ -1197,10 +1197,10 @@
(failure "function' requires a non-empty arguments tuple.")
{#Item [harg targs]}
- (in_meta (list (form$ (list (tuple$ (list (local_identifier$ name)
+ (in_meta (list (form$ (list (tuple$ (list (local_symbol$ name)
harg))
(list#mix (function'' [arg body']
- (form$ (list (tuple$ (list (local_identifier$ "")
+ (form$ (list (tuple$ (list (local_symbol$ "")
arg))
body')))
body
@@ -1219,7 +1219,7 @@
name
(form$ (list (text$ "lux type check")
type
- (form$ (list (identifier$ [..prelude_module "function'"])
+ (form$ (list (symbol$ [..prelude_module "function'"])
name
(tuple$ args)
body))))
@@ -1393,15 +1393,15 @@
(macro:' .private (do tokens)
({{#Item monad {#Item [_ {#Tuple bindings}] {#Item body {#End}}}}
- (let' [g!in (local_identifier$ "in")
- g!then (local_identifier$ " then ")
+ (let' [g!in (local_symbol$ "in")
+ g!then (local_symbol$ " then ")
body' (list#mix ("lux type check" (-> (Tuple Code Code) Code Code)
(function' [binding body']
(let' [[var value] binding]
- ({[_ {#Identifier [module short]}]
+ ({[_ {#Symbol [module short]}]
({""
(form$ (list g!then
- (form$ (list (tuple$ (list (local_identifier$ "") var)) body'))
+ (form$ (list (tuple$ (list (local_symbol$ "") var)) body'))
value))
_
@@ -1411,13 +1411,13 @@
_
(form$ (list g!then
- (form$ (list (tuple$ (list (local_identifier$ "") var)) body'))
+ (form$ (list (tuple$ (list (local_symbol$ "") var)) body'))
value))}
var))))
body
(list#reversed (pairs bindings)))]
- (in_meta (list (form$ (list (variant$ (list (tuple$ (list (identifier$ [..prelude_module "#in"]) g!in
- (identifier$ [..prelude_module "#then"]) g!then))
+ (in_meta (list (form$ (list (variant$ (list (tuple$ (list (symbol$ [..prelude_module "#in"]) g!in
+ (symbol$ [..prelude_module "#then"]) g!then))
body'))
monad)))))
@@ -1496,7 +1496,7 @@
_ ($_ text#composite module "." name)}
module)))
-(def:''' .private (global_identifier full_name state)
+(def:''' .private (global_symbol full_name state)
(-> Symbol ($' Meta Symbol))
(let' [[module name] full_name
[#info info #source source #current_module _ #modules modules
@@ -1524,9 +1524,9 @@
(def:''' .private (:List<Code> expression)
(-> Code Code)
- (let' [type (variant$ (list (identifier$ [..prelude_module "#Apply"])
- (identifier$ [..prelude_module "Code"])
- (identifier$ [..prelude_module "List"])))]
+ (let' [type (variant$ (list (symbol$ [..prelude_module "#Apply"])
+ (symbol$ [..prelude_module "Code"])
+ (symbol$ [..prelude_module "List"])))]
(form$ (list (text$ "lux type check") type expression))))
(def:''' .private (spliced replace? untemplated elems)
@@ -1537,7 +1537,7 @@
{#Item lastI inits}
(do meta_monad
- [lastO ({[_ {#Form {#Item [[_ {#Identifier ["" "~+"]}] {#Item [spliced {#End}]}]}}]
+ [lastO ({[_ {#Form {#Item [[_ {#Symbol ["" "~+"]}] {#Item [spliced {#End}]}]}}]
(in (:List<Code> spliced))
_
@@ -1547,10 +1547,10 @@
lastI)]
(monad#mix meta_monad
(function' [leftI rightO]
- ({[_ {#Form {#Item [[_ {#Identifier ["" "~+"]}] {#Item [spliced {#End}]}]}}]
+ ({[_ {#Form {#Item [[_ {#Symbol ["" "~+"]}] {#Item [spliced {#End}]}]}}]
(let' [g!in-module (form$ (list (text$ "lux in-module")
(text$ ..prelude_module)
- (identifier$ [..prelude_module "list#composite"])))]
+ (symbol$ [..prelude_module "list#composite"])))]
(in (form$ (list g!in-module (:List<Code> spliced) rightO))))
_
@@ -1569,85 +1569,85 @@
(def:''' .private (untemplated_text value)
(-> Text Code)
- (with_location (variant$ (list (identifier$ [..prelude_module "#Text"]) (text$ value)))))
+ (with_location (variant$ (list (symbol$ [..prelude_module "#Text"]) (text$ value)))))
(def:''' .private (untemplated replace? subst token)
(-> Bit Text Code ($' Meta Code))
({[_ [_ {#Bit value}]]
- (in_meta (with_location (variant$ (list (identifier$ [..prelude_module "#Bit"]) (bit$ value)))))
+ (in_meta (with_location (variant$ (list (symbol$ [..prelude_module "#Bit"]) (bit$ value)))))
[_ [_ {#Nat value}]]
- (in_meta (with_location (variant$ (list (identifier$ [..prelude_module "#Nat"]) (nat$ value)))))
+ (in_meta (with_location (variant$ (list (symbol$ [..prelude_module "#Nat"]) (nat$ value)))))
[_ [_ {#Int value}]]
- (in_meta (with_location (variant$ (list (identifier$ [..prelude_module "#Int"]) (int$ value)))))
+ (in_meta (with_location (variant$ (list (symbol$ [..prelude_module "#Int"]) (int$ value)))))
[_ [_ {#Rev value}]]
- (in_meta (with_location (variant$ (list (identifier$ [..prelude_module "#Rev"]) (rev$ value)))))
+ (in_meta (with_location (variant$ (list (symbol$ [..prelude_module "#Rev"]) (rev$ value)))))
[_ [_ {#Frac value}]]
- (in_meta (with_location (variant$ (list (identifier$ [..prelude_module "#Frac"]) (frac$ value)))))
+ (in_meta (with_location (variant$ (list (symbol$ [..prelude_module "#Frac"]) (frac$ value)))))
[_ [_ {#Text value}]]
(in_meta (untemplated_text value))
- [#1 [_ {#Identifier [module name]}]]
+ [#1 [_ {#Symbol [module name]}]]
(do meta_monad
[real_name ({""
(if (text#= "" subst)
(in [module name])
- (global_identifier [subst name]))
+ (global_symbol [subst name]))
_
(in [module name])}
module)
.let' [[module name] real_name]]
- (in_meta (with_location (variant$ (list (identifier$ [..prelude_module "#Identifier"]) (tuple$ (list (text$ module) (text$ name))))))))
+ (in_meta (with_location (variant$ (list (symbol$ [..prelude_module "#Symbol"]) (tuple$ (list (text$ module) (text$ name))))))))
- [#0 [_ {#Identifier [module name]}]]
- (in_meta (with_location (variant$ (list (identifier$ [..prelude_module "#Identifier"]) (tuple$ (list (text$ module) (text$ name)))))))
+ [#0 [_ {#Symbol [module name]}]]
+ (in_meta (with_location (variant$ (list (symbol$ [..prelude_module "#Symbol"]) (tuple$ (list (text$ module) (text$ name)))))))
- [#1 [_ {#Form {#Item [[_ {#Identifier ["" "~"]}] {#Item [unquoted {#End}]}]}}]]
+ [#1 [_ {#Form {#Item [[_ {#Symbol ["" "~"]}] {#Item [unquoted {#End}]}]}}]]
(in_meta (form$ (list (text$ "lux type check")
- (identifier$ [..prelude_module "Code"])
+ (symbol$ [..prelude_module "Code"])
unquoted)))
- [#1 [_ {#Form {#Item [[_ {#Identifier ["" "~!"]}] {#Item [dependent {#End}]}]}}]]
+ [#1 [_ {#Form {#Item [[_ {#Symbol ["" "~!"]}] {#Item [dependent {#End}]}]}}]]
(do meta_monad
[independent (untemplated replace? subst dependent)]
- (in (with_location (variant$ (list (identifier$ [..prelude_module "#Form"])
+ (in (with_location (variant$ (list (symbol$ [..prelude_module "#Form"])
(untemplated_list (list (untemplated_text "lux in-module")
(untemplated_text subst)
independent)))))))
- [#1 [_ {#Form {#Item [[_ {#Identifier ["" "~'"]}] {#Item [keep_quoted {#End}]}]}}]]
+ [#1 [_ {#Form {#Item [[_ {#Symbol ["" "~'"]}] {#Item [keep_quoted {#End}]}]}}]]
(untemplated #0 subst keep_quoted)
[_ [meta {#Form elems}]]
(do meta_monad
[output (spliced replace? (untemplated replace? subst) elems)
- .let' [[_ output'] (with_location (variant$ (list (identifier$ [..prelude_module "#Form"]) output)))]]
+ .let' [[_ output'] (with_location (variant$ (list (symbol$ [..prelude_module "#Form"]) output)))]]
(in [meta output']))
[_ [meta {#Variant elems}]]
(do meta_monad
[output (spliced replace? (untemplated replace? subst) elems)
- .let' [[_ output'] (with_location (variant$ (list (identifier$ [..prelude_module "#Variant"]) output)))]]
+ .let' [[_ output'] (with_location (variant$ (list (symbol$ [..prelude_module "#Variant"]) output)))]]
(in [meta output']))
[_ [meta {#Tuple elems}]]
(do meta_monad
[output (spliced replace? (untemplated replace? subst) elems)
- .let' [[_ output'] (with_location (variant$ (list (identifier$ [..prelude_module "#Tuple"]) output)))]]
+ .let' [[_ output'] (with_location (variant$ (list (symbol$ [..prelude_module "#Tuple"]) output)))]]
(in [meta output']))}
[replace? token]))
(macro:' .public (Primitive tokens)
({{#Item [_ {#Text class_name}] {#End}}
- (in_meta (list (variant$ (list (identifier$ [..prelude_module "#Primitive"]) (text$ class_name) |#End|))))
+ (in_meta (list (variant$ (list (symbol$ [..prelude_module "#Primitive"]) (text$ class_name) |#End|))))
{#Item [_ {#Text class_name}] {#Item [_ {#Tuple params}] {#End}}}
- (in_meta (list (variant$ (list (identifier$ [..prelude_module "#Primitive"]) (text$ class_name) (untemplated_list params)))))
+ (in_meta (list (variant$ (list (symbol$ [..prelude_module "#Primitive"]) (text$ class_name) (untemplated_list params)))))
_
(failure "Wrong syntax for Primitive")}
@@ -1673,7 +1673,7 @@
[current_module current_module_name
=template (untemplated #1 current_module template)]
(in (list (form$ (list (text$ "lux type check")
- (identifier$ [..prelude_module "Code"])
+ (symbol$ [..prelude_module "Code"])
=template)))))
_
@@ -1684,7 +1684,7 @@
({{#Item template {#End}}
(do meta_monad
[=template (untemplated #1 "" template)]
- (in (list (form$ (list (text$ "lux type check") (identifier$ [..prelude_module "Code"]) =template)))))
+ (in (list (form$ (list (text$ "lux type check") (symbol$ [..prelude_module "Code"]) =template)))))
_
(failure "Wrong syntax for `")}
@@ -1694,7 +1694,7 @@
({{#Item template {#End}}
(do meta_monad
[=template (untemplated #0 "" template)]
- (in (list (form$ (list (text$ "lux type check") (identifier$ [..prelude_module "Code"]) =template)))))
+ (in (list (form$ (list (text$ "lux type check") (symbol$ [..prelude_module "Code"]) =template)))))
_
(failure "Wrong syntax for '")}
@@ -1751,18 +1751,18 @@
(-> (-> b c) (-> a b) (-> a c)))
(function' [x] (f (g x))))
-(def:''' .private (identifier_name x)
+(def:''' .private (symbol_name x)
(-> Code ($' Maybe Symbol))
- ({[_ {#Identifier sname}]
+ ({[_ {#Symbol sname}]
{#Some sname}
_
{#None}}
x))
-(def:''' .private (identifier_short x)
+(def:''' .private (symbol_short x)
(-> Code ($' Maybe Text))
- ({[_ {#Identifier "" sname}]
+ ({[_ {#Symbol "" sname}]
{#Some sname}
_
@@ -1780,7 +1780,7 @@
(def:''' .private (realized_template env template)
(-> Replacement_Environment Code Code)
- ({[_ {#Identifier "" sname}]
+ ({[_ {#Symbol "" sname}]
({{#Some subst}
subst
@@ -1851,7 +1851,7 @@
_
(failure "Wrong syntax for template")}
- [(monad#each maybe_monad identifier_short bindings)
+ [(monad#each maybe_monad symbol_short bindings)
(monad#each maybe_monad tuple_list data)])
_
@@ -2041,7 +2041,7 @@
(def:''' .private (single_expansion token)
(-> Code ($' Meta ($' List Code)))
- ({[_ {#Form {#Item [_ {#Identifier name}] args}}]
+ ({[_ {#Form {#Item [_ {#Symbol name}] args}}]
(do meta_monad
[name' (normal name)
?macro (macro' name')]
@@ -2058,7 +2058,7 @@
(def:''' .private (expansion token)
(-> Code ($' Meta ($' List Code)))
- ({[_ {#Form {#Item [_ {#Identifier name}] args}}]
+ ({[_ {#Form {#Item [_ {#Symbol name}] args}}]
(do meta_monad
[name' (normal name)
?macro (macro' name')]
@@ -2078,7 +2078,7 @@
(def:''' .private (full_expansion syntax)
(-> Code ($' Meta ($' List Code)))
- ({[_ {#Form {#Item [_ {#Identifier name}] args}}]
+ ({[_ {#Form {#Item [_ {#Symbol name}] args}}]
(do meta_monad
[name' (normal name)
?macro (macro' name')]
@@ -2091,7 +2091,7 @@
{#None}
(do meta_monad
[args' (monad#each meta_monad full_expansion args)]
- (in (list (form$ {#Item (identifier$ name) (list#conjoint args')}))))}
+ (in (list (form$ {#Item (symbol$ name) (list#conjoint args')}))))}
?macro))
[_ {#Form members}]
@@ -2137,7 +2137,7 @@
[_ {#Text value}]
(text#encoded value)
- [_ {#Identifier [module name]}]
+ [_ {#Symbol [module name]}]
(if (text#= "" module)
name
($_ text#composite module "." name))
@@ -2166,8 +2166,8 @@
(def:''' .private (normal_type type)
(-> Code Code)
- ({[_ {#Variant {#Item [_ {#Identifier identifier}] parts}}]
- (` {(~ (identifier$ identifier)) (~+ (list#each normal_type parts))})
+ ({[_ {#Variant {#Item [_ {#Symbol symbol}] parts}}]
+ (` {(~ (symbol$ symbol)) (~+ (list#each normal_type parts))})
[_ {#Tuple members}]
(` (Tuple (~+ (list#each normal_type members))))
@@ -2178,7 +2178,7 @@
{#End}}}}}]
(` ("lux in-module" (~ (text$ module)) (~ (normal_type type'))))
- [_ {#Form {#Item [_ {#Identifier ["" ":~"]}] {#Item expression {#End}}}}]
+ [_ {#Form {#Item [_ {#Symbol ["" ":~"]}] {#Item expression {#End}}}}]
expression
[_0 {#Form {#Item [_1 {#Variant {#Item binding {#Item body {#End}}}}]
@@ -2188,12 +2188,12 @@
{#Item value
{#End}}}}]
- [_0 {#Form {#Item [_1 {#Identifier ["library/lux" "__adjusted_quantified_type__"]}]
+ [_0 {#Form {#Item [_1 {#Symbol ["library/lux" "__adjusted_quantified_type__"]}]
{#Item _permission
{#Item _level
{#Item body
{#End}}}}}}]
- [_0 {#Form {#Item [_1 {#Identifier [..prelude_module "__adjusted_quantified_type__"]}]
+ [_0 {#Form {#Item [_1 {#Symbol [..prelude_module "__adjusted_quantified_type__"]}]
{#Item _permission
{#Item _level
{#Item (normal_type body)
@@ -2265,7 +2265,7 @@
[product#left a x]
[product#right b y])
-(def:''' .private (identifier prefix state)
+(def:''' .private (generated_symbol prefix state)
(-> Text ($' Meta Code))
({[#info info #source source #current_module _ #modules modules
#scopes scopes #type_context types #host host
@@ -2277,12 +2277,12 @@
#seed ("lux i64 +" 1 seed) #expected expected
#location location #extensions extensions
#scope_type_vars scope_type_vars #eval _eval]
- (local_identifier$ ($_ text#composite "__gensym__" prefix (nat#encoded seed)))}}
+ (local_symbol$ ($_ text#composite "__gensym__" prefix (nat#encoded seed)))}}
state))
(macro:' .public (exec tokens)
({{#Item value actions}
- (let' [dummy (local_identifier$ "")]
+ (let' [dummy (local_symbol$ "")]
(in_meta (list (list#mix ("lux type check" (-> Code Code Code)
(function' [pre post] (` ({(~ dummy) (~ post)}
(~ pre)))))
@@ -2333,18 +2333,18 @@
(def:' .private (expander branches)
(-> (List Code) (Meta (List Code)))
- ({{#Item [_ {#Form {#Item [_ {#Identifier name}] args}}]
+ ({{#Item [_ {#Form {#Item [_ {#Symbol name}] args}}]
{#Item body
branches'}}
(do meta_monad
[??? (macro? name)]
(if ???
(do meta_monad
- [init_expansion (single_expansion (form$ (list& (identifier$ name) (form$ args) body branches')))]
+ [init_expansion (single_expansion (form$ (list& (symbol$ name) (form$ args) body branches')))]
(expander init_expansion))
(do meta_monad
[sub_expansion (expander branches')]
- (in (list& (form$ (list& (identifier$ name) args))
+ (in (list& (form$ (list& (symbol$ name) args))
body
sub_expansion)))))
@@ -2404,10 +2404,10 @@
_
(failure "Wrong syntax for ^or")))
-(def:' .private (identifier? code)
+(def:' .private (symbol? code)
(-> Code Bit)
(case code
- [_ {#Identifier _}]
+ [_ {#Symbol _}]
#1
_
@@ -2421,7 +2421,7 @@
(list#mix (: (-> [Code Code] Code Code)
(function' [lr body']
(let' [[l r] lr]
- (if (identifier? l)
+ (if (symbol? l)
(` ({(~ l) (~ body')} (~ r)))
(` (case (~ r) (~ l) (~ body')))))))
body)
@@ -2435,21 +2435,21 @@
(macro:' .public (function tokens)
(case (: (Maybe [Text Code (List Code) Code])
(case tokens
- (^ (list [_ {#Form (list& [_ {#Identifier ["" name]}] head tail)}] body))
+ (^ (list [_ {#Form (list& [_ {#Symbol ["" name]}] head tail)}] body))
{#Some name head tail body}
_
{#None}))
{#Some g!name head tail body}
- (let [g!blank (local_identifier$ "")
+ (let [g!blank (local_symbol$ "")
nest (: (-> Code (-> Code Code Code))
(function' [g!name]
(function' [arg body']
- (if (identifier? arg)
+ (if (symbol? arg)
(` ([(~ g!name) (~ arg)] (~ body')))
(` ([(~ g!name) (~ g!blank)]
(.case (~ g!blank) (~ arg) (~ body'))))))))]
- (in_meta (list (nest (..local_identifier$ g!name) head
+ (in_meta (list (nest (..local_symbol$ g!name) head
(list#mix (nest g!blank) body (list#reversed tail))))))
{#None}
@@ -2473,11 +2473,11 @@
_
{#None}))
-(def:' .private (local_identifierP tokens)
+(def:' .private (local_symbolP tokens)
(-> (List Code) (Maybe [(List Code) Text]))
(case tokens
- (^ (list& [_ {#Identifier ["" local_identifier]}] tokens'))
- {#Some [tokens' local_identifier]}
+ (^ (list& [_ {#Symbol ["" local_symbol]}] tokens'))
+ {#Some [tokens' local_symbol]}
_
{#None}))
@@ -2496,7 +2496,7 @@
tail (<parser> tokens)]
(in {#Item head tail}))))]
- [parametersP Text local_identifierP]
+ [parametersP Text local_symbolP]
[enhanced_parametersP Code anyP]
)
@@ -2506,14 +2506,14 @@
(case tokens
(^ (list& [_ {#Form local_declaration}] tokens'))
(do maybe_monad
- [% (local_identifierP local_declaration)
+ [% (local_symbolP local_declaration)
.let' [[local_declaration name] %]
parameters (<parameters_parser> local_declaration)]
(in [tokens' [name parameters]]))
_
(do maybe_monad
- [% (local_identifierP tokens)
+ [% (local_symbolP tokens)
.let' [[tokens' name] %]]
(in [tokens' [name {#End}]]))))]
@@ -2529,10 +2529,10 @@
[_ {#Bit it}]
[tokens' candidate]
- [_ {#Identifier ["" _]}]
+ [_ {#Symbol ["" _]}]
[tokens (` .private)]
- [_ {#Identifier it}]
+ [_ {#Symbol it}]
[tokens' candidate]
_
@@ -2586,7 +2586,7 @@
body
_
- (` (function ((~ (..local_identifier$ name)) (~+ parameters))
+ (` (function ((~ (..local_symbol$ name)) (~+ parameters))
(~ body))))
body (case ?type
{#Some type}
@@ -2595,7 +2595,7 @@
{#None}
body)]
- (in_meta (list (` ("lux def" (~ (..local_identifier$ name))
+ (in_meta (list (` ("lux def" (~ (..local_symbol$ name))
(~ body)
(~ export_policy))))))
@@ -2615,14 +2615,14 @@
(macro:' .public (macro: tokens)
(case (macroP tokens)
{#Some [export_policy name args body]}
- (let [name (local_identifier$ name)
+ (let [name (local_symbol$ name)
body (case args
{#End}
body
_
(` ("lux macro"
- (function ((~ name) (~+ (list#each local_identifier$ args))) (~ body)))))]
+ (function ((~ name) (~+ (list#each local_symbol$ args))) (~ body)))))]
(in_meta (list (` ("lux def" (~ name)
(~ body)
(~ export_policy))))))
@@ -2671,7 +2671,7 @@
(macro: (maybe#else tokens state)
(case tokens
(^ (list else maybe))
- (let [g!temp (: Code [dummy_location {#Identifier ["" ""]}])
+ (let [g!temp (: Code [dummy_location {#Symbol ["" ""]}])
code (` (case (~ maybe)
{.#Some (~ g!temp)}
(~ g!temp)
@@ -2969,13 +2969,13 @@
.let [tag_mappings (: (List [Text Code])
(list#each (function (_ tag)
[(product#right tag)
- (identifier$ tag)])
+ (symbol$ tag)])
tags))]
members (monad#each meta_monad
(: (-> Code (Meta (List Code)))
(function (_ token)
(case token
- (^ [_ {#Form (list [_ {#Text "lux def"}] [_ {#Identifier ["" slot_name]}] value export_policy)}])
+ (^ [_ {#Form (list [_ {#Text "lux def"}] [_ {#Symbol ["" slot_name]}] value export_policy)}])
(case (plist#value slot_name tag_mappings)
{#Some tag}
(in (list tag value))
@@ -3024,10 +3024,10 @@
{#Some [export_policy name args type definitions]}
(let [usage (case args
{#End}
- (local_identifier$ name)
+ (local_symbol$ name)
_
- (` ((~ (local_identifier$ name)) (~+ args))))]
+ (` ((~ (local_symbol$ name)) (~+ args))))]
(in_meta (list (` (..def: (~ export_policy) (~ usage)
(~ type)
(implementation
@@ -3064,10 +3064,10 @@
(def: (caseP tokens)
(-> (List Code) (Maybe [(List Code) [Text Code]]))
(case tokens
- (^ (list& [_ {#Variant (list [_ {#Identifier ["" niladic]}])}] tokens'))
+ (^ (list& [_ {#Variant (list [_ {#Symbol ["" niladic]}])}] tokens'))
{#Some [tokens' [niladic (` .Any)]]}
- (^ (list& [_ {#Variant (list& [_ {#Identifier ["" polyadic]}] caseT)}] tokens'))
+ (^ (list& [_ {#Variant (list& [_ {#Symbol ["" polyadic]}] caseT)}] tokens'))
{#Some [tokens' [polyadic (` (..Tuple (~+ caseT)))]]}
_
@@ -3087,7 +3087,7 @@
(def: (slotP tokens)
(-> (List Code) (Maybe [(List Code) [Text Code]]))
(case tokens
- (^ (list& [_ {#Identifier ["" slot]}] type tokens'))
+ (^ (list& [_ {#Symbol ["" slot]}] type tokens'))
{#Some [tokens' [slot type]]}
_
@@ -3130,9 +3130,9 @@
(def: (type_declaration it)
(-> Code (Meta (Tuple Code (Maybe (Either (List Text) (List Text))))))
- ({[_ {#Form {#Item [_ {#Identifier declarer}] parameters}}]
+ ({[_ {#Form {#Item [_ {#Symbol declarer}] parameters}}]
(do meta_monad
- [declaration (single_expansion (form$ (list& (identifier$ declarer) parameters)))]
+ [declaration (single_expansion (form$ (list& (symbol$ declarer) parameters)))]
(case declaration
(^ (list type [_ {#Variant tags}]))
(case (everyP textP tags)
@@ -3166,7 +3166,7 @@
(do meta_monad
[type+labels?? (..type_declaration type_codes)
module_name current_module_name
- .let' [type_name (local_identifier$ name)
+ .let' [type_name (local_symbol$ name)
[type labels??] type+labels??
type' (: (Maybe Code)
(case args
@@ -3174,7 +3174,7 @@
{#Some type}
_
- {#Some (` (.All ((~ type_name) (~+ (list#each local_identifier$ args)))
+ {#Some (` (.All ((~ type_name) (~+ (list#each local_symbol$ args)))
(~ type)))}))]]
(case type'
{#Some type''}
@@ -3244,11 +3244,11 @@
(: (-> Code (Meta Text))
(function (_ def)
(case def
- [_ {#Identifier ["" name]}]
+ [_ {#Symbol ["" name]}]
(in_meta name)
_
- (failure "only/+ and exclude/- require identifiers."))))
+ (failure "only/+ and exclude/- require symbols."))))
defs))
(def: (referrals_parser tokens)
@@ -3288,11 +3288,11 @@
[structs' (monad#each meta_monad
(function (_ struct)
(case struct
- [_ {#Identifier ["" struct_name]}]
+ [_ {#Symbol ["" struct_name]}]
(in_meta struct_name)
_
- (failure "Expected all implementations of opening form to be identifiers.")))
+ (failure "Expected all implementations of opening form to be symbols.")))
structs)
next+remainder (openings_parser parts')]
(let [[next remainder] next+remainder]
@@ -3423,7 +3423,7 @@
(function (_ token)
(case token
... Simple
- [_ {#Identifier ["" module_name]}]
+ [_ {#Symbol ["" module_name]}]
(do meta_monad
[absolute_module_name (..absolute_module_name nested? relative_root module_name)]
(in (list [#import_name absolute_module_name
@@ -3432,7 +3432,7 @@
#refer_open (list)]])))
... Nested
- (^ [_ {#Tuple (list& [_ {#Identifier ["" module_name]}] extra)}])
+ (^ [_ {#Tuple (list& [_ {#Symbol ["" module_name]}] extra)}])
(do meta_monad
[absolute_module_name (case (normal_parallel_path relative_root module_name)
{#Some parallel_path}
@@ -3456,7 +3456,7 @@
#refer_open openings]]
sub_imports))))
- (^ [_ {#Tuple (list& [_ {#Text alias}] [_ {#Identifier ["" module_name]}] extra)}])
+ (^ [_ {#Tuple (list& [_ {#Text alias}] [_ {#Symbol ["" module_name]}] extra)}])
(do meta_monad
[absolute_module_name (case (normal_parallel_path relative_root module_name)
{#Some parallel_path}
@@ -3732,10 +3732,10 @@
(case tokens
(^ (list& [_ {#Form (list [_ {#Text alias}])}] body branches))
(do meta_monad
- [g!temp (..identifier "temp")]
+ [g!temp (..generated_symbol "temp")]
(in (list& g!temp (` (..^open (~ g!temp) (~ (text$ alias)) (~ body))) branches)))
- (^ (list [_ {#Identifier name}] [_ {#Text alias}] body))
+ (^ (list [_ {#Symbol name}] [_ {#Text alias}] body))
(do meta_monad
[init_type (type_definition name)
struct_evidence (record_slots init_type)]
@@ -3753,8 +3753,8 @@
tags)
pattern (|> locals
(list#each (function (_ [slot binding])
- (list (identifier$ slot)
- (identifier$ binding))))
+ (list (symbol$ slot)
+ (symbol$ binding))))
list#conjoint
tuple$)]
(do meta_monad
@@ -3772,7 +3772,7 @@
(in enhanced_target))))
target
(zipped/2 locals members))]
- (in (` ({(~ pattern) (~ enhanced_target)} (~ (identifier$ source)))))))))
+ (in (` ({(~ pattern) (~ enhanced_target)} (~ (symbol$ source)))))))))
name tags&members body)]
(in (list full_body)))))
@@ -3811,19 +3811,19 @@
(macro: .public (value@ tokens)
(case tokens
- (^ (list [_ {#Identifier slot'}] record))
+ (^ (list [_ {#Symbol slot'}] record))
(do meta_monad
[slot (normal slot')
output (..type_slot slot)
.let [[idx tags exported? type] output]
- g!_ (..identifier "_")
- g!output (..identifier "")]
+ g!_ (..generated_symbol "_")
+ g!output (..generated_symbol "")]
(case (interface_methods type)
{#Some members}
(let [pattern (|> (zipped/2 tags (enumeration members))
(list#each (: (-> [Symbol [Nat Type]] (List Code))
(function (_ [[r_module r_name] [r_idx r_type]])
- (list (identifier$ [r_module r_name])
+ (list (symbol$ [r_module r_name])
(if ("lux i64 =" idx r_idx)
g!output
g!_)))))
@@ -3843,8 +3843,8 @@
(^ (list selector))
(do meta_monad
- [g!_ (..identifier "_")
- g!record (..identifier "record")]
+ [g!_ (..generated_symbol "_")
+ g!record (..generated_symbol "record")]
(in (list (` (function ((~ g!_) (~ g!record)) (..value@ (~ selector) (~ g!record)))))))
_
@@ -3854,8 +3854,8 @@
(-> Text (List Symbol) Nat Symbol Code Type (Meta (List Code)))
(do meta_monad
[output (record_slots type)
- g!_ (..identifier "g!_")
- .let [g!output (local_identifier$ short)
+ g!_ (..generated_symbol "g!_")
+ .let [g!output (local_symbol$ short)
pattern (|> tags
enumeration
(list#each (function (_ [tag_idx tag])
@@ -3875,7 +3875,7 @@
(in_meta (list#conjoint decls')))
_
- (in_meta (list (` ("lux def" (~ (local_identifier$ (..module_alias (list short) alias)))
+ (in_meta (list (` ("lux def" (~ (local_symbol$ (..module_alias (list short) alias)))
(~ source+)
#0)))))))
@@ -3883,11 +3883,11 @@
(case tokens
(^ (list [_ {#Text alias}] struct))
(case struct
- [_ {#Identifier struct_name}]
+ [_ {#Symbol struct_name}]
(do meta_monad
[struct_type (type_definition struct_name)
output (record_slots struct_type)
- .let [source (identifier$ struct_name)]]
+ .let [source (symbol$ struct_name)]]
(case output
{#Some [tags members]}
(do meta_monad
@@ -3902,7 +3902,7 @@
_
(do meta_monad
- [g!struct (..identifier "struct")]
+ [g!struct (..generated_symbol "struct")]
(in_meta (list (` ("lux def" (~ g!struct) (~ struct) #0))
(` (..open: (~ (text$ alias)) (~ g!struct)))))))
@@ -3911,14 +3911,14 @@
(macro: .public (|>> tokens)
(do meta_monad
- [g!_ (..identifier "_")
- g!arg (..identifier "arg")]
+ [g!_ (..generated_symbol "_")
+ g!arg (..generated_symbol "arg")]
(in_meta (list (` (function ((~ g!_) (~ g!arg)) (|> (~ g!arg) (~+ tokens))))))))
(macro: .public (<<| tokens)
(do meta_monad
- [g!_ (..identifier "_")
- g!arg (..identifier "arg")]
+ [g!_ (..generated_symbol "_")
+ g!arg (..generated_symbol "arg")]
(in_meta (list (` (function ((~ g!_) (~ g!arg)) (<| (~+ tokens) (~ g!arg))))))))
(def: (imported_by? import_name module_name)
@@ -3984,13 +3984,13 @@
(in (list)))
.let [defs (list#each (: (-> Text Code)
(function (_ def)
- (` ("lux def alias" (~ (local_identifier$ def)) (~ (identifier$ [module_name def]))))))
+ (` ("lux def alias" (~ (local_symbol$ def)) (~ (symbol$ [module_name def]))))))
defs')
openings (|> r_opens
(list#each (: (-> Openings (List Code))
(function (_ [alias structs])
(list#each (function (_ name)
- (` (open: (~ (text$ alias)) (~ (identifier$ [module_name name])))))
+ (` (open: (~ (text$ alias)) (~ (symbol$ [module_name name])))))
structs))))
list#conjoint)]]
(in (list#composite defs openings))))
@@ -4014,10 +4014,10 @@
(list (' "*"))
{#Only defs}
- (list (variant$ (list& (' "+") (list#each local_identifier$ defs))))
+ (list (variant$ (list& (' "+") (list#each local_symbol$ defs))))
{#Exclude defs}
- (list (variant$ (list& (' "-") (list#each local_identifier$ defs))))
+ (list (variant$ (list& (' "-") (list#each local_symbol$ defs))))
{#Ignore}
(list)
@@ -4026,7 +4026,7 @@
(list)))
openings (list#each (function (_ [alias structs])
(form$ (list& (text$ (..module_alias (list (alias_stand_in 0) module_alias) alias))
- (list#each local_identifier$ structs))))
+ (list#each local_symbol$ structs))))
r_opens)]
(` ((~! ..refer) (~ (text$ module_name))
(~+ localizations)
@@ -4050,9 +4050,9 @@
(macro: .public (# tokens)
(case tokens
- (^ (list struct [_ {#Identifier member}]))
+ (^ (list struct [_ {#Symbol member}]))
(in_meta (list (` (let [(^open (~ (text$ (alias_stand_in 0)))) (~ struct)]
- (~ (identifier$ member))))))
+ (~ (symbol$ member))))))
(^ (list& struct member args))
(in_meta (list (` ((..# (~ struct) (~ member)) (~+ args)))))
@@ -4062,7 +4062,7 @@
(macro: .public (with@ tokens)
(case tokens
- (^ (list [_ {#Identifier slot'}] value record))
+ (^ (list [_ {#Symbol slot'}] value record))
(do meta_monad
[slot (normal slot')
output (..type_slot slot)
@@ -4074,20 +4074,20 @@
(: (-> [Symbol [Nat Type]] (Meta [Symbol Nat Code]))
(function (_ [r_slot_name [r_idx r_type]])
(do meta_monad
- [g!slot (..identifier "")]
+ [g!slot (..generated_symbol "")]
(in_meta [r_slot_name r_idx g!slot]))))
(zipped/2 tags (enumeration members)))]
(let [pattern (|> pattern'
(list#each (: (-> [Symbol Nat Code] (List Code))
(function (_ [r_slot_name r_idx r_var])
- (list (identifier$ r_slot_name)
+ (list (symbol$ r_slot_name)
r_var))))
list#conjoint
tuple$)
output (|> pattern'
(list#each (: (-> [Symbol Nat Code] (List Code))
(function (_ [r_slot_name r_idx r_var])
- (list (identifier$ r_slot_name)
+ (list (symbol$ r_slot_name)
(if ("lux i64 =" idx r_idx)
value
r_var)))))
@@ -4107,7 +4107,7 @@
(do meta_monad
[bindings (monad#each meta_monad
(: (-> Code (Meta Code))
- (function (_ _) (..identifier "temp")))
+ (function (_ _) (..generated_symbol "temp")))
slots)
.let [pairs (zipped/2 slots bindings)
update_expr (list#mix (: (-> [Code Code] Code Code)
@@ -4127,16 +4127,16 @@
(^ (list selector value))
(do meta_monad
- [g!_ (..identifier "_")
- g!record (..identifier "record")]
+ [g!_ (..generated_symbol "_")
+ g!record (..generated_symbol "record")]
(in (list (` (function ((~ g!_) (~ g!record))
(..with@ (~ selector) (~ value) (~ g!record)))))))
(^ (list selector))
(do meta_monad
- [g!_ (..identifier "_")
- g!value (..identifier "value")
- g!record (..identifier "record")]
+ [g!_ (..generated_symbol "_")
+ g!value (..generated_symbol "value")
+ g!record (..generated_symbol "record")]
(in (list (` (function ((~ g!_) (~ g!value) (~ g!record))
(..with@ (~ selector) (~ g!value) (~ g!record)))))))
@@ -4145,7 +4145,7 @@
(macro: .public (revised@ tokens)
(case tokens
- (^ (list [_ {#Identifier slot'}] fun record))
+ (^ (list [_ {#Symbol slot'}] fun record))
(do meta_monad
[slot (normal slot')
output (..type_slot slot)
@@ -4157,20 +4157,20 @@
(: (-> [Symbol [Nat Type]] (Meta [Symbol Nat Code]))
(function (_ [r_slot_name [r_idx r_type]])
(do meta_monad
- [g!slot (..identifier "")]
+ [g!slot (..generated_symbol "")]
(in_meta [r_slot_name r_idx g!slot]))))
(zipped/2 tags (enumeration members)))]
(let [pattern (|> pattern'
(list#each (: (-> [Symbol Nat Code] (List Code))
(function (_ [r_slot_name r_idx r_var])
- (list (identifier$ r_slot_name)
+ (list (symbol$ r_slot_name)
r_var))))
list#conjoint
tuple$)
output (|> pattern'
(list#each (: (-> [Symbol Nat Code] (List Code))
(function (_ [r_slot_name r_idx r_var])
- (list (identifier$ r_slot_name)
+ (list (symbol$ r_slot_name)
(if ("lux i64 =" idx r_idx)
(` ((~ fun) (~ r_var)))
r_var)))))
@@ -4188,24 +4188,24 @@
_
(do meta_monad
- [g!record (..identifier "record")
- g!temp (..identifier "temp")]
+ [g!record (..generated_symbol "record")
+ g!temp (..generated_symbol "temp")]
(in (list (` (let [(~ g!record) (~ record)
(~ g!temp) (value@ [(~+ slots)] (~ g!record))]
(with@ [(~+ slots)] ((~ fun) (~ g!temp)) (~ g!record))))))))
(^ (list selector fun))
(do meta_monad
- [g!_ (..identifier "_")
- g!record (..identifier "record")]
+ [g!_ (..generated_symbol "_")
+ g!record (..generated_symbol "record")]
(in (list (` (function ((~ g!_) (~ g!record))
(..revised@ (~ selector) (~ fun) (~ g!record)))))))
(^ (list selector))
(do meta_monad
- [g!_ (..identifier "_")
- g!fun (..identifier "fun")
- g!record (..identifier "record")]
+ [g!_ (..generated_symbol "_")
+ g!fun (..generated_symbol "fun")
+ g!record (..generated_symbol "record")]
(in (list (` (function ((~ g!_) (~ g!fun) (~ g!record))
(..revised@ (~ selector) (~ g!fun) (~ g!record)))))))
@@ -4220,7 +4220,7 @@
branches))
(case (: (Maybe (List Code))
(do maybe_monad
- [bindings' (monad#each maybe_monad identifier_short bindings)
+ [bindings' (monad#each maybe_monad symbol_short bindings)
data' (monad#each maybe_monad tuple_list data)]
(let [num_bindings (list#size bindings')]
(if (every? (|>> ("lux i64 =" num_bindings))
@@ -4292,10 +4292,10 @@
{#Named [module name] anonymous}
... TODO: Generate the explicit type definition instead of using
- ... the "identifier$" shortcut below.
+ ... the "symbol$" shortcut below.
... (` {.#Named [(~ (text$ module)) (~ (text$ name))]
... (~ (type_code anonymous))})
- (identifier$ [module name])))
+ (symbol$ [module name])))
(macro: .public (loop tokens)
(let [?params (case tokens
@@ -4303,7 +4303,7 @@
{#Some [name bindings body]}
(^ (list [_ {#Tuple bindings}] body))
- {#Some [(local_identifier$ "recur") bindings body]}
+ {#Some [(local_symbol$ "recur") bindings body]}
_
{#None})]
@@ -4312,10 +4312,10 @@
(let [pairs (pairs bindings)
vars (list#each product#left pairs)
inits (list#each product#right pairs)]
- (if (every? identifier? inits)
+ (if (every? symbol? inits)
(do meta_monad
[inits' (: (Meta (List Symbol))
- (case (monad#each maybe_monad identifier_name inits)
+ (case (monad#each maybe_monad symbol_name inits)
{#Some inits'} (in_meta inits')
{#None} (failure "Wrong syntax for loop")))
init_types (monad#each meta_monad type_definition inits')
@@ -4329,7 +4329,7 @@
(do meta_monad
[aliases (monad#each meta_monad
(: (-> Code (Meta Code))
- (function (_ _) (..identifier "")))
+ (function (_ _) (..generated_symbol "")))
inits)]
(in_meta (list (` (let [(~+ (..interleaved aliases inits))]
(.loop (~ name)
@@ -4345,7 +4345,7 @@
(^or [_ {#Bit _}] [_ {#Nat _}] [_ {#Int _}] [_ {#Rev _}] [_ {#Frac _}] [_ {#Text _}])
(list target)
- [_ {#Identifier [module name]}]
+ [_ {#Symbol [module name]}]
(if (and (text#= "" module)
(text#= label name))
tokens
@@ -4362,7 +4362,7 @@
(case tokens
(^ (list& [_ {#Tuple bindings}] bodies))
(case bindings
- (^ (list& [_ {#Identifier ["" var_name]}] expr bindings'))
+ (^ (list& [_ {#Symbol ["" var_name]}] expr bindings'))
(do meta_monad
[expansion (single_expansion expr)]
(in (with_expansions' var_name expansion
@@ -4420,7 +4420,7 @@
(def: (static_literal token)
(-> Code (Meta Code))
(case token
- [_ {#Identifier [def_module def_name]}]
+ [_ {#Symbol [def_module def_name]}]
(if (text#= "" def_module)
(do meta_monad
[current_module current_module_name]
@@ -4480,7 +4480,7 @@
(-> Code [Multi_Level_Case Code] (List Code))
(let [inner_pattern_body (list#mix (function (_ [calculation pattern] success)
(let [bind? (case pattern
- [_ {#Identifier _}]
+ [_ {#Symbol _}]
#1
_
@@ -4502,13 +4502,13 @@
(do meta_monad
[mlc (multi_level_case^ levels)
.let [initial_bind? (case mlc
- [[_ {#Identifier _}] _]
+ [[_ {#Symbol _}] _]
#1
_
#0)]
expected ..expected_type
- g!temp (..identifier "temp")]
+ g!temp (..generated_symbol "temp")]
(let [output (list g!temp
(` ({{.#Some (~ g!temp)}
(~ g!temp)
@@ -4538,7 +4538,7 @@
(macro: .public (symbol tokens)
(case tokens
- (^ (list [_ {#Identifier [module name]}]))
+ (^ (list [_ {#Symbol [module name]}]))
(in_meta (list (` [(~ (text$ module)) (~ (text$ name))])))
_
@@ -4575,8 +4575,8 @@
(macro: .public (^@ tokens)
(case tokens
- (^ (list& [_meta {#Form (list [_ {#Identifier ["" name]}] pattern)}] body branches))
- (let [g!whole (local_identifier$ name)]
+ (^ (list& [_meta {#Form (list [_ {#Symbol ["" name]}] pattern)}] body branches))
+ (let [g!whole (local_symbol$ name)]
(in_meta (list& g!whole
(` (case (~ g!whole) (~ pattern) (~ body)))
branches)))
@@ -4586,8 +4586,8 @@
(macro: .public (^|> tokens)
(case tokens
- (^ (list& [_meta {#Form (list [_ {#Identifier ["" name]}] [_ {#Tuple steps}])}] body branches))
- (let [g!name (local_identifier$ name)]
+ (^ (list& [_meta {#Form (list [_ {#Symbol ["" name]}] [_ {#Tuple steps}])}] body branches))
+ (let [g!name (local_symbol$ name)]
(in_meta (list& g!name
(` (let [(~ g!name) (|> (~ g!name) (~+ steps))]
(~ body)))
@@ -4626,14 +4626,14 @@
(macro: .public (:of tokens)
(case tokens
- (^ (list [_ {#Identifier var_name}]))
+ (^ (list [_ {#Symbol var_name}]))
(do meta_monad
[var_type (type_definition var_name)]
(in (list (type_code var_type))))
(^ (list expression))
(do meta_monad
- [g!temp (..identifier "g!temp")]
+ [g!temp (..generated_symbol "g!temp")]
(in (list (` (let [(~ g!temp) (~ expression)]
(..:of (~ g!temp)))))))
@@ -4663,17 +4663,17 @@
(case (templateP tokens)
{#Some [export_policy name args input_templates]}
(do meta_monad
- [g!tokens (..identifier "tokens")
- g!compiler (..identifier "compiler")
- g!_ (..identifier "_")
+ [g!tokens (..generated_symbol "tokens")
+ g!compiler (..generated_symbol "compiler")
+ g!_ (..generated_symbol "_")
.let [rep_env (list#each (function (_ arg)
- [arg (` ((~' ~) (~ (local_identifier$ arg))))])
+ [arg (` ((~' ~) (~ (local_symbol$ arg))))])
args)]
this_module current_module_name]
(in (list (` (macro: (~ export_policy)
- ((~ (local_identifier$ name)) (~ g!tokens) (~ g!compiler))
+ ((~ (local_symbol$ name)) (~ g!tokens) (~ g!compiler))
(case (~ g!tokens)
- (^ (list (~+ (list#each local_identifier$ args))))
+ (^ (list (~+ (list#each local_symbol$ args))))
{.#Right [(~ g!compiler)
(list (~+ (list#each (function (_ template)
(` (`' (~ (with_replacements rep_env
@@ -4711,10 +4711,10 @@
[_ {#Text platform}]
(..in_meta platform)
- [_ {#Identifier identifier}]
+ [_ {#Symbol symbol}]
(do meta_monad
- [identifier (..global_identifier identifier)
- type+value (..definition_value identifier)
+ [symbol (..global_symbol symbol)
+ type+value (..definition_value symbol)
.let [[type value] type+value]]
(case (..flat_alias type)
(^or {#Primitive "#Text" {#End}}
@@ -4723,13 +4723,13 @@
_
(failure ($_ text#composite
- "Invalid target platform (must be a value of type Text): " (symbol#encoded identifier)
+ "Invalid target platform (must be a value of type Text): " (symbol#encoded symbol)
" : " (..code#encoded (..type_code type))))))
_
(failure ($_ text#composite
"Invalid target platform syntax: " (..code#encoded choice)
- \n "Must be either a text literal or an identifier."))))
+ \n "Must be either a text literal or a symbol."))))
(def: (target_pick target options default)
(-> Text (List [Code Code]) (Maybe Code) (Meta (List Code)))
@@ -4784,9 +4784,9 @@
(def: (embedded_expansions code)
(-> Code (Meta [(List [Code Code]) Code]))
(case code
- (^ [ann {#Form (list [_ {#Identifier ["" "~~"]}] expansion)}])
+ (^ [ann {#Form (list [_ {#Symbol ["" "~~"]}] expansion)}])
(do meta_monad
- [g!expansion (..identifier "g!expansion")]
+ [g!expansion (..generated_symbol "g!expansion")]
(in [(list [g!expansion expansion]) g!expansion]))
(^template [<tag>]
@@ -4834,7 +4834,7 @@
(-> Code (-> Code (Meta Code))
(-> (List Code) (Meta Code)))
(case (list#reversed elems)
- {#Item [_ {#Form {#Item [[_ {#Identifier ["" "~+"]}] {#Item [spliced {#End}]}]}}]
+ {#Item [_ {#Form {#Item [[_ {#Symbol ["" "~+"]}] {#Item [spliced {#End}]}]}}]
inits}
(do meta_monad
[=inits (monad#each meta_monad untemplated_pattern (list#reversed inits))]
@@ -4853,7 +4853,7 @@
(def: (untemplated_pattern pattern)
(-> Code (Meta Code))
(do meta_monad
- [g!meta (..identifier "g!meta")]
+ [g!meta (..generated_symbol "g!meta")]
(case pattern
(^template [<tag> <gen>]
[[_ {<tag> value}]
@@ -4864,12 +4864,12 @@
[.#Rev rev$]
[.#Frac frac$]
[.#Text text$]
- [.#Identifier name$])
+ [.#Symbol name$])
- [_ {#Form {#Item [[_ {#Identifier ["" "~"]}] {#Item [unquoted {#End}]}]}}]
+ [_ {#Form {#Item [[_ {#Symbol ["" "~"]}] {#Item [unquoted {#End}]}]}}]
(in_meta unquoted)
- [_ {#Form {#Item [[_ {#Identifier ["" "~+"]}] {#Item [spliced {#End}]}]}}]
+ [_ {#Form {#Item [[_ {#Symbol ["" "~+"]}] {#Item [spliced {#End}]}]}}]
(failure "Cannot use (~+) inside of ^code unless it is the last element in a form or a tuple.")
(^template [<tag> <untemplated>]
@@ -4922,7 +4922,7 @@
(case tokens
(^ (list expression))
(do meta_monad
- [g!_ (..identifier "g!_")]
+ [g!_ (..generated_symbol "g!_")]
(in (list (` ("lux try"
(.function ((~ g!_) (~ g!_))
(~ expression)))))))
@@ -4933,7 +4933,7 @@
(def: (methodP tokens)
(-> (List Code) (Maybe [(List Code) [Text Code]]))
(case tokens
- (^ (list& [_ {#Form (list [_ {#Text "lux type check"}] type [_ {#Identifier ["" name]}])}]
+ (^ (list& [_ {#Form (list [_ {#Text "lux type check"}] type [_ {#Symbol ["" name]}])}]
tokens'))
{#Some [tokens' [name type]]}
@@ -4954,17 +4954,17 @@
(def: (recursive_type g!self g!dummy name body)
(-> Code Code Text Code Code)
(` ((.All ((~ g!self) (~ g!dummy))
- (~ (let$ (local_identifier$ name) (` {.#Apply (..Primitive "") (~ g!self)})
+ (~ (let$ (local_symbol$ name) (` {.#Apply (..Primitive "") (~ g!self)})
body)))
(..Primitive ""))))
(macro: .public (Rec tokens)
(case tokens
- (^ (list [_ {#Identifier "" name}] body))
+ (^ (list [_ {#Symbol "" name}] body))
(do meta_monad
[body' (expansion body)
- g!self (identifier "g!self")
- g!dummy (identifier "g!dummy")]
+ g!self (generated_symbol "g!self")
+ g!dummy (generated_symbol "g!dummy")]
(case body'
(^ (list body' labels))
(in (list (..recursive_type g!self g!dummy name body') labels))
diff --git a/stdlib/source/library/lux/abstract/comonad.lux b/stdlib/source/library/lux/abstract/comonad.lux
index af96eb4e2..e3b0f9dbc 100644
--- a/stdlib/source/library/lux/abstract/comonad.lux
+++ b/stdlib/source/library/lux/abstract/comonad.lux
@@ -26,7 +26,7 @@
(macro: .public (be tokens state)
(case (: (Maybe [(Maybe Text) Code (List Code) Code])
(case tokens
- (^ (list [_ {.#Tuple (list [_ {.#Identifier ["" name]}] comonad)}] [_ {.#Tuple bindings}] body))
+ (^ (list [_ {.#Tuple (list [_ {.#Symbol ["" name]}] comonad)}] [_ {.#Tuple bindings}] body))
{.#Some [{.#Some name} comonad bindings body]}
(^ (list comonad [_ {.#Tuple bindings}] body))
@@ -37,20 +37,20 @@
{.#Some [?name comonad bindings body]}
(if (|> bindings list.size (n.% 2) (n.= 0))
(let [[module short] (symbol ..be)
- identifier (: (-> Text Code)
- (|>> ($_ "lux text concat" module " " short " ") [""] {.#Identifier} [location.dummy]))
- g!_ (identifier "_")
- g!each (identifier "each")
- g!disjoint (identifier "disjoint")
+ symbol (: (-> Text Code)
+ (|>> ($_ "lux text concat" module " " short " ") [""] {.#Symbol} [location.dummy]))
+ g!_ (symbol "_")
+ g!each (symbol "each")
+ g!disjoint (symbol "disjoint")
body' (list#mix (: (-> [Code Code] Code Code)
(function (_ binding body')
(with_expansions [<default> (` (|> (~ value) (~ g!disjoint) ((~ g!each) (function ((~ g!_) (~ var)) (~ body')))))]
(let [[var value] binding]
(case var
- [_ {.#Identifier ["" _]}]
+ [_ {.#Symbol ["" _]}]
<default>
- [_ {.#Identifier _}]
+ [_ {.#Symbol _}]
(` ((~ var) (~ value) (~ body')))
_
@@ -59,7 +59,7 @@
(list.reversed (list.pairs bindings)))]
{.#Right [state (list (case ?name
{.#Some name}
- (let [name [location.dummy {.#Identifier ["" name]}]]
+ (let [name [location.dummy {.#Symbol ["" name]}]]
(` (.case (~ comonad)
(~ name)
(.case (~ name)
diff --git a/stdlib/source/library/lux/abstract/monad.lux b/stdlib/source/library/lux/abstract/monad.lux
index db53c915d..738654ef5 100644
--- a/stdlib/source/library/lux/abstract/monad.lux
+++ b/stdlib/source/library/lux/abstract/monad.lux
@@ -57,7 +57,7 @@
(macro: .public (do tokens state)
(case (: (Maybe [(Maybe Text) Code (List Code) Code])
(case tokens
- (^ (list [_ {.#Tuple (list [_ {.#Identifier ["" name]}] monad)}] [_ {.#Tuple bindings}] body))
+ (^ (list [_ {.#Tuple (list [_ {.#Symbol ["" name]}] monad)}] [_ {.#Tuple bindings}] body))
{.#Some [{.#Some name} monad bindings body]}
(^ (list monad [_ {.#Tuple bindings}] body))
@@ -68,20 +68,20 @@
{.#Some [?name monad bindings body]}
(if (|> bindings list#size .int ("lux i64 %" +2) ("lux i64 =" +0))
(let [[module short] (symbol ..do)
- identifier (: (-> Text Code)
- (|>> ($_ "lux text concat" module " " short " ") [""] {.#Identifier} [location.dummy]))
- g!_ (identifier "_")
- g!each (identifier "each")
- g!conjoint (identifier "conjoint")
+ symbol (: (-> Text Code)
+ (|>> ($_ "lux text concat" module " " short " ") [""] {.#Symbol} [location.dummy]))
+ g!_ (symbol "_")
+ g!each (symbol "each")
+ g!conjoint (symbol "conjoint")
body' (list#mix (: (-> [Code Code] Code Code)
(function (_ binding body')
(with_expansions [<default> (` (|> (~ value) ((~ g!each) (function ((~ g!_) (~ var)) (~ body'))) (~ g!conjoint)))]
(let [[var value] binding]
(case var
- [_ {.#Identifier ["" _]}]
+ [_ {.#Symbol ["" _]}]
<default>
- [_ {.#Identifier _}]
+ [_ {.#Symbol _}]
(` ((~ var) (~ value) (~ body')))
_
@@ -90,7 +90,7 @@
(reversed (pairs bindings)))]
{.#Right [state (list (case ?name
{.#Some name}
- (let [name [location.dummy {.#Identifier ["" name]}]]
+ (let [name [location.dummy {.#Symbol ["" name]}]]
(` (.case (~ monad)
(~ name)
(.case (~ name)
diff --git a/stdlib/source/library/lux/abstract/monad/indexed.lux b/stdlib/source/library/lux/abstract/monad/indexed.lux
index 0d05fa951..0b0952bb4 100644
--- a/stdlib/source/library/lux/abstract/monad/indexed.lux
+++ b/stdlib/source/library/lux/abstract/monad/indexed.lux
@@ -36,16 +36,16 @@
{#Macro Symbol Code}
{#Binding Binding}))
-(def: global_identifier
+(def: global_symbol
(Parser Symbol)
(//.do <>.monad
- [[module short] <code>.identifier
+ [[module short] <code>.symbol
_ (<>.assertion "" (case module "" false _ true))]
(in [module short])))
(def: context
(Parser Context)
- (<>.or (<>.and ..global_identifier
+ (<>.or (<>.and ..global_symbol
<code>.any)
binding))
@@ -56,7 +56,7 @@
(def: named_monad
(Parser [(Maybe Text) Code])
(<>.either (<code>.tuple (<>.and (# <>.monad each (|>> {.#Some})
- <code>.local_identifier)
+ <code>.local_symbol)
<code>.any))
(# <>.monad each (|>> [{.#None}])
<code>.any)))
@@ -64,11 +64,11 @@
(syntax: .public (do [[?name monad] ..named_monad
context (<code>.tuple (<>.some context))
expression <code>.any])
- (macro.with_identifiers [g!_ g!then]
+ (macro.with_symbols [g!_ g!then]
(let [body (list#mix (function (_ context next)
(case context
{#Macro macro parameter}
- (` ((~ (code.identifier macro))
+ (` ((~ (code.symbol macro))
(~ parameter)
(~ next)))
@@ -81,7 +81,7 @@
(list.reversed context))]
(in (list (case ?name
{.#Some name}
- (let [name (code.local_identifier name)]
+ (let [name (code.local_symbol 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 f4170b94a..0eded28b3 100644
--- a/stdlib/source/library/lux/control/concatenative.lux
+++ b/stdlib/source/library/lux/control/concatenative.lux
@@ -11,7 +11,7 @@
["%" format {"+" format}]]
[collection
["[0]" list ("[1]#[0]" mix functor)]]]
- ["[0]" macro {"+" with_identifiers}
+ ["[0]" macro {"+" with_symbols}
["[0]" code]
["[0]" template]
[syntax {"+" syntax:}
@@ -36,7 +36,7 @@
(def: aliases^
(Parser (List Alias))
- (|> (<>.and <code>.local_identifier <code>.any)
+ (|> (<>.and <code>.local_symbol <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_identifier from) to pre))
+ (code.replaced (code.local_symbol from) to pre))
aliased
aliases))]
(case [(value@ #bottom inputs)
@@ -95,11 +95,11 @@
(~ (de_alias outputC)))))))
[?bottomI ?bottomO]
- (with_identifiers [g!stack]
+ (with_symbols [g!stack]
(monad.do meta.monad
[inputC (singleton (macro.full_expansion (stack_mix (value@ #top inputs) (maybe.else g!stack ?bottomI))))
outputC (singleton (macro.full_expansion (stack_mix (value@ #top outputs) (maybe.else g!stack ?bottomO))))]
- (with_identifiers [g!_]
+ (with_symbols [g!_]
(in (list (` (All ((~ g!_) (~ g!stack))
(-> (~ (de_alias inputC))
(~ (de_alias outputC)))))))))))))
@@ -120,19 +120,19 @@
(Parser [Code Text Code (List Code)])
(|export|.parser
($_ <>.and
- <code>.local_identifier
+ <code>.local_symbol
<code>.any
(<>.many <code>.any))))
(syntax: .public (word: [[export_policy name type commands] ..word])
- (in (list (` (def: (~ export_policy) (~ (code.local_identifier name))
+ (in (list (` (def: (~ export_policy) (~ (code.local_symbol name))
(~ type)
(|>> (~+ commands)))))))
(syntax: .public (apply [arity (<>.only (n.> 0) <code>.nat)])
- (with_identifiers [g!_ g!func g!stack g!output]
+ (with_symbols [g!_ g!func g!stack g!output]
(monad.do [! meta.monad]
- [g!inputs (|> (macro.identifier "input") (list.repeated arity) (monad.all !))]
+ [g!inputs (|> (macro.symbol "input") (list.repeated arity) (monad.all !))]
(in (list (` (: (All ((~ g!_) (~+ g!inputs) (~ g!output))
(-> (-> (~+ g!inputs) (~ g!output))
(=> [(~+ g!inputs)] [(~ g!output)])))
@@ -141,7 +141,7 @@
[(~ g!stack) ((~ g!func) (~+ g!inputs))])))))))))
(template [<arity>]
- [(`` (def: .public (~~ (template.identifier ["apply/" <arity>]))
+ [(`` (def: .public (~~ (template.symbol ["apply/" <arity>]))
(..apply <arity>)))]
[1] [2] [3] [4]
diff --git a/stdlib/source/library/lux/control/concurrency/actor.lux b/stdlib/source/library/lux/control/concurrency/actor.lux
index 7bbc5f158..b3f261d65 100644
--- a/stdlib/source/library/lux/control/concurrency/actor.lux
+++ b/stdlib/source/library/lux/control/concurrency/actor.lux
@@ -19,7 +19,7 @@
["%" format {"+" format}]]
[collection
["[0]" list ("[1]#[0]" monoid monad)]]]
- ["[0]" macro {"+" with_identifiers}
+ ["[0]" macro {"+" with_symbols}
["[0]" code]
[syntax {"+" syntax:}
["|[0]|" input]
@@ -212,8 +212,8 @@
(def: actor_decl^
(Parser [Text (List Text)])
- (<>.either (<code>.form (<>.and <code>.local_identifier (<>.some <code>.local_identifier)))
- (<>.and <code>.local_identifier (# <>.monad in (list)))))
+ (<>.either (<code>.form (<>.and <code>.local_symbol (<>.some <code>.local_symbol)))
+ (<>.and <code>.local_symbol (# <>.monad in (list)))))
(type: On_MailC
[[Text Text Text] Code])
@@ -223,7 +223,7 @@
(def: argument
(Parser Text)
- <code>.local_identifier)
+ <code>.local_symbol)
(def: on_mail^
(Parser (Maybe On_MailC))
@@ -245,9 +245,9 @@
{.#Some [[mailN stateN selfN] bodyC]}
(` (function ((~ g!_)
- (~ (code.local_identifier mailN))
- (~ (code.local_identifier stateN))
- (~ (code.local_identifier selfN)))
+ (~ (code.local_symbol mailN))
+ (~ (code.local_symbol stateN))
+ (~ (code.local_symbol selfN)))
(~ bodyC)))))
(def: actorP
@@ -259,11 +259,11 @@
behavior^)))
(syntax: .public (actor: [[export_policy [name vars] state_type [?on_mail messages]] ..actorP])
- (with_identifiers [g!_]
+ (with_symbols [g!_]
(do meta.monad
- [g!type (macro.identifier (format name "_abstract_type"))
- .let [g!actor (code.local_identifier name)
- g!vars (list#each code.local_identifier vars)]]
+ [g!type (macro.symbol (format name "_abstract_type"))
+ .let [g!actor (code.local_symbol name)
+ g!vars (list#each code.local_symbol vars)]]
(in (list (` ((~! abstract:) (~ export_policy) ((~ g!type) (~+ g!vars))
(~ state_type)
@@ -277,7 +277,7 @@
(syntax: .public (actor [[state_type init] (<code>.tuple (<>.and <code>.any <code>.any))
?on_mail on_mail^])
- (with_identifiers [g!_]
+ (with_symbols [g!_]
(in (list (` (: ((~! io.IO) (..Actor (~ state_type)))
(..spawn! (: (..Behavior (~ state_type) (~ state_type))
[..#on_init (|>>)
@@ -296,16 +296,16 @@
(def: signature^
(Parser Signature)
(<code>.form ($_ <>.and
- (<>.else (list) (<code>.tuple (<>.some <code>.local_identifier)))
- <code>.local_identifier
+ (<>.else (list) (<code>.tuple (<>.some <code>.local_symbol)))
+ <code>.local_symbol
|input|.parser
- <code>.local_identifier
- <code>.local_identifier)))
+ <code>.local_symbol
+ <code>.local_symbol)))
(def: reference^
(Parser [Symbol (List Text)])
- (<>.either (<code>.form (<>.and <code>.identifier (<>.some <code>.local_identifier)))
- (<>.and <code>.identifier (# <>.monad in (list)))))
+ (<>.either (<code>.form (<>.and <code>.symbol (<>.some <code>.local_symbol)))
+ (<>.and <code>.symbol (# <>.monad in (list)))))
(def: messageP
(Parser [Code Signature Code Code])
@@ -316,17 +316,17 @@
<code>.any)))
(syntax: .public (message: [[export_policy signature output_type body] ..messageP])
- (with_identifiers [g!_ g!return]
+ (with_symbols [g!_ g!return]
(do meta.monad
[actor_scope abstract.current
- .let [g!type (code.local_identifier (value@ abstract.#name actor_scope))
- g!message (code.local_identifier (value@ #name signature))
+ .let [g!type (code.local_symbol (value@ abstract.#name actor_scope))
+ g!message (code.local_symbol (value@ #name signature))
g!actor_vars (value@ abstract.#type_vars actor_scope)
- g!all_vars (|> signature (value@ #vars) (list#each code.local_identifier) (list#composite g!actor_vars))
+ g!all_vars (|> signature (value@ #vars) (list#each code.local_symbol) (list#composite g!actor_vars))
g!inputsC (|> signature (value@ #inputs) (list#each product.left))
g!inputsT (|> signature (value@ #inputs) (list#each product.right))
- g!state (|> signature (value@ #state) code.local_identifier)
- g!self (|> signature (value@ #self) code.local_identifier)]]
+ g!state (|> signature (value@ #state) code.local_symbol)
+ g!self (|> signature (value@ #self) code.local_symbol)]]
(in (list (` (def: (~ export_policy) ((~ g!message) (~+ g!inputsC))
(All ((~ g!_) (~+ g!all_vars))
(-> (~+ g!inputsT)
diff --git a/stdlib/source/library/lux/control/continuation.lux b/stdlib/source/library/lux/control/continuation.lux
index 3be6645ff..97714878e 100644
--- a/stdlib/source/library/lux/control/continuation.lux
+++ b/stdlib/source/library/lux/control/continuation.lux
@@ -9,7 +9,7 @@
["[0]" function]
[parser
["<[0]>" code]]]
- [macro {"+" with_identifiers}
+ [macro {"+" with_symbols}
[syntax {"+" syntax:}]
["[0]" code]]]])
@@ -34,7 +34,7 @@
k)))
(syntax: .public (pending [expr <code>.any])
- (with_identifiers [g!_ g!k]
+ (with_symbols [g!_ g!k]
(in (list (` (.function ((~ g!_) (~ g!k)) ((~ g!k) (~ expr))))))))
(def: .public (reset scope)
diff --git a/stdlib/source/library/lux/control/exception.lux b/stdlib/source/library/lux/control/exception.lux
index 7e92d15da..114c0c07f 100644
--- a/stdlib/source/library/lux/control/exception.lux
+++ b/stdlib/source/library/lux/control/exception.lux
@@ -81,8 +81,8 @@
(let [private (: (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_identifier |input|.parser))
- (<>.and <code>.local_identifier (<>#in (list))))
+ (<>.either (<code>.form (<>.and <code>.local_symbol |input|.parser))
+ (<>.and <code>.local_symbol (<>#in (list))))
(<>.maybe <code>.any)
))]
($_ <>.either
@@ -91,11 +91,11 @@
)))
(syntax: .public (exception: [[export_policy t_vars [name inputs] body] ..exception])
- (macro.with_identifiers [g!_ g!descriptor]
+ (macro.with_symbols [g!_ g!descriptor]
(do meta.monad
[current_module meta.current_module_name
.let [descriptor ($_ text#composite "{" current_module "." name "}" text.new_line)
- g!self (code.local_identifier name)]]
+ g!self (code.local_symbol 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/contract.lux b/stdlib/source/library/lux/control/function/contract.lux
index 3817a4bef..526b36e74 100644
--- a/stdlib/source/library/lux/control/function/contract.lux
+++ b/stdlib/source/library/lux/control/function/contract.lux
@@ -8,7 +8,7 @@
[data
[text
["%" format {"+" format}]]]
- [macro {"+" with_identifiers}
+ [macro {"+" with_symbols}
[syntax {"+" syntax:}]
["[0]" code]]
[math
@@ -39,7 +39,7 @@
(syntax: .public (post [test <code>.any
expr <code>.any])
- (with_identifiers [g!output]
+ (with_symbols [g!output]
(in (list (` (let [(~ g!output) (~ expr)]
(exec
((~! ..assert!) (~ (code.text (exception.error ..post_condition_failed test)))
diff --git a/stdlib/source/library/lux/control/function/mutual.lux b/stdlib/source/library/lux/control/function/mutual.lux
index 493c36d80..999eea333 100644
--- a/stdlib/source/library/lux/control/function/mutual.lux
+++ b/stdlib/source/library/lux/control/function/mutual.lux
@@ -59,17 +59,17 @@
(in (list body))
{.#Item mutual {.#End}}
- (.let [g!name (|> mutual (value@ [#declaration declaration.#name]) code.local_identifier)]
+ (.let [g!name (|> mutual (value@ [#declaration declaration.#name]) code.local_symbol)]
(in (list (` (.let [(~ g!name) (: (~ (value@ #type mutual))
(function (~ (declaration.format (value@ #declaration mutual)))
(~ (value@ #body mutual))))]
(~ body))))))
_
- (macro.with_identifiers [g!context g!output]
+ (macro.with_symbols [g!context g!output]
(do [! meta.monad]
[here_name meta.current_module_name
- hidden_names (monad.each ! (//.constant (macro.identifier "mutual_function#"))
+ hidden_names (monad.each ! (//.constant (macro.symbol "mutual_function#"))
functions)
.let [definitions (list#each (..mutual_definition hidden_names g!context)
(list.zipped/2 hidden_names
@@ -77,7 +77,7 @@
context_types (list#each (function (_ mutual)
(` (-> (~ g!context) (~ (value@ #type mutual)))))
functions)
- user_names (list#each (|>> (value@ [#declaration declaration.#name]) code.local_identifier)
+ user_names (list#each (|>> (value@ [#declaration declaration.#name]) code.local_symbol)
functions)]
g!pop (local.push (list#each (function (_ [g!name mutual])
[[here_name (value@ [#declaration declaration.#name] mutual)]
@@ -118,10 +118,10 @@
(~ _#body))))))
_
- (macro.with_identifiers [g!context g!output]
+ (macro.with_symbols [g!context g!output]
(do [! meta.monad]
[here_name meta.current_module_name
- hidden_names (monad.each ! (//.constant (macro.identifier "mutual_function#"))
+ hidden_names (monad.each ! (//.constant (macro.symbol "mutual_function#"))
functions)
.let [definitions (list#each (..mutual_definition hidden_names g!context)
(list.zipped/2 hidden_names
@@ -129,7 +129,7 @@
context_types (list#each (function (_ mutual)
(` (-> (~ g!context) (~ (value@ [#mutual #type] mutual)))))
functions)
- user_names (list#each (|>> (value@ [#mutual #declaration declaration.#name]) code.local_identifier)
+ user_names (list#each (|>> (value@ [#mutual #declaration declaration.#name]) code.local_symbol)
functions)]
g!pop (local.push (list#each (function (_ [g!name mutual])
[[here_name (value@ [#mutual #declaration declaration.#name] mutual)]
@@ -147,7 +147,7 @@
user_names))])))
g!pop
(list#each (function (_ mutual)
- (.let [g!name (|> mutual (value@ [#mutual #declaration declaration.#name]) code.local_identifier)]
+ (.let [g!name (|> mutual (value@ [#mutual #declaration declaration.#name]) code.local_symbol)]
(` (.def:
(~ (value@ #export_policy mutual))
(~ g!name)
diff --git a/stdlib/source/library/lux/control/io.lux b/stdlib/source/library/lux/control/io.lux
index 23267c01d..21ec7bb8f 100644
--- a/stdlib/source/library/lux/control/io.lux
+++ b/stdlib/source/library/lux/control/io.lux
@@ -10,7 +10,7 @@
["<[0]>" code]]]
[type
abstract]
- [macro {"+" with_identifiers}
+ [macro {"+" with_symbols}
[syntax {"+" syntax:}]
["[0]" template]]]])
@@ -31,7 +31,7 @@
[((:representation io) [])])
(syntax: .public (io [computation <code>.any])
- (with_identifiers [g!func g!arg]
+ (with_symbols [g!func g!arg]
(in (list (` ((~! ..label) (function ((~ g!func) (~ g!arg))
(~ computation))))))))
diff --git a/stdlib/source/library/lux/control/lazy.lux b/stdlib/source/library/lux/control/lazy.lux
index 414f8bc37..76f7b49c9 100644
--- a/stdlib/source/library/lux/control/lazy.lux
+++ b/stdlib/source/library/lux/control/lazy.lux
@@ -12,7 +12,7 @@
["<[0]>" code]]
[concurrency
["[0]" atom]]]
- [macro {"+" with_identifiers}
+ [macro {"+" with_symbols}
[syntax {"+" syntax:}]]
[type
abstract]]])
@@ -39,7 +39,7 @@
((:representation lazy) [])))
(syntax: .public (lazy [expression <code>.any])
- (with_identifiers [g!_]
+ (with_symbols [g!_]
(in (list (` ((~! ..lazy') (function ((~ g!_) (~ g!_)) (~ expression))))))))
(implementation: .public (equivalence (^open "_#[0]"))
diff --git a/stdlib/source/library/lux/control/maybe.lux b/stdlib/source/library/lux/control/maybe.lux
index ce7c40222..2988a6d42 100644
--- a/stdlib/source/library/lux/control/maybe.lux
+++ b/stdlib/source/library/lux/control/maybe.lux
@@ -122,7 +122,7 @@
(macro: .public (else tokens state)
(case tokens
(^ (.list else maybe))
- (let [g!temp (: Code [location.dummy {.#Identifier ["" ""]}])]
+ (let [g!temp (: Code [location.dummy {.#Symbol ["" ""]}])]
{.#Right [state (.list (` (case (~ maybe)
{.#Some (~ g!temp)}
(~ g!temp)
diff --git a/stdlib/source/library/lux/control/parser/binary.lux b/stdlib/source/library/lux/control/parser/binary.lux
index 63ee6d36e..b76df036e 100644
--- a/stdlib/source/library/lux/control/parser/binary.lux
+++ b/stdlib/source/library/lux/control/parser/binary.lux
@@ -274,7 +274,7 @@
[3 [.#Rev] ..rev]
[4 [.#Frac] ..frac]
[5 [.#Text] ..text]
- [6 [.#Identifier] ..symbol]
+ [6 [.#Symbol] ..symbol]
[7 [.#Form] sequence]
[8 [.#Variant] sequence]
[9 [.#Tuple] sequence]]))))))
diff --git a/stdlib/source/library/lux/control/parser/code.lux b/stdlib/source/library/lux/control/parser/code.lux
index c2ee27afd..02c495986 100644
--- a/stdlib/source/library/lux/control/parser/code.lux
+++ b/stdlib/source/library/lux/control/parser/code.lux
@@ -1,6 +1,6 @@
(.module:
[library
- [lux {"-" nat int rev local not}
+ [lux {"-" nat int rev local not symbol}
[abstract
["[0]" monad {"+" do}]]
[control
@@ -81,13 +81,13 @@
_
<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"]
- [identifier identifier! Symbol .#Identifier symbol.equivalence "identifier"]
+ [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"]
)
(def: .public (this! code)
@@ -127,7 +127,7 @@
_
<failure>))))]
- [local_identifier local_identifier! .#Identifier text.equivalence "local identifier"]
+ [local_symbol local_symbol! .#Symbol text.equivalence "local symbol"]
)
(template [<name> <tag> <desc>]
diff --git a/stdlib/source/library/lux/control/parser/json.lux b/stdlib/source/library/lux/control/parser/json.lux
index 80b52e147..22487ec8a 100644
--- a/stdlib/source/library/lux/control/parser/json.lux
+++ b/stdlib/source/library/lux/control/parser/json.lux
@@ -1,6 +1,6 @@
(.module:
[library
- [lux "*"
+ [lux {"-" symbol}
[abstract
["[0]" monad {"+" do}]]
[control
diff --git a/stdlib/source/library/lux/control/parser/type.lux b/stdlib/source/library/lux/control/parser/type.lux
index 11815338e..85e710ec2 100644
--- a/stdlib/source/library/lux/control/parser/type.lux
+++ b/stdlib/source/library/lux/control/parser/type.lux
@@ -136,7 +136,7 @@
(def: (label idx)
(-> Nat Code)
- (code.local_identifier ($_ text#composite "label" text.tab (n#encoded idx))))
+ (code.local_symbol ($_ text#composite "label" text.tab (n#encoded idx))))
(def: .public (with_extension type poly)
(All (_ a) (-> Type (Parser a) (Parser [Code a])))
diff --git a/stdlib/source/library/lux/control/pipe.lux b/stdlib/source/library/lux/control/pipe.lux
index 2929ddc52..2d44a11fb 100644
--- a/stdlib/source/library/lux/control/pipe.lux
+++ b/stdlib/source/library/lux/control/pipe.lux
@@ -11,7 +11,7 @@
["[0]" identity]
[collection
["[0]" list ("[1]#[0]" monad)]]]
- [macro {"+" with_identifiers}
+ [macro {"+" with_symbols}
[syntax {"+" syntax:}]
["[0]" code]]
[math
@@ -44,7 +44,7 @@
else body^
_ _reversed_
branches (<>.some (<>.and body^ body^))])
- (with_identifiers [g!temp]
+ (with_symbols [g!temp]
(in (list (` (let [(~ g!temp) (~ prev)]
(cond (~+ (do list.monad
[[test then] branches]
@@ -70,7 +70,7 @@
(syntax: .public (loop> [test body^
then body^
prev <code>.any])
- (with_identifiers [g!temp]
+ (with_symbols [g!temp]
(in (list (` (loop [(~ g!temp) (~ prev)]
(if (|> (~ g!temp) (~+ test))
((~' recur) (|> (~ g!temp) (~+ then)))
@@ -79,7 +79,7 @@
(syntax: .public (do> [monad <code>.any
steps (<>.some body^)
prev <code>.any])
- (with_identifiers [g!temp]
+ (with_symbols [g!temp]
(case (list.reversed steps)
(^ (list& last_step prev_steps))
(let [step_bindings (do list.monad
@@ -95,14 +95,14 @@
(syntax: .public (exec> [body body^
prev <code>.any])
- (with_identifiers [g!temp]
+ (with_symbols [g!temp]
(in (list (` (let [(~ g!temp) (~ prev)]
(exec (|> (~ g!temp) (~+ body))
(~ g!temp))))))))
(syntax: .public (tuple> [paths (<>.many body^)
prev <code>.any])
- (with_identifiers [g!temp]
+ (with_symbols [g!temp]
(in (list (` (let [(~ g!temp) (~ prev)]
[(~+ (list#each (function (_ body) (` (|> (~ g!temp) (~+ body))))
paths))]))))))
diff --git a/stdlib/source/library/lux/control/security/capability.lux b/stdlib/source/library/lux/control/security/capability.lux
index f92ae3a75..dd0fb1f35 100644
--- a/stdlib/source/library/lux/control/security/capability.lux
+++ b/stdlib/source/library/lux/control/security/capability.lux
@@ -43,19 +43,19 @@
(|export|.parser
($_ <>.and
|declaration|.parser
- (<c>.form ($_ <>.and <c>.local_identifier <c>.any <c>.any))))])
- (macro.with_identifiers [g!_]
+ (<c>.form ($_ <>.and <c>.local_symbol <c>.any <c>.any))))])
+ (macro.with_symbols [g!_]
(do [! meta.monad]
[this_module meta.current_module_name
.let [[name vars] declaration]
g!brand (# ! each (|>> %.code code.text)
- (macro.identifier (format (%.symbol [this_module name]))))
+ (macro.symbol (format (%.symbol [this_module name]))))
.let [capability (` (..Capability (.Primitive (~ g!brand)) (~ input) (~ output)))]]
(in (list (` (type: (~ export_policy)
(~ (|declaration|.format declaration))
(~ capability)))
- (` (def: (~ (code.local_identifier forger))
- (All ((~ g!_) (~+ (list#each code.local_identifier vars)))
+ (` (def: (~ (code.local_symbol forger))
+ (All ((~ g!_) (~+ (list#each code.local_symbol vars)))
(-> (-> (~ input) (~ output))
(~ capability)))
(~! ..capability)))
diff --git a/stdlib/source/library/lux/control/try.lux b/stdlib/source/library/lux/control/try.lux
index fbe4b4e6a..40aa45562 100644
--- a/stdlib/source/library/lux/control/try.lux
+++ b/stdlib/source/library/lux/control/try.lux
@@ -138,7 +138,7 @@
{..#Success (~' g!temp)}
(~' g!temp)
- {..#Failure (~ [location.dummy {.#Identifier ["" ""]}])}
+ {..#Failure (~ [location.dummy {.#Symbol ["" ""]}])}
(~ else))))]}
_
diff --git a/stdlib/source/library/lux/data/collection/list.lux b/stdlib/source/library/lux/data/collection/list.lux
index a0bf40821..b4fb8e4d6 100644
--- a/stdlib/source/library/lux/data/collection/list.lux
+++ b/stdlib/source/library/lux/data/collection/list.lux
@@ -417,9 +417,9 @@
0 (list)
_ (|> size -- (enum.range n.enum 0))))
-(def: (identifier$ name)
+(def: (symbol$ name)
(-> Text Code)
- [["" 0 0] {.#Identifier "" name}])
+ [["" 0 0] {.#Symbol "" name}])
(def: (nat#encoded value)
(-> Nat Text)
@@ -449,8 +449,8 @@
(if (n.> 0 num_lists)
(let [(^open "[0]") ..functor
indices (..indices num_lists)
- type_vars (: (List Code) (each (|>> nat#encoded identifier$) indices))
- zipped_type (` (.All ((~ (identifier$ "0_")) (~+ type_vars))
+ type_vars (: (List Code) (each (|>> nat#encoded symbol$) indices))
+ zipped_type (` (.All ((~ (symbol$ "0_")) (~+ type_vars))
(-> (~+ (each (: (-> Code Code) (function (_ var) (` (List (~ var)))))
type_vars))
(List [(~+ type_vars)]))))
@@ -458,12 +458,12 @@
(each ++)
(each (function (_ idx)
(let [base (nat#encoded idx)]
- [(identifier$ base)
- (identifier$ ("lux text concat" base "'"))]))))
+ [(symbol$ base)
+ (symbol$ ("lux text concat" base "'"))]))))
pattern (` [(~+ (each (function (_ [v vs]) (` {.#Item (~ v) (~ vs)}))
vars+lists))])
- g!step (identifier$ "0step0")
- g!blank (identifier$ "0,0")
+ g!step (symbol$ "0step0")
+ g!blank (symbol$ "0,0")
list_vars (each product.right vars+lists)
code (` (: (~ zipped_type)
(function ((~ g!step) (~+ list_vars))
@@ -489,10 +489,10 @@
(if (n.> 0 num_lists)
(let [(^open "[0]") ..functor
indices (..indices num_lists)
- g!return_type (identifier$ "0return_type0")
- g!func (identifier$ "0func0")
- type_vars (: (List Code) (each (|>> nat#encoded identifier$) indices))
- zipped_type (` (All ((~ (identifier$ "0_")) (~+ type_vars) (~ g!return_type))
+ g!return_type (symbol$ "0return_type0")
+ g!func (symbol$ "0func0")
+ type_vars (: (List Code) (each (|>> nat#encoded symbol$) indices))
+ zipped_type (` (All ((~ (symbol$ "0_")) (~+ type_vars) (~ g!return_type))
(-> (-> (~+ type_vars) (~ g!return_type))
(~+ (each (: (-> Code Code) (function (_ var) (` (List (~ var)))))
type_vars))
@@ -501,12 +501,12 @@
(each ++)
(each (function (_ idx)
(let [base (nat#encoded idx)]
- [(identifier$ base)
- (identifier$ ("lux text concat" base "'"))]))))
+ [(symbol$ base)
+ (symbol$ ("lux text concat" base "'"))]))))
pattern (` [(~+ (each (function (_ [v vs]) (` {.#Item (~ v) (~ vs)}))
vars+lists))])
- g!step (identifier$ "0step0")
- g!blank (identifier$ "0,0")
+ g!step (symbol$ "0step0")
+ g!blank (symbol$ "0,0")
list_vars (each product.right vars+lists)
code (` (: (~ zipped_type)
(function ((~ g!step) (~ g!func) (~+ list_vars))
diff --git a/stdlib/source/library/lux/data/collection/sequence.lux b/stdlib/source/library/lux/data/collection/sequence.lux
index d9724358a..fbd998ae2 100644
--- a/stdlib/source/library/lux/data/collection/sequence.lux
+++ b/stdlib/source/library/lux/data/collection/sequence.lux
@@ -8,7 +8,7 @@
["//" continuation {"+" Cont}]
["<>" parser
["<[0]>" code {"+" Parser}]]]
- [macro {"+" with_identifiers}
+ [macro {"+" with_symbols}
[syntax {"+" syntax:}]
["[0]" code]]
[data
@@ -130,7 +130,7 @@
(syntax: .public (^sequence& [patterns (<code>.form (<>.many <code>.any))
body <code>.any
branches (<>.some <code>.any)])
- (with_identifiers [g!sequence]
+ (with_symbols [g!sequence]
(let [body+ (` (let [(~+ (|> patterns
(list#each (function (_ pattern)
(list (` [(~ pattern) (~ g!sequence)])
diff --git a/stdlib/source/library/lux/data/format/binary.lux b/stdlib/source/library/lux/data/format/binary.lux
index ec07e1002..94fdea2bc 100644
--- a/stdlib/source/library/lux/data/format/binary.lux
+++ b/stdlib/source/library/lux/data/format/binary.lux
@@ -283,7 +283,7 @@
[3 .#Rev ..rev]
[4 .#Frac ..frac]
[5 .#Text ..text]
- [6 .#Identifier ..symbol]
+ [6 .#Symbol ..symbol]
[7 .#Form sequence]
[8 .#Variant sequence]
[9 .#Tuple sequence])
diff --git a/stdlib/source/library/lux/data/format/css/property.lux b/stdlib/source/library/lux/data/format/css/property.lux
index a2c5a6d50..ede7ae19a 100644
--- a/stdlib/source/library/lux/data/format/css/property.lux
+++ b/stdlib/source/library/lux/data/format/css/property.lux
@@ -52,8 +52,8 @@
White_Space Word_Break Word_Wrap Writing_Mode
Z_Index}]])
-(syntax: (text_identifier [identifier s.text])
- (in (list (code.local_identifier (text.replaced "-" "_" identifier)))))
+(syntax: (text_symbol [symbol s.text])
+ (in (list (code.local_symbol (text.replaced "-" "_" symbol)))))
(abstract: .public (Property brand)
Text
@@ -72,7 +72,7 @@
(with_expansions [<rows> (template.spliced <property>+)]
(template [<property>]
- [(`` (def: .public (~~ (text_identifier <property>))
+ [(`` (def: .public (~~ (text_symbol <property>))
(Property <brand>)
(:abstraction <property>)))]
diff --git a/stdlib/source/library/lux/data/format/css/query.lux b/stdlib/source/library/lux/data/format/css/query.lux
index 2af4d0f68..1dfc31505 100644
--- a/stdlib/source/library/lux/data/format/css/query.lux
+++ b/stdlib/source/library/lux/data/format/css/query.lux
@@ -21,8 +21,8 @@
Pointer Hover
Light Scripting Motion Color_Scheme}]])
-(syntax: (text_identifier [identifier s.text])
- (in (list (code.local_identifier (text.replaced "-" "_" identifier)))))
+(syntax: (text_symbol [symbol s.text])
+ (in (list (code.local_symbol (text.replaced "-" "_" symbol)))))
(abstract: .public Media
Text
@@ -32,7 +32,7 @@
(|>> :representation))
(template [<media>]
- [(`` (def: .public (~~ (text_identifier <media>))
+ [(`` (def: .public (~~ (text_symbol <media>))
Media
(:abstraction <media>)))]
@@ -50,7 +50,7 @@
(|>> :representation))
(template [<feature> <brand>]
- [(`` (def: .public ((~~ (text_identifier <feature>)) input)
+ [(`` (def: .public ((~~ (text_symbol <feature>)) input)
(-> (Value <brand>) Feature)
(:abstraction (format "(" <feature> ": " (//value.value input) ")"))))]
diff --git a/stdlib/source/library/lux/data/format/css/value.lux b/stdlib/source/library/lux/data/format/css/value.lux
index b57294ade..1ede42fd9 100644
--- a/stdlib/source/library/lux/data/format/css/value.lux
+++ b/stdlib/source/library/lux/data/format/css/value.lux
@@ -28,8 +28,8 @@
[//
[selector {"+" Label}]])
-(syntax: (text_identifier [identifier s.text])
- (in (list (code.local_identifier (text.replaced "-" "_" identifier)))))
+(syntax: (text_symbol [symbol s.text])
+ (in (list (code.local_symbol (text.replaced "-" "_" symbol)))))
(template: (enumeration: <abstraction> <representation> <out> <sample>+ <definition>+)
(abstract: .public <abstraction>
@@ -88,7 +88,7 @@
(with_expansions [<rows> (template.spliced <value>+)]
(template [<value>]
- [(`` (def: .public (~~ (..text_identifier <value>))
+ [(`` (def: .public (~~ (..text_symbol <value>))
(Value <brand>)
(:abstraction <value>)))]
diff --git a/stdlib/source/library/lux/data/format/xml.lux b/stdlib/source/library/lux/data/format/xml.lux
index 1db81f6d7..ec9516eb5 100644
--- a/stdlib/source/library/lux/data/format/xml.lux
+++ b/stdlib/source/library/lux/data/format/xml.lux
@@ -1,6 +1,6 @@
(.module:
[library
- [lux "*"
+ [lux {"-" symbol}
[abstract
[monad {"+" do}]
[equivalence {"+" Equivalence}]
diff --git a/stdlib/source/library/lux/data/text/regex.lux b/stdlib/source/library/lux/data/text/regex.lux
index 7a67e2a28..a32d21eb5 100644
--- a/stdlib/source/library/lux/data/text/regex.lux
+++ b/stdlib/source/library/lux/data/text/regex.lux
@@ -15,7 +15,7 @@
["[0]" product]
[collection
["[0]" list ("[1]#[0]" mix monad)]]]
- [macro {"+" with_identifiers}
+ [macro {"+" with_symbols}
[syntax {"+" syntax:}]
["[0]" code]]
[math
@@ -80,7 +80,7 @@
(-> Text (Parser Code))
(do <>.monad
[symbol (<text>.enclosed ["\@<" ">"] (symbol^ current_module))]
- (in (` (: ((~! <text>.Parser) Text) (~ (code.identifier symbol)))))))
+ (in (` (: ((~! <text>.Parser) Text) (~ (code.symbol symbol)))))))
(def: re_range^
(Parser Code)
@@ -196,12 +196,12 @@
(<>.either (do <>.monad
[_ (<text>.this "\")
id number^]
- (in (` ((~! ..copy) (~ (code.identifier ["" (n#encoded id)]))))))
+ (in (` ((~! ..copy) (~ (code.symbol ["" (n#encoded id)]))))))
(do <>.monad
[_ (<text>.this "\k<")
captured_symbol symbol_part^
_ (<text>.this ">")]
- (in (` ((~! ..copy) (~ (code.identifier ["" captured_symbol]))))))))
+ (in (` ((~! ..copy) (~ (code.symbol ["" captured_symbol]))))))))
(def: (re_simple^ current_module)
(-> Text (Parser Code))
@@ -283,8 +283,8 @@
(do <>.monad
[parts (<>.many (<>.or (re_complex^ current_module)
(re_scoped^ current_module)))
- .let [g!total (code.identifier ["" "0total"])
- g!temp (code.identifier ["" "0temp"])
+ .let [g!total (code.symbol ["" "0total"])
+ g!temp (code.symbol ["" "0temp"])
[_ names steps] (list#mix (: (-> (Either Code [Re_Group Code])
[Nat (List Code) (List (List Code))]
[Nat (List Code) (List (List Code))])
@@ -301,10 +301,10 @@
{.#Right [{#Capturing [?name num_captures]} scoped]}
(let [[idx! name!] (case ?name
{.#Some _name}
- [idx (code.identifier ["" _name])]
+ [idx (code.symbol ["" _name])]
{.#None}
- [(++ idx) (code.identifier ["" (n#encoded idx)])])
+ [(++ idx) (code.symbol ["" (n#encoded idx)])])
access (if (n.> 0 num_captures)
(` ((~! product.left) (~ name!)))
name!)]
@@ -428,7 +428,7 @@
(syntax: .public (^regex [[pattern bindings] (<code>.form (<>.and <code>.text (<>.maybe <code>.any)))
body <code>.any
branches (<>.many <code>.any)])
- (with_identifiers [g!temp]
+ (with_symbols [g!temp]
(in (list& (` (^multi (~ g!temp)
[((~! <text>.result) (..regex (~ (code.text pattern))) (~ g!temp))
{try.#Success (~ (maybe.else g!temp bindings))}]))
diff --git a/stdlib/source/library/lux/debug.lux b/stdlib/source/library/lux/debug.lux
index 5a35e3c62..ed076d3ae 100644
--- a/stdlib/source/library/lux/debug.lux
+++ b/stdlib/source/library/lux/debug.lux
@@ -518,11 +518,11 @@
{try.#Failure _}
(exception.except ..cannot_represent_value type)))
-(syntax: .public (private [definition <code>.identifier])
+(syntax: .public (private [definition <code>.symbol])
(let [[module _] definition]
(in (list (` ("lux in-module"
(~ (code.text module))
- (~ (code.identifier definition))))))))
+ (~ (code.symbol definition))))))))
(def: .public (log! message)
(-> Text Any)
@@ -545,9 +545,9 @@
(def: target
(<code>.Parser Target)
- (<>.either (<>.and <code>.local_identifier
+ (<>.either (<>.and <code>.local_symbol
(# <>.monad in {.#None}))
- (<code>.tuple (<>.and <code>.local_identifier
+ (<code>.tuple (<>.and <code>.local_symbol
(# <>.monad each (|>> {.#Some}) <code>.any)))))
(exception: .public (unknown_local_binding [name Text])
@@ -592,5 +592,5 @@
{.#Some format}
format)]
(` [(~ (code.text name))
- ((~ format) (~ (code.local_identifier name)))])))
+ ((~ format) (~ (code.local_symbol name)))])))
targets))))))))))
diff --git a/stdlib/source/library/lux/documentation.lux b/stdlib/source/library/lux/documentation.lux
index e37df17e9..5bd6f7f30 100644
--- a/stdlib/source/library/lux/documentation.lux
+++ b/stdlib/source/library/lux/documentation.lux
@@ -59,7 +59,7 @@
[.#Rev]
[.#Frac]
[.#Text]
- [.#Identifier])
+ [.#Symbol])
(^template [<tag>]
[[[_ _ column] {<tag> members}]
@@ -87,7 +87,7 @@
(def: (code_documentation expected_module old_location reference_column example)
(-> Text Location Nat Code [Location Text])
(case example
- [new_location {.#Identifier [module short]}]
+ [new_location {.#Symbol [module short]}]
(let [documentation (cond (text#= expected_module module)
short
@@ -449,17 +449,17 @@
(<>.or (<code>.text! "")
<code>.any))
-(exception: .public (unqualified_identifier [name Symbol])
+(exception: .public (unqualified_symbol [name Symbol])
(exception.report
["Name" (%.symbol name)]))
-(def: qualified_identifier
+(def: qualified_symbol
(Parser Symbol)
(do <>.monad
- [name <code>.identifier]
+ [name <code>.symbol]
(case name
["" _]
- (<>.failure (exception.error ..unqualified_identifier [name]))
+ (<>.failure (exception.error ..unqualified_symbol [name]))
_
(in name))))
@@ -493,9 +493,9 @@
(def: declaration
(Parser Declaration)
- (<>.either (<>.and ..qualified_identifier (<>#in (list)))
- (<code>.form (<>.and ..qualified_identifier
- (<>.some (<code>.local_identifier))))))
+ (<>.either (<>.and ..qualified_symbol (<>#in (list)))
+ (<code>.form (<>.and ..qualified_symbol
+ (<>.some (<code>.local_symbol))))))
(syntax: (minimal_definition_documentation
[[name parameters] ..declaration])
@@ -504,24 +504,24 @@
[[_ def_type def_value]] (meta.export name)
tags (meta.tags_of name)]
(with_expansions [<\n> (~! text.\n)]
- (macro.with_identifiers [g!type]
+ (macro.with_symbols [g!type]
(in (list (` ($_ ((~! md.then))
... Name
(<| ((~! md.heading/3))
- (~ (code.text (%.code (let [g!name (|> name product.right code.local_identifier)]
+ (~ (code.text (%.code (let [g!name (|> name product.right code.local_symbol)]
(case parameters
{.#End}
g!name
_
- (` ((~ g!name) (~+ (list#each code.local_identifier parameters))))))))))
+ (` ((~ g!name) (~+ (list#each code.local_symbol parameters))))))))))
... Type
(let [(~ g!type) ("lux in-module"
(~ g!module)
- (.:of (~ (code.identifier name))))]
+ (.:of (~ (code.symbol name))))]
((~! md.code) "clojure"
(~ (if (type#= .Type def_type)
- (` (|> (~ (code.identifier name))
+ (` (|> (~ (code.symbol name))
(:as .Type)
((~! type.anonymous))
((~! ..type_definition)
@@ -543,8 +543,8 @@
(with_expansions [<\n> (~! text.\n)]
(in (list (` ($_ ((~! md.then))
((~! ..minimal_definition_documentation)
- ((~ (code.identifier name))
- (~+ (list#each code.local_identifier parameters))))
+ ((~ (code.symbol name))
+ (~+ (list#each code.local_symbol parameters))))
... Description
(~+ (case description
{.#Some description}
@@ -584,18 +584,18 @@
(in (list (` (: (.List ..Definition)
(list [..#definition (~ (code.text short))
..#documentation ((~! ..minimal_definition_documentation)
- ((~ (code.identifier name))
- (~+ (list#each code.local_identifier parameters))))])))))))
+ ((~ (code.symbol name))
+ (~+ (list#each code.local_symbol parameters))))])))))))
(syntax: .public (documentation: [[name parameters] ..declaration
extra (<>.some <code>.any)])
(let [[_ short] name]
- (in (list (` (.def: .public (~ (code.local_identifier short))
+ (in (list (` (.def: .public (~ (code.local_symbol short))
(.List ..Definition)
(.list [..#definition (~ (code.text short))
..#documentation ((~! ..definition_documentation)
- ((~ (code.identifier name))
- (~+ (list#each code.local_identifier parameters)))
+ ((~ (code.symbol name))
+ (~+ (list#each code.local_symbol parameters)))
(~+ extra))])))))))
(def: definitions_documentation
@@ -623,7 +623,7 @@
(|>> (text.all_split_by ..expected_separator)
(set.of_list text.hash)))
-(syntax: .public (module [[name _] ..qualified_identifier
+(syntax: .public (module [[name _] ..qualified_symbol
description <code>.any
definitions (<code>.tuple (<>.some <code>.any))
subs (<code>.tuple (<>.some <code>.any))])
diff --git a/stdlib/source/library/lux/extension.lux b/stdlib/source/library/lux/extension.lux
index 87812cb08..91c86641e 100644
--- a/stdlib/source/library/lux/extension.lux
+++ b/stdlib/source/library/lux/extension.lux
@@ -12,7 +12,7 @@
["[0]" product]
[collection
["[0]" list ("[1]#[0]" functor)]]]
- [macro {"+" with_identifiers}
+ [macro {"+" with_symbols}
["[0]" code]
[syntax {"+" syntax:}]]
[tool
@@ -31,18 +31,18 @@
(-> Code (Parser Declaration))
(<c>.form ($_ <>.and
<c>.any
- <c>.local_identifier
- <c>.local_identifier
- <c>.local_identifier
+ <c>.local_symbol
+ <c>.local_symbol
+ <c>.local_symbol
(<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_identifier extension)
- g!phase (code.local_identifier phase)
- g!archive (code.local_identifier archive)]
- (with_identifiers [g!handler g!inputs g!error g!_]
+ (let [g!name (code.local_symbol extension)
+ g!phase (code.local_symbol phase)
+ g!archive (code.local_symbol 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))
(.case ((~! <result>)
diff --git a/stdlib/source/library/lux/ffi.js.lux b/stdlib/source/library/lux/ffi.js.lux
index b6bffd6ad..03a98b0cd 100644
--- a/stdlib/source/library/lux/ffi.js.lux
+++ b/stdlib/source/library/lux/ffi.js.lux
@@ -17,7 +17,7 @@
["[0]" list ("[1]#[0]" functor)]]]
[type
abstract]
- [macro {"+" with_identifiers}
+ [macro {"+" with_symbols}
[syntax {"+" syntax:}]
["[0]" code]
["[0]" template]]]])
@@ -25,7 +25,7 @@
(abstract: .public (Object brand) Any)
(template [<name>]
- [(with_expansions [<brand> (template.identifier [<name> "'"])]
+ [(with_expansions [<brand> (template.symbol [<name> "'"])]
(abstract: <brand>
Any
@@ -76,7 +76,7 @@
(Parser Field)
(<code>.form ($_ <>.and
(<>.parses? ..static!)
- <code>.local_identifier
+ <code>.local_symbol
..nullable)))
(type: Common_Method
@@ -99,8 +99,8 @@
(def: common_method
(Parser Common_Method)
($_ <>.and
- <code>.local_identifier
- (<>.maybe (<>.after (<code>.this! (' "as")) <code>.local_identifier))
+ <code>.local_symbol
+ (<>.maybe (<>.after (<code>.this! (' "as")) <code>.local_symbol))
(<code>.tuple (<>.some ..nullable))
(<>.parses? (<code>.this! (' "io")))
(<>.parses? (<code>.this! (' "try")))
@@ -132,7 +132,7 @@
(-> (List Nullable) (List [Bit Code]))
(|>> list.enumeration
(list#each (function (_ [idx [nullable? type]])
- [nullable? (|> idx %.nat code.local_identifier)]))))
+ [nullable? (|> idx %.nat code.local_symbol)]))))
(def: (nullable_type [nullable? type])
(-> Nullable Code)
@@ -181,10 +181,10 @@
(def: class_declaration
(Parser Class_Declaration)
- (<>.either (<>.and <code>.local_identifier
+ (<>.either (<>.and <code>.local_symbol
(<>#in (list)))
- (<code>.form (<>.and <code>.local_identifier
- (<>.some <code>.local_identifier)))))
+ (<code>.form (<>.and <code>.local_symbol
+ (<>.some <code>.local_symbol)))))
(def: import
(Parser Import)
@@ -236,18 +236,18 @@
(~+ (list#each (with_null g!temp) g!inputs)))))))))))
(syntax: .public (import: [import ..import])
- (with_identifiers [g!temp g!_]
+ (with_symbols [g!temp g!_]
(case import
{#Class [[class_name class_parameters] format members]}
- (with_identifiers [g!object]
+ (with_symbols [g!object]
(let [qualify (: (-> Text Code)
(function (_ member_name)
(|> format
(text.replaced "[1]" class_name)
(text.replaced "." member_name)
- code.local_identifier)))
- class_parameters (list#each code.local_identifier class_parameters)
- declaration (` ((~ (code.local_identifier class_name))
+ code.local_symbol)))
+ class_parameters (list#each code.local_symbol class_parameters)
+ declaration (` ((~ (code.local_symbol class_name))
(~+ class_parameters)))
real_class (text.replaced "/" "." class_name)]
(in (list& (` (type: (~ declaration)
@@ -313,7 +313,7 @@
members)))))
{#Function [name alias inputsT io? try? outputT]}
- (in (list (..make_function (code.local_identifier (maybe.else name alias))
+ (in (list (..make_function (code.local_symbol (maybe.else name alias))
g!temp
name
inputsT
@@ -326,8 +326,8 @@
[("js type-of" object)])
(syntax: .public (constant [type <code>.any
- [head tail] (<code>.tuple (<>.and <code>.local_identifier (<>.some <code>.local_identifier)))])
- (with_identifiers [g!_]
+ [head tail] (<code>.tuple (<>.and <code>.local_symbol (<>.some <code>.local_symbol)))])
+ (with_symbols [g!_]
(let [constant (` ("js constant" (~ (code.text head))))]
(case tail
{.#End}
@@ -347,8 +347,8 @@
{.#None}
(~ g!_)
- (..constant (~ type) [(~ (code.local_identifier (%.format head "." next)))
- (~+ (list#each code.local_identifier tail))])))))))))))
+ (..constant (~ type) [(~ (code.local_symbol (%.format head "." next)))
+ (~+ (list#each code.local_symbol tail))])))))))))))
(template: (!defined? <constant>)
[(.case (..constant Any <constant>)
diff --git a/stdlib/source/library/lux/ffi.jvm.lux b/stdlib/source/library/lux/ffi.jvm.lux
index f739e2ff2..7e8a46ce3 100644
--- a/stdlib/source/library/lux/ffi.jvm.lux
+++ b/stdlib/source/library/lux/ffi.jvm.lux
@@ -21,7 +21,7 @@
["[0]" array]
["[0]" list ("[1]#[0]" monad mix monoid)]
["[0]" dictionary {"+" Dictionary}]]]
- [macro {"+" with_identifiers}
+ [macro {"+" with_symbols}
[syntax {"+" syntax:}]
["[0]" code]
["[0]" template]]
@@ -367,7 +367,7 @@
{.#None})]
- [parser.var? name (code.identifier ["" name])]
+ [parser.var? name (code.symbol ["" name])]
[parser.wildcard? _ (` .Any)]
[parser.lower? _ (` .Any)]
[parser.upper? limit (parameter_type limit)]
@@ -407,27 +407,27 @@
(-> Text Text (Parser Code))
(do <>.monad
[.let [dotted_name (format "::" field_name)]
- _ (<code>.this! (code.identifier ["" 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.identifier ["" dotted_name]))]
- (in (get_virtual_field class_name field_name (code.local_identifier self_name)))))
+ _ (<code>.this! (code.symbol ["" dotted_name]))]
+ (in (get_virtual_field class_name field_name (code.local_symbol 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] (: (Parser [Any Any Code])
- (<code>.form ($_ <>.and (<code>.this! (' :=)) (<code>.this! (code.identifier ["" 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_identifier self_name)))))))
+ (~ (code.local_symbol self_name)))))))
(def: (replaced f input)
(-> (-> Code Code) Code Code)
@@ -482,7 +482,7 @@
(do <>.monad
[.let [dotted_name (format "::" method_name "!")]
args (: (Parser (List Code))
- (<code>.form (<>.after (<code>.this! (code.identifier ["" 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
@@ -495,10 +495,10 @@
(do <>.monad
[.let [dotted_name (format "::" method_name "!")]
args (: (Parser (List Code))
- (<code>.form (<>.after (<code>.this! (code.identifier ["" dotted_name]))
+ (<code>.form (<>.after (<code>.this! (code.symbol ["" dotted_name]))
(<code>.tuple (<>.exactly (list.size arguments) <code>.any)))))]
(in (` (<jvm_op> (~ (code.text class_name)) (~ (code.text method_name))
- (~ (code.local_identifier self_name))
+ (~ (code.local_symbol self_name))
(~+ (|> args
(list.zipped/2 (list#each product.right arguments))
(list#each ..decorate_input))))))))]
@@ -563,7 +563,7 @@
(def: (valid_class_name type_vars)
(-> (List (Type Var)) (Parser External))
(do <>.monad
- [name <code>.local_identifier
+ [name <code>.local_symbol
_ (..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]
@@ -592,7 +592,7 @@
(def: (variable^ type_vars)
(-> (List (Type Var)) (Parser (Type Parameter)))
(do <>.monad
- [name <code>.local_identifier
+ [name <code>.local_symbol
_ (..assertion ..unexpected_type_variable [name type_vars]
(list.member? text.equivalence (list#each parser.name type_vars) name))]
(in (type.var name))))
@@ -633,7 +633,7 @@
(-> (Type (<| Return' Value' category))
(Parser (Type (<| Return' Value' category)))))
(do <>.monad
- [_ (<code>.identifier! ["" (..reflection type)])]
+ [_ (<code>.symbol! ["" (..reflection type)])]
(in type)))
(def: primitive^
@@ -667,7 +667,7 @@
(def: void^
(Parser (Type Void))
(do <>.monad
- [_ (<code>.identifier! ["" (reflection.reflection reflection.void)])]
+ [_ (<code>.symbol! ["" (reflection.reflection reflection.void)])]
(in type.void)))
(def: (return^ type_vars)
@@ -677,7 +677,7 @@
(def: var^
(Parser (Type Var))
- (# <>.monad each type.var <code>.local_identifier))
+ (# <>.monad each type.var <code>.local_symbol))
(def: vars^
(Parser (List (Type Var)))
@@ -705,9 +705,9 @@
(def: annotation^
(Parser Annotation)
(<>.either (do <>.monad
- [ann_name <code>.local_identifier]
+ [ann_name <code>.local_symbol]
(in [ann_name (list)]))
- (<code>.form (<>.and <code>.local_identifier
+ (<code>.form (<>.and <code>.local_symbol
annotation_parameters^))))
(def: annotations^
@@ -729,7 +729,7 @@
(<code>.form (do <>.monad
[tvars (<>.else (list) ..vars^)
.let [total_vars (list#composite tvars type_vars)]
- name <code>.local_identifier
+ name <code>.local_symbol
anns ..annotations^
inputs (<code>.tuple (<>.some (..type^ total_vars)))
output (..return^ total_vars)
@@ -750,7 +750,7 @@
(-> (List (Type Var)) (Parser [Member_Declaration FieldDecl]))
(<>.either (<code>.form (do <>.monad
[_ (<code>.this! (' "const"))
- name <code>.local_identifier
+ name <code>.local_symbol
anns ..annotations^
type (..type^ type_vars)
body <code>.any]
@@ -758,14 +758,14 @@
(<code>.form (do <>.monad
[pm privacy_modifier^
sm state_modifier^
- name <code>.local_identifier
+ name <code>.local_symbol
anns ..annotations^
type (..type^ type_vars)]
(in [[name pm anns] {#VariableField [sm type]}])))))
(def: (argument^ type_vars)
(-> (List (Type Var)) (Parser Argument))
- (<>.and <code>.local_identifier
+ (<>.and <code>.local_symbol
(..type^ type_vars)))
(def: (arguments^ type_vars)
@@ -789,7 +789,7 @@
.let [total_vars (list#composite class_vars method_vars)]
[_ self_name arguments] (<code>.form ($_ <>.and
(<code>.this! (' new))
- <code>.local_identifier
+ <code>.local_symbol
(..arguments^ total_vars)))
constructor_args (..constructor_args^ total_vars)
exs (throws_decl^ total_vars)
@@ -809,8 +809,8 @@
method_vars (<>.else (list) ..vars^)
.let [total_vars (list#composite class_vars method_vars)]
[name self_name arguments] (<code>.form ($_ <>.and
- <code>.local_identifier
- <code>.local_identifier
+ <code>.local_symbol
+ <code>.local_symbol
(..arguments^ total_vars)))
return_type (..return^ total_vars)
exs (throws_decl^ total_vars)
@@ -830,8 +830,8 @@
.let [total_vars (list#composite (product.right (parser.declaration owner_class))
method_vars)]
[name self_name arguments] (<code>.form ($_ <>.and
- <code>.local_identifier
- <code>.local_identifier
+ <code>.local_symbol
+ <code>.local_symbol
(..arguments^ total_vars)))
return_type (..return^ total_vars)
exs (throws_decl^ total_vars)
@@ -850,7 +850,7 @@
_ (<code>.this! (' "static"))
method_vars (<>.else (list) ..vars^)
.let [total_vars method_vars]
- [name arguments] (<code>.form (<>.and <code>.local_identifier
+ [name arguments] (<code>.form (<>.and <code>.local_symbol
(..arguments^ total_vars)))
return_type (..return^ total_vars)
exs (throws_decl^ total_vars)
@@ -868,7 +868,7 @@
_ (<code>.this! (' "abstract"))
method_vars (<>.else (list) ..vars^)
.let [total_vars method_vars]
- [name arguments] (<code>.form (<>.and <code>.local_identifier
+ [name arguments] (<code>.form (<>.and <code>.local_symbol
(..arguments^ total_vars)))
return_type (..return^ total_vars)
exs (throws_decl^ total_vars)
@@ -885,7 +885,7 @@
_ (<code>.this! (' "native"))
method_vars (<>.else (list) ..vars^)
.let [total_vars method_vars]
- [name arguments] (<code>.form (<>.and <code>.local_identifier
+ [name arguments] (<code>.form (<>.and <code>.local_symbol
(..arguments^ total_vars)))
return_type (..return^ total_vars)
exs (throws_decl^ total_vars)
@@ -907,13 +907,13 @@
(def: partial_call^
(Parser Partial_Call)
- (<code>.form (<>.and <code>.identifier (<>.some <code>.any))))
+ (<code>.form (<>.and <code>.symbol (<>.some <code>.any))))
(def: import_member_alias^
(Parser (Maybe Text))
(<>.maybe (do <>.monad
[_ (<code>.this! (' "as"))]
- <code>.local_identifier)))
+ <code>.local_symbol)))
(def: (import_member_args^ type_vars)
(-> (List (Type Var)) (Parser (List [Bit (Type Value)])))
@@ -937,11 +937,11 @@
($_ <>.either
(<code>.form (do <>.monad
[_ (<code>.this! (' "enum"))
- enum_members (<>.some <code>.local_identifier)]
+ enum_members (<>.some <code>.local_symbol)]
(in {#EnumDecl enum_members})))
(<code>.form (do <>.monad
[tvars (<>.else (list) ..vars^)
- _ (<code>.identifier! ["" "new"])
+ _ (<code>.symbol! ["" "new"])
?alias import_member_alias^
.let [total_vars (list#composite owner_vars tvars)]
?prim_mode (<>.maybe primitive_mode^)
@@ -962,7 +962,7 @@
(<>.or (<code>.this! (' "static"))
(in [])))
tvars (<>.else (list) ..vars^)
- name <code>.local_identifier
+ name <code>.local_symbol
?alias import_member_alias^
.let [total_vars (list#composite owner_vars tvars)]
?prim_mode (<>.maybe primitive_mode^)
@@ -981,7 +981,7 @@
#import_method_return return]]})))
(<code>.form (do <>.monad
[static? (<>.parses? (<code>.this! (' "static")))
- name <code>.local_identifier
+ name <code>.local_symbol
?prim_mode (<>.maybe primitive_mode^)
gtype (..type^ owner_vars)
maybe? (<>.parses? (<code>.this! (' "?")))
@@ -1039,7 +1039,7 @@
(def: var$'
(-> (Type Var) Code)
- (|>> ..signature code.local_identifier))
+ (|>> ..signature code.local_symbol))
(def: (method_decl$ [[name pm anns] method_decl])
(-> [Member_Declaration MethodDecl] Code)
@@ -1131,7 +1131,7 @@
(in (` ("jvm member invoke special"
(~ (code.text (product.left (parser.read_class super_class))))
(~ (code.text name))
- (~ (code.local_identifier self_name))
+ (~ (code.local_symbol self_name))
(~+ (|> args
(list.zipped/2 (list#each product.right arguments))
(list#each ..decorate_input)))))))))]
@@ -1186,7 +1186,7 @@
(def: (complete_call$ g!obj [method args])
(-> Code Partial_Call Code)
- (` ((~ (code.identifier method)) (~+ args) (~ g!obj))))
+ (` ((~ (code.symbol method)) (~+ args) (~ g!obj))))
(def: $Object
(Type Class)
@@ -1251,14 +1251,14 @@
("jvm object null?" obj))
(syntax: .public (??? [expr <code>.any])
- (with_identifiers [g!temp]
+ (with_symbols [g!temp]
(in (list (` (let [(~ g!temp) (~ expr)]
(if ("jvm object null?" (~ g!temp))
{.#None}
{.#Some (~ g!temp)})))))))
(syntax: .public (!!! [expr <code>.any])
- (with_identifiers [g!value]
+ (with_symbols [g!value]
(in (list (` (.case (~ expr)
{.#Some (~ g!value)}
(~ g!value)
@@ -1268,7 +1268,7 @@
(syntax: .public (check [class (..type^ (list))
unchecked (<>.maybe <code>.any)])
- (with_identifiers [g!_ g!unchecked]
+ (with_symbols [g!_ g!unchecked]
(let [class_name (..reflection class)
class_type (` (.Primitive (~ (code.text class_name))))
check_type (` (.Maybe (~ class_type)))
@@ -1294,7 +1294,7 @@
(syntax: .public (do_to [obj <code>.any
methods (<>.some partial_call^)])
- (with_identifiers [g!obj]
+ (with_symbols [g!obj]
(in (list (` (let [(~ g!obj) (~ obj)]
(exec (~+ (list#each (complete_call$ g!obj) methods))
(~ g!obj))))))))
@@ -1305,7 +1305,7 @@
def_name (..internal full_name)
params' (list#each ..var$' params)]
(template.with_locals [g!_]
- (` (def: (~ (code.identifier ["" def_name]))
+ (` (def: (~ (code.symbol ["" def_name]))
.Type
(All ((~ (' g!_)) (~+ params'))
(.Primitive (~ (code.text full_name))
@@ -1337,7 +1337,7 @@
[arg_inputs (monad.each !
(: (-> [Bit (Type Value)] (Meta [Bit Code]))
(function (_ [maybe? _])
- (with_identifiers [arg_name]
+ (with_symbols [arg_name]
(in [maybe? arg_name]))))
#import_member_args)
.let [input_jvm_types (list#each product.right #import_member_args)
@@ -1365,7 +1365,7 @@
(` (??? (~ return_term)))
... else
- (let [g!temp (` ((~' ~') (~ (code.identifier ["" " Ω "]))))]
+ (let [g!temp (` ((~' ~') (~ (code.symbol ["" " Ω "]))))]
(` (let [(~ g!temp) (~ return_term)]
(if (not (..null? (.:as (.Primitive "java.lang.Object")
(~ g!temp))))
@@ -1491,7 +1491,7 @@
(let [[full_name class_tvars] (parser.declaration class)]
(case member
{#EnumDecl enum_members}
- (with_identifiers [g!_]
+ (with_symbols [g!_]
(do meta.monad
[.let [enum_type (: Code
(case class_tvars
@@ -1504,7 +1504,7 @@
(.Primitive (~ (code.text full_name)) [(~+ =class_tvars)]))))))
getter_interop (: (-> Text Code)
(function (_ name)
- (let [getter_name (code.identifier ["" (..import_name import_format method_prefix name)])]
+ (let [getter_name (code.symbol ["" (..import_name import_format method_prefix name)])]
(` (def: (~ getter_name)
(~ enum_type)
(~ (get_static_field full_name name)))))))]]
@@ -1513,7 +1513,7 @@
{#ConstructorDecl [commons _]}
(do meta.monad
[.let [classT (type.class full_name (list))
- def_name (code.identifier ["" (..import_name import_format method_prefix (value@ #import_member_alias commons))])
+ def_name (code.symbol ["" (..import_name import_format method_prefix (value@ #import_member_alias commons))])
jvm_interop (|> [classT
(` ("jvm member invoke constructor"
[(~+ (list#each ..var$ class_tvars))]
@@ -1530,9 +1530,9 @@
((~' in) (.list (.` (~ jvm_interop)))))))))
{#MethodDecl [commons method]}
- (with_identifiers [g!obj]
+ (with_symbols [g!obj]
(do meta.monad
- [.let [def_name (code.identifier ["" (..import_name import_format method_prefix (value@ #import_member_alias commons))])
+ [.let [def_name (code.symbol ["" (..import_name import_format method_prefix (value@ #import_member_alias commons))])
(^open "[0]") commons
(^open "[0]") method
[jvm_op object_ast] (: [Text (List Code)]
@@ -1587,9 +1587,9 @@
{#FieldAccessDecl fad}
(do meta.monad
[.let [(^open "_[0]") fad
- getter_name (code.identifier ["" (..import_name import_format method_prefix _#import_field_name)])
- setter_name (code.identifier ["" (..import_name import_format method_prefix (format _#import_field_name "!"))])]
- getter_interop (with_identifiers [g!obj]
+ getter_name (code.symbol ["" (..import_name import_format method_prefix _#import_field_name)])
+ setter_name (code.symbol ["" (..import_name import_format method_prefix (format _#import_field_name "!"))])]
+ getter_interop (with_symbols [g!obj]
(let [getter_call (if _#import_field_static?
(` ((~ getter_name) []))
(` ((~ getter_name) [(~ g!obj) (~! <code>.any)])))
@@ -1608,7 +1608,7 @@
((~' in) (.list (.` (~ getter_body)))))))))
setter_interop (: (Meta (List Code))
(if _#import_field_setter?
- (with_identifiers [g!obj g!value]
+ (with_symbols [g!obj g!value]
(let [setter_call (if _#import_field_static?
(` ((~ setter_name) [(~ g!value) (~! <code>.any)]))
(` ((~ setter_name) [(~ g!value) (~! <code>.any)
@@ -1796,7 +1796,7 @@
(syntax: .public (length [array <code>.any])
(case array
- [_ {.#Identifier array_name}]
+ [_ {.#Symbol array_name}]
(do meta.monad
[array_type (meta.type array_name)
array_jvm_type (lux_type->jvm_type array_type)
@@ -1824,14 +1824,14 @@
(.:as .Nat))))))
_
- (with_identifiers [g!array]
+ (with_symbols [g!array]
(in (list (` (let [(~ g!array) (~ array)]
(..length (~ g!array)))))))))
(syntax: .public (read! [idx <code>.any
array <code>.any])
(case array
- [_ {.#Identifier array_name}]
+ [_ {.#Symbol array_name}]
(do meta.monad
[array_type (meta.type array_name)
array_jvm_type (lux_type->jvm_type array_type)
@@ -1861,7 +1861,7 @@
(in (list (` ("jvm array read object" (~ g!idx) (~ array))))))))
_
- (with_identifiers [g!array]
+ (with_symbols [g!array]
(in (list (` (let [(~ g!array) (~ array)]
(..read! (~ idx) (~ g!array)))))))))
@@ -1869,7 +1869,7 @@
value <code>.any
array <code>.any])
(case array
- [_ {.#Identifier array_name}]
+ [_ {.#Symbol array_name}]
(do meta.monad
[array_type (meta.type array_name)
array_jvm_type (lux_type->jvm_type array_type)
@@ -1900,7 +1900,7 @@
(in (list (` ("jvm array write object" (~ g!idx) (~ value) (~ array))))))))
_
- (with_identifiers [g!array]
+ (with_symbols [g!array]
(in (list (` (let [(~ g!array) (~ array)]
(..write! (~ idx) (~ value) (~ g!array)))))))))
diff --git a/stdlib/source/library/lux/ffi.lua.lux b/stdlib/source/library/lux/ffi.lua.lux
index b8a203ddd..a06e0ccef 100644
--- a/stdlib/source/library/lux/ffi.lua.lux
+++ b/stdlib/source/library/lux/ffi.lua.lux
@@ -18,7 +18,7 @@
["[0]" list ("[1]#[0]" functor mix)]]]
[type
abstract]
- [macro {"+" with_identifiers}
+ [macro {"+" with_symbols}
[syntax {"+" syntax:}]
["[0]" code]
["[0]" template]]]])
@@ -26,7 +26,7 @@
(abstract: .public (Object brand) Any)
(template [<name>]
- [(with_expansions [<brand> (template.identifier [<name> "'"])]
+ [(with_expansions [<brand> (template.symbol [<name> "'"])]
(abstract: <brand> Any)
(type: .public <name>
(..Object <brand>)))]
@@ -67,14 +67,14 @@
(Parser Field)
(<code>.form ($_ <>.and
(<>.parses? ..static!)
- <code>.local_identifier
+ <code>.local_symbol
..nilable)))
(def: constant
(Parser Field)
(<code>.form ($_ <>.and
(<>#in true)
- <code>.local_identifier
+ <code>.local_symbol
..nilable)))
(type: Common_Method
@@ -97,8 +97,8 @@
(def: common_method
(Parser Common_Method)
($_ <>.and
- <code>.local_identifier
- (<>.maybe (<>.after (<code>.this! (' "as")) <code>.local_identifier))
+ <code>.local_symbol
+ (<>.maybe (<>.after (<code>.this! (' "as")) <code>.local_symbol))
(<code>.tuple (<>.some ..nilable))
(<>.parses? (<code>.this! (' "io")))
(<>.parses? (<code>.this! (' "try")))
@@ -128,7 +128,7 @@
(-> (List Nilable) (List [Bit Code]))
(|>> list.enumeration
(list#each (function (_ [idx [nilable? type]])
- [nilable? (|> idx %.nat code.local_identifier)]))))
+ [nilable? (|> idx %.nat code.local_symbol)]))))
(def: (nilable_type [nilable? type])
(-> Nilable Code)
@@ -167,7 +167,7 @@
(def: import
($_ <>.or
- (<>.and <code>.local_identifier
+ (<>.and <code>.local_symbol
(<>.else ["" (list)]
(<code>.tuple (<>.and <code>.text
(<>.some member)))))
@@ -219,17 +219,17 @@
(syntax: .public (import: [import ..import])
... {.#doc (example "Easily import types, methods, functions and constants."
... (import: (os/getenv [..String] "io" "?" ..String)))}
- (with_identifiers [g!temp]
+ (with_symbols [g!temp]
(case import
{#Class [class format members]}
- (with_identifiers [g!object]
+ (with_symbols [g!object]
(let [qualify (: (-> Text Code)
(function (_ member_name)
(|> format
(text.replaced "[1]" class)
(text.replaced "[0]" member_name)
- code.local_identifier)))
- g!type (code.local_identifier class)
+ code.local_symbol)))
+ g!type (code.local_symbol class)
real_class (text.replaced "/" "." class)
imported (case (text.all_split_by "/" class)
{.#Item head tail}
@@ -293,7 +293,7 @@
members)))))
{#Function [name alias inputsT io? try? outputT]}
- (in (list (..make_function (code.local_identifier (maybe.else name alias))
+ (in (list (..make_function (code.local_symbol (maybe.else name alias))
g!temp
(` ("lua constant" (~ (code.text (text.replaced "/" "." name)))))
inputsT
@@ -302,7 +302,7 @@
outputT)))
{#Constant [_ name fieldT]}
- (in (list (` ((~! syntax:) ((~ (code.local_identifier name)) [])
+ (in (list (` ((~! syntax:) ((~ (code.local_symbol name)) [])
(# (~! meta.monad) (~' in)
(list (` (.:as (~ (nilable_type fieldT))
("lua constant" (~ (code.text (text.replaced "/" "." name))))))))))))
diff --git a/stdlib/source/library/lux/ffi.old.lux b/stdlib/source/library/lux/ffi.old.lux
index d27658372..e40d2302c 100644
--- a/stdlib/source/library/lux/ffi.old.lux
+++ b/stdlib/source/library/lux/ffi.old.lux
@@ -20,7 +20,7 @@
[collection
["[0]" array {"+" Array}]
["[0]" list ("[1]#[0]" monad mix monoid)]]]
- ["[0]" macro {"+" with_identifiers}
+ ["[0]" macro {"+" with_symbols}
[syntax {"+" syntax:}]
["[0]" code]
["[0]" template]]
@@ -322,7 +322,7 @@
(not (list.empty? pbounds))))
type_params)
{.#None}
- (code.identifier ["" name])
+ (code.symbol ["" name])
{.#Some [pname pbounds]}
(class_type' mode type_params in_array? (maybe.trusted (list.head pbounds))))
@@ -349,7 +349,7 @@
(def: (type_param_type$ [name bounds])
(-> Type_Parameter Code)
- (code.identifier ["" name]))
+ (code.symbol ["" name]))
(def: (class_decl_type$ (^open "[0]"))
(-> Class_Declaration Code)
@@ -357,7 +357,7 @@
(function (_ [pname pbounds])
(case pbounds
{.#End}
- (code.identifier ["" pname])
+ (code.symbol ["" pname])
{.#Item bound1 _}
(class_type {#ManualPrM} #class_params bound1))))
@@ -416,14 +416,14 @@
(-> Text Text (Parser Code))
(do <>.monad
[.let [dotted_name (format "::" field_name)]
- _ (<code>.this! (code.identifier ["" 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.identifier ["" 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)
@@ -431,7 +431,7 @@
(do <>.monad
[.let [dotted_name (format "::" field_name)]
[_ _ value] (: (Parser [Any Any Code])
- (<code>.form ($_ <>.and (<code>.this! (' :=)) (<code>.this! (code.identifier ["" 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)
@@ -482,7 +482,7 @@
(do <>.monad
[.let [dotted_name (format "::" method_name "!")]
args (: (Parser (List Code))
- (<code>.form (<>.after (<code>.this! (code.identifier ["" dotted_name]))
+ (<code>.form (<>.after (<code>.this! (code.symbol ["" dotted_name]))
(<code>.tuple (<>.exactly (list.size arg_decls) <code>.any)))))
.let [arg_decls' (: (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'))))
@@ -494,7 +494,7 @@
(do <>.monad
[.let [dotted_name (format "::" method_name "!")]
args (: (Parser (List Code))
- (<code>.form (<>.after (<code>.this! (code.identifier ["" dotted_name]))
+ (<code>.form (<>.after (<code>.this! (code.symbol ["" dotted_name]))
(<code>.tuple (<>.exactly (list.size arg_decls) <code>.any)))))
.let [arg_decls' (: (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'))))
@@ -565,7 +565,7 @@
bound recur^]
(in {#GenericWildcard {.#Some [bound_kind bound]}})))
(do <>.monad
- [name <code>.local_identifier
+ [name <code>.local_symbol
_ (no_periods_assertion name)]
(if (list.member? text.equivalence (list#each product.left type_vars) name)
(in {#GenericTypeVar name})
@@ -588,7 +588,7 @@
_
(in {#GenericArray component}))))
(<code>.form (do <>.monad
- [name <code>.local_identifier
+ [name <code>.local_symbol
_ (no_periods_assertion name)
params (<>.some recur^)
_ (<>.assertion (format name " cannot be a type-parameter!")
@@ -599,10 +599,10 @@
(def: type_param^
(Parser Type_Parameter)
(<>.either (do <>.monad
- [param_name <code>.local_identifier]
+ [param_name <code>.local_symbol]
(in [param_name (list)]))
(<code>.tuple (do <>.monad
- [param_name <code>.local_identifier
+ [param_name <code>.local_symbol
_ (<code>.this! (' <))
bounds (<>.many (..generic_type^ (list)))]
(in [param_name bounds])))))
@@ -617,11 +617,11 @@
(def: class_decl^
(Parser Class_Declaration)
(<>.either (do <>.monad
- [name <code>.local_identifier
+ [name <code>.local_symbol
_ (no_periods_assertion name)]
(in [name (list)]))
(<code>.form (do <>.monad
- [name <code>.local_identifier
+ [name <code>.local_symbol
_ (no_periods_assertion name)
params (<>.some ..type_param^)]
(in [name params])))
@@ -630,11 +630,11 @@
(def: (super_class_decl^ type_vars)
(-> (List Type_Parameter) (Parser Super_Class_Decl))
(<>.either (do <>.monad
- [name <code>.local_identifier
+ [name <code>.local_symbol
_ (no_periods_assertion name)]
(in [name (list)]))
(<code>.form (do <>.monad
- [name <code>.local_identifier
+ [name <code>.local_symbol
_ (no_periods_assertion name)
params (<>.some (..generic_type^ type_vars))]
(in [name params])))))
@@ -646,9 +646,9 @@
(def: annotation^
(Parser Annotation)
(<>.either (do <>.monad
- [ann_name <code>.local_identifier]
+ [ann_name <code>.local_symbol]
(in [ann_name (list)]))
- (<code>.form (<>.and <code>.local_identifier
+ (<code>.form (<>.and <code>.local_symbol
annotation_params^))))
(def: annotations^'
@@ -679,7 +679,7 @@
(-> (List Type_Parameter) (Parser [Member_Declaration MethodDecl]))
(<code>.form (do <>.monad
[tvars ..type_params^
- name <code>.local_identifier
+ name <code>.local_symbol
anns ..annotations^
inputs (<code>.tuple (<>.some (..generic_type^ type_vars)))
output (..generic_type^ type_vars)
@@ -700,7 +700,7 @@
(-> (List Type_Parameter) (Parser [Member_Declaration FieldDecl]))
(<>.either (<code>.form (do <>.monad
[_ (<code>.this! (' "const"))
- name <code>.local_identifier
+ name <code>.local_symbol
anns ..annotations^
type (..generic_type^ type_vars)
body <code>.any]
@@ -708,14 +708,14 @@
(<code>.form (do <>.monad
[pm privacy_modifier^
sm state_modifier^
- name <code>.local_identifier
+ name <code>.local_symbol
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_identifier
+ (<>.and <code>.local_symbol
(..generic_type^ type_vars)))
(def: (arg_decls^ type_vars)
@@ -757,8 +757,8 @@
method_vars ..type_params^
.let [total_vars (list#composite class_vars method_vars)]
[name this_name arg_decls] (<code>.form ($_ <>.and
- <code>.local_identifier
- <code>.local_identifier
+ <code>.local_symbol
+ <code>.local_symbol
(..arg_decls^ total_vars)))
return_type (..generic_type^ total_vars)
exs (..throws_decl^ total_vars)
@@ -780,8 +780,8 @@
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_identifier
- <code>.local_identifier
+ <code>.local_symbol
+ <code>.local_symbol
(..arg_decls^ total_vars)))
return_type (..generic_type^ total_vars)
exs (..throws_decl^ total_vars)
@@ -803,7 +803,7 @@
_ (<code>.this! (' "static"))
method_vars ..type_params^
.let [total_vars method_vars]
- [name arg_decls] (<code>.form (<>.and <code>.local_identifier
+ [name arg_decls] (<code>.form (<>.and <code>.local_symbol
(..arg_decls^ total_vars)))
return_type (..generic_type^ total_vars)
exs (..throws_decl^ total_vars)
@@ -821,7 +821,7 @@
_ (<code>.this! (' "abstract"))
method_vars ..type_params^
.let [total_vars method_vars]
- [name arg_decls] (<code>.form (<>.and <code>.local_identifier
+ [name arg_decls] (<code>.form (<>.and <code>.local_symbol
(..arg_decls^ total_vars)))
return_type (..generic_type^ total_vars)
exs (..throws_decl^ total_vars)
@@ -838,7 +838,7 @@
_ (<code>.this! (' "native"))
method_vars ..type_params^
.let [total_vars method_vars]
- [name arg_decls] (<code>.form (<>.and <code>.local_identifier
+ [name arg_decls] (<code>.form (<>.and <code>.local_symbol
(..arg_decls^ total_vars)))
return_type (..generic_type^ total_vars)
exs (..throws_decl^ total_vars)
@@ -860,13 +860,13 @@
(def: partial_call^
(Parser Partial_Call)
- (<code>.form (<>.and <code>.identifier (<>.some <code>.any))))
+ (<code>.form (<>.and <code>.symbol (<>.some <code>.any))))
(def: import_member_alias^
(Parser (Maybe Text))
(<>.maybe (do <>.monad
[_ (<code>.this! (' "as"))]
- <code>.local_identifier)))
+ <code>.local_symbol)))
(def: (import_member_args^ type_vars)
(-> (List Type_Parameter) (Parser (List [Bit GenericType])))
@@ -886,7 +886,7 @@
($_ <>.either
(<code>.form (do <>.monad
[_ (<code>.this! (' "enum"))
- enum_members (<>.some <code>.local_identifier)]
+ enum_members (<>.some <code>.local_symbol)]
(in {#EnumDecl enum_members})))
(<code>.form (do <>.monad
[tvars ..type_params^
@@ -910,7 +910,7 @@
(<>.or (<code>.this! (' "static"))
(in [])))
tvars ..type_params^
- name <code>.local_identifier
+ name <code>.local_symbol
?alias import_member_alias^
.let [total_vars (list#composite owner_vars tvars)]
?prim_mode (<>.maybe primitive_mode^)
@@ -929,7 +929,7 @@
#import_method_return return]]})))
(<code>.form (do <>.monad
[static? (<>.parses? (<code>.this! (' "static")))
- name <code>.local_identifier
+ name <code>.local_symbol
?prim_mode (<>.maybe primitive_mode^)
gtype (..generic_type^ owner_vars)
maybe? (<>.parses? (<code>.this! (' "?")))
@@ -1101,7 +1101,7 @@
(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_identifier this_name)) (~' _jvm_this)]
+ (code.format (pre_walk_replace replacer (` (let [(~ (code.local_symbol this_name)) (~' _jvm_this)]
(~ body))))))))
{#OverridenMethod strict_fp? class_decl type_vars this_name arg_decls return_type body exs}
@@ -1125,7 +1125,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_identifier this_name)) (~' _jvm_this)]
+ (|> (` (let [(~ (code.local_symbol this_name)) (~' _jvm_this)]
(~ body)))
(pre_walk_replace replacer)
(pre_walk_replace super_replacer)
@@ -1170,7 +1170,7 @@
(def: (complete_call$ g!obj [method args])
(-> Code Partial_Call Code)
- (` ((~ (code.identifier method)) (~+ args) (~ g!obj))))
+ (` ((~ (code.symbol method)) (~+ args) (~ g!obj))))
... [Syntax]
(def: object_super_class
@@ -1242,14 +1242,14 @@
("jvm object null?" obj))
(syntax: .public (??? [expr <code>.any])
- (with_identifiers [g!temp]
+ (with_symbols [g!temp]
(in (list (` (let [(~ g!temp) (~ expr)]
(if ("jvm object null?" (~ g!temp))
{.#None}
{.#Some (~ g!temp)})))))))
(syntax: .public (!!! [expr <code>.any])
- (with_identifiers [g!value]
+ (with_symbols [g!value]
(in (list (` (.case (~ expr)
{.#Some (~ g!value)}
(~ g!value)
@@ -1259,7 +1259,7 @@
(syntax: .public (check [class (..generic_type^ (list))
unchecked (<>.maybe <code>.any)])
- (with_identifiers [g!_ g!unchecked]
+ (with_symbols [g!_ g!unchecked]
(let [class_name (simple_class$ (list) class)
class_type (` (.Primitive (~ (code.text class_name))))
check_type (` (.Maybe (~ class_type)))
@@ -1285,16 +1285,16 @@
(syntax: .public (do_to [obj <code>.any
methods (<>.some partial_call^)])
- (with_identifiers [g!obj]
+ (with_symbols [g!obj]
(in (list (` (let [(~ g!obj) (~ obj)]
(exec (~+ (list#each (complete_call$ g!obj) methods))
(~ g!obj))))))))
(def: (class_import$ [full_name params])
(-> Class_Declaration Code)
- (let [params' (list#each (|>> product.left code.local_identifier) params)]
+ (let [params' (list#each (|>> product.left code.local_symbol) params)]
(template.with_locals [g!_]
- (` (def: (~ (code.identifier ["" full_name]))
+ (` (def: (~ (code.symbol ["" full_name]))
Type
(All ((~ (' g!_)) (~+ params'))
(Primitive (~ (code.text (safe full_name)))
@@ -1326,7 +1326,7 @@
[arg_inputs (monad.each !
(: (-> [Bit GenericType] (Meta [Bit Code]))
(function (_ [maybe? _])
- (with_identifiers [arg_name]
+ (with_symbols [arg_name]
(in [maybe? arg_name]))))
#import_member_args)
.let [arg_classes (: (List Text)
@@ -1350,7 +1350,7 @@
(^or {#ConstructorDecl [commons _]} {#MethodDecl [commons _]})
(if (value@ #import_member_maybe? commons)
(` (??? (~ return_term)))
- (let [g!temp (` ((~' ~') (~ (code.identifier ["" " Ω "]))))]
+ (let [g!temp (` ((~' ~') (~ (code.symbol ["" " Ω "]))))]
(` (let [(~ g!temp) (~ return_term)]
(if (not (..null? (:as (Primitive "java.lang.Object")
(~ g!temp))))
@@ -1386,7 +1386,7 @@
(def: (lux_type_parameter [name _])
(-> Type_Parameter Code)
- (code.identifier ["" name]))
+ (code.symbol ["" name]))
(template [<name> <byte> <short> <int> <float>]
[(def: (<name> mode [class expression])
@@ -1442,7 +1442,7 @@
(list#each lux_type_parameter))]
(case member
{#EnumDecl enum_members}
- (macro.with_identifiers [g!_]
+ (macro.with_symbols [g!_]
(do [! meta.monad]
[.let [enum_type (: Code
(case class_tvars
@@ -1456,7 +1456,7 @@
(` (All ((~ g!_) (~+ =class_tvars)) (Primitive (~ (code.text full_name)) [(~+ =class_tvars)]))))))
getter_interop (: (-> Text Code)
(function (_ name)
- (let [getter_name (code.identifier ["" (..import_name import_format method_prefix name)])]
+ (let [getter_name (code.symbol ["" (..import_name import_format method_prefix name)])]
(` (def: (~ getter_name)
(~ enum_type)
((~ (code.text (format "jvm getstatic" ":" full_name ":" name)))))))))]]
@@ -1464,7 +1464,7 @@
{#ConstructorDecl [commons _]}
(do meta.monad
- [.let [def_name (code.identifier ["" (..import_name import_format method_prefix (value@ #import_member_alias commons))])
+ [.let [def_name (code.symbol ["" (..import_name import_format method_prefix (value@ #import_member_alias commons))])
jvm_extension (code.text (format "jvm new" ":" full_name ":" (text.interposed "," arg_classes)))
jvm_interop (|> (` ((~ jvm_extension)
(~+ (jvm_extension_inputs (value@ #import_member_mode commons) arg_classes arg_function_inputs))))
@@ -1475,9 +1475,9 @@
((~' in) (.list (.` (~ jvm_interop)))))))))
{#MethodDecl [commons method]}
- (with_identifiers [g!obj]
+ (with_symbols [g!obj]
(do meta.monad
- [.let [def_name (code.identifier ["" (..import_name import_format method_prefix (value@ #import_member_alias commons))])
+ [.let [def_name (code.symbol ["" (..import_name import_format method_prefix (value@ #import_member_alias commons))])
(^open "[0]") commons
(^open "[0]") method
[jvm_op object_ast] (: [Text (List Code)]
@@ -1520,9 +1520,9 @@
(|> class_tvars
(list.only free_type_param?)
(list#each lux_type_parameter)))
- getter_name (code.identifier ["" (..import_name import_format method_prefix #import_field_name)])
- setter_name (code.identifier ["" (..import_name import_format method_prefix (format #import_field_name "!"))])]
- getter_interop (with_identifiers [g!obj]
+ getter_name (code.symbol ["" (..import_name import_format method_prefix #import_field_name)])
+ setter_name (code.symbol ["" (..import_name import_format method_prefix (format #import_field_name "!"))])]
+ getter_interop (with_symbols [g!obj]
(let [getter_call (if #import_field_static?
(` ((~ getter_name) []))
(` ((~ getter_name) [(~ g!obj) (~! <code>.any)])))
@@ -1543,7 +1543,7 @@
((~' in) (.list (.` (~ getter_body)))))))))
setter_interop (: (Meta (List Code))
(if #import_field_setter?
- (with_identifiers [g!obj g!value]
+ (with_symbols [g!obj g!value]
(let [setter_call (if #import_field_static?
(` ((~ setter_name) [(~ g!value) (~! <code>.any)]))
(` ((~ setter_name) [(~ g!value) (~! <code>.any)
@@ -1653,7 +1653,7 @@
(syntax: .public (read! [idx <code>.any
array <code>.any])
(case array
- [_ {.#Identifier array_name}]
+ [_ {.#Symbol array_name}]
(do meta.monad
[array_type (meta.type array_name)
array_jvm_type (type_class_name array_type)]
@@ -1674,7 +1674,7 @@
(in (list (` ("jvm aaload" (~ array) (~ idx)))))))
_
- (with_identifiers [g!array]
+ (with_symbols [g!array]
(in (list (` (let [(~ g!array) (~ array)]
(..read! (~ idx) (~ g!array)))))))))
@@ -1682,7 +1682,7 @@
value <code>.any
array <code>.any])
(case array
- [_ {.#Identifier array_name}]
+ [_ {.#Symbol array_name}]
(do meta.monad
[array_type (meta.type array_name)
array_jvm_type (type_class_name array_type)]
@@ -1703,7 +1703,7 @@
(in (list (` ("jvm aastore" (~ array) (~ idx) (~ value)))))))
_
- (with_identifiers [g!array]
+ (with_symbols [g!array]
(in (list (` (let [(~ g!array) (~ array)]
(..write! (~ idx) (~ value) (~ g!array)))))))))
diff --git a/stdlib/source/library/lux/ffi.php.lux b/stdlib/source/library/lux/ffi.php.lux
index 08cbcf46b..e37ef1595 100644
--- a/stdlib/source/library/lux/ffi.php.lux
+++ b/stdlib/source/library/lux/ffi.php.lux
@@ -18,7 +18,7 @@
["[0]" list ("[1]#[0]" functor)]]]
[type
abstract]
- [macro {"+" with_identifiers}
+ [macro {"+" with_symbols}
[syntax {"+" syntax:}]
["[0]" code]
["[0]" template]]]])
@@ -26,7 +26,7 @@
(abstract: .public (Object brand) Any)
(template [<name>]
- [(with_expansions [<brand> (template.identifier [<name> "'"])]
+ [(with_expansions [<brand> (template.symbol [<name> "'"])]
(abstract: .public <brand> Any)
(type: .public <name>
(..Object <brand>)))]
@@ -60,7 +60,7 @@
(def: alias
(Parser Alias)
- (<>.after (<code>.this! (' "as")) <code>.local_identifier))
+ (<>.after (<code>.this! (' "as")) <code>.local_symbol))
(type: Field
[Bit Text (Maybe Alias) Nullable])
@@ -73,7 +73,7 @@
(Parser Field)
(<code>.form ($_ <>.and
(<>.parses? ..static!)
- <code>.local_identifier
+ <code>.local_symbol
(<>.maybe ..alias)
..nullable)))
@@ -81,7 +81,7 @@
(Parser Field)
(<code>.form ($_ <>.and
(<>#in true)
- <code>.local_identifier
+ <code>.local_symbol
(<>.maybe ..alias)
..nullable)))
@@ -105,7 +105,7 @@
(def: common_method
(Parser Common_Method)
($_ <>.and
- <code>.local_identifier
+ <code>.local_symbol
(<>.maybe ..alias)
(<code>.tuple (<>.some ..nullable))
(<>.parses? (<code>.this! (' "io")))
@@ -136,7 +136,7 @@
(-> (List Nullable) (List [Bit Code]))
(|>> list.enumeration
(list#each (function (_ [idx [nullable? type]])
- [nullable? (|> idx %.nat code.local_identifier)]))))
+ [nullable? (|> idx %.nat code.local_symbol)]))))
(def: (nullable_type [nullable? type])
(-> Nullable Code)
@@ -177,7 +177,7 @@
(Parser Import)
($_ <>.or
($_ <>.and
- <code>.local_identifier
+ <code>.local_symbol
(<>.maybe ..alias)
(<>.else ["" (list)]
(<code>.tuple (<>.and <code>.text
@@ -237,17 +237,17 @@
(~+ (list#each (with_null g!temp) g!inputs)))))))))))
(syntax: .public (import: [import ..import])
- (with_identifiers [g!temp]
+ (with_symbols [g!temp]
(case import
{#Class [class alias format members]}
- (with_identifiers [g!object]
+ (with_symbols [g!object]
(let [qualify (: (-> Text Code)
(function (_ member_name)
(|> format
(text.replaced "[1]" (maybe.else class alias))
(text.replaced "[0]" member_name)
- code.local_identifier)))
- g!type (code.local_identifier (maybe.else class alias))
+ code.local_symbol)))
+ g!type (code.local_symbol (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_identifier (maybe.else name alias))
+ (in (list (..make_function (code.local_symbol (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_identifier (maybe.else name alias))) [])
+ (in (list (` ((~! syntax:) ((~ (code.local_symbol (maybe.else name alias))) [])
(# (~! meta.monad) (~' in)
(list (` (.:as (~ (nullable_type fieldT)) (~ imported))))))))))
)))
diff --git a/stdlib/source/library/lux/ffi.py.lux b/stdlib/source/library/lux/ffi.py.lux
index c05d1039f..d19d9aefb 100644
--- a/stdlib/source/library/lux/ffi.py.lux
+++ b/stdlib/source/library/lux/ffi.py.lux
@@ -18,7 +18,7 @@
["[0]" list ("[1]#[0]" functor mix)]]]
[type
abstract]
- [macro {"+" with_identifiers}
+ [macro {"+" with_symbols}
[syntax {"+" syntax:}]
["[0]" code]
["[0]" template]]]])
@@ -26,7 +26,7 @@
(abstract: .public (Object brand) Any)
(template [<name>]
- [(with_expansions [<brand> (template.identifier [<name> "'"])]
+ [(with_expansions [<brand> (template.symbol [<name> "'"])]
(abstract: <brand> Any)
(type: .public <name>
(..Object <brand>)))]
@@ -75,7 +75,7 @@
(Parser Field)
(<code>.form ($_ <>.and
(<>.parses? ..static!)
- <code>.local_identifier
+ <code>.local_symbol
..noneable)))
(type: Common_Method
@@ -98,8 +98,8 @@
(def: common_method
(Parser Common_Method)
($_ <>.and
- <code>.local_identifier
- (<>.maybe (<>.after (<code>.this! (' "as")) <code>.local_identifier))
+ <code>.local_symbol
+ (<>.maybe (<>.after (<code>.this! (' "as")) <code>.local_symbol))
(<code>.tuple (<>.some ..noneable))
(<>.parses? (<code>.this! (' "io")))
(<>.parses? (<code>.this! (' "try")))
@@ -131,7 +131,7 @@
(-> (List Noneable) (List [Bit Code]))
(|>> list.enumeration
(list#each (function (_ [idx [noneable? type]])
- [noneable? (|> idx %.nat code.local_identifier)]))))
+ [noneable? (|> idx %.nat code.local_symbol)]))))
(def: (noneable_type [noneable? type])
(-> Noneable Code)
@@ -169,7 +169,7 @@
(def: import
(Parser Import)
- (<>.or (<>.and <code>.local_identifier
+ (<>.or (<>.and <code>.local_symbol
(<>.else ["" (list)]
(<code>.tuple (<>.and <code>.text
(<>.some member)))))
@@ -239,17 +239,17 @@
... ("static" sep ..String)
... ("static" getsize [..String] "io" "try" ..Integer)
... ("static" getmtime [..String] "io" "try" ..Float)]))}
- (with_identifiers [g!temp]
+ (with_symbols [g!temp]
(case import
{#Class [class format members]}
- (with_identifiers [g!object]
+ (with_symbols [g!object]
(let [qualify (: (-> Text Code)
(function (_ member_name)
(|> format
(text.replaced "[1]" class)
(text.replaced "[0]" member_name)
- code.local_identifier)))
- g!type (code.local_identifier class)
+ code.local_symbol)))
+ g!type (code.local_symbol class)
real_class (text.replaced "/" "." class)
imported (case (text.all_split_by "/" class)
{.#Item head tail}
@@ -324,7 +324,7 @@
members)))))
{#Function [name alias inputsT io? try? outputT]}
- (in (list (..make_function (code.local_identifier (maybe.else name alias))
+ (in (list (..make_function (code.local_symbol (maybe.else name alias))
g!temp
(` ("python constant" (~ (code.text name))))
inputsT
diff --git a/stdlib/source/library/lux/ffi.rb.lux b/stdlib/source/library/lux/ffi.rb.lux
index 41e21b197..e80f0a782 100644
--- a/stdlib/source/library/lux/ffi.rb.lux
+++ b/stdlib/source/library/lux/ffi.rb.lux
@@ -18,7 +18,7 @@
["[0]" list ("[1]#[0]" functor)]]]
[type
abstract]
- [macro {"+" with_identifiers}
+ [macro {"+" with_symbols}
[syntax {"+" syntax:}]
["[0]" code]
["[0]" template]]]])
@@ -26,7 +26,7 @@
(abstract: .public (Object brand) Any)
(template [<name>]
- [(with_expansions [<brand> (template.identifier [<name> "'"])]
+ [(with_expansions [<brand> (template.symbol [<name> "'"])]
(abstract: <brand> Any)
(type: .public <name>
(..Object <brand>)))]
@@ -60,7 +60,7 @@
(def: alias
(Parser Alias)
- (<>.after (<code>.this! (' "as")) <code>.local_identifier))
+ (<>.after (<code>.this! (' "as")) <code>.local_symbol))
(type: Field
[Bit Text (Maybe Alias) Nilable])
@@ -73,7 +73,7 @@
(Parser Field)
(<code>.form ($_ <>.and
(<>.parses? ..static!)
- <code>.local_identifier
+ <code>.local_symbol
(<>.maybe ..alias)
..nilable)))
@@ -81,7 +81,7 @@
(Parser Field)
(<code>.form ($_ <>.and
(<>#in true)
- <code>.local_identifier
+ <code>.local_symbol
(<>.maybe ..alias)
..nilable)))
@@ -105,7 +105,7 @@
(def: common_method
(Parser Common_Method)
($_ <>.and
- <code>.local_identifier
+ <code>.local_symbol
(<>.maybe ..alias)
(<code>.tuple (<>.some ..nilable))
(<>.parses? (<code>.this! (' "io")))
@@ -136,7 +136,7 @@
(-> (List Nilable) (List [Bit Code]))
(|>> list.enumeration
(list#each (function (_ [idx [nilable? type]])
- [nilable? (|> idx %.nat code.local_identifier)]))))
+ [nilable? (|> idx %.nat code.local_symbol)]))))
(def: (nilable_type [nilable? type])
(-> Nilable Code)
@@ -179,7 +179,7 @@
(<>.maybe <code>.text)
($_ <>.or
($_ <>.and
- <code>.local_identifier
+ <code>.local_symbol
(<>.maybe ..alias)
(<>.else ["" (list)]
(<code>.tuple (<>.and <code>.text
@@ -230,17 +230,17 @@
(~+ (list#each (with_nil g!temp) g!inputs)))))))))))
(syntax: .public (import: [[?module import] ..import])
- (with_identifiers [g!temp]
+ (with_symbols [g!temp]
(case import
{#Class [class alias format members]}
- (with_identifiers [g!object]
+ (with_symbols [g!object]
(let [qualify (: (-> Text Code)
(function (_ member_name)
(|> format
(text.replaced "[1]" (maybe.else class alias))
(text.replaced "[0]" member_name)
- code.local_identifier)))
- g!type (code.local_identifier (maybe.else class alias))
+ code.local_symbol)))
+ g!type (code.local_symbol (maybe.else class alias))
module_import (: (List Code)
(case ?module
{.#Some module}
@@ -313,7 +313,7 @@
{.#None}
(list)))
("ruby constant" (~ (code.text name)))))]
- (in (list (..make_function (code.local_identifier (maybe.else name alias))
+ (in (list (..make_function (code.local_symbol (maybe.else name alias))
g!temp
imported
inputsT
@@ -330,7 +330,7 @@
{.#None}
(list)))
("ruby constant" (~ (code.text name)))))]
- (in (list (` ((~! syntax:) ((~ (code.local_identifier (maybe.else name alias))) [])
+ (in (list (` ((~! syntax:) ((~ (code.local_symbol (maybe.else name alias))) [])
(# (~! meta.monad) (~' in)
(list (` (.:as (~ (nilable_type fieldT)) (~ imported))))))))))
)))
diff --git a/stdlib/source/library/lux/ffi.scm.lux b/stdlib/source/library/lux/ffi.scm.lux
index 32d964fbc..ae9bdeb89 100644
--- a/stdlib/source/library/lux/ffi.scm.lux
+++ b/stdlib/source/library/lux/ffi.scm.lux
@@ -18,7 +18,7 @@
["[0]" list ("[1]#[0]" functor)]]]
[type
abstract]
- [macro {"+" with_identifiers}
+ [macro {"+" with_symbols}
[syntax {"+" syntax:}]
["[0]" code]
["[0]" template]]]])
@@ -26,7 +26,7 @@
(abstract: .public (Object brand) Any)
(template [<name>]
- [(with_expansions [<brand> (template.identifier [<name> "'"])]
+ [(with_expansions [<brand> (template.symbol [<name> "'"])]
(abstract: .public <brand> Any)
(type: .public <name>
(..Object <brand>)))]
@@ -60,7 +60,7 @@
(def: alias
(Parser Alias)
- (<>.after (<code>.this! (' "as")) <code>.local_identifier))
+ (<>.after (<code>.this! (' "as")) <code>.local_symbol))
(type: Field
[Bit Text (Maybe Alias) Nilable])
@@ -73,7 +73,7 @@
(Parser Field)
(<code>.form ($_ <>.and
(<>.parses? ..static!)
- <code>.local_identifier
+ <code>.local_symbol
(<>.maybe ..alias)
..nilable)))
@@ -81,7 +81,7 @@
(Parser Field)
(<code>.form ($_ <>.and
(<>#in true)
- <code>.local_identifier
+ <code>.local_symbol
(<>.maybe ..alias)
..nilable)))
@@ -97,7 +97,7 @@
(def: common_method
(Parser Common_Method)
($_ <>.and
- <code>.local_identifier
+ <code>.local_symbol
(<>.maybe ..alias)
(<code>.tuple (<>.some ..nilable))
(<>.parses? (<code>.this! (' "io")))
@@ -108,7 +108,7 @@
(-> (List Nilable) (List [Bit Code]))
(|>> list.enumeration
(list#each (function (_ [idx [nilable? type]])
- [nilable? (|> idx %.nat code.local_identifier)]))))
+ [nilable? (|> idx %.nat code.local_symbol)]))))
(def: (nilable_type [nilable? type])
(-> Nilable Code)
@@ -202,11 +202,11 @@
(~+ (list#each (with_nil g!temp) g!inputs)))))))))))
(syntax: .public (import: [import ..import])
- (with_identifiers [g!temp]
+ (with_symbols [g!temp]
(case import
{#Function [name alias inputsT io? try? outputT]}
(let [imported (` ("scheme constant" (~ (code.text name))))]
- (in (list (..make_function (code.local_identifier (maybe.else name alias))
+ (in (list (..make_function (code.local_symbol (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_identifier (maybe.else name alias))))
+ (in (list (` ((~! syntax:) ((~ (code.local_symbol (maybe.else name alias))))
(# (~! meta.monad) (~' in)
(list (` (.:as (~ (nilable_type fieldT)) (~ imported))))))))))
)))
diff --git a/stdlib/source/library/lux/macro.lux b/stdlib/source/library/lux/macro.lux
index 3f1d04553..1fa269e8c 100644
--- a/stdlib/source/library/lux/macro.lux
+++ b/stdlib/source/library/lux/macro.lux
@@ -1,6 +1,6 @@
(.module:
[library
- [lux "*"
+ [lux {"-" symbol}
[abstract
["[0]" monad {"+" do}]]
[data
@@ -21,7 +21,7 @@
(def: .public (single_expansion syntax)
(-> Code (Meta (List Code)))
(case syntax
- [_ {.#Form {.#Item [[_ {.#Identifier name}] args]}}]
+ [_ {.#Form {.#Item [[_ {.#Symbol name}] args]}}]
(do //.monad
[?macro (//.macro name)]
(case ?macro
@@ -37,7 +37,7 @@
(def: .public (expansion syntax)
(-> Code (Meta (List Code)))
(case syntax
- [_ {.#Form {.#Item [[_ {.#Identifier name}] args]}}]
+ [_ {.#Form {.#Item [[_ {.#Symbol name}] args]}}]
(do //.monad
[?macro (//.macro name)]
(case ?macro
@@ -57,7 +57,7 @@
(def: .public (full_expansion syntax)
(-> Code (Meta (List Code)))
(case syntax
- [_ {.#Form {.#Item [[_ {.#Identifier name}] args]}}]
+ [_ {.#Form {.#Item [[_ {.#Symbol name}] args]}}]
(do //.monad
[?macro (//.macro name)]
(case ?macro
@@ -69,7 +69,7 @@
{.#None}
(do //.monad
- [parts' (monad.each //.monad full_expansion (list& (code.identifier name) args))]
+ [parts' (monad.each //.monad full_expansion (list& (code.symbol name) args))]
(in (list (code.form (list#conjoint parts')))))))
[_ {.#Form {.#Item [harg targs]}}]
@@ -91,23 +91,23 @@
_
(# //.monad in (list syntax))))
-(def: .public (identifier prefix)
+(def: .public (symbol prefix)
(-> Text (Meta Code))
(do //.monad
[id //.seed]
(in (|> id
(# nat.decimal encoded)
($_ text#composite "__gensym__" prefix)
- [""] code.identifier))))
+ [""] code.symbol))))
-(def: (local_identifier ast)
+(def: (local_symbol ast)
(-> Code (Meta Text))
(case ast
- [_ {.#Identifier [_ name]}]
+ [_ {.#Symbol [_ name]}]
(# //.monad in name)
_
- (//.failure (text#composite "Code is not a local identifier: " (code.format ast)))))
+ (//.failure (text#composite "Code is not a local symbol: " (code.format ast)))))
(def: .public wrong_syntax_error
(-> Symbol Text)
@@ -115,20 +115,20 @@
(text.prefix (text#composite "Wrong syntax for " text.\''))
(text.suffix (text#composite text.\'' "."))))
-(macro: .public (with_identifiers tokens)
+(macro: .public (with_symbols tokens)
(case tokens
- (^ (list [_ {.#Tuple identifiers}] body))
+ (^ (list [_ {.#Tuple symbols}] body))
(do [! //.monad]
- [identifier_names (monad.each ! ..local_identifier identifiers)
- .let [identifier_defs (list#conjoint (list#each (: (-> Text (List Code))
- (function (_ name) (list (code.identifier ["" name]) (` (..identifier (~ (code.text name)))))))
- identifier_names))]]
+ [symbol_names (monad.each ! ..local_symbol symbols)
+ .let [symbol_defs (list#conjoint (list#each (: (-> Text (List Code))
+ (function (_ name) (list (code.symbol ["" name]) (` (..symbol (~ (code.text name)))))))
+ symbol_names))]]
(in (list (` ((~! do) (~! //.monad)
- [(~+ identifier_defs)]
+ [(~+ symbol_defs)]
(~ body))))))
_
- (//.failure (..wrong_syntax_error (symbol ..with_identifiers)))))
+ (//.failure (..wrong_syntax_error (.symbol ..with_symbols)))))
(def: .public (one_expansion token)
(-> Code (Meta Code))
@@ -143,8 +143,8 @@
(template [<macro> <func>]
[(macro: .public (<macro> tokens)
- (let [[module _] (symbol .._)
- [_ short] (symbol <macro>)
+ (let [[module _] (.symbol .._)
+ [_ short] (.symbol <macro>)
macro_name [module short]]
(case (: (Maybe [Bit Code])
(case tokens
diff --git a/stdlib/source/library/lux/macro/code.lux b/stdlib/source/library/lux/macro/code.lux
index 60a3ee79c..7621c06ff 100644
--- a/stdlib/source/library/lux/macro/code.lux
+++ b/stdlib/source/library/lux/macro/code.lux
@@ -1,6 +1,6 @@
(.module:
[library
- [lux {"-" nat int rev}
+ [lux {"-" nat int rev symbol}
[abstract
[equivalence {"+" Equivalence}]]
[data
@@ -26,7 +26,7 @@
... {.#Rev Rev}
... {.#Frac Frac}
... {.#Text Text}
-... {.#Identifier Symbol}
+... {.#Symbol Symbol}
... {.#Form (List (w (Code' w)))}
... {.#Variant (List (w (Code' w)))}
... {.#Tuple (List (w (Code' w)))})
@@ -39,16 +39,16 @@
(-> <type> Code)
[location.dummy {<tag> x}])]
- [bit Bit .#Bit]
- [nat Nat .#Nat]
- [int Int .#Int]
- [rev Rev .#Rev]
- [frac Frac .#Frac]
- [text Text .#Text]
- [identifier Symbol .#Identifier]
- [form (List Code) .#Form]
- [variant (List Code) .#Variant]
- [tuple (List Code) .#Tuple]
+ [bit Bit .#Bit]
+ [nat Nat .#Nat]
+ [int Int .#Int]
+ [rev Rev .#Rev]
+ [frac Frac .#Frac]
+ [text Text .#Text]
+ [symbol Symbol .#Symbol]
+ [form (List Code) .#Form]
+ [variant (List Code) .#Variant]
+ [tuple (List Code) .#Tuple]
)
(template [<name> <tag>]
@@ -56,7 +56,7 @@
(-> Text Code)
[location.dummy {<tag> ["" name]}])]
- [local_identifier .#Identifier])
+ [local_symbol .#Symbol])
(implementation: .public equivalence
(Equivalence Code)
@@ -66,13 +66,13 @@
(^template [<tag> <eq>]
[[[_ {<tag> x'}] [_ {<tag> y'}]]
(# <eq> = x' y')])
- ([.#Bit bit.equivalence]
- [.#Nat nat.equivalence]
- [.#Int int.equivalence]
- [.#Rev rev.equivalence]
- [.#Frac frac.equivalence]
- [.#Text text.equivalence]
- [.#Identifier symbol.equivalence])
+ ([.#Bit bit.equivalence]
+ [.#Nat nat.equivalence]
+ [.#Int int.equivalence]
+ [.#Rev rev.equivalence]
+ [.#Frac frac.equivalence]
+ [.#Text text.equivalence]
+ [.#Symbol symbol.equivalence])
(^template [<tag>]
[[[_ {<tag> xs'}] [_ {<tag> ys'}]]
@@ -90,12 +90,12 @@
(^template [<tag> <struct>]
[[_ {<tag> value}]
(# <struct> encoded value)])
- ([.#Bit bit.codec]
- [.#Nat nat.decimal]
- [.#Int int.decimal]
- [.#Rev rev.decimal]
- [.#Frac frac.decimal]
- [.#Identifier symbol.codec])
+ ([.#Bit bit.codec]
+ [.#Nat nat.decimal]
+ [.#Int int.decimal]
+ [.#Rev rev.decimal]
+ [.#Frac frac.decimal]
+ [.#Symbol symbol.codec])
[_ {.#Text value}]
(text.format value)
diff --git a/stdlib/source/library/lux/macro/local.lux b/stdlib/source/library/lux/macro/local.lux
index 69b15e99b..498cebc08 100644
--- a/stdlib/source/library/lux/macro/local.lux
+++ b/stdlib/source/library/lux/macro/local.lux
@@ -101,7 +101,7 @@
(do meta.monad
[_ (monad.each meta.monad ..push_one macros)
seed meta.seed
- g!pop (//.identifier "pop")
+ g!pop (//.symbol "pop")
_ (let [g!pop (: Symbol
["" (//code.format g!pop)])]
(..push_one [g!pop (..pop_all (list#each product.left macros) g!pop)]))]
diff --git a/stdlib/source/library/lux/macro/syntax.lux b/stdlib/source/library/lux/macro/syntax.lux
index e1107fa4e..1f61650f1 100644
--- a/stdlib/source/library/lux/macro/syntax.lux
+++ b/stdlib/source/library/lux/macro/syntax.lux
@@ -1,7 +1,7 @@
(.module:
[library
[lux "*"
- ["[0]" macro {"+" with_identifiers}]
+ ["[0]" macro {"+" with_symbols}]
["[0]" meta]
[abstract
["[0]" monad {"+" do}]]
@@ -48,14 +48,14 @@
(/export.parser
($_ <>.and
(</>.form ($_ <>.and
- </>.local_identifier
+ </>.local_symbol
(</>.tuple (<>.some </>.any))))
</>.any)))
(macro: .public (syntax: tokens)
(case (</>.result ..syntax tokens)
{try.#Success [export_policy [name args] body]}
- (with_identifiers [g!tokens g!body g!error]
+ (with_symbols [g!tokens g!body g!error]
(do [! meta.monad]
[_ (if (|> args list.size nat.even?)
(in [])
@@ -67,19 +67,19 @@
(` ((~! ..self_documenting) (' (~ var))
(~ parser)))])]
(case var
- [_ {.#Identifier ["" _]}]
+ [_ {.#Symbol ["" _]}]
<default>
- [_ {.#Identifier _}]
+ [_ {.#Symbol _}]
(in [var parser])
_
<default>))))
(list.pairs args))
this_module meta.current_module_name
- .let [g!state (code.identifier ["" "*lux*"])
+ .let [g!state (code.symbol ["" "*lux*"])
error_msg (code.text (macro.wrong_syntax_error [this_module name]))]]
- (in (list (` (.macro: (~ export_policy) ((~ (code.identifier ["" name])) (~ g!tokens) (~ g!state))
+ (in (list (` (.macro: (~ export_policy) ((~ (code.symbol ["" name])) (~ g!tokens) (~ g!state))
(.case ((~! </>.result)
(: ((~! </>.Parser) (Meta (List Code)))
((~! do) (~! <>.monad)
diff --git a/stdlib/source/library/lux/macro/syntax/declaration.lux b/stdlib/source/library/lux/macro/syntax/declaration.lux
index 1e218f48b..012d5130c 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_identifier
+ (<>.either (<>.and <code>.local_symbol
(<>#in (list)))
- (<code>.form (<>.and <code>.local_identifier
- (<>.some <code>.local_identifier)))))
+ (<code>.form (<>.and <code>.local_symbol
+ (<>.some <code>.local_symbol)))))
(def: .public (format value)
(-> Declaration Code)
- (let [g!name (code.local_identifier (value@ #name value))]
+ (let [g!name (code.local_symbol (value@ #name value))]
(case (value@ #arguments value)
{.#End}
g!name
arguments
- (` ((~ g!name) (~+ (list#each code.local_identifier arguments)))))))
+ (` ((~ g!name) (~+ (list#each code.local_symbol arguments)))))))
diff --git a/stdlib/source/library/lux/macro/syntax/definition.lux b/stdlib/source/library/lux/macro/syntax/definition.lux
index d9d83ebd4..be3bb1f8a 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_identifier _#name))
+ (~ (code.local_symbol _#name))
(~ (case _#value
{.#Left check}
(//check.format check)
@@ -74,7 +74,7 @@
<code>.form
(<>.after (<code>.text! ..extension))
($_ <>.and
- <code>.local_identifier
+ <code>.local_symbol
(<>.or //check.parser
<code>.any)
<code>.bit
diff --git a/stdlib/source/library/lux/macro/syntax/export.lux b/stdlib/source/library/lux/macro/syntax/export.lux
index 27c74dceb..86b04be16 100644
--- a/stdlib/source/library/lux/macro/syntax/export.lux
+++ b/stdlib/source/library/lux/macro/syntax/export.lux
@@ -16,11 +16,11 @@
(do [! <>.monad]
[candiate <code>.next]
(case candiate
- [_ {.#Identifier ["" _]}]
+ [_ {.#Symbol ["" _]}]
(in default_policy)
(^or [_ {.#Bit _}]
- [_ {.#Identifier _}])
+ [_ {.#Symbol _}])
(do !
[_ <code>.any]
(in candiate))
diff --git a/stdlib/source/library/lux/macro/syntax/type/variable.lux b/stdlib/source/library/lux/macro/syntax/type/variable.lux
index 60edd0fcb..d40442b40 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_identifier)
+ code.local_symbol)
(def: .public parser
(Parser Variable)
- <code>.local_identifier)
+ <code>.local_symbol)
diff --git a/stdlib/source/library/lux/macro/template.lux b/stdlib/source/library/lux/macro/template.lux
index b6a67cadd..68b57a71d 100644
--- a/stdlib/source/library/lux/macro/template.lux
+++ b/stdlib/source/library/lux/macro/template.lux
@@ -1,6 +1,6 @@
(.module:
[library
- [lux {"-" let local macro}
+ [lux {"-" let local macro symbol}
["[0]" meta]
[abstract
["[0]" monad {"+" do}]]
@@ -32,15 +32,15 @@
(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_identifier))
+(syntax: .public (with_locals [locals (<code>.tuple (<>.some <code>.local_symbol))
body <code>.any])
(do [! meta.monad]
[g!locals (|> locals
- (list#each //.identifier)
+ (list#each //.symbol)
(monad.all !))]
(in (list (` (.with_expansions [(~+ (|> (list.zipped/2 locals g!locals)
- (list#each (function (_ [name identifier])
- (list (code.local_identifier name) (as_is identifier))))
+ (list#each (function (_ [name symbol])
+ (list (code.local_symbol name) (as_is symbol))))
list#conjoint))]
(~ body)))))))
@@ -56,13 +56,13 @@
(def: (snippet module_side?)
(-> Bit (Parser Text))
- (.let [full_identifier (..symbol_side module_side? <code>.identifier)]
+ (.let [full_symbol (..symbol_side module_side? <code>.symbol)]
($_ <>.either
<code>.text
(if module_side?
- full_identifier
- (<>.either <code>.local_identifier
- full_identifier))
+ full_symbol
+ (<>.either <code>.local_symbol
+ full_symbol))
(<>#each bit#encoded <code>.bit)
(<>#each nat#encoded <code>.nat)
(<>#each int#encoded <code>.int)
@@ -88,7 +88,7 @@
{.#Right simple}
(in (list (|> simple (text.interposed "") <simple>)))))]
- [identifier code.local_identifier code.identifier]
+ [symbol code.local_symbol code.symbol]
)
(type: Environment
@@ -97,7 +97,7 @@
(def: (applied env template)
(-> Environment Code Code)
(case template
- [_ {.#Identifier "" name}]
+ [_ {.#Symbol "" name}]
(case (dictionary.value name env)
{.#Some substitute}
substitute
@@ -143,8 +143,8 @@
(def: local
(Parser Local)
(do <>.monad
- [[name parameters] (<code>.form (<>.and <code>.local_identifier
- (<>.many <code>.local_identifier)))
+ [[name parameters] (<code>.form (<>.and <code>.local_symbol
+ (<>.many <code>.local_symbol)))
template (<code>.tuple (<>.some <code>.any))]
(in [#name name
#parameters parameters
@@ -167,7 +167,7 @@
(..macro local)])
locals))]
(if expression?
- (//.with_identifiers [g!body]
+ (//.with_symbols [g!body]
(in (list (` (.let [(~ g!body) (~ body)]
(exec (~ g!pop)
(~ g!body)))))))
diff --git a/stdlib/source/library/lux/math/infix.lux b/stdlib/source/library/lux/math/infix.lux
index 25a37563a..92c2d1e98 100644
--- a/stdlib/source/library/lux/math/infix.lux
+++ b/stdlib/source/library/lux/math/infix.lux
@@ -35,7 +35,7 @@
(<>#each code.rev <code>.rev)
(<>#each code.frac <code>.frac)
(<>#each code.text <code>.text)
- (<>#each code.identifier <code>.identifier)))
+ (<>#each code.symbol <code>.symbol)))
(def: expression
(Parser Infix)
diff --git a/stdlib/source/library/lux/program.lux b/stdlib/source/library/lux/program.lux
index b2690af76..0815a2e26 100644
--- a/stdlib/source/library/lux/program.lux
+++ b/stdlib/source/library/lux/program.lux
@@ -11,7 +11,7 @@
["<>" parser
["<[0]>" code]
["<[0]>" cli]]]
- [macro {"+" with_identifiers}
+ [macro {"+" with_symbols}
[syntax {"+" syntax:}]
["[0]" code]]]])
@@ -22,12 +22,12 @@
(def: arguments^
(<code>.Parser Arguments)
- (<>.or <code>.local_identifier
+ (<>.or <code>.local_symbol
(<code>.tuple (<>.some <code>.any))))
(syntax: .public (program: [args ..arguments^
body <code>.any])
- (with_identifiers [g!program g!args g!_ g!output g!message]
+ (with_symbols [g!program g!args g!_ g!output g!message]
(let [initialization+event_loop
(` ((~! do) (~! io.monad)
[(~ g!output) (~ body)
@@ -40,7 +40,7 @@
(in (list (` ("lux def program"
(~ (case args
{#Raw args}
- (` (.function ((~ g!program) (~ (code.identifier ["" args])))
+ (` (.function ((~ g!program) (~ (code.symbol ["" args])))
(~ initialization+event_loop)))
{#Parsed args}
diff --git a/stdlib/source/library/lux/target/common_lisp.lux b/stdlib/source/library/lux/target/common_lisp.lux
index 04e8c791f..b8005d561 100644
--- a/stdlib/source/library/lux/target/common_lisp.lux
+++ b/stdlib/source/library/lux/target/common_lisp.lux
@@ -32,7 +32,7 @@
(|>> :representation))
(template [<type> <super>]
- [(with_expansions [<brand> (template.identifier [<type> "'"])]
+ [(with_expansions [<brand> (template.symbol [<type> "'"])]
(`` (abstract: .public (<brand> brand) Any))
(`` (type: .public (<type> brand)
(<super> (<brand> brand)))))]
@@ -46,7 +46,7 @@
)
(template [<type> <super>]
- [(with_expansions [<brand> (template.identifier [<type> "'"])]
+ [(with_expansions [<brand> (template.symbol [<type> "'"])]
(`` (abstract: .public <brand> Any))
(`` (type: .public <type> (<super> <brand>))))]
diff --git a/stdlib/source/library/lux/target/js.lux b/stdlib/source/library/lux/target/js.lux
index dc1a4d71b..b6f649c95 100644
--- a/stdlib/source/library/lux/target/js.lux
+++ b/stdlib/source/library/lux/target/js.lux
@@ -36,7 +36,7 @@
(|>> :representation))
(template [<type> <super>+]
- [(with_expansions [<brand> (template.identifier [<type> "'"])]
+ [(with_expansions [<brand> (template.symbol [<type> "'"])]
(abstract: (<brand> brand) Any)
(`` (type: .public <type> (|> Any <brand> (~~ (template.spliced <super>+))))))]
@@ -47,7 +47,7 @@
)
(template [<type> <super>+]
- [(with_expansions [<brand> (template.identifier [<type> "'"])]
+ [(with_expansions [<brand> (template.symbol [<type> "'"])]
(abstract: <brand> Any)
(`` (type: .public <type> (|> <brand> (~~ (template.spliced <super>+))))))]
diff --git a/stdlib/source/library/lux/target/jvm/bytecode/instruction.lux b/stdlib/source/library/lux/target/jvm/bytecode/instruction.lux
index b47e4d4ba..61bb956bd 100644
--- a/stdlib/source/library/lux/target/jvm/bytecode/instruction.lux
+++ b/stdlib/source/library/lux/target/jvm/bytecode/instruction.lux
@@ -100,7 +100,7 @@
)
(template [<shift> <name> <inputT> <writer> <unwrap>]
- [(with_expansions [<private> (template.identifier ["'" <name>])]
+ [(with_expansions [<private> (template.symbol ["'" <name>])]
(def: (<private> opcode input0)
(-> Opcode <inputT> Mutation)
(function (_ [offset binary])
@@ -126,7 +126,7 @@
)
(template [<shift> <name> <inputT> <writer>]
- [(with_expansions [<private> (template.identifier ["'" <name>])]
+ [(with_expansions [<private> (template.symbol ["'" <name>])]
(def: (<private> opcode input0)
(-> Opcode <inputT> Mutation)
(function (_ [offset binary])
diff --git a/stdlib/source/library/lux/target/jvm/encoding/signed.lux b/stdlib/source/library/lux/target/jvm/encoding/signed.lux
index d07406031..415c7f504 100644
--- a/stdlib/source/library/lux/target/jvm/encoding/signed.lux
+++ b/stdlib/source/library/lux/target/jvm/encoding/signed.lux
@@ -48,7 +48,7 @@
["Scope (in bytes)" (%.nat scope)]))
(template [<bytes> <name> <size> <constructor> <maximum> <+> <->]
- [(with_expansions [<raw> (template.identifier [<name> "'"])]
+ [(with_expansions [<raw> (template.symbol [<name> "'"])]
(abstract: <raw> Any)
(type: .public <name> (Signed <raw>)))
diff --git a/stdlib/source/library/lux/target/jvm/encoding/unsigned.lux b/stdlib/source/library/lux/target/jvm/encoding/unsigned.lux
index 9549340c3..9df045d18 100644
--- a/stdlib/source/library/lux/target/jvm/encoding/unsigned.lux
+++ b/stdlib/source/library/lux/target/jvm/encoding/unsigned.lux
@@ -60,7 +60,7 @@
["Subject" (%.nat (:representation subject))]))
(template [<bytes> <name> <size> <constructor> <maximum> <+> <-> <max>]
- [(with_expansions [<raw> (template.identifier [<name> "'"])]
+ [(with_expansions [<raw> (template.symbol [<name> "'"])]
(abstract: .public <raw> Any)
(type: .public <name> (Unsigned <raw>)))
diff --git a/stdlib/source/library/lux/target/jvm/modifier.lux b/stdlib/source/library/lux/target/jvm/modifier.lux
index 3ab952378..400b341e7 100644
--- a/stdlib/source/library/lux/target/jvm/modifier.lux
+++ b/stdlib/source/library/lux/target/jvm/modifier.lux
@@ -11,7 +11,7 @@
[data
[format
["[0]F" binary {"+" Writer}]]]
- [macro {"+" with_identifiers}
+ [macro {"+" with_symbols}
[syntax {"+" syntax:}]
["[0]" code]]
[math
@@ -80,7 +80,7 @@
(syntax: .public (modifiers: [ofT <code>.any
options (<>.many <code>.any)])
- (with_identifiers [g!modifier g!code]
+ (with_symbols [g!modifier g!code]
(in (list (` (template [(~ g!code) (~ g!modifier)]
[(def: (~' .public) (~ g!modifier)
(..Modifier (~ ofT))
diff --git a/stdlib/source/library/lux/target/jvm/type/category.lux b/stdlib/source/library/lux/target/jvm/type/category.lux
index 177da5322..e3bbface9 100644
--- a/stdlib/source/library/lux/target/jvm/type/category.lux
+++ b/stdlib/source/library/lux/target/jvm/type/category.lux
@@ -22,7 +22,7 @@
(type: .public Parameter (<| Return' Value' Object' Parameter' Any))
(template [<parents> <child>]
- [(with_expansions [<raw> (template.identifier [<child> "'"])]
+ [(with_expansions [<raw> (template.symbol [<child> "'"])]
(abstract: <raw> Any)
(type: .public <child>
(`` (<| Return' Value' (~~ (template.spliced <parents>)) <raw>))))]
diff --git a/stdlib/source/library/lux/target/lua.lux b/stdlib/source/library/lux/target/lua.lux
index f06c47ee4..02fe49a51 100644
--- a/stdlib/source/library/lux/target/lua.lux
+++ b/stdlib/source/library/lux/target/lua.lux
@@ -59,7 +59,7 @@
(|>> :representation))
(template [<type> <super>+]
- [(with_expansions [<brand> (template.identifier [<type> "'"])]
+ [(with_expansions [<brand> (template.symbol [<type> "'"])]
(abstract: (<brand> brand) Any)
(`` (type: .public <type> (|> Any <brand> (~~ (template.spliced <super>+))))))]
@@ -70,7 +70,7 @@
)
(template [<type> <super>+]
- [(with_expansions [<brand> (template.identifier [<type> "'"])]
+ [(with_expansions [<brand> (template.symbol [<type> "'"])]
(abstract: <brand> Any)
(`` (type: .public <type> (|> <brand> (~~ (template.spliced <super>+))))))]
@@ -374,13 +374,13 @@
0 (.list)
_ (|> (-- arity)
(enum.range n.enum 0)
- (list#each (|>> %.nat code.local_identifier))))))
+ (list#each (|>> %.nat code.local_symbol))))))
(syntax: (arity_types [arity <code>.nat])
(in (list.repeated arity (` ..Expression))))
(template [<arity> <function>+]
- [(with_expansions [<apply> (template.identifier ["apply/" <arity>])
+ [(with_expansions [<apply> (template.symbol ["apply/" <arity>])
<inputs> (arity_inputs <arity>)
<types> (arity_types <arity>)
<definitions> (template.spliced <function>+)]
@@ -389,7 +389,7 @@
(..apply/* (.list <inputs>) function))
(template [<function>]
- [(`` (def: .public (~~ (template.identifier [<function> "/" <arity>]))
+ [(`` (def: .public (~~ (template.symbol [<function> "/" <arity>]))
(<apply> (..var <function>))))]
<definitions>))]
diff --git a/stdlib/source/library/lux/target/php.lux b/stdlib/source/library/lux/target/php.lux
index f2b459958..3d477cf34 100644
--- a/stdlib/source/library/lux/target/php.lux
+++ b/stdlib/source/library/lux/target/php.lux
@@ -67,7 +67,7 @@
(|>> :representation))
(template [<type> <super>+]
- [(with_expansions [<brand> (template.identifier [<type> "'"])]
+ [(with_expansions [<brand> (template.symbol [<type> "'"])]
(abstract: (<brand> brand) Any)
(`` (type: .public <type> (|> Any <brand> (~~ (template.spliced <super>+))))))]
@@ -78,7 +78,7 @@
)
(template [<type> <super>+]
- [(with_expansions [<brand> (template.identifier [<type> "'"])]
+ [(with_expansions [<brand> (template.symbol [<type> "'"])]
(abstract: .public <brand> Any)
(`` (type: .public <type> (|> <brand> (~~ (template.spliced <super>+))))))]
@@ -231,13 +231,13 @@
0 (.list)
_ (|> (-- arity)
(enum.range n.enum 0)
- (list#each (|>> %.nat code.local_identifier))))))
+ (list#each (|>> %.nat code.local_symbol))))))
(syntax: (arity_types [arity <code>.nat])
(in (list.repeated arity (` ..Expression))))
(template [<arity> <function>+]
- [(with_expansions [<apply> (template.identifier ["apply/" <arity>])
+ [(with_expansions [<apply> (template.symbol ["apply/" <arity>])
<inputs> (arity_inputs <arity>)
<types> (arity_types <arity>)
<definitions> (template.spliced <function>+)]
@@ -246,7 +246,7 @@
(..apply/* (.list <inputs>) function))
(template [<function>]
- [(`` (def: .public (~~ (template.identifier [<function> "/" <arity>]))
+ [(`` (def: .public (~~ (template.symbol [<function> "/" <arity>]))
(<apply> (..constant <function>))))]
<definitions>))]
diff --git a/stdlib/source/library/lux/target/python.lux b/stdlib/source/library/lux/target/python.lux
index 17ddfcb4d..064c39bfc 100644
--- a/stdlib/source/library/lux/target/python.lux
+++ b/stdlib/source/library/lux/target/python.lux
@@ -71,7 +71,7 @@
(|>> :representation))
(template [<type> <super>]
- [(with_expansions [<brand> (template.identifier [<type> "'"])]
+ [(with_expansions [<brand> (template.symbol [<type> "'"])]
(`` (abstract: (<brand> brand) Any))
(`` (type: .public (<type> brand)
(<super> (<brand> brand)))))]
@@ -84,7 +84,7 @@
)
(template [<type> <super>]
- [(with_expansions [<brand> (template.identifier [<type> "'"])]
+ [(with_expansions [<brand> (template.symbol [<type> "'"])]
(`` (abstract: <brand> Any))
(`` (type: .public <type> (<super> <brand>))))]
@@ -461,13 +461,13 @@
0 (.list)
_ (|> (-- arity)
(enum.range n.enum 0)
- (list#each (|>> %.nat code.local_identifier))))))
+ (list#each (|>> %.nat code.local_symbol))))))
(syntax: (arity_types [arity <code>.nat])
(in (list.repeated arity (` (Expression Any)))))
(template [<arity> <function>+]
- [(with_expansions [<apply> (template.identifier ["apply/" <arity>])
+ [(with_expansions [<apply> (template.symbol ["apply/" <arity>])
<inputs> (arity_inputs <arity>)
<types> (arity_types <arity>)
<definitions> (template.spliced <function>+)]
@@ -476,7 +476,7 @@
(..apply/* function (.list <inputs>)))
(template [<function>]
- [(`` (def: .public (~~ (template.identifier [<function> "/" <arity>]))
+ [(`` (def: .public (~~ (template.symbol [<function> "/" <arity>]))
(<apply> (..var <function>))))]
<definitions>))]
diff --git a/stdlib/source/library/lux/target/r.lux b/stdlib/source/library/lux/target/r.lux
index 2499ce6c2..6e0b19d2a 100644
--- a/stdlib/source/library/lux/target/r.lux
+++ b/stdlib/source/library/lux/target/r.lux
@@ -26,7 +26,7 @@
Text
(template [<type> <super>+]
- [(with_expansions [<kind> (template.identifier [<type> "'"])]
+ [(with_expansions [<kind> (template.symbol [<type> "'"])]
(abstract: .public (<kind> kind) Any)
(`` (type: .public <type> (|> Any <kind> (~~ (template.spliced <super>+))))))]
@@ -34,7 +34,7 @@
)
(template [<type> <super>+]
- [(with_expansions [<kind> (template.identifier [<type> "'"])]
+ [(with_expansions [<kind> (template.symbol [<type> "'"])]
(abstract: .public (<kind> kind) Any)
(`` (type: .public (<type> <brand>) (|> <brand> <kind> (~~ (template.spliced <super>+))))))]
@@ -208,13 +208,13 @@
0 (.list)
_ (|> arity
list.indices
- (list#each (|>> %.nat code.local_identifier))))))
+ (list#each (|>> %.nat code.local_symbol))))))
(syntax: (arity_types [arity <code>.nat])
(in (list.repeated arity (` ..Expression))))
(template [<arity> <function>+]
- [(with_expansions [<apply> (template.identifier ["apply/" <arity>])
+ [(with_expansions [<apply> (template.symbol ["apply/" <arity>])
<inputs> (arity_inputs <arity>)
<types> (arity_types <arity>)
<definitions> (template.spliced <function>+)]
@@ -223,7 +223,7 @@
(..apply (.list <inputs>) function))
(template [<function>]
- [(`` (def: .public (~~ (template.identifier [<function> "/" <arity>]))
+ [(`` (def: .public (~~ (template.symbol [<function> "/" <arity>]))
(-> [<types>] Expression)
(<apply> (..var <function>))))]
diff --git a/stdlib/source/library/lux/target/ruby.lux b/stdlib/source/library/lux/target/ruby.lux
index 1824a139f..fe641d5da 100644
--- a/stdlib/source/library/lux/target/ruby.lux
+++ b/stdlib/source/library/lux/target/ruby.lux
@@ -59,7 +59,7 @@
(|>> :representation))
(template [<type> <super>+]
- [(with_expansions [<brand> (template.identifier [<type> "'"])]
+ [(with_expansions [<brand> (template.symbol [<type> "'"])]
(abstract: (<brand> brand) Any)
(`` (type: .public <type> (|> Any <brand> (~~ (template.spliced <super>+))))))]
@@ -72,7 +72,7 @@
)
(template [<type> <super>+]
- [(with_expansions [<brand> (template.identifier [<type> "'"])]
+ [(with_expansions [<brand> (template.symbol [<type> "'"])]
(abstract: <brand> Any)
(`` (type: .public <type> (|> <brand> (~~ (template.spliced <super>+))))))]
@@ -437,13 +437,13 @@
0 (.list)
_ (|> (-- arity)
(enum.range n.enum 0)
- (list#each (|>> %.nat code.local_identifier))))))
+ (list#each (|>> %.nat code.local_symbol))))))
(syntax: (arity_types [arity <code>.nat])
(in (list.repeated arity (` ..Expression))))
(template [<arity> <function>+]
- [(with_expansions [<apply> (template.identifier ["apply/" <arity>])
+ [(with_expansions [<apply> (template.symbol ["apply/" <arity>])
<inputs> (arity_inputs <arity>)
<types> (arity_types <arity>)
<definitions> (template.spliced <function>+)]
@@ -452,7 +452,7 @@
(..apply/* (.list <inputs>) function))
(template [<function>]
- [(`` (def: .public (~~ (template.identifier [<function> "/" <arity>]))
+ [(`` (def: .public (~~ (template.symbol [<function> "/" <arity>]))
(<apply> (..local <function>))))]
<definitions>))]
diff --git a/stdlib/source/library/lux/test.lux b/stdlib/source/library/lux/test.lux
index 92b90dcbb..802320de4 100644
--- a/stdlib/source/library/lux/test.lux
+++ b/stdlib/source/library/lux/test.lux
@@ -284,7 +284,7 @@
(code.tuple (list (code.text (symbol.module symbol))
(code.text (symbol.short symbol)))))
-(syntax: (reference [name <code>.identifier])
+(syntax: (reference [name <code>.symbol])
(do meta.monad
[_ (meta.export name)]
(in (list (symbol_code name)))))
@@ -345,7 +345,7 @@
[(revised@ #expected_coverage (set.union coverage) tally)
documentation]))))))
-(syntax: .public (covering [module <code>.identifier
+(syntax: .public (covering [module <code>.symbol
test <code>.any])
(do meta.monad
[.let [module (symbol.module module)]
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/generation.lux b/stdlib/source/library/lux/tool/compiler/language/lux/generation.lux
index 8133275b1..108e94a40 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/generation.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/generation.lux
@@ -1,6 +1,6 @@
(.module:
[library
- [lux {"-" Module}
+ [lux {"-" Module symbol}
[abstract
[monad {"+" do}]]
[control
@@ -178,7 +178,7 @@
_ (extension.update (revised@ #counter ++))]
(in count)))
-(def: .public (identifier prefix)
+(def: .public (symbol prefix)
(All (_ anchor expression directive)
(-> Text (Operation anchor expression directive Text)))
(# phase.monad each (|>> %.nat (format prefix)) ..next))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis.lux
index ace3fcee8..7f0b63249 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis.lux
@@ -56,7 +56,7 @@
[.#Frac /primitive.frac]
[.#Text /primitive.text])
- (^ {.#Variant (list& [_ {.#Identifier tag}]
+ (^ {.#Variant (list& [_ {.#Symbol tag}]
values)})
(case values
{.#Item value {.#End}}
@@ -83,7 +83,7 @@
(def: (compile|others expander archive compile code')
(-> Expander Archive Phase (-> (Code' (Ann Location)) (Operation Analysis)))
(case code'
- {.#Identifier reference}
+ {.#Symbol reference}
(/reference.reference reference)
(^ {.#Form (list [_ {.#Variant branches}] input)})
@@ -94,8 +94,8 @@
(^ {.#Form (list& [_ {.#Text extension_name}] extension_args)})
(//extension.apply archive compile [extension_name extension_args])
- (^ {.#Form (list [_ {.#Tuple (list [_ {.#Identifier ["" function_name]}]
- [_ {.#Identifier ["" arg_name]}])}]
+ (^ {.#Form (list [_ {.#Tuple (list [_ {.#Symbol ["" function_name]}]
+ [_ {.#Symbol ["" arg_name]}])}]
body)})
(/function.function compile function_name arg_name archive body)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/case.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/case.lux
index 146ea09cf..c0cd0f8c2 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/case.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/case.lux
@@ -222,7 +222,7 @@
(def: (analyse_pattern num_tags inputT pattern next)
(All (_ a) (-> (Maybe Nat) Type Code (Operation a) (Operation [Pattern a])))
(.case pattern
- [location {.#Identifier ["" name]}]
+ [location {.#Symbol ["" name]}]
(/.with_location location
(do ///.monad
[outputA (//scope.with_local [name inputT]
@@ -314,7 +314,7 @@
_
(/.except ..cannot_match_with_pattern [inputT' pattern]))))
- (^ [location {.#Variant (list& [_ {.#Identifier tag}] values)}])
+ (^ [location {.#Variant (list& [_ {.#Symbol tag}] values)}])
(/.with_location location
(do ///.monad
[tag (///extension.lifted (meta.normal tag))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/structure.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/structure.lux
index 8de445db6..f8101daf3 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/structure.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/structure.lux
@@ -77,10 +77,10 @@
[(exception: .public (<name> [key Symbol
record (List [Symbol Code])])
(exception.report
- ["Tag" (%.code (code.identifier key))]
+ ["Tag" (%.code (code.symbol key))]
["Record" (%.code (code.tuple (|> record
(list#each (function (_ [keyI valC])
- (list (code.identifier keyI) valC)))
+ (list (code.symbol keyI) valC)))
list#conjoint)))]))]
[cannot_repeat_slot]
@@ -89,7 +89,7 @@
(exception: .public (slot_does_not_belong_to_record [key Symbol
type Type])
(exception.report
- ["Tag" (%.code (code.identifier key))]
+ ["Tag" (%.code (code.symbol key))]
["Type" (%.type type)]))
(exception: .public (record_size_mismatch [expected Nat
@@ -102,7 +102,7 @@
["Type" (%.type type)]
["Expression" (%.code (|> record
(list#each (function (_ [keyI valueC])
- (list (code.identifier keyI) valueC)))
+ (list (code.symbol keyI) valueC)))
list#conjoint
code.tuple))]))
@@ -311,7 +311,7 @@
output (: (List [Symbol Code])
{.#End})]
(case input
- (^ (list& [_ {.#Identifier slotH}] valueH tail))
+ (^ (list& [_ {.#Symbol slotH}] valueH tail))
(do ///.monad
[slotH (///extension.lifted (meta.normal slotH))]
(recur tail {.#Item [slotH valueH] output}))
@@ -381,7 +381,7 @@
(^ (list singletonC))
(analyse archive singletonC)
- (^ (list [_ {.#Identifier pseudo_slot}] singletonC))
+ (^ (list [_ {.#Symbol pseudo_slot}] singletonC))
(do [! ///.monad]
[head_k (///extension.lifted (meta.normal pseudo_slot))
slot (///extension.lifted (meta.try (meta.slot head_k)))]
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 5a0abb14d..bc21d4cab 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
@@ -219,7 +219,7 @@
(-> Expander /////analysis.Bundle Handler)
(function (_ extension_name phase archive inputsC+)
(case inputsC+
- (^ (list [_ {.#Identifier ["" short_name]}] valueC exported?C))
+ (^ (list [_ {.#Symbol ["" short_name]}] valueC exported?C))
(do phase.monad
[current_module (/////directive.lifted_analysis
(///.lifted meta.current_module_name))
@@ -247,7 +247,7 @@
(def: (def::type_tagged expander host_analysis)
(-> Expander /////analysis.Bundle Handler)
(..custom
- [($_ <>.and <code>.local_identifier <code>.any
+ [($_ <>.and <code>.local_symbol <code>.any
(<>.or (<code>.variant (<>.some <code>.text))
(<code>.tuple (<>.some <code>.text)))
<code>.any)
@@ -339,7 +339,7 @@
(def: def::alias
Handler
(..custom
- [($_ <>.and <code>.local_identifier <code>.identifier)
+ [($_ <>.and <code>.local_symbol <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/common_lisp/common.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/common_lisp/common.lux
index bdc1114ac..482033355 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/common_lisp/common.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/common_lisp/common.lux
@@ -64,7 +64,7 @@
... <s>.any))))
... (function (_ extension_name phase archive [input else conditionals])
... (do [! /////.monad]
-... [@input (# ! each _.var (generation.identifier "input"))
+... [@input (# ! each _.var (generation.symbol "input"))
... inputG (phase archive input)
... elseG (phase archive else)
... conditionalsG (: (Operation (List [Expression Expression]))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/js/host.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/js/host.lux
index 8a83d334d..69281ea06 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/js/host.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/js/host.lux
@@ -133,7 +133,7 @@
(do [! ////////phase.monad]
[abstractionG (phase archive abstractionS)
.let [variable (: (-> Text (Operation Var))
- (|>> generation.identifier
+ (|>> generation.symbol
(# ! each _.var)))]
g!inputs (monad.each ! (function (_ _) (variable "input"))
(list.repeated (.nat arity) []))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/lua/common.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/lua/common.lux
index 7d7e431c1..637ade6fb 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/lua/common.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/lua/common.lux
@@ -117,7 +117,7 @@
(do [! /////.monad]
[inputG (phase archive input)
else! (..statement phase archive else)
- @input (# ! each _.var (generation.identifier "input"))
+ @input (# ! each _.var (generation.symbol "input"))
conditionals! (: (Operation (List [Expression Statement]))
(monad.each ! (function (_ [chars branch])
(do !
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/lua/host.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/lua/host.lux
index 2bcd95a66..ef4309089 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/lua/host.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/lua/host.lux
@@ -171,7 +171,7 @@
(do [! ////////phase.monad]
[abstractionG (phase archive abstractionS)
.let [variable (: (-> Text (Operation Var))
- (|>> generation.identifier
+ (|>> generation.symbol
(# ! each _.var)))]
g!inputs (monad.each ! (function (_ _)
(variable "input"))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/php/common.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/php/common.lux
index b218eeb31..b7f210d65 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/php/common.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/php/common.lux
@@ -67,7 +67,7 @@
[inputG (phase archive input)
[[context_module context_artifact] elseG] (generation.with_new_context archive
(phase archive else))
- @input (# ! each _.var (generation.identifier "input"))
+ @input (# ! each _.var (generation.symbol "input"))
conditionalsG (: (Operation (List [Expression Expression]))
(monad.each ! (function (_ [chars branch])
(do !
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/python/common.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/python/common.lux
index e7c312c0a..5f7cb433f 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/python/common.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/python/common.lux
@@ -110,7 +110,7 @@
(do [! /////.monad]
[inputG (phase archive input)
else! (..statement phase archive else)
- @input (# ! each _.var (generation.identifier "input"))
+ @input (# ! each _.var (generation.symbol "input"))
conditionals! (: (Operation (List [(Expression Any)
(Statement Any)]))
(monad.each ! (function (_ [chars branch])
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/python/host.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/python/host.lux
index 7c257467b..c1fcde536 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/python/host.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/python/host.lux
@@ -131,7 +131,7 @@
(do [! ////////phase.monad]
[abstractionG (phase archive abstractionS)
.let [variable (: (-> Text (Operation SVar))
- (|>> generation.identifier
+ (|>> generation.symbol
(# ! each _.var)))]
g!inputs (monad.each ! (function (_ _) (variable "input"))
(list.repeated (.nat arity) []))]
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/r/common.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/r/common.lux
index 854ad42bc..6d6ddd25d 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/r/common.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/r/common.lux
@@ -64,7 +64,7 @@
... ... <s>.any))))
... ... (function (_ extension_name phase archive [input else conditionals])
... ... (do [! /////.monad]
-... ... [@input (# ! each _.var (generation.identifier "input"))
+... ... [@input (# ! each _.var (generation.symbol "input"))
... ... inputG (phase archive input)
... ... elseG (phase archive else)
... ... conditionalsG (: (Operation (List [Expression Expression]))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/ruby/common.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/ruby/common.lux
index 607320bbb..3be90b82c 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/ruby/common.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/ruby/common.lux
@@ -109,7 +109,7 @@
(do [! /////.monad]
[inputG (phase archive input)
else! (statement phase archive else)
- @input (# ! each _.local (generation.identifier "input"))
+ @input (# ! each _.local (generation.symbol "input"))
conditionals! (: (Operation (List [Expression Statement]))
(monad.each ! (function (_ [chars branch])
(do !
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/scheme/common.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/scheme/common.lux
index d22c8d075..417205477 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/scheme/common.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/generation/scheme/common.lux
@@ -64,7 +64,7 @@
<s>.any))))
(function (_ extension_name phase archive [input else conditionals])
(do [! /////.monad]
- [@input (# ! each _.var (generation.identifier "input"))
+ [@input (# ! each _.var (generation.symbol "input"))
inputG (phase archive input)
elseG (phase archive else)
conditionalsG (: (Operation (List [Expression Expression]))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/function.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/function.lux
index 9c585b13b..6a7ac6314 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/function.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/function.lux
@@ -48,7 +48,7 @@
_
(do [! ///////phase.monad]
- [@closure (# ! each _.var (/////generation.identifier "closure"))]
+ [@closure (# ! each _.var (/////generation.symbol "closure"))]
(in (_.labels (list [@closure [(|> (list.enumeration inits)
(list#each (|>> product.left ..capture))
_.args)
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 8180b15b0..acb4af284 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
@@ -87,31 +87,31 @@
(-> (Expression Any) (Computation Any))
(|>> [1 #1] ..variant))
-(syntax: .public (with_vars [vars (<code>.tuple (<>.some <code>.local_identifier))
+(syntax: .public (with_vars [vars (<code>.tuple (<>.some <code>.local_symbol))
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_identifier var)
+ (list (code.local_symbol var)
(` (_.var (~ (code.text (format "v" (%.nat id)))))))))
list.together))]
(~ body)))))))
-(syntax: (runtime: [declaration (<>.or <code>.local_identifier
- (<code>.form (<>.and <code>.local_identifier
- (<>.some <code>.local_identifier))))
+(syntax: (runtime: [declaration (<>.or <code>.local_symbol
+ (<code>.form (<>.and <code>.local_symbol
+ (<>.some <code>.local_symbol))))
code <code>.any])
(do meta.monad
[runtime_id meta.seed]
- (macro.with_identifiers [g!_]
- (let [runtime (code.local_identifier (///reference.artifact [..module_id runtime_id]))
+ (macro.with_symbols [g!_]
+ (let [runtime (code.local_symbol (///reference.artifact [..module_id runtime_id]))
runtime_name (` (_.var (~ (code.text (%.code runtime)))))]
(case declaration
{.#Left name}
- (let [g!name (code.local_identifier name)
- code_nameC (code.local_identifier (format "@" name))]
+ (let [g!name (code.local_symbol name)
+ code_nameC (code.local_symbol (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_identifier name)
- code_nameC (code.local_identifier (format "@" name))
+ (let [g!name (code.local_symbol name)
+ code_nameC (code.local_symbol (format "@" name))
- inputsC (list#each code.local_identifier inputs)
+ inputsC (list#each code.local_symbol 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 686e9934e..42f9e9188 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
@@ -10,7 +10,7 @@
[collection
["[0]" list ("[1]#[0]" functor)]]]
["[0]" meta]
- ["[0]" macro {"+" with_identifiers}
+ ["[0]" macro {"+" with_symbols}
["[0]" code]
[syntax {"+" syntax:}]]]]
["[0]" /// "_"
@@ -32,12 +32,12 @@
(type: .public (Variadic of) (-> (List of) of))
(syntax: (arity: [arity <code>.nat
- name <code>.local_identifier
+ name <code>.local_symbol
type <code>.any])
- (with_identifiers [g!_ g!extension g!name g!phase g!archive g!inputs g!of g!anchor g!expression g!directive]
+ (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.identifier "input")))]
- (in (list (` (def: .public ((~ (code.local_identifier name)) (~ g!extension))
+ [g!input+ (monad.all ! (list.repeated arity (macro.symbol "input")))]
+ (in (list (` (def: .public ((~ (code.local_symbol 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/runtime.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/runtime.lux
index e93f01032..c935522f2 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
@@ -85,46 +85,46 @@
(-> Var (-> Var Expression) Statement)
(_.define name (definition name)))
-(syntax: .public (with_vars [vars (<code>.tuple (<>.some <code>.local_identifier))
+(syntax: .public (with_vars [vars (<code>.tuple (<>.some <code>.local_symbol))
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_identifier var)
+ (list (code.local_symbol var)
(` (_.var (~ (code.text (format "v" (%.nat id)))))))))
list.together))]
(~ body)))))))
-(syntax: (runtime: [declaration (<>.or <code>.local_identifier
- (<code>.form (<>.and <code>.local_identifier
- (<>.some <code>.local_identifier))))
+(syntax: (runtime: [declaration (<>.or <code>.local_symbol
+ (<code>.form (<>.and <code>.local_symbol
+ (<>.some <code>.local_symbol))))
code <code>.any])
- (macro.with_identifiers [g!_ runtime]
+ (macro.with_symbols [g!_ runtime]
(let [runtime_name (` (_.var (~ (code.text (%.code runtime)))))]
(case declaration
{.#Left name}
- (let [g!name (code.local_identifier name)]
+ (let [g!name (code.local_symbol name)]
(in (list (` (def: .public (~ g!name)
Var
(~ runtime_name)))
- (` (def: (~ (code.local_identifier (format "@" name)))
+ (` (def: (~ (code.local_symbol (format "@" name)))
Statement
(..feature (~ runtime_name)
(function ((~ g!_) (~ g!name))
(~ code))))))))
{.#Right [name inputs]}
- (let [g!name (code.local_identifier name)
- inputsC (list#each code.local_identifier inputs)
+ (let [g!name (code.local_symbol name)
+ inputsC (list#each code.local_symbol 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_identifier (format "@" name)))
+ (` (def: (~ (code.local_symbol (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 b8216596f..b1f3932b2 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
@@ -102,14 +102,14 @@
(-> Var (-> Var Statement) Statement)
(definition name))
-(syntax: .public (with_vars [vars (<code>.tuple (<>.some <code>.local_identifier))
+(syntax: .public (with_vars [vars (<code>.tuple (<>.some <code>.local_symbol))
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_identifier var)
+ (list (code.local_symbol var)
(` (_.var (~ (code.text (format "v" (%.nat id)))))))))
list.together))]
(~ body)))))))
@@ -117,40 +117,40 @@
(def: module_id
0)
-(syntax: (runtime: [declaration (<>.or <code>.local_identifier
- (<code>.form (<>.and <code>.local_identifier
- (<>.some <code>.local_identifier))))
+(syntax: (runtime: [declaration (<>.or <code>.local_symbol
+ (<code>.form (<>.and <code>.local_symbol
+ (<>.some <code>.local_symbol))))
code <code>.any])
(do meta.monad
[runtime_id meta.seed]
- (macro.with_identifiers [g!_]
- (let [runtime (code.local_identifier (///reference.artifact [..module_id runtime_id]))
+ (macro.with_symbols [g!_]
+ (let [runtime (code.local_symbol (///reference.artifact [..module_id runtime_id]))
runtime_name (` (_.var (~ (code.text (%.code runtime)))))]
(case declaration
{.#Left name}
- (macro.with_identifiers [g!_]
- (let [g!name (code.local_identifier name)]
+ (macro.with_symbols [g!_]
+ (let [g!name (code.local_symbol name)]
(in (list (` (def: .public (~ g!name)
Var
(~ runtime_name)))
- (` (def: (~ (code.local_identifier (format "@" name)))
+ (` (def: (~ (code.local_symbol (format "@" name)))
Statement
(..feature (~ runtime_name)
(function ((~ g!_) (~ g!name))
(_.set (~ g!name) (~ code))))))))))
{.#Right [name inputs]}
- (macro.with_identifiers [g!_]
- (let [g!name (code.local_identifier name)
- inputsC (list#each code.local_identifier inputs)
+ (macro.with_symbols [g!_]
+ (let [g!name (code.local_symbol name)
+ inputsC (list#each code.local_symbol 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_identifier (format "@" name)))
+ (` (def: (~ (code.local_symbol (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 3dc089d50..1b29003d1 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
@@ -70,14 +70,14 @@
(-> Constant (-> Constant Statement) Statement)
(definition name))
-(syntax: .public (with_vars [vars (<code>.tuple (<>.some <code>.local_identifier))
+(syntax: .public (with_vars [vars (<code>.tuple (<>.some <code>.local_symbol))
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_identifier var)
+ (list (code.local_symbol var)
(` (_.var (~ (code.text (format "v" (%.nat id)))))))))
list.together))]
(~ body)))))))
@@ -85,40 +85,40 @@
(def: module_id
0)
-(syntax: (runtime: [declaration (<>.or <code>.local_identifier
- (<code>.form (<>.and <code>.local_identifier
- (<>.some <code>.local_identifier))))
+(syntax: (runtime: [declaration (<>.or <code>.local_symbol
+ (<code>.form (<>.and <code>.local_symbol
+ (<>.some <code>.local_symbol))))
code <code>.any])
(do meta.monad
[runtime_id meta.seed]
- (macro.with_identifiers [g!_]
- (let [runtime (code.local_identifier (///reference.artifact [..module_id runtime_id]))
+ (macro.with_symbols [g!_]
+ (let [runtime (code.local_symbol (///reference.artifact [..module_id runtime_id]))
runtime_name (` (_.constant (~ (code.text (%.code runtime)))))]
(case declaration
{.#Left name}
- (macro.with_identifiers [g!_]
- (let [g!name (code.local_identifier name)]
+ (macro.with_symbols [g!_]
+ (let [g!name (code.local_symbol name)]
(in (list (` (def: .public (~ g!name)
Var
(~ runtime_name)))
- (` (def: (~ (code.local_identifier (format "@" name)))
+ (` (def: (~ (code.local_symbol (format "@" name)))
Statement
(..feature (~ runtime_name)
(function ((~ g!_) (~ g!name))
(_.define (~ g!name) (~ code))))))))))
{.#Right [name inputs]}
- (macro.with_identifiers [g!_]
- (let [g!name (code.local_identifier name)
- inputsC (list#each code.local_identifier inputs)
+ (macro.with_symbols [g!_]
+ (let [g!name (code.local_symbol name)
+ inputsC (list#each code.local_symbol 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_identifier (format "@" name)))
+ (` (def: (~ (code.local_symbol (format "@" name)))
Statement
(..feature (~ runtime_name)
(function ((~ g!_) (~ g!_))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/case.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/case.lux
index 88a0f48ad..41f22d6e1 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/case.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/case.lux
@@ -1,6 +1,6 @@
(.module:
[library
- [lux {"-" case let if}
+ [lux {"-" case let if symbol}
[abstract
["[0]" monad {"+" do}]]
[data
@@ -34,7 +34,7 @@
[meta
[archive {"+" Archive}]]]]]]])
-(def: .public (identifier prefix)
+(def: .public (symbol prefix)
(-> Text (Operation SVar))
(///////phase#each (|>> %.nat (format prefix) _.var)
/////generation.next))
@@ -279,7 +279,7 @@
(do !
[pre! (recur preP)
post! (recur postP)
- g!once (..identifier "once")]
+ g!once (..symbol "once")]
(in (..alternation in_closure? g!once pre! post!)))
_
@@ -289,7 +289,7 @@
(-> Bit Phase! Phase Archive Path (Operation (Statement Any)))
(do ///////phase.monad
[pattern_matching! (pattern_matching' in_closure? statement expression archive pathP)
- g!once (..identifier "once")]
+ g!once (..symbol "once")]
(in ($_ _.then
(..with_looping in_closure? g!once
pattern_matching!)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/loop.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/loop.lux
index 570d262d7..5579c4d48 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/loop.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/loop.lux
@@ -110,7 +110,7 @@
(Generator! (List Synthesis))
(do [! ///////phase.monad]
[offset /////generation.anchor
- @temp (//case.identifier "lux_recur_values")
+ @temp (//case.symbol "lux_recur_values")
argsO+ (monad.each ! (expression archive) argsS+)
.let [re_binds (|> argsO+
list.enumeration
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 a4948041f..3615afcb5 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
@@ -100,36 +100,36 @@
(def: (runtime_name name)
(-> Text SVar)
- (let [identifier (format ..prefix
- "_" (%.nat $.version)
- "_" (%.nat (text#hash name)))]
- (_.var identifier)))
+ (let [symbol (format ..prefix
+ "_" (%.nat $.version)
+ "_" (%.nat (text#hash name)))]
+ (_.var symbol)))
(def: (feature name definition)
(-> SVar (-> SVar (Statement Any)) (Statement Any))
(definition name))
-(syntax: .public (with_vars [vars (<code>.tuple (<>.some <code>.local_identifier))
+(syntax: .public (with_vars [vars (<code>.tuple (<>.some <code>.local_symbol))
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_identifier var)
+ (list (code.local_symbol var)
(` (_.var (~ (code.text (format "v" (%.nat id)))))))))
list.together))]
(~ body)))))))
-(syntax: (runtime: [declaration (<>.or <code>.local_identifier
- (<code>.form (<>.and <code>.local_identifier
- (<>.some <code>.local_identifier))))
+(syntax: (runtime: [declaration (<>.or <code>.local_symbol
+ (<code>.form (<>.and <code>.local_symbol
+ (<>.some <code>.local_symbol))))
code <code>.any])
(case declaration
{.#Left name}
- (macro.with_identifiers [g!_]
- (let [nameC (code.local_identifier name)
- code_nameC (code.local_identifier (format "@" name))
+ (macro.with_symbols [g!_]
+ (let [nameC (code.local_symbol name)
+ code_nameC (code.local_symbol (format "@" name))
runtime_nameC (` (runtime_name (~ (code.text name))))]
(in (list (` (def: .public (~ nameC) SVar (~ runtime_nameC)))
(` (def: (~ code_nameC)
@@ -139,11 +139,11 @@
(_.set (list (~ g!_)) (~ code))))))))))
{.#Right [name inputs]}
- (macro.with_identifiers [g!_]
- (let [nameC (code.local_identifier name)
- code_nameC (code.local_identifier (format "@" name))
+ (macro.with_symbols [g!_]
+ (let [nameC (code.local_symbol name)
+ code_nameC (code.local_symbol (format "@" name))
runtime_nameC (` (runtime_name (~ (code.text name))))
- inputsC (list#each code.local_identifier inputs)
+ inputsC (list#each code.local_symbol 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/loop.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/loop.lux
index 29bd92b23..3e7bcf927 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/loop.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/loop.lux
@@ -43,7 +43,7 @@
... true loop
_
(do [! ///////phase.monad]
- [$scope (# ! each _.var (/////generation.identifier "loop_scope"))
+ [$scope (# ! each _.var (/////generation.symbol "loop_scope"))
initsO+ (monad.each ! (expression archive) initsS+)
bodyO (/////generation.with_anchor $scope
(expression archive bodyS))]
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 d61ff76b1..f45c9c04d 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
@@ -10,7 +10,7 @@
[number]
(coll [list "list/" Functor<List>]
(dictionary ["dict" unordered {"+" Dict}])))
- [macro {"+" with_identifiers}]
+ [macro {"+" with_symbols}]
(macro [code]
["s" syntax {"+" syntax:}])
[host])
@@ -63,12 +63,12 @@
"Expected: " (|> expected .int %i) "\n"
" Actual: " (|> actual .int %i)))
-(syntax: (arity: [name s.local_identifier
+(syntax: (arity: [name s.local_symbol
arity s.nat])
- (with_identifiers [g!_ g!proc g!name g!translate g!inputs]
+ (with_symbols [g!_ g!proc g!name g!translate g!inputs]
(do [@ macro.monad]
- [g!input+ (monad.all @ (list.repeated arity (macro.identifier "input")))]
- (in (list (` (def: .public ((~ (code.local_identifier name)) (~ g!proc))
+ [g!input+ (monad.all @ (list.repeated arity (macro.symbol "input")))]
+ (in (list (` (def: .public ((~ (code.local_symbol 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 fae9bcf9f..e3523fe0f 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_identifier))
+(syntax: .public (with_vars [vars (<code>.tuple (<>.some <code>.local_symbol))
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_identifier var)
+ (list (code.local_symbol var)
(` (_.var (~ (code.text (format "v" (%.nat id)))))))))
list.together))]
(~ body)))))))
-(syntax: (runtime: [declaration (<>.or <code>.local_identifier
- (<code>.form (<>.and <code>.local_identifier
- (<>.some <code>.local_identifier))))
+(syntax: (runtime: [declaration (<>.or <code>.local_symbol
+ (<code>.form (<>.and <code>.local_symbol
+ (<>.some <code>.local_symbol))))
code <code>.any])
(do meta.monad
[runtime_id meta.seed]
- (macro.with_identifiers [g!_]
- (let [runtime (code.local_identifier (///reference.artifact [..module_id runtime_id]))
+ (macro.with_symbols [g!_]
+ (let [runtime (code.local_symbol (///reference.artifact [..module_id runtime_id]))
runtime_name (` (_.var (~ (code.text (%.code runtime)))))]
(case declaration
{.#Left name}
- (let [g!name (code.local_identifier name)]
+ (let [g!name (code.local_symbol name)]
(in (list (` (def: .public (~ g!name)
_.SVar
(~ runtime_name)))
- (` (def: (~ (code.local_identifier (format "@" name)))
+ (` (def: (~ (code.local_symbol (format "@" name)))
_.Expression
(_.set! (~ runtime_name) (~ code)))))))
{.#Right [name inputs]}
- (let [g!name (code.local_identifier name)
- inputsC (list#each code.local_identifier inputs)
+ (let [g!name (code.local_symbol name)
+ inputsC (list#each code.local_symbol 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_identifier (format "@" name)))
+ (` (def: (~ (code.local_symbol (format "@" name)))
_.Expression
(..with_vars [(~+ inputsC)]
(_.set! (~ runtime_name)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/case.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/case.lux
index f43fc7a9f..d6f4d2a2b 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/case.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/case.lux
@@ -1,6 +1,6 @@
(.module:
[library
- [lux {"-" case let if}
+ [lux {"-" case let if symbol}
[abstract
["[0]" monad {"+" do}]]
[control
@@ -36,7 +36,7 @@
[meta
[archive {"+" Archive}]]]]]]])
-(def: .public (identifier prefix)
+(def: .public (symbol prefix)
(-> Text (Operation LVar))
(///////phase#each (|>> %.nat (format prefix) _.local) /////generation.next))
@@ -322,16 +322,16 @@
(do ///////phase.monad
[pre! (recur preP)
post! (recur postP)
- g!once (..identifier "once")
- g!continue? (..identifier "continue")]
+ g!once (..symbol "once")
+ g!continue? (..symbol "continue")]
(in (..alternation in_closure? g!once g!continue? pre! post!))))))))
(def: (pattern_matching in_closure? statement expression archive pathP)
(-> Bit (Generator! Path))
(do ///////phase.monad
[pattern_matching! (pattern_matching' in_closure? statement expression archive pathP)
- g!once (..identifier "once")
- g!continue? (..identifier "continue")]
+ g!once (..symbol "once")
+ g!continue? (..symbol "continue")]
(in ($_ _.then
(..with_looping in_closure? g!once g!continue?
pattern_matching!)
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/loop.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/loop.lux
index 70cb4a42a..9ff64de7f 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/loop.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/loop.lux
@@ -84,7 +84,7 @@
(Generator! (List Synthesis))
(do [! ///////phase.monad]
[offset /////generation.anchor
- @temp (//case.identifier "lux_recur_values")
+ @temp (//case.symbol "lux_recur_values")
argsO+ (monad.each ! (expression archive) argsS+)
.let [re_binds (|> argsO+
list.enumeration
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 1dd09a7b2..e5657407e 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
@@ -71,14 +71,14 @@
(-> LVar (-> LVar Statement) Statement)
(definition name))
-(syntax: .public (with_vars [vars (<code>.tuple (<>.some <code>.local_identifier))
+(syntax: .public (with_vars [vars (<code>.tuple (<>.some <code>.local_symbol))
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_identifier var)
+ (list (code.local_symbol var)
(` (_.local (~ (code.text (format "v" (%.nat id)))))))))
list.together))]
(~ body)))))))
@@ -86,37 +86,37 @@
(def: module_id
0)
-(syntax: (runtime: [declaration (<>.or <code>.local_identifier
- (<code>.form (<>.and <code>.local_identifier
- (<>.some <code>.local_identifier))))
+(syntax: (runtime: [declaration (<>.or <code>.local_symbol
+ (<code>.form (<>.and <code>.local_symbol
+ (<>.some <code>.local_symbol))))
code <code>.any])
(do meta.monad
[runtime_id meta.seed]
- (macro.with_identifiers [g!_]
- (let [runtime (code.local_identifier (///reference.artifact [..module_id runtime_id]))
+ (macro.with_symbols [g!_]
+ (let [runtime (code.local_symbol (///reference.artifact [..module_id runtime_id]))
runtime_name (` (_.local (~ (code.text (%.code runtime)))))]
(case declaration
{.#Left name}
- (macro.with_identifiers [g!_]
- (let [g!name (code.local_identifier name)]
+ (macro.with_symbols [g!_]
+ (let [g!name (code.local_symbol name)]
(in (list (` (def: .public (~ g!name) LVar (~ runtime_name)))
- (` (def: (~ (code.local_identifier (format "@" name)))
+ (` (def: (~ (code.local_symbol (format "@" name)))
Statement
(..feature (~ runtime_name)
(function ((~ g!_) (~ g!name))
(_.set (list (~ g!name)) (~ code))))))))))
{.#Right [name inputs]}
- (macro.with_identifiers [g!_]
- (let [g!name (code.local_identifier name)
- inputsC (list#each code.local_identifier inputs)
+ (macro.with_symbols [g!_]
+ (let [g!name (code.local_symbol name)
+ inputsC (list#each code.local_symbol 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_identifier (format "@" name)))
+ (` (def: (~ (code.local_symbol (format "@" name)))
Statement
(..feature (~ runtime_name)
(function ((~ g!_) (~ g!_))
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 d070b09b2..3e5b2e7e7 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
@@ -15,7 +15,7 @@
[collection
["[0]" list ("[1]#[0]" functor)]
["dict" dictionary {"+" Dictionary}]]]
- ["[0]" macro {"+" with_identifiers}
+ ["[0]" macro {"+" with_symbols}
["[0]" code]
[syntax {"+" syntax:}]]
[target
@@ -38,12 +38,12 @@
(type: .public Trinary (-> (Vector 3 Expression) Computation))
(type: .public Variadic (-> (List Expression) Computation))
-(syntax: (arity: [name <code>.local_identifier
+(syntax: (arity: [name <code>.local_symbol
arity <code>.nat])
- (with_identifiers [g!_ g!extension g!name g!phase g!inputs]
+ (with_symbols [g!_ g!extension g!name g!phase g!inputs]
(do [! macro.monad]
- [g!input+ (monad.all ! (list.repeated arity (macro.identifier "input")))]
- (in (list (` (def: .public ((~ (code.local_identifier name)) (~ g!extension))
+ [g!input+ (monad.all ! (list.repeated arity (macro.symbol "input")))]
+ (in (list (` (def: .public ((~ (code.local_symbol 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 59fb09719..c9cad6f31 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
@@ -58,48 +58,48 @@
(def: .public unit
(_.string /////synthesis.unit))
-(syntax: .public (with_vars [vars (<code>.tuple (<>.some <code>.local_identifier))
+(syntax: .public (with_vars [vars (<code>.tuple (<>.some <code>.local_symbol))
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_identifier var)
+ (list (code.local_symbol var)
(` (_.var (~ (code.text (format "v" (%.nat id)))))))))
list.together))]
(~ body)))))))
-(syntax: (runtime: [declaration (<>.or <code>.local_identifier
- (<code>.form (<>.and <code>.local_identifier
- (<>.some <code>.local_identifier))))
+(syntax: (runtime: [declaration (<>.or <code>.local_symbol
+ (<code>.form (<>.and <code>.local_symbol
+ (<>.some <code>.local_symbol))))
code <code>.any])
(do meta.monad
[runtime_id meta.seed]
- (macro.with_identifiers [g!_]
- (let [runtime (code.local_identifier (///reference.artifact [..module_id runtime_id]))
+ (macro.with_symbols [g!_]
+ (let [runtime (code.local_symbol (///reference.artifact [..module_id runtime_id]))
runtime_name (` (_.var (~ (code.text (%.code runtime)))))]
(case declaration
{.#Left name}
- (let [g!name (code.local_identifier name)]
+ (let [g!name (code.local_symbol name)]
(in (list (` (def: .public (~ g!name)
Var
(~ runtime_name)))
- (` (def: (~ (code.local_identifier (format "@" name)))
+ (` (def: (~ (code.local_symbol (format "@" name)))
_.Computation
(_.define_constant (~ runtime_name) (~ code)))))))
{.#Right [name inputs]}
- (let [g!name (code.local_identifier name)
- inputsC (list#each code.local_identifier inputs)
+ (let [g!name (code.local_symbol name)
+ inputsC (list#each code.local_symbol 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_identifier (format "@" name)))
+ (` (def: (~ (code.local_symbol (format "@" name)))
_.Computation
(..with_vars [(~+ inputsC)]
(_.define_function (~ runtime_name) [(list (~+ inputsC)) {.#None}]
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/syntax.lux b/stdlib/source/library/lux/tool/compiler/language/lux/syntax.lux
index 6da850247..5be0c68f9 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/syntax.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/syntax.lux
@@ -420,7 +420,7 @@
(!with_char+ source_code//size source_code g!offset/1 g!char/1 @end)
(!if_digit? g!char/1
(signed_parser source_code//size offset where (!++/2 offset) source_code)
- (!full_symbol_parser offset [where (!++ offset) source_code] where @aliases .#Identifier)))])
+ (!full_symbol_parser offset [where (!++ offset) source_code] where @aliases .#Symbol)))])
(with_expansions [<output> {.#Right [[(revised@ .#column (|>> (!n/+ (!n/- start end))) where)
end
@@ -539,9 +539,9 @@
[(~~ (static ..symbol_separator))
... (~~ (static ..frac_separator))
]
- ... It's either a Rev, an identifier, or a comment.
+ ... It's either a Rev, a symbol, or a comment.
(with_expansions [<rev_parser> (rev_parser source_code//size offset/0 where (!++ offset/1) source_code)
- <short_symbol_parser> (!short_symbol_parser source_code//size current_module [where offset/1 source_code] where .#Identifier)
+ <short_symbol_parser> (!short_symbol_parser source_code//size current_module [where offset/1 source_code] where .#Symbol)
<comment_parser> (case ("lux text index" (!++ offset/1) (static text.new_line) source_code)
{.#Some end}
(recur (!vertical where end source_code))
@@ -554,10 +554,10 @@
(!if_digit? char/1
... It's a Rev.
<rev_parser>
- ... It's either an identifier, or a comment.
+ ... It's either a symbol, or a comment.
("lux syntax char case!" char/1
[[(~~ (static ..symbol_separator))]
- ... It's either an identifier, or a comment.
+ ... It's either a symbol, or a comment.
(<| (let [offset/2 (!++ offset/1)])
(!with_char+ source_code//size source_code offset/2 char/2
(!end_of_file where offset/2 source_code current_module))
@@ -565,9 +565,9 @@
[[(~~ (static ..symbol_separator))]
... It's a comment.
<comment_parser>]
- ... It's an identifier.
+ ... It's a symbol.
<short_symbol_parser>))]
- ... It's an identifier.
+ ... It's a symbol.
<short_symbol_parser>))))
[(~~ (static ..positive_sign))
@@ -588,14 +588,14 @@
["1" #1]))]
... else
- (!full_symbol_parser offset/0 [<consume_1>] where aliases .#Identifier)))]
+ (!full_symbol_parser offset/0 [<consume_1>] where aliases .#Symbol)))]
... else
(!if_digit? char/0
... Natural number
(nat_parser source_code//size offset/0 where (!++ offset/0) source_code)
- ... Identifier
- (!full_symbol_parser offset/0 [<consume_1>] where aliases .#Identifier))
+ ... Symbol
+ (!full_symbol_parser offset/0 [<consume_1>] where aliases .#Symbol))
)))
)))
))
diff --git a/stdlib/source/library/lux/type.lux b/stdlib/source/library/lux/type.lux
index c0737d326..b389af6de 100644
--- a/stdlib/source/library/lux/type.lux
+++ b/stdlib/source/library/lux/type.lux
@@ -264,7 +264,7 @@
([.#Sum] [.#Product] [.#Function] [.#Apply])
{.#Named name sub_type}
- (code.identifier name)
+ (code.symbol name)
(^template [<tag>]
[{<tag> env body}
@@ -381,14 +381,14 @@
(n.> 0)))
(syntax: (new_secret_marker [])
- (macro.with_identifiers [g!_secret_marker_]
+ (macro.with_symbols [g!_secret_marker_]
(in (list g!_secret_marker_))))
(def: secret_marker
(`` (symbol (~~ (new_secret_marker)))))
-(syntax: .public (:log! [input (<>.or (<>.and <code>.identifier
- (<>.maybe (<>.after (<code>.identifier! ..secret_marker) <code>.any)))
+(syntax: .public (:log! [input (<>.or (<>.and <code>.symbol
+ (<>.maybe (<>.after (<code>.symbol! ..secret_marker) <code>.any)))
<code>.any)])
(case input
{.#Left [valueN valueC]}
@@ -406,23 +406,23 @@
(symbol#encoded valueN))
text.new_line
" Type: " (..format valueT)))]]
- (in (list (code.identifier valueN))))
+ (in (list (code.symbol valueN))))
{.#Right valueC}
- (macro.with_identifiers [g!value]
+ (macro.with_symbols [g!value]
(in (list (` (.let [(~ g!value) (~ valueC)]
- (..:log! (~ valueC) (~ (code.identifier ..secret_marker)) (~ g!value)))))))))
+ (..:log! (~ valueC) (~ (code.symbol ..secret_marker)) (~ g!value)))))))))
(def: type_parameters
(Parser (List Text))
- (<code>.tuple (<>.some <code>.local_identifier)))
+ (<code>.tuple (<>.some <code>.local_symbol)))
(syntax: .public (:as [type_vars type_parameters
input <code>.any
output <code>.any
value (<>.maybe <code>.any)])
- (macro.with_identifiers [g!_]
- (let [casterC (` (: (All ((~ g!_) (~+ (list#each code.local_identifier type_vars)))
+ (macro.with_symbols [g!_]
+ (let [casterC (` (: (All ((~ g!_) (~+ (list#each code.local_symbol type_vars)))
(-> (~ input) (~ output)))
(|>> :expected)))]
(case value
@@ -445,8 +445,8 @@
(syntax: .public (:sharing [type_vars ..type_parameters
exemplar ..typed
computation ..typed])
- (macro.with_identifiers [g!_]
- (let [typeC (` (All ((~ g!_) (~+ (list#each code.local_identifier type_vars)))
+ (macro.with_symbols [g!_]
+ (let [typeC (` (All ((~ g!_) (~+ (list#each code.local_symbol type_vars)))
(-> (~ (value@ #type exemplar))
(~ (value@ #type computation)))))
shareC (` (: (~ typeC)
@@ -458,7 +458,7 @@
exemplar ..typed
extraction <code>.any])
(in (list (` (:of ((~! ..:sharing)
- [(~+ (list#each code.local_identifier type_vars))]
+ [(~+ (list#each code.local_symbol type_vars))]
(~ (value@ #type exemplar))
(~ (value@ #expression exemplar))
diff --git a/stdlib/source/library/lux/type/abstract.lux b/stdlib/source/library/lux/type/abstract.lux
index 9de534c9b..0e199c7ad 100644
--- a/stdlib/source/library/lux/type/abstract.lux
+++ b/stdlib/source/library/lux/type/abstract.lux
@@ -180,7 +180,7 @@
(def: cast
(Parser [(Maybe Text) Code])
- (<>.either (<>.and (<>.maybe <code>.local_identifier) <code>.any)
+ (<>.either (<>.and (<>.maybe <code>.local_symbol) <code>.any)
(<>.and (<>#in {.#None}) <code>.any)))
(template [<name> <from> <to>]
@@ -206,8 +206,8 @@
(def: declaration
(Parser [Text (List Text)])
- (<>.either (<code>.form (<>.and <code>.local_identifier (<>.some <code>.local_identifier)))
- (<>.and <code>.local_identifier (# <>.monad in (list)))))
+ (<>.either (<code>.form (<>.and <code>.local_symbol (<>.some <code>.local_symbol)))
+ (<>.and <code>.local_symbol (# <>.monad in (list)))))
(def: abstract
(Parser [Code [Text (List Text)] Code (List Code)])
@@ -224,9 +224,9 @@
..abstract])
(do meta.monad
[current_module meta.current_module_name
- .let [type_varsC (list#each code.local_identifier type_vars)
- abstraction_declaration (` ((~ (code.local_identifier name)) (~+ type_varsC)))
- representation_declaration (` ((~ (code.local_identifier (representation_definition_name 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)))
(~+ type_varsC)))]
_ (..push! [name
type_varsC
@@ -261,19 +261,19 @@
{#Current value}
(in (list (` (.|> (~ value) ..:representation ..:abstraction))))))
-(syntax: .public (^:representation [selection (<code>.form (..selection <code>.local_identifier))
+(syntax: .public (^:representation [selection (<code>.form (..selection <code>.local_symbol))
body <code>.any
branches (<>.some <code>.any)])
(case selection
{#Specific specific name}
- (let [g!var (code.local_identifier name)]
+ (let [g!var (code.local_symbol name)]
(in (list& g!var
(` (.let [(~ g!var) (..:representation (~ specific) (~ g!var))]
(~ body)))
branches)))
{#Current name}
- (let [g!var (code.local_identifier name)]
+ (let [g!var (code.local_symbol name)]
(in (list& g!var
(` (.let [(~ g!var) (..:representation (~ g!var))]
(~ body)))
diff --git a/stdlib/source/library/lux/type/dynamic.lux b/stdlib/source/library/lux/type/dynamic.lux
index d0a042d07..2d1eda0db 100644
--- a/stdlib/source/library/lux/type/dynamic.lux
+++ b/stdlib/source/library/lux/type/dynamic.lux
@@ -10,7 +10,7 @@
[data
[text
["%" format]]]
- [macro {"+" with_identifiers}
+ [macro {"+" with_symbols}
["[0]" syntax {"+" syntax:}]]
["[0]" type
abstract]]])
@@ -33,13 +33,13 @@
(|>> :representation))
(syntax: .public (:dynamic [value <code>.any])
- (with_identifiers [g!value]
+ (with_symbols [g!value]
(in (list (` (let [(~ g!value) (~ value)]
((~! ..abstraction) [(:of (~ g!value)) (~ g!value)])))))))
(syntax: .public (:static [type <code>.any
value <code>.any])
- (with_identifiers [g!type g!value]
+ (with_symbols [g!type g!value]
(in (list (` (let [[(~ g!type) (~ g!value)] ((~! ..representation) (~ value))]
(: ((~! try.Try) (~ type))
(if (# (~! type.equivalence) (~' =)
diff --git a/stdlib/source/library/lux/type/implicit.lux b/stdlib/source/library/lux/type/implicit.lux
index c3b9983f4..12f218f8d 100644
--- a/stdlib/source/library/lux/type/implicit.lux
+++ b/stdlib/source/library/lux/type/implicit.lux
@@ -315,7 +315,7 @@
(def: (var? input)
(-> Code Bit)
(case input
- [_ {.#Identifier _}]
+ [_ {.#Symbol _}]
#1
_
@@ -329,13 +329,13 @@
(-> Instance Code)
(case dependencies
{.#End}
- (code.identifier constructor)
+ (code.symbol constructor)
_
- (` ((~ (code.identifier constructor)) (~+ (list#each instance$ dependencies))))))
+ (` ((~ (code.symbol constructor)) (~+ (list#each instance$ dependencies))))))
-(syntax: .public (## [member <code>.identifier
- args (<>.or (<>.and (<>.some <code>.identifier) <code>.end!)
+(syntax: .public (## [member <code>.symbol
+ args (<>.or (<>.and (<>.some <code>.symbol) <code>.end!)
(<>.and (<>.some <code>.any) <code>.end!))])
(case args
{.#Left [args _]}
@@ -350,8 +350,8 @@
{.#Item chosen {.#End}}
(in (list (` (# (~ (instance$ chosen))
- (~ (code.local_identifier (product.right member)))
- (~+ (list#each code.identifier args))))))
+ (~ (code.local_symbol (product.right member)))
+ (~+ (list#each code.symbol args))))))
_
(meta.failure (format "Too many implementations available: "
@@ -362,14 +362,14 @@
{.#Right [args _]}
(do [! meta.monad]
- [labels (|> (macro.identifier "") (list.repeated (list.size args)) (monad.all !))]
+ [labels (|> (macro.symbol "") (list.repeated (list.size args)) (monad.all !))]
(in (list (` (let [(~+ (|> args (list.zipped/2 labels) (list#each ..pair_list) list#conjoint))]
- (..## (~ (code.identifier member)) (~+ labels)))))))
+ (..## (~ (code.symbol member)) (~+ labels)))))))
))
(def: (implicit_bindings amount)
(-> Nat (Meta (List Code)))
- (|> (macro.identifier "g!implicit")
+ (|> (macro.symbol "g!implicit")
(list.repeated amount)
(monad.all meta.monad)))
diff --git a/stdlib/source/library/lux/type/poly.lux b/stdlib/source/library/lux/type/poly.lux
index fbd910be4..08538565b 100644
--- a/stdlib/source/library/lux/type/poly.lux
+++ b/stdlib/source/library/lux/type/poly.lux
@@ -16,7 +16,7 @@
[collection
["[0]" list ("[1]#[0]" functor)]
["[0]" dictionary]]]
- [macro {"+" with_identifiers}
+ [macro {"+" with_symbols}
["[0]" code]
[syntax {"+" syntax:}]]
[math
@@ -26,14 +26,14 @@
(def: polyP
(Parser [Code Text Code])
(let [private ($_ <>.and
- <code>.local_identifier
+ <code>.local_symbol
<code>.any)]
(<>.either (<>.and <code>.any private)
(<>.and (<>#in (` .private)) private))))
(syntax: .public (poly: [[export_policy name body] ..polyP])
- (with_identifiers [g!_ g!type g!output]
- (let [g!name (code.identifier ["" name])]
+ (with_symbols [g!_ g!type g!output]
+ (let [g!name (code.symbol ["" name])]
(in (.list (` ((~! syntax:) (~ export_policy) ((~ g!name) [(~ g!type) (~! <code>.any)])
((~! do) (~! meta.monad)
[(~ g!type) ((~! meta.eval) .Type (~ g!type))]
@@ -85,7 +85,7 @@
[.Tuple .#Product type.flat_tuple])
{.#Named name sub_type}
- (code.identifier name)
+ (code.symbol name)
(^template [<tag>]
[{<tag> scope body}
diff --git a/stdlib/source/library/lux/type/quotient.lux b/stdlib/source/library/lux/type/quotient.lux
index 099d14b53..3301280c1 100644
--- a/stdlib/source/library/lux/type/quotient.lux
+++ b/stdlib/source/library/lux/type/quotient.lux
@@ -6,7 +6,7 @@
[control
[parser
["<[0]>" code]]]
- [macro {"+" with_identifiers}
+ [macro {"+" with_symbols}
[syntax {"+" syntax:}]]
["[0]" type
abstract]]])
@@ -44,7 +44,7 @@
)
(syntax: .public (type [class <code>.any])
- (with_identifiers [g!t g!c g!%]
+ (with_symbols [g!t g!c g!%]
(in (list (` ((~! type.:by_example)
[(~ g!t) (~ g!c) (~ g!%)]
diff --git a/stdlib/source/library/lux/type/refinement.lux b/stdlib/source/library/lux/type/refinement.lux
index 02745abd2..a294ffec8 100644
--- a/stdlib/source/library/lux/type/refinement.lux
+++ b/stdlib/source/library/lux/type/refinement.lux
@@ -85,7 +85,7 @@
{.#Item head no}]))))
(syntax: .public (type [refiner <code>.any])
- (macro.with_identifiers [g!t g!%]
+ (macro.with_symbols [g!t g!%]
(in (list (` ((~! type.:by_example) [(~ g!t) (~ g!%)]
(..Refiner (~ g!t) (~ g!%))
(~ refiner)
diff --git a/stdlib/source/library/lux/type/resource.lux b/stdlib/source/library/lux/type/resource.lux
index 9d562cbd4..d9ffdfea7 100644
--- a/stdlib/source/library/lux/type/resource.lux
+++ b/stdlib/source/library/lux/type/resource.lux
@@ -127,7 +127,7 @@
(# monad in [context []])))
(syntax: .public (exchange [swaps ..indices])
- (macro.with_identifiers [g!_ g!context g!!]
+ (macro.with_symbols [g!_ g!context g!!]
(case swaps
{.#End}
(in (list (` (~! no_op))))
@@ -135,7 +135,7 @@
{.#Item head tail}
(do [! meta.monad]
[.let [max_idx (list#mix n.max head tail)]
- g!inputs (<| (monad.all !) (list.repeated (++ max_idx)) (macro.identifier "input"))
+ g!inputs (<| (monad.all !) (list.repeated (++ max_idx)) (macro.symbol "input"))
.let [g!outputs (|> (monad.mix maybe.monad
(function (_ from to)
(do maybe.monad
@@ -166,9 +166,9 @@
(template [<name> <from> <to>]
[(syntax: .public (<name> [amount ..amount])
- (macro.with_identifiers [g!_ g!context g!!]
+ (macro.with_symbols [g!_ g!context g!!]
(do [! meta.monad]
- [g!keys (|> (macro.identifier "keys")
+ [g!keys (|> (macro.symbol "keys")
(list.repeated amount)
(monad.all !))]
(in (list (` (: (All ((~ g!_) (~ g!!) (~+ g!keys) (~ g!context))
diff --git a/stdlib/source/library/lux/type/unit.lux b/stdlib/source/library/lux/type/unit.lux
index 6509f6505..146abbf8f 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_identifier
- <code>.local_identifier))])
+ <code>.local_symbol
+ <code>.local_symbol))])
(do meta.monad
[@ meta.current_module_name
- .let [g!type (code.local_identifier type_name)]]
+ .let [g!type (code.local_symbol type_name)]]
(in (list (` (type: (~ export_policy) (~ g!type)
(Primitive (~ (code.text (%.symbol [@ type_name]))))))
- (` (implementation: (~ export_policy) (~ (code.local_identifier unit_name))
+ (` (implementation: (~ export_policy) (~ (code.local_symbol 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_identifier
- <code>.local_identifier
+ <code>.local_symbol
+ <code>.local_symbol
..scaleP))])
(do meta.monad
[.let [(^open "_[0]") ratio]
@ meta.current_module_name
- .let [g!scale (code.local_identifier type_name)]]
+ .let [g!scale (code.local_symbol type_name)]]
(in (list (` (type: (~ export_policy) ((~ g!scale) (~' u))
(Primitive (~ (code.text (%.symbol [@ type_name]))) [(~' u)])))
- (` (implementation: (~ export_policy) (~ (code.local_identifier scale_name))
+ (` (implementation: (~ export_policy) (~ (code.local_symbol scale_name))
(..Scale (~ g!scale))
(def: (~' scale)
@@ -155,8 +155,8 @@
(i./ (.int denominator))
in')))
-(syntax: (implementation_name [type_name <code>.local_identifier])
- (in (list (code.local_identifier (text.lower_cased type_name)))))
+(syntax: (implementation_name [type_name <code>.local_symbol])
+ (in (list (code.local_symbol (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 a34c8a7fc..d2dc29f2d 100644
--- a/stdlib/source/library/lux/world/net/http/client.lux
+++ b/stdlib/source/library/lux/world/net/http/client.lux
@@ -36,8 +36,8 @@
(! (Try (//.Response !))))
request)))
-(syntax: (method_function [[_ name] <code>.identifier])
- (in (list (code.local_identifier (text.replaced "#" "" (text.lower_cased name))))))
+(syntax: (method_function [[_ name] <code>.symbol])
+ (in (list (code.local_symbol (text.replaced "#" "" (text.lower_cased name))))))
(template [<method>]
[(with_expansions [<name> (method_function <method>)]