aboutsummaryrefslogtreecommitdiff
path: root/stdlib
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib')
-rw-r--r--stdlib/source/documentation/lux.lux10
-rw-r--r--stdlib/source/documentation/lux/data/color/named.lux2
-rw-r--r--stdlib/source/documentation/lux/data/text/unicode/block.lux2
-rw-r--r--stdlib/source/library/lux.lux34
-rw-r--r--stdlib/source/library/lux/abstract/comonad.lux2
-rw-r--r--stdlib/source/library/lux/abstract/monad.lux2
-rw-r--r--stdlib/source/library/lux/control/parser/binary.lux2
-rw-r--r--stdlib/source/library/lux/control/try.lux2
-rw-r--r--stdlib/source/library/lux/data/format/binary.lux2
-rw-r--r--stdlib/source/library/lux/data/text/format.lux2
-rw-r--r--stdlib/source/library/lux/macro.lux6
-rw-r--r--stdlib/source/library/lux/macro/syntax.lux2
-rw-r--r--stdlib/source/library/lux/meta/location.lux2
-rw-r--r--stdlib/source/library/lux/target/common_lisp.lux2
-rw-r--r--stdlib/source/library/lux/target/jvm/bytecode.lux4
-rw-r--r--stdlib/source/library/lux/target/jvm/encoding/unsigned.lux4
-rw-r--r--stdlib/source/library/lux/target/ruby.lux2
-rw-r--r--stdlib/source/library/lux/target/scheme.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux.lux2
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux6
-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/syntax.lux2
-rw-r--r--stdlib/source/library/lux/type.lux4
-rw-r--r--stdlib/source/library/lux/type/abstract.lux8
-rw-r--r--stdlib/source/specification/compositor/generation/case.lux6
-rw-r--r--stdlib/source/specification/compositor/generation/primitive.lux2
-rw-r--r--stdlib/source/specification/compositor/generation/reference.lux2
-rw-r--r--stdlib/source/specification/compositor/generation/structure.lux4
-rw-r--r--stdlib/source/test/lux.lux8
-rw-r--r--stdlib/source/test/lux/debug.lux2
-rw-r--r--stdlib/source/test/lux/macro.lux6
-rw-r--r--stdlib/source/test/lux/macro/template.lux4
-rw-r--r--stdlib/source/test/lux/meta/symbol.lux10
-rw-r--r--stdlib/source/test/lux/target/jvm.lux2
-rw-r--r--stdlib/source/test/lux/test.lux12
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/case.lux2
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/function.lux6
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/primitive.lux6
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/reference.lux2
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/structure.lux10
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux2
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/primitive.lux4
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/structure.lux2
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/syntax.lux2
-rw-r--r--stdlib/source/test/lux/type.lux2
-rw-r--r--stdlib/source/test/lux/type/check.lux2
46 files changed, 103 insertions, 103 deletions
diff --git a/stdlib/source/documentation/lux.lux b/stdlib/source/documentation/lux.lux
index 2fe05c99e..82029959f 100644
--- a/stdlib/source/documentation/lux.lux
+++ b/stdlib/source/documentation/lux.lux
@@ -433,7 +433,7 @@
(documentation: /.macro:
"Macro-definition macro."
- [(macro: .public (name_of tokens)
+ [(macro: .public (symbol tokens)
(case tokens
(^template [<tag>]
[(^ (list [_ {<tag> [module name]}]))
@@ -441,7 +441,7 @@
([#Identifier] [#Tag])
_
- (failure "Wrong syntax for name_of")))])
+ (failure "Wrong syntax for symbol")))])
(documentation: /.and
"Short-circuiting 'and'."
@@ -767,9 +767,9 @@
_
{#Left (format "Static part " (%t static) " does not match URI: " uri)})])
-(documentation: /.name_of
+(documentation: /.symbol
"Given an identifier or a tag, gives back a 2 tuple with the module and name parts, both as Text."
- [(name_of ..#doc)
+ [(symbol ..#doc)
"=>"
["documentation/lux" "#doc"]])
@@ -1005,7 +1005,7 @@
..with_expansions
..static
..^multi
- ..name_of
+ ..symbol
..:parameter
..same?
..^@
diff --git a/stdlib/source/documentation/lux/data/color/named.lux b/stdlib/source/documentation/lux/data/color/named.lux
index 57efb0cb1..06c7217e5 100644
--- a/stdlib/source/documentation/lux/data/color/named.lux
+++ b/stdlib/source/documentation/lux/data/color/named.lux
@@ -22,7 +22,7 @@
(template [<name>]
[(documentation: <name>
(let [[red green blue] (//.rgb <name>)
- [_ name] (name_of <name>)]
+ [_ name] (symbol <name>)]
(format "R:" (hex#encoded red)
" G:" (hex#encoded green)
" B:" (hex#encoded blue)
diff --git a/stdlib/source/documentation/lux/data/text/unicode/block.lux b/stdlib/source/documentation/lux/data/text/unicode/block.lux
index 320b2470f..da7dc36ed 100644
--- a/stdlib/source/documentation/lux/data/text/unicode/block.lux
+++ b/stdlib/source/documentation/lux/data/text/unicode/block.lux
@@ -26,7 +26,7 @@
(template [<name>]
[(documentation: <name>
- (let [[_ name] (name_of <name>)]
+ (let [[_ name] (symbol <name>)]
(format (hex#encoded (/.start <name>))
"-" (hex#encoded (/.end <name>))
" | " (text.replaced "_" " " name))))]
diff --git a/stdlib/source/library/lux.lux b/stdlib/source/library/lux.lux
index f3f3601d3..c488444dd 100644
--- a/stdlib/source/library/lux.lux
+++ b/stdlib/source/library/lux.lux
@@ -4575,13 +4575,13 @@
(|>> symbol#encoded
(text#composite "Wrong syntax for ")))
-(macro: .public (name_of tokens)
+(macro: .public (symbol tokens)
(case tokens
(^ (list [_ {#Identifier [module name]}]))
(in_meta (list (` [(~ (text$ module)) (~ (text$ name))])))
_
- (failure (..wrong_syntax_error [..prelude_module "name_of"]))))
+ (failure (..wrong_syntax_error [..prelude_module "symbol"]))))
(def: (scope_type_vars state)
(Meta (List Nat))
@@ -4605,7 +4605,7 @@
(failure (text#composite "Indexed-type does not exist: " (nat#encoded idx)))))
_
- (failure (..wrong_syntax_error (name_of ..$)))))
+ (failure (..wrong_syntax_error (symbol ..$)))))
(def: .public (same? reference sample)
(All (_ a)
@@ -4621,7 +4621,7 @@
branches)))
_
- (failure (..wrong_syntax_error (name_of ..^@)))))
+ (failure (..wrong_syntax_error (symbol ..^@)))))
(macro: .public (^|> tokens)
(case tokens
@@ -4633,7 +4633,7 @@
branches)))
_
- (failure (..wrong_syntax_error (name_of ..^|>)))))
+ (failure (..wrong_syntax_error (symbol ..^|>)))))
(macro: .public (:expected tokens)
(case tokens
@@ -4643,7 +4643,7 @@
(in (list (` ("lux type as" (~ (type_code type)) (~ expr))))))
_
- (failure (..wrong_syntax_error (name_of ..:expected)))))
+ (failure (..wrong_syntax_error (symbol ..:expected)))))
(def: location
(Meta Location)
@@ -4661,7 +4661,7 @@
(in (list (` (..panic! (~ (text$ message)))))))
_
- (failure (..wrong_syntax_error (name_of ..undefined)))))
+ (failure (..wrong_syntax_error (symbol ..undefined)))))
(macro: .public (:of tokens)
(case tokens
@@ -4677,7 +4677,7 @@
(..:of (~ g!temp)))))))
_
- (failure (..wrong_syntax_error (name_of ..:of)))))
+ (failure (..wrong_syntax_error (symbol ..:of)))))
(def: (tupleP tokens)
(-> (List Code) (Maybe [(List Code) (List Code)]))
@@ -4723,7 +4723,7 @@
{.#Left (~ (text$ (..wrong_syntax_error [this_module name])))}))))))
{#None}
- (failure (..wrong_syntax_error (name_of ..template:)))))
+ (failure (..wrong_syntax_error (symbol ..template:)))))
(macro: .public (as_is tokens compiler)
{#Right [compiler tokens]})
@@ -4737,7 +4737,7 @@
[compiler] {#Right})
_
- {#Left (..wrong_syntax_error (name_of ..char))}))
+ {#Left (..wrong_syntax_error (symbol ..char))}))
(def: target
(Meta Text)
@@ -4807,7 +4807,7 @@
(target_pick target options {#None})
{#None}
- (failure (..wrong_syntax_error (name_of ..for))))
+ (failure (..wrong_syntax_error (symbol ..for))))
(^ (list [_ {#Tuple options}] default))
(case (pairs' options)
@@ -4815,10 +4815,10 @@
(target_pick target options {#Some default})
{#None}
- (failure (..wrong_syntax_error (name_of ..for))))
+ (failure (..wrong_syntax_error (symbol ..for))))
_
- (failure (..wrong_syntax_error (name_of ..for))))))
+ (failure (..wrong_syntax_error (symbol ..for))))))
(def: (embedded_expansions code)
(-> Code (Meta [(List [Code Code]) Code]))
@@ -4853,7 +4853,7 @@
(~ labelled))))))
_
- (failure (..wrong_syntax_error (name_of ..``)))))
+ (failure (..wrong_syntax_error (symbol ..``)))))
(def: (name$ [module name])
(-> Symbol Code)
@@ -4932,7 +4932,7 @@
(in (list pattern)))
_
- (failure (..wrong_syntax_error (name_of ..^code)))))
+ (failure (..wrong_syntax_error (symbol ..^code)))))
(def: .public false
Bit
@@ -4955,7 +4955,7 @@
(..failure ":let requires an even number of parts"))
_
- (..failure (..wrong_syntax_error (name_of ..:let)))))
+ (..failure (..wrong_syntax_error (symbol ..:let)))))
(macro: .public (try tokens)
(case tokens
@@ -4967,7 +4967,7 @@
(~ expression)))))))
_
- (..failure (..wrong_syntax_error (name_of ..try)))))
+ (..failure (..wrong_syntax_error (symbol ..try)))))
(def: (methodP tokens)
(-> (List Code) (Maybe [(List Code) [Text Code]]))
diff --git a/stdlib/source/library/lux/abstract/comonad.lux b/stdlib/source/library/lux/abstract/comonad.lux
index 067e918bf..af96eb4e2 100644
--- a/stdlib/source/library/lux/abstract/comonad.lux
+++ b/stdlib/source/library/lux/abstract/comonad.lux
@@ -36,7 +36,7 @@
{.#None}))
{.#Some [?name comonad bindings body]}
(if (|> bindings list.size (n.% 2) (n.= 0))
- (let [[module short] (name_of ..be)
+ (let [[module short] (symbol ..be)
identifier (: (-> Text Code)
(|>> ($_ "lux text concat" module " " short " ") [""] {.#Identifier} [location.dummy]))
g!_ (identifier "_")
diff --git a/stdlib/source/library/lux/abstract/monad.lux b/stdlib/source/library/lux/abstract/monad.lux
index 62162ef72..db53c915d 100644
--- a/stdlib/source/library/lux/abstract/monad.lux
+++ b/stdlib/source/library/lux/abstract/monad.lux
@@ -67,7 +67,7 @@
{.#None}))
{.#Some [?name monad bindings body]}
(if (|> bindings list#size .int ("lux i64 %" +2) ("lux i64 =" +0))
- (let [[module short] (name_of ..do)
+ (let [[module short] (symbol ..do)
identifier (: (-> Text Code)
(|>> ($_ "lux text concat" module " " short " ") [""] {.#Identifier} [location.dummy]))
g!_ (identifier "_")
diff --git a/stdlib/source/library/lux/control/parser/binary.lux b/stdlib/source/library/lux/control/parser/binary.lux
index 2d52aaee3..63ee6d36e 100644
--- a/stdlib/source/library/lux/control/parser/binary.lux
+++ b/stdlib/source/library/lux/control/parser/binary.lux
@@ -1,6 +1,6 @@
(.module:
[library
- [lux {"-" and or nat int rev list type}
+ [lux {"-" and or nat int rev list type symbol}
[type {"+" :sharing}]
[abstract
[hash {"+" Hash}]
diff --git a/stdlib/source/library/lux/control/try.lux b/stdlib/source/library/lux/control/try.lux
index 9567a738e..fbe4b4e6a 100644
--- a/stdlib/source/library/lux/control/try.lux
+++ b/stdlib/source/library/lux/control/try.lux
@@ -129,7 +129,7 @@
{.#None}
{#Failure (`` (("lux in-module" (~~ (static .prelude_module)) .symbol#encoded)
- (name_of ..of_maybe)))}))
+ (symbol ..of_maybe)))}))
(macro: .public (else tokens compiler)
(case tokens
diff --git a/stdlib/source/library/lux/data/format/binary.lux b/stdlib/source/library/lux/data/format/binary.lux
index fa55d392e..ec07e1002 100644
--- a/stdlib/source/library/lux/data/format/binary.lux
+++ b/stdlib/source/library/lux/data/format/binary.lux
@@ -1,6 +1,6 @@
(.module:
[library
- [lux {"-" and or nat int rev list type}
+ [lux {"-" and or nat int rev list type symbol}
[abstract
[monoid {"+" Monoid}]
[monad {"+" Monad do}]
diff --git a/stdlib/source/library/lux/data/text/format.lux b/stdlib/source/library/lux/data/text/format.lux
index 8a5509a8f..ea27fee06 100644
--- a/stdlib/source/library/lux/data/text/format.lux
+++ b/stdlib/source/library/lux/data/text/format.lux
@@ -1,6 +1,6 @@
(.module:
[library
- [lux {"-" list nat int rev type}
+ [lux {"-" list nat int rev type symbol}
[abstract
[monad {"+" do}]
[functor
diff --git a/stdlib/source/library/lux/macro.lux b/stdlib/source/library/lux/macro.lux
index cb81d841b..3f1d04553 100644
--- a/stdlib/source/library/lux/macro.lux
+++ b/stdlib/source/library/lux/macro.lux
@@ -128,7 +128,7 @@
(~ body))))))
_
- (//.failure (..wrong_syntax_error (name_of ..with_identifiers)))))
+ (//.failure (..wrong_syntax_error (symbol ..with_identifiers)))))
(def: .public (one_expansion token)
(-> Code (Meta Code))
@@ -143,8 +143,8 @@
(template [<macro> <func>]
[(macro: .public (<macro> tokens)
- (let [[module _] (name_of .._)
- [_ short] (name_of <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/syntax.lux b/stdlib/source/library/lux/macro/syntax.lux
index 319ace41d..e1107fa4e 100644
--- a/stdlib/source/library/lux/macro/syntax.lux
+++ b/stdlib/source/library/lux/macro/syntax.lux
@@ -93,4 +93,4 @@
{try.#Failure ((~! text.interposed) (~! text.new_line) (list (~ error_msg) (~ g!error)))})))))))
{try.#Failure error}
- (meta.failure (macro.wrong_syntax_error (name_of ..syntax:)))))
+ (meta.failure (macro.wrong_syntax_error (symbol ..syntax:)))))
diff --git a/stdlib/source/library/lux/meta/location.lux b/stdlib/source/library/lux/meta/location.lux
index 6cc10a3c2..93711e772 100644
--- a/stdlib/source/library/lux/meta/location.lux
+++ b/stdlib/source/library/lux/meta/location.lux
@@ -29,7 +29,7 @@
(~ [..dummy {.#Nat (value@ .#column location)}])])))]})
_
- {.#Left (`` (("lux in-module" (~~ (static .prelude_module)) wrong_syntax_error) (name_of ..here)))}))
+ {.#Left (`` (("lux in-module" (~~ (static .prelude_module)) wrong_syntax_error) (symbol ..here)))}))
(def: .public (format it)
(-> Location Text)
diff --git a/stdlib/source/library/lux/target/common_lisp.lux b/stdlib/source/library/lux/target/common_lisp.lux
index 21258a8bf..04e8c791f 100644
--- a/stdlib/source/library/lux/target/common_lisp.lux
+++ b/stdlib/source/library/lux/target/common_lisp.lux
@@ -1,6 +1,6 @@
(.module:
[library
- [lux {"-" Code int if cond or and comment let}
+ [lux {"-" Code int if cond or and comment let symbol}
[control
[pipe {"+" case> cond> new>}]]
[data
diff --git a/stdlib/source/library/lux/target/jvm/bytecode.lux b/stdlib/source/library/lux/target/jvm/bytecode.lux
index b269b69b7..c7fee0eed 100644
--- a/stdlib/source/library/lux/target/jvm/bytecode.lux
+++ b/stdlib/source/library/lux/target/jvm/bytecode.lux
@@ -754,7 +754,7 @@
[(function (_ resolver)
(do try.monad
[[expected @to] (..resolve_label label resolver)
- _ (exception.assertion ..mismatched_environments [(name_of <instruction>) label @here expected actual]
+ _ (exception.assertion ..mismatched_environments [(symbol <instruction>) label @here expected actual]
(# /stack.equivalence = expected actual))
jump (..jump @from @to)]
(case jump
@@ -805,7 +805,7 @@
(case (dictionary.value label resolver)
{.#Some [expected {.#Some @to}]}
(do try.monad
- [_ (exception.assertion ..mismatched_environments [(name_of <instruction>) label @here expected actual]
+ [_ (exception.assertion ..mismatched_environments [(symbol <instruction>) label @here expected actual]
(# /stack.equivalence = expected actual))
jump (..jump @from @to)]
(case jump
diff --git a/stdlib/source/library/lux/target/jvm/encoding/unsigned.lux b/stdlib/source/library/lux/target/jvm/encoding/unsigned.lux
index bff5a4439..9549340c3 100644
--- a/stdlib/source/library/lux/target/jvm/encoding/unsigned.lux
+++ b/stdlib/source/library/lux/target/jvm/encoding/unsigned.lux
@@ -73,7 +73,7 @@
(def: .public (<constructor> value)
(-> Nat (Try <name>))
(if (n.> (:representation <maximum>) value)
- (exception.except ..value_exceeds_the_maximum [(name_of <name>) value <maximum>])
+ (exception.except ..value_exceeds_the_maximum [(symbol <name>) value <maximum>])
{try.#Success (:abstraction value)}))
(def: .public (<+> parameter subject)
@@ -87,7 +87,7 @@
(let [parameter' (:representation parameter)
subject' (:representation subject)]
(if (n.> subject' parameter')
- (exception.except ..subtraction_cannot_yield_negative_value [(name_of <name>) parameter subject])
+ (exception.except ..subtraction_cannot_yield_negative_value [(symbol <name>) parameter subject])
{try.#Success (:abstraction (n.- parameter' subject'))})))
(def: .public (<max> left right)
diff --git a/stdlib/source/library/lux/target/ruby.lux b/stdlib/source/library/lux/target/ruby.lux
index cd633c813..1824a139f 100644
--- a/stdlib/source/library/lux/target/ruby.lux
+++ b/stdlib/source/library/lux/target/ruby.lux
@@ -1,6 +1,6 @@
(.module:
[library
- [lux {"-" Location Code static int if cond function or and not comment local global}
+ [lux {"-" Location Code static int if cond function or and not comment local global symbol}
["@" target]
[abstract
[equivalence {"+" Equivalence}]
diff --git a/stdlib/source/library/lux/target/scheme.lux b/stdlib/source/library/lux/target/scheme.lux
index 1bf857bf8..3f3688b76 100644
--- a/stdlib/source/library/lux/target/scheme.lux
+++ b/stdlib/source/library/lux/target/scheme.lux
@@ -1,6 +1,6 @@
(.module:
[library
- [lux {"-" Code int or and if cond let}
+ [lux {"-" Code int or and if cond let symbol}
["@" target]
[abstract
[equivalence {"+" Equivalence}]
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux.lux b/stdlib/source/library/lux/tool/compiler/language/lux.lux
index 06da2b69c..447ccee15 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux.lux
@@ -86,6 +86,6 @@
(def: .public key
(Key .Module)
- (key.key [signature.#name (name_of ..compiler)
+ (key.key [signature.#name (symbol ..compiler)
signature.#version /version.version]
(module.empty 0)))
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux
index 88bef0ffd..7f090639f 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux
@@ -210,9 +210,9 @@
(function (_ extension_name phase archive valueC)
(do [! ////.monad]
[_ (typeA.infer .Macro)
- input_type (loop [input_name (name_of .Macro')]
+ input_type (loop [input_name (symbol .Macro')]
(do !
- [input_type (///.lifted (meta.definition (name_of .Macro')))]
+ [input_type (///.lifted (meta.definition (symbol .Macro')))]
(case input_type
(^or {.#Definition [exported? def_type def_value]}
{.#Type [exported? def_value labels]})
@@ -220,7 +220,7 @@
(^or {.#Tag _}
{.#Slot _})
- (////.failure (exception.error ..not_a_type [(name_of .Macro')]))
+ (////.failure (exception.error ..not_a_type [(symbol .Macro')]))
{.#Alias real_name}
(recur real_name))))]
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 7e6bd24ff..70cb4a42a 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
@@ -1,6 +1,6 @@
(.module:
[library
- [lux {"-" Scope}
+ [lux {"-" Scope symbol}
[abstract
["[0]" monad {"+" do}]]
[data
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 d64167384..6da850247 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/syntax.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/syntax.lux
@@ -172,7 +172,7 @@
(template: (!failure parser where offset source_code)
[{.#Left [[where offset source_code]
- (exception.error ..unrecognized_input [where (%.symbol (name_of parser)) source_code offset])]}])
+ (exception.error ..unrecognized_input [where (%.symbol (symbol parser)) source_code offset])]}])
(template: (!end_of_file where offset source_code current_module)
[{.#Left [[where offset source_code]
diff --git a/stdlib/source/library/lux/type.lux b/stdlib/source/library/lux/type.lux
index 98a966e31..c0737d326 100644
--- a/stdlib/source/library/lux/type.lux
+++ b/stdlib/source/library/lux/type.lux
@@ -385,7 +385,7 @@
(in (list g!_secret_marker_))))
(def: secret_marker
- (`` (name_of (~~ (new_secret_marker)))))
+ (`` (symbol (~~ (new_secret_marker)))))
(syntax: .public (:log! [input (<>.or (<>.and <code>.identifier
(<>.maybe (<>.after (<code>.identifier! ..secret_marker) <code>.any)))
@@ -397,7 +397,7 @@
valueT (meta.type valueN)
.let [_ ("lux io log"
($_ text#composite
- (symbol#encoded (name_of ..:log!)) " " (location.format location) text.new_line
+ (symbol#encoded (symbol ..:log!)) " " (location.format location) text.new_line
"Expression: " (case valueC
{.#Some valueC}
(code.format valueC)
diff --git a/stdlib/source/library/lux/type/abstract.lux b/stdlib/source/library/lux/type/abstract.lux
index 915c035c3..9de534c9b 100644
--- a/stdlib/source/library/lux/type/abstract.lux
+++ b/stdlib/source/library/lux/type/abstract.lux
@@ -80,7 +80,7 @@
(def: (peek! frame)
(-> (Maybe Text) (Meta Frame))
(function (_ compiler)
- (let [[reference definition_reference] (name_of ..frames)
+ (let [[reference definition_reference] (symbol ..frames)
current_frames (peek_frames reference definition_reference (value@ .#modules compiler))]
(case (case frame
{.#Some frame}
@@ -141,7 +141,7 @@
(-> Frame (Meta Any))
(function (_ compiler)
{.#Right [(revised@ .#modules
- (..push_frame (name_of ..frames) frame)
+ (..push_frame (symbol ..frames) frame)
compiler)
[]]}))
@@ -174,7 +174,7 @@
(syntax: (pop! [])
(function (_ compiler)
{.#Right [(revised@ .#modules
- (..pop_frame (name_of ..frames))
+ (..pop_frame (symbol ..frames))
compiler)
(list)]}))
@@ -201,7 +201,7 @@
(def: representation_definition_name
(-> Text Text)
(|>> ($_ text#composite
- (symbol#encoded (name_of ..#Representation))
+ (symbol#encoded (symbol ..#Representation))
" ")))
(def: declaration
diff --git a/stdlib/source/specification/compositor/generation/case.lux b/stdlib/source/specification/compositor/generation/case.lux
index f88f76890..ec9a36675 100644
--- a/stdlib/source/specification/compositor/generation/case.lux
+++ b/stdlib/source/specification/compositor/generation/case.lux
@@ -100,7 +100,7 @@
(-> Runner Test)
(do r.monad
[value r.safe_frac]
- (_.test (%.symbol (name_of synthesis.branch/let))
+ (_.test (%.symbol (symbol synthesis.branch/let))
(|> (synthesis.branch/let [(synthesis.f64 value)
0
(synthesis.variable/local 0)])
@@ -113,7 +113,7 @@
[on_true r.safe_frac
on_false (|> r.safe_frac (r.only (|>> (f.= on_true) not)))
verdict r.bit]
- (_.test (%.symbol (name_of synthesis.branch/if))
+ (_.test (%.symbol (symbol synthesis.branch/if))
(|> (synthesis.branch/if [(synthesis.bit verdict)
(synthesis.f64 on_true)
(synthesis.f64 on_false)])
@@ -126,7 +126,7 @@
[[inputS pathS] ..case
on_success r.safe_frac
on_failure (|> r.safe_frac (r.only (|>> (f.= on_success) not)))]
- (_.test (%.symbol (name_of synthesis.branch/case))
+ (_.test (%.symbol (symbol synthesis.branch/case))
(|> (synthesis.branch/case
[inputS
($_ synthesis.path/alt
diff --git a/stdlib/source/specification/compositor/generation/primitive.lux b/stdlib/source/specification/compositor/generation/primitive.lux
index cd7aef408..7821f793b 100644
--- a/stdlib/source/specification/compositor/generation/primitive.lux
+++ b/stdlib/source/specification/compositor/generation/primitive.lux
@@ -32,7 +32,7 @@
(~~ (template [<evaluation_name> <synthesis> <gen> <test>]
[(do r.monad
[expected <gen>]
- (_.test (%.symbol (name_of <synthesis>))
+ (_.test (%.symbol (symbol <synthesis>))
(|> (run <evaluation_name> (<synthesis> expected))
(case> {try.#Success actual}
(<test> expected (:expected actual))
diff --git a/stdlib/source/specification/compositor/generation/reference.lux b/stdlib/source/specification/compositor/generation/reference.lux
index 697638508..2438074a4 100644
--- a/stdlib/source/specification/compositor/generation/reference.lux
+++ b/stdlib/source/specification/compositor/generation/reference.lux
@@ -1,5 +1,5 @@
(.module:
- [lux "*"
+ [lux {"-" symbol}
["_" test {"+" Test}]
[abstract
[monad {"+" do}]]
diff --git a/stdlib/source/specification/compositor/generation/structure.lux b/stdlib/source/specification/compositor/generation/structure.lux
index cd9b9b812..256b52b78 100644
--- a/stdlib/source/specification/compositor/generation/structure.lux
+++ b/stdlib/source/specification/compositor/generation/structure.lux
@@ -35,7 +35,7 @@
tag_in (|> r.nat (# ! each (n.% num_tags)))
.let [last?_in (|> num_tags -- (n.= tag_in))]
value_in r.i64]
- (_.test (%.symbol (name_of synthesis.variant))
+ (_.test (%.symbol (symbol synthesis.variant))
(|> (synthesis.variant [analysis.#lefts (if last?_in
(-- tag_in)
tag_in)
@@ -68,7 +68,7 @@
(do [! r.monad]
[size (|> r.nat (# ! each (|>> (n.% 10) (n.max 2))))
tuple_in (r.list size r.i64)]
- (_.test (%.symbol (name_of synthesis.tuple))
+ (_.test (%.symbol (symbol synthesis.tuple))
(|> (synthesis.tuple (list#each (|>> synthesis.i64) tuple_in))
(run "tuple")
(case> {try.#Success tuple_out}
diff --git a/stdlib/source/test/lux.lux b/stdlib/source/test/lux.lux
index e33bdf2f0..da7c16c26 100644
--- a/stdlib/source/test/lux.lux
+++ b/stdlib/source/test/lux.lux
@@ -266,11 +266,11 @@
(def: for_module
Test
($_ _.and
- (let [[module short] (/.name_of .example)]
- (_.cover [/.name_of /.prelude_module]
+ (let [[module short] (/.symbol .example)]
+ (_.cover [/.symbol /.prelude_module]
(and (text#= /.prelude_module module)
(text#= short "example"))))
- (let [[module short] (/.name_of ..example)]
+ (let [[module short] (/.symbol ..example)]
(_.cover [/.module_separator]
(and (text.contains? /.module_separator module)
(not (text.contains? /.module_separator short)))))
@@ -302,7 +302,7 @@
(def: current_module
Text
- (let [[module _] (name_of .._)]
+ (let [[module _] (symbol .._)]
module))
(def: for_code/'
diff --git a/stdlib/source/test/lux/debug.lux b/stdlib/source/test/lux/debug.lux
index 3ad2747e8..3cc3e18f5 100644
--- a/stdlib/source/test/lux/debug.lux
+++ b/stdlib/source/test/lux/debug.lux
@@ -262,7 +262,7 @@
true))
(_.cover [/.log!]
(exec
- (/.log! (format (%.symbol (name_of /.log!))
+ (/.log! (format (%.symbol (symbol /.log!))
" works: " (%.text message)))
true))
))))
diff --git a/stdlib/source/test/lux/macro.lux b/stdlib/source/test/lux/macro.lux
index 0b8fdced8..8553e6e16 100644
--- a/stdlib/source/test/lux/macro.lux
+++ b/stdlib/source/test/lux/macro.lux
@@ -61,8 +61,8 @@
(do [! random.monad]
[seed random.nat
identifier_prefix (random.ascii/upper 1)
- .let [macro_module (symbol.module (name_of /._))
- current_module (symbol.module (name_of .._))]]
+ .let [macro_module (symbol.module (symbol /._))
+ current_module (symbol.module (symbol .._))]]
(in [seed
identifier_prefix
[.#info [.#target ""
@@ -161,7 +161,7 @@
(|> (/.single_expansion (` (/.log_single_expansion!)))
(meta.result lux)
(!expect (^multi {try.#Failure error}
- (text.contains? (/.wrong_syntax_error (name_of /.log_single_expansion!))
+ (text.contains? (/.wrong_syntax_error (symbol /.log_single_expansion!))
error)))))
(_.cover [/.with_identifiers]
(with_expansions [<expected> (fresh_identifier)]
diff --git a/stdlib/source/test/lux/macro/template.lux b/stdlib/source/test/lux/macro/template.lux
index f65cdaa27..c2001cb23 100644
--- a/stdlib/source/test/lux/macro/template.lux
+++ b/stdlib/source/test/lux/macro/template.lux
@@ -62,10 +62,10 @@
<short>' true
_ false))
(_.cover [/.identifier]
- (and (case (`` (name_of (~~ (/.identifier <short>))))
+ (and (case (`` (symbol (~~ (/.identifier <short>))))
["" <short>'] true
_ false)
- (case (`` (name_of (~~ (/.identifier <module> <short>))))
+ (case (`` (symbol (~~ (/.identifier <module> <short>))))
[<module>' <short>'] true
_ false)
))
diff --git a/stdlib/source/test/lux/meta/symbol.lux b/stdlib/source/test/lux/meta/symbol.lux
index 85598a159..84f87e9fa 100644
--- a/stdlib/source/test/lux/meta/symbol.lux
+++ b/stdlib/source/test/lux/meta/symbol.lux
@@ -58,12 +58,12 @@
(_.cover [/.module /.short]
(and (same? module1 (/.module symbol1))
(same? short1 (/.short symbol1))))
- (_.for [.name_of]
+ (_.for [.symbol]
(let [(^open "/#[0]") /.equivalence]
($_ _.and
(_.test "Can obtain Symbol from identifier."
- (and (/#= [.prelude_module "yolo"] (.name_of .yolo))
- (/#= ["test/lux/meta/symbol" "yolo"] (.name_of ..yolo))
- (/#= ["" "yolo"] (.name_of yolo))
- (/#= ["library/lux/test" "yolo"] (.name_of library/lux/test.yolo)))))))
+ (and (/#= [.prelude_module "yolo"] (.symbol .yolo))
+ (/#= ["test/lux/meta/symbol" "yolo"] (.symbol ..yolo))
+ (/#= ["" "yolo"] (.symbol yolo))
+ (/#= ["library/lux/test" "yolo"] (.symbol library/lux/test.yolo)))))))
)))))
diff --git a/stdlib/source/test/lux/target/jvm.lux b/stdlib/source/test/lux/target/jvm.lux
index 7aaefe214..2508ae7fc 100644
--- a/stdlib/source/test/lux/target/jvm.lux
+++ b/stdlib/source/test/lux/target/jvm.lux
@@ -1722,7 +1722,7 @@
(def: .public test
Test
- (<| (_.context (%.symbol (name_of .._)))
+ (<| (_.context (%.symbol (symbol .._)))
($_ _.and
(<| (_.context "instruction")
..instruction)
diff --git a/stdlib/source/test/lux/test.lux b/stdlib/source/test/lux/test.lux
index fad4845ac..c67db2d55 100644
--- a/stdlib/source/test/lux/test.lux
+++ b/stdlib/source/test/lux/test.lux
@@ -188,9 +188,9 @@
[covering _] covering]
(/.cover' [/.cover]
(and (and (not (set.empty? (value@ /.#expected_coverage not_covering)))
- (not (set.member? (value@ /.#actual_coverage not_covering) (name_of ..dummy_target))))
+ (not (set.member? (value@ /.#actual_coverage not_covering) (symbol ..dummy_target))))
(and (not (set.empty? (value@ /.#expected_coverage covering)))
- (set.member? (value@ /.#actual_coverage covering) (name_of ..dummy_target))))))))
+ (set.member? (value@ /.#actual_coverage covering) (symbol ..dummy_target))))))))
(do random.monad
[not_covering (/.covering .._ (/.test "" true))
covering (/.covering .._ (in (/.cover' [..dummy_target] true)))]
@@ -199,9 +199,9 @@
[covering _] covering]
(/.cover' [/.cover']
(and (and (not (set.empty? (value@ /.#expected_coverage not_covering)))
- (not (set.member? (value@ /.#actual_coverage not_covering) (name_of ..dummy_target))))
+ (not (set.member? (value@ /.#actual_coverage not_covering) (symbol ..dummy_target))))
(and (not (set.empty? (value@ /.#expected_coverage covering)))
- (set.member? (value@ /.#actual_coverage covering) (name_of ..dummy_target))))))))
+ (set.member? (value@ /.#actual_coverage covering) (symbol ..dummy_target))))))))
(do random.monad
[not_covering (/.covering .._ (/.test "" true))
covering (/.covering .._ (/.for [..dummy_target] (/.test "" true)))]
@@ -210,9 +210,9 @@
[covering _] covering]
(/.cover' [/.for]
(and (and (not (set.empty? (value@ /.#expected_coverage not_covering)))
- (not (set.member? (value@ /.#actual_coverage not_covering) (name_of ..dummy_target))))
+ (not (set.member? (value@ /.#actual_coverage not_covering) (symbol ..dummy_target))))
(and (not (set.empty? (value@ /.#expected_coverage covering)))
- (set.member? (value@ /.#actual_coverage covering) (name_of ..dummy_target))))))))
+ (set.member? (value@ /.#actual_coverage covering) (symbol ..dummy_target))))))))
))
(def: .public test
diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/case.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/case.lux
index b75932d8d..8cf740847 100644
--- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/case.lux
+++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/case.lux
@@ -140,7 +140,7 @@
[pattern body])
(def: .public test
- (<| (_.context (symbol.module (name_of /._)))
+ (<| (_.context (symbol.module (symbol /._)))
(do [! r.monad]
[module_name (r.unicode 5)
variant_name (r.unicode 5)
diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/function.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/function.lux
index 66f8a82ab..8ab7706c7 100644
--- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/function.lux
+++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/function.lux
@@ -58,7 +58,7 @@
[outputT outputC] _primitive.primitive
[inputT _] _primitive.primitive
.let [g!arg (code.local_identifier arg_name)]]
- (<| (_.context (%.symbol (name_of /.function)))
+ (<| (_.context (%.symbol (symbol /.function)))
($_ _.and
(_.test "Can analyse function."
(and (|> (//type.with_type (All (_ a) (-> a outputT))
@@ -105,7 +105,7 @@
(type.function {.#Item varT partial_poly_inputsT})
varT)
dummy_function {////analysis.#Function (list) {////analysis.#Reference (////reference.local 1)}}]]
- (<| (_.context (%.symbol (name_of /.apply)))
+ (<| (_.context (%.symbol (symbol /.apply)))
($_ _.and
(_.test "Can analyse monomorphic type application."
(|> (/.apply _primitive.phase inputsC funcT dummy_function archive.empty (' []))
@@ -126,7 +126,7 @@
(def: .public test
Test
- (<| (_.context (symbol.module (name_of /._)))
+ (<| (_.context (symbol.module (symbol /._)))
($_ _.and
..abstraction
..apply
diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/primitive.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/primitive.lux
index 8ce35da36..b0bb9903e 100644
--- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/primitive.lux
+++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/primitive.lux
@@ -86,9 +86,9 @@
{try.#Failure error})))
(def: .public test
- (<| (_.context (symbol.module (name_of /._)))
+ (<| (_.context (symbol.module (symbol /._)))
(`` ($_ _.and
- (_.test (%.symbol (name_of ////analysis.#Unit))
+ (_.test (%.symbol (symbol ////analysis.#Unit))
(|> (infer Any (..phase archive.empty (' [])))
(case> (^ {try.#Success {////analysis.#Primitive {////analysis.#Unit output}}})
(same? [] output)
@@ -98,7 +98,7 @@
(~~ (template [<type> <tag> <random> <constructor>]
[(do r.monad
[sample <random>]
- (_.test (%.symbol (name_of <tag>))
+ (_.test (%.symbol (symbol <tag>))
(|> (infer <type> (..phase archive.empty (<constructor> sample)))
(case> {try.#Success {////analysis.#Primitive {<tag> output}}}
(same? sample output)
diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/reference.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/reference.lux
index a1683c75d..b8da226ad 100644
--- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/reference.lux
+++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/reference.lux
@@ -64,7 +64,7 @@
check!))
(def: .public test
- (<| (_.context (symbol.module (name_of /._)))
+ (<| (_.context (symbol.module (symbol /._)))
(do r.monad
[[expectedT _] _primitive.primitive
def_module (r.unicode 5)
diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/structure.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/structure.lux
index 062ec96dc..d10dc39d4 100644
--- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/structure.lux
+++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/structure.lux
@@ -133,7 +133,7 @@
(list.after choice primitives)))
[+valueT +valueC] (maybe.trusted (list.item +choice +primitives))
+variantT (type.variant (list#each product.left +primitives))]]
- (<| (_.context (%.symbol (name_of /.sum)))
+ (<| (_.context (%.symbol (symbol /.sum)))
($_ _.and
(_.test "Can analyse."
(check_sum variantT choice size
@@ -182,7 +182,7 @@
(list [{.#Parameter 1} +valueC])
(list.after choice primitives)))
+tupleT (type.tuple (list#each product.left +primitives))]]
- (<| (_.context (%.symbol (name_of /.product)))
+ (<| (_.context (%.symbol (symbol /.product)))
($_ _.and
(_.test "Can analyse."
(|> (//type.with_type tupleT
@@ -251,7 +251,7 @@
(type.univ_q 1))
choice_tag (maybe.trusted (list.item choice tags))
other_choice_tag (maybe.trusted (list.item other_choice tags))]]
- (<| (_.context (%.symbol (name_of /.tagged_sum)))
+ (<| (_.context (%.symbol (symbol /.tagged_sum)))
($_ _.and
(_.test "Can infer."
(|> (/.tagged_sum _primitive.phase [module_name choice_tag] archive.empty choiceC)
@@ -295,14 +295,14 @@
(list.after (++ choice) primitivesT))))
(type.univ_q 1)
{.#Named [module_name type_name]})]]
- (<| (_.context (%.symbol (name_of /.record)))
+ (<| (_.context (%.symbol (symbol /.record)))
(_.test "Can infer."
(|> (/.record archive.empty _primitive.phase recordC)
(check_record module_name tags monoT monoT size))))))
(def: .public test
Test
- (<| (_.context (symbol.module (name_of /._)))
+ (<| (_.context (symbol.module (symbol /._)))
($_ _.and
..sum
..product
diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux
index 17ce8036e..41d8cb44b 100644
--- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux
+++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux
@@ -194,7 +194,7 @@
(def: .public test
Test
- (<| (_.context (symbol.module (name_of /._)))
+ (<| (_.context (symbol.module (symbol /._)))
($_ _.and
..lux
..i64
diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/primitive.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/primitive.lux
index 136635e38..ac1973b9f 100644
--- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/primitive.lux
+++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/primitive.lux
@@ -73,12 +73,12 @@
(def: .public test
Test
- (<| (_.context (%.symbol (name_of ////synthesis.#Primitive)))
+ (<| (_.context (%.symbol (symbol ////synthesis.#Primitive)))
(`` ($_ _.and
(~~ (template [<analysis> <synthesis> <generator>]
[(do r.monad
[expected <generator>]
- (_.test (%.symbol (name_of <synthesis>))
+ (_.test (%.symbol (symbol <synthesis>))
(|> {////analysis.#Primitive {<analysis> expected}}
(//.phase archive.empty)
(phase.result [///bundle.empty ////synthesis.init])
diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/structure.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/structure.lux
index f08463d54..29adddd53 100644
--- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/structure.lux
+++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/structure.lux
@@ -76,7 +76,7 @@
(def: .public test
Test
- (<| (_.context (%.symbol (name_of ////synthesis.#Structure)))
+ (<| (_.context (%.symbol (symbol ////synthesis.#Structure)))
($_ _.and
..variant
..tuple
diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/syntax.lux b/stdlib/source/test/lux/tool/compiler/language/lux/syntax.lux
index 306ab931b..639132d1b 100644
--- a/stdlib/source/test/lux/tool/compiler/language/lux/syntax.lux
+++ b/stdlib/source/test/lux/tool/compiler/language/lux/syntax.lux
@@ -139,7 +139,7 @@
(def: .public test
Test
- (<| (_.context (symbol.module (name_of /._)))
+ (<| (_.context (symbol.module (symbol /._)))
($_ _.and
..code
..comments
diff --git a/stdlib/source/test/lux/type.lux b/stdlib/source/test/lux/type.lux
index 774e95513..4033af819 100644
--- a/stdlib/source/test/lux/type.lux
+++ b/stdlib/source/test/lux/type.lux
@@ -1,6 +1,6 @@
(.module:
[library
- [lux "*"
+ [lux {"-" symbol}
["_" test {"+" Test}]
[abstract
["[0]" monad {"+" do}]
diff --git a/stdlib/source/test/lux/type/check.lux b/stdlib/source/test/lux/type/check.lux
index c4d14054e..cd4fc5426 100644
--- a/stdlib/source/test/lux/type/check.lux
+++ b/stdlib/source/test/lux/type/check.lux
@@ -1,6 +1,6 @@
(.module:
[library
- [lux {"-" type}
+ [lux {"-" type symbol}
["_" test {"+" Test}]
["[0]" type ("[1]#[0]" equivalence)]
[abstract