Skip to content

Commit

Permalink
Re-named Symbol to Name. Re-named short to proper.
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardoejp committed Feb 13, 2024
1 parent 3e13f0b commit e0056b1
Show file tree
Hide file tree
Showing 286 changed files with 2,513 additions and 2,465 deletions.
2 changes: 1 addition & 1 deletion lux-c++/source/program.lux
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
<type>)
(let [on (as (-> Any
<type>)
(getattr [@ (template.symbol [/runtime._] [<short>])]))]
(getattr [@ (template.name [/runtime._] [<short>])]))]
(on it)))]

[object_tag Natural]
Expand Down
2 changes: 1 addition & 1 deletion lux-php/source/program.lux
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@
[(ffi.interface <name>
(getValue [] java/lang/Object))

(`` (ffi.import (,, (template.symbol ["program/" <name>]))
(`` (ffi.import (,, (template.name ["program/" <name>]))
"[1]::[0]"
(getValue [] java/lang/Object)))]

Expand Down
14 changes: 7 additions & 7 deletions stdlib/source/documentation/lux.lux
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
($.definition /.Text
"Your standard, run-of-the-mill string values.")

($.definition /.Symbol
($.definition /.Name
(%.message "A name for a Lux definition."
\n "It includes the module of provenance."))

Expand Down Expand Up @@ -335,7 +335,7 @@
{#Universal (List @) @}
{#Existential (List @) @}
{#Reification @ @}
{#Named Symbol @}))))))
{#Named Name @}))))))

($.definition /.exec
"Sequential execution of expressions (great for side-effects)."
Expand Down Expand Up @@ -431,14 +431,14 @@

($.definition /.macro
"Macro-definition macro."
($.example (' (the .public symbol
($.example (' (the .public name
(macro (_ tokens)
(when tokens
(^template.with [<tag>]
[(list [_ {<tag> [module name]}])
(in (list (` [(, (as_text module))
(, (as_text name))])))])
([#Symbol])
([#Name])

_
(failure .wrong_syntax)))))))
Expand Down Expand Up @@ -708,7 +708,7 @@
[integer +123 "+123"]
[decimal +123.0 "+123.0"]
[text "123" "'123'"]
[symbol ["yolo" "lol"] "yolo.lol"]
[name ["yolo" "lol"] "yolo.lol"]
[form (list (bit #1)) "(#1)"]
[tuple (list (bit #1)) "[#1]"]
)]
Expand Down Expand Up @@ -760,9 +760,9 @@
... _
... {#Left (%.message "Static part " (%t static) " does not match URI: " uri)}))))

($.definition /.symbol
($.definition /.name
"Gives back a 2 tuple with the module and name parts, both as Text."
($.example (' (symbol ..#doc)))
($.example (' (name ..#doc)))
($.comment "=>")
($.example (' ["documentation/lux" "#doc"])))

Expand Down
4 changes: 2 additions & 2 deletions stdlib/source/documentation/lux/control/concatenative.lux
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
(`` (the arithmetic
(.List $.Documentation)
(list (,, (template.with [<input> <word> <func>]
[(`` ($.definition (,, (template.symbol [/._] [<word>]))
[(`` ($.definition (,, (template.name [/._] [<word>]))
(,, (template.text [<func> " for " <input> " arithmetic."]))))]

[Natural n/+ n.+]
Expand Down Expand Up @@ -100,7 +100,7 @@
((apply 1) ++)))))

(,, (template.with [<arity>]
[(expansion.let [<name> (template.symbol [/._] ["apply_" <arity>])
[(expansion.let [<name> (template.name [/._] ["apply_" <arity>])
<doc> (template.text ["Lift a function of arity " <arity>
" into a concatenative function of arity " <arity> "."])]
($.definition <name>
Expand Down
2 changes: 1 addition & 1 deletion stdlib/source/documentation/lux/data.lux
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
["[1][0]" text]])

... (the palette_documentation
... (syntax.macro (_ [[_ name] <code>.symbol])
... (syntax.macro (_ [[_ name] <code>.name])
... (in (list (code.text (%.message "A " (text.replaced "_" "-" name) " palette."))))))

... (`` (the .public documentation
Expand Down
4 changes: 2 additions & 2 deletions stdlib/source/documentation/lux/data/binary.lux
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
($.definition \\projection.text)
($.definition \\projection.maybe)
($.definition \\projection.set_elements_are_not_unique)
($.definition \\projection.symbol)
($.definition \\projection.name)
($.definition \\projection.type)
($.definition \\projection.location)
($.definition \\projection.code)
Expand Down Expand Up @@ -149,7 +149,7 @@
($.definition \\injection.maybe)
($.definition \\injection.list)
($.definition \\injection.set)
($.definition \\injection.symbol)
($.definition \\injection.name)
($.definition \\injection.type)
($.definition \\injection.location)
($.definition \\injection.code)
Expand Down
2 changes: 1 addition & 1 deletion stdlib/source/documentation/lux/data/color/named.lux
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
(template.macro (_ <name>)
[($.definition <name>
(let [[red green blue] <name>
[_ name] (symbol <name>)]
[_ name] (name <name>)]
(%.message "R:" (hex#injection red)
" G:" (hex#injection green)
" B:" (hex#injection blue)
Expand Down
2 changes: 1 addition & 1 deletion stdlib/source/documentation/lux/data/text.lux
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
($.definition \\injection.text)

($.definition \\injection.ratio)
($.definition \\injection.symbol)
($.definition \\injection.name)
($.definition \\injection.location)
($.definition \\injection.code)
($.definition \\injection.type)
Expand Down
2 changes: 1 addition & 1 deletion stdlib/source/documentation/lux/documentation.lux
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<documentation> (/.definition /.definition
""
(/.example (' <documentation>)))
<all> (these (/.definition /.unqualified_symbol)
<all> (these (/.definition /.unqualified_name)
(/.definition /.Definition)
(/.definition /.Module)
(/.definition /.definition)
Expand Down
4 changes: 2 additions & 2 deletions stdlib/source/documentation/lux/meta.lux
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
["[0]" /
["[1][0]" code]
["[1][0]" location]
["[1][0]" symbol]
["[1][0]" name]
["[1][0]" type]
["[1][0]" macro]
["[1][0]" static]
Expand Down Expand Up @@ -197,7 +197,7 @@

/code.documentation
/location.documentation
/symbol.documentation
/name.documentation
/type.documentation
/macro.documentation
/static.documentation
Expand Down
8 changes: 4 additions & 4 deletions stdlib/source/documentation/lux/meta/code.lux
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
[\\projection.revolution \\projection.this_revolution]
[\\projection.decimal \\projection.this_decimal]
[\\projection.text \\projection.this_text]
[\\projection.symbol \\projection.this_symbol]
[\\projection.name \\projection.this_name]
))

($.definition \\projection.this
Expand All @@ -53,7 +53,7 @@
($.definition <check>
(%.message "Checks for a specific local " <desc> " (a " <desc> " that has no module prefix)."))]

[\\projection.local \\projection.this_local "local symbol"]
[\\projection.local \\projection.this_local "local name"]
))

(,, (template.with [<name>]
Expand Down Expand Up @@ -98,7 +98,7 @@
($.definition /.revolution)
($.definition /.decimal)
($.definition /.text)
($.definition /.symbol)
($.definition /.name)
($.definition /.form)
($.definition /.variant)
($.definition /.tuple)
Expand All @@ -107,7 +107,7 @@
($.definition /.injection)

($.definition /.local
"Produces a local symbol (an symbol with no module prefix).")
"Produces a local name (a name with no module prefix).")

($.definition /.replaced
""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
($.definition /.get_registry)
($.definition /.set_registry)
($.definition /.next)
($.definition /.symbol)
($.definition /.name)
($.definition /.enter_module)
($.definition /.module)
($.definition /.evaluate!)
Expand Down
20 changes: 10 additions & 10 deletions stdlib/source/documentation/lux/meta/macro.lux
Original file line number Diff line number Diff line change
Expand Up @@ -36,22 +36,22 @@
... "Expands all macro-calls everywhere recursively, until only primitive/base code remains."
... ($.example (' (full_expansion syntax))))

($.definition /.symbol
($.definition /.name
(%.message "Generates a unique name as a Code node (ready to be used in code templates)."
\n "A prefix can be given (or just be empty text) to better identify the code for debugging purposes.")
($.example (' (symbol prefix))))
($.example (' (name prefix))))

($.definition /.with_symbols
"Creates new symbols and offers them to the body expression."
($.definition /.with_names
"Creates new names and offers them to the body expression."
($.example (' (the synchronized
(syntax.macro (_ [lock any
body any])
(with_symbols [g!lock g!body g!_]
(in (list (` (let [(, g!lock) (, lock)
(, g!_) ("jvm monitorenter" (, g!lock))
(, g!body) (, body)
(, g!_) ("jvm monitorexit" (, g!lock))]
(, g!body)))))))))))
(with_names ['lock 'body '_]
(in (list (` (let [(, 'lock) (, lock)
(, '_) ("jvm monitorenter" (, 'lock))
(, 'body) (, body)
(, '_) ("jvm monitorexit" (, 'lock))]
(, 'body)))))))))))

... ($.definition /.one_expansion
... "Works just like expand, except that it ensures that the output is a single Code token."
Expand Down
8 changes: 4 additions & 4 deletions stdlib/source/documentation/lux/meta/macro/template.lux
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@
($.comment "=>")
($.example (' "#0123+456+789.0abcdefghi")))

($.definition /.symbol
(%.message "An symbol made by concatenating pieces of code."
($.definition /.name
(%.message "A name made by concatenating pieces of code."
\n "The (optional) module part and the short part are specified independently.")
($.example (' (symbol ["abc" .def ..ghi])))
($.example (' (name ["abc" .def ..ghi])))
($.comment "=>")
($.example (' abcdefghi))

($.example (' (symbol [.def] ["abc" .def ..ghi])))
($.example (' (name [.def] ["abc" .def ..ghi])))
($.comment "=>")
($.example (' .abcdefghi)))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
($.definition /.absolute)

($.definition /.module
"The module part of a symbol.")
"The module part of a name.")

($.definition /.short
"The short part of a symbol.")
($.definition /.proper
"The proper part of a name.")
))
10 changes: 5 additions & 5 deletions stdlib/source/injection/lux/data/binary.lux
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

(.using
[library
[lux (.except and or natural integer revolution list symbol type)
[lux (.except and or natural integer revolution list name type)
[ffi (.only)]
[abstract
[monoid (.only Monoid)]]
Expand Down Expand Up @@ -272,8 +272,8 @@
(|>> set.list
(..list value)))

(the .public symbol
(Injection Symbol)
(the .public name
(Injection Name)
(all ..and
..text
..text
Expand Down Expand Up @@ -308,7 +308,7 @@
[07 .#Universal quantified]
[08 .#Existential quantified]
[09 .#Reification pair]
[10 .#Named (..and ..symbol again)]))
[10 .#Named (..and ..name again)]))
)))))))

(the .public location
Expand Down Expand Up @@ -343,7 +343,7 @@
[3 .#Revolution ..revolution]
[4 .#Decimal ..decimal]
[5 .#Text ..text]
[6 .#Symbol ..symbol]
[6 .#Name ..name]
[7 .#Form sequence]
[8 .#Variant sequence]
[9 .#Tuple sequence]))
Expand Down
6 changes: 3 additions & 3 deletions stdlib/source/injection/lux/data/text.lux
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

(.using
[library
[lux (.except list natural integer revolution symbol type)
[lux (.except list natural integer revolution name type)
[abstract
[monad (.only do)]]
[control
Expand Down Expand Up @@ -50,8 +50,8 @@
(template.with [,name]
[(the .public ,name
(Injection Decimal)
(let [suffix (its unit.#suffix (template.symbol [unit._] [,name]))]
(|>> (by (template.symbol [decimal._] [,name]) injection)
(let [suffix (its unit.#suffix (template.name [unit._] [,name]))]
(|>> (by (template.name [decimal._] [,name]) injection)
(text.split_by decimal.delimiter)
(maybe.else ["" ""])
product.left
Expand Down
Loading

0 comments on commit e0056b1

Please sign in to comment.