aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEduardo Julian2018-07-21 23:05:01 -0400
committerEduardo Julian2018-07-21 23:05:01 -0400
commit22d10692d87ac1c07fc14f6100917b913bb0f8b3 (patch)
tree61864188bf4521ab26825f85128b989d2ea202bf
parent2746f1a2d7606e3295e12e9c2e6833663658ffa8 (diff)
Re-named "name-for" to "name-of".
-rw-r--r--lux-mode/lux-mode.el2
-rw-r--r--stdlib/source/lux.lux10
-rw-r--r--stdlib/source/lux/compiler/default/phase/analysis/reference.lux2
-rw-r--r--stdlib/source/lux/concurrency/actor.lux4
-rw-r--r--stdlib/source/lux/host.jvm.lux2
-rw-r--r--stdlib/source/lux/macro.lux12
-rw-r--r--stdlib/source/lux/macro/poly.lux2
-rw-r--r--stdlib/source/lux/test.lux2
-rw-r--r--stdlib/source/lux/type/abstract.lux2
-rw-r--r--stdlib/source/lux/type/unit.lux2
-rw-r--r--stdlib/test/test/lux/data/name.lux16
11 files changed, 28 insertions, 28 deletions
diff --git a/lux-mode/lux-mode.el b/lux-mode/lux-mode.el
index 712d2d649..7d717d5b2 100644
--- a/lux-mode/lux-mode.el
+++ b/lux-mode/lux-mode.el
@@ -295,7 +295,7 @@ Called by `imenu--generic-function'."
"with-expansions"
"exception:"
"word:"
- "function" "undefined" "name-for" "static"
+ "function" "undefined" "name-of" "static"
"for" "io"
"infix"
"format"
diff --git a/stdlib/source/lux.lux b/stdlib/source/lux.lux
index 9bf84ca45..a9c442462 100644
--- a/stdlib/source/lux.lux
+++ b/stdlib/source/lux.lux
@@ -3431,7 +3431,7 @@
(list [(tag$ ["lux" "doc"])
(text$ "Macro-definition macro.
- (macro: #export (name-for tokens)
+ (macro: #export (name-of tokens)
(case tokens
(^template [<tag>]
(^ (list [_ (<tag> [prefix name])]))
@@ -3439,7 +3439,7 @@
([#Identifier] [#Tag])
_
- (fail \"Wrong syntax for name-for\")))")])
+ (fail \"Wrong syntax for name-of\")))")])
(let [[exported? tokens] (export^ tokens)
name+args+meta+body?? (: (Maybe [Name (List Code) Code Code])
(case tokens
@@ -5692,9 +5692,9 @@
_
(fail "Wrong syntax for ^multi")))
-(macro: #export (name-for tokens)
+(macro: #export (name-of tokens)
{#.doc (doc "Given an identifier or a tag, gives back a 2 tuple with the prefix and name parts, both as Text."
- (name-for #.doc)
+ (name-of #.doc)
"=>"
["lux" "doc"])}
(case tokens
@@ -5704,7 +5704,7 @@
([#Identifier] [#Tag])
_
- (fail "Wrong syntax for name-for")))
+ (fail "Wrong syntax for name-of")))
(do-template [<type> <even> <odd> <%> <=> <0> <2>]
[(def: #export (<even> n)
diff --git a/stdlib/source/lux/compiler/default/phase/analysis/reference.lux b/stdlib/source/lux/compiler/default/phase/analysis/reference.lux
index 862ec9daf..30da3e60f 100644
--- a/stdlib/source/lux/compiler/default/phase/analysis/reference.lux
+++ b/stdlib/source/lux/compiler/default/phase/analysis/reference.lux
@@ -28,7 +28,7 @@
(with-expansions [<return> (wrap (|> def-name reference.constant #//.Reference))]
(do ///.Monad<Operation>
[[actualT def-anns _] (extension.lift (macro.find-def def-name))]
- (case (macro.get-identifier-ann (name-for #.alias) def-anns)
+ (case (macro.get-identifier-ann (name-of #.alias) def-anns)
(#.Some real-def-name)
(definition real-def-name)
diff --git a/stdlib/source/lux/concurrency/actor.lux b/stdlib/source/lux/concurrency/actor.lux
index fb0e9171a..05229b49e 100644
--- a/stdlib/source/lux/concurrency/actor.lux
+++ b/stdlib/source/lux/concurrency/actor.lux
@@ -151,14 +151,14 @@
(do-template [<with> <resolve> <tag> <desc>]
[(def: #export (<with> name)
(-> Name cs.Annotations cs.Annotations)
- (|>> (#.Cons [(name-for <tag>)
+ (|>> (#.Cons [(name-of <tag>)
(code.tag name)])))
(def: #export (<resolve> name)
(-> Name (Meta Name))
(do Monad<Meta>
[[_ annotations _] (macro.find-def name)]
- (case (macro.get-tag-ann (name-for <tag>) annotations)
+ (case (macro.get-tag-ann (name-of <tag>) annotations)
(#.Some actor-name)
(wrap actor-name)
diff --git a/stdlib/source/lux/host.jvm.lux b/stdlib/source/lux/host.jvm.lux
index 1c314ba0f..1cf76a4dd 100644
--- a/stdlib/source/lux/host.jvm.lux
+++ b/stdlib/source/lux/host.jvm.lux
@@ -369,7 +369,7 @@
definitions (macro.definitions current-module)]
(wrap (list/fold (: (-> [Text Definition] Class-Imports Class-Imports)
(function (_ [short-name [_ meta _]] imports)
- (case (macro.get-text-ann (name-for #..jvm-class) meta)
+ (case (macro.get-text-ann (name-of #..jvm-class) meta)
(#.Some full-class-name)
(add-import [short-name full-class-name] imports)
diff --git a/stdlib/source/lux/macro.lux b/stdlib/source/lux/macro.lux
index 1909aeca6..f2277ba06 100644
--- a/stdlib/source/lux/macro.lux
+++ b/stdlib/source/lux/macro.lux
@@ -187,7 +187,7 @@
(def: #export (get-doc anns)
{#.doc "Looks-up a definition's documentation."}
(-> Code (Maybe Text))
- (get-text-ann (name-for #.doc) anns))
+ (get-text-ann (name-of #.doc) anns))
(def: #export (flag-set? flag-name anns)
{#.doc "Finds out whether an annotation-as-a-flag is set (has value '#1')."}
@@ -198,7 +198,7 @@
[(def: #export <name>
{#.doc (code.text ($_ text/compose "Checks whether a definition is " <desc> "."))}
(-> Code Bit)
- (flag-set? (name-for <tag>)))]
+ (flag-set? (name-of <tag>)))]
[export? #.export? "exported"]
[macro? #.macro? "a macro"]
@@ -210,7 +210,7 @@
(def: #export (aliased? annotations)
(-> Code Bit)
- (case (get-identifier-ann (name-for #.alias) annotations)
+ (case (get-identifier-ann (name-of #.alias) annotations)
(#.Some _)
#1
@@ -237,7 +237,7 @@
(-> Code (List Text))
(maybe.default (list)
(do maybe.Monad<Maybe>
- [_args (get-ann (name-for <tag>) anns)
+ [_args (get-ann (name-of <tag>) anns)
args (parse-tuple _args)]
(monad.map @ parse-text args))))]
@@ -255,7 +255,7 @@
(if (and (macro? def-anns)
(or (export? def-anns) (text/= module this-module)))
(#.Some (:coerce Macro def-value))
- (case (get-identifier-ann (name-for #.alias) def-anns)
+ (case (get-identifier-ann (name-of #.alias) def-anns)
(#.Some [r-module r-name])
(find-macro' modules this-module r-module r-name)
@@ -671,7 +671,7 @@
(-> Name (Meta Name))
(do Monad<Meta>
[[_ def-anns _] (find-def def-name)]
- (case (get-identifier-ann (name-for #.alias) def-anns)
+ (case (get-identifier-ann (name-of #.alias) def-anns)
(#.Some real-def-name)
(wrap real-def-name)
diff --git a/stdlib/source/lux/macro/poly.lux b/stdlib/source/lux/macro/poly.lux
index 7cfa74fce..ed9af9cc6 100644
--- a/stdlib/source/lux/macro/poly.lux
+++ b/stdlib/source/lux/macro/poly.lux
@@ -347,7 +347,7 @@
(do p.Monad<Parser>
[current any
#let [_ (log! ($_ text/compose
- "{" (name/encode (name-for ..log)) "} "
+ "{" (name/encode (name-of ..log)) "} "
(%type current)))]]
(p.fail "LOGGING")))
diff --git a/stdlib/source/lux/test.lux b/stdlib/source/lux/test.lux
index 307b71b89..8bb0a71a3 100644
--- a/stdlib/source/lux/test.lux
+++ b/stdlib/source/lux/test.lux
@@ -205,7 +205,7 @@
[defs (macro.exports module-name)]
(wrap (|> defs
(list/map (function (_ [def-name [_ def-anns _]])
- (case (macro.get-text-ann (name-for #..test) def-anns)
+ (case (macro.get-text-ann (name-of #..test) def-anns)
(#.Some description)
[#1 module-name def-name description]
diff --git a/stdlib/source/lux/type/abstract.lux b/stdlib/source/lux/type/abstract.lux
index a7fd3ead9..0c5c0be59 100644
--- a/stdlib/source/lux/type/abstract.lux
+++ b/stdlib/source/lux/type/abstract.lux
@@ -61,7 +61,7 @@
(def: representation-name
(-> Text Text)
(|>> ($_ text/compose "{" kind "@" module "}")
- (let [[module kind] (name-for #..Representation)])))
+ (let [[module kind] (name-of #..Representation)])))
(def: (cast type-vars input-declaration output-declaration)
(-> (List Code) Code Code Macro)
diff --git a/stdlib/source/lux/type/unit.lux b/stdlib/source/lux/type/unit.lux
index a7d4effbc..df714a996 100644
--- a/stdlib/source/lux/type/unit.lux
+++ b/stdlib/source/lux/type/unit.lux
@@ -62,7 +62,7 @@
[(def: <name>
(-> Text Text)
(|>> (format "{" kind "@" module "}")
- (let [[module kind] (name-for <tag>)])))]
+ (let [[module kind] (name-of <tag>)])))]
[unit-name #..Unit]
[scale-name #..Scale]
diff --git a/stdlib/test/test/lux/data/name.lux b/stdlib/test/test/lux/data/name.lux
index 296e9c1bf..5c6311100 100644
--- a/stdlib/test/test/lux/data/name.lux
+++ b/stdlib/test/test/lux/data/name.lux
@@ -61,13 +61,13 @@
(let [(^open "&/.") &.Equivalence<Name>]
($_ seq
(test "Can obtain Name from identifier."
- (and (&/= ["lux" "yolo"] (name-for .yolo))
- (&/= ["test/lux/data/name" "yolo"] (name-for ..yolo))
- (&/= ["" "yolo"] (name-for yolo))
- (&/= ["lux/test" "yolo"] (name-for lux/test.yolo))))
+ (and (&/= ["lux" "yolo"] (name-of .yolo))
+ (&/= ["test/lux/data/name" "yolo"] (name-of ..yolo))
+ (&/= ["" "yolo"] (name-of yolo))
+ (&/= ["lux/test" "yolo"] (name-of lux/test.yolo))))
(test "Can obtain Name from tag."
- (and (&/= ["lux" "yolo"] (name-for #.yolo))
- (&/= ["test/lux/data/name" "yolo"] (name-for #..yolo))
- (&/= ["" "yolo"] (name-for #yolo))
- (&/= ["lux/test" "yolo"] (name-for #lux/test.yolo)))))))
+ (and (&/= ["lux" "yolo"] (name-of #.yolo))
+ (&/= ["test/lux/data/name" "yolo"] (name-of #..yolo))
+ (&/= ["" "yolo"] (name-of #yolo))
+ (&/= ["lux/test" "yolo"] (name-of #lux/test.yolo)))))))