aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/meta/type.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/library/lux/meta/type.lux')
-rw-r--r--stdlib/source/library/lux/meta/type.lux26
1 files changed, 13 insertions, 13 deletions
diff --git a/stdlib/source/library/lux/meta/type.lux b/stdlib/source/library/lux/meta/type.lux
index da2463a52..90ad79d1e 100644
--- a/stdlib/source/library/lux/meta/type.lux
+++ b/stdlib/source/library/lux/meta/type.lux
@@ -80,9 +80,9 @@
(`` (def .public (format type)
(-> Type Text)
(when type
- {.#Primitive name params}
+ {.#Nominal name params}
(all text#composite
- "(Primitive "
+ "(Nominal "
(text.enclosed' text.double_quote name)
(|> params
(list#each (|>> format (text#composite " ")))
@@ -140,8 +140,8 @@
(`` (def (reduced env type)
(-> (List Type) Type Type)
(when type
- {.#Primitive name params}
- {.#Primitive name (list#each (reduced env) params)}
+ {.#Nominal name params}
+ {.#Nominal name (list#each (reduced env) params)}
(,, (with_template [<tag>]
[{<tag> left right}
@@ -188,7 +188,7 @@
false
(same? x y))
(when [x y]
- [{.#Primitive xname xparams} {.#Primitive yname yparams}]
+ [{.#Nominal xname xparams} {.#Nominal yname yparams}]
(and (text#= xname yname)
(n.= (list.size yparams) (list.size xparams))
(list#mix (.function (_ [x y] prev) (and prev (= x y)))
@@ -264,9 +264,9 @@
(`` (def .public (code type)
(-> Type Code)
(when type
- {.#Primitive name params}
- (` {.#Primitive (, (code.text name))
- (.list (,* (list#each code params)))})
+ {.#Nominal name params}
+ (` {.#Nominal (, (code.text name))
+ (.list (,* (list#each code params)))})
(,, (with_template [<tag>]
[{<tag> idx}
@@ -390,14 +390,14 @@
_ (|> element_type
(array (-- depth))
(list)
- {.#Primitive array.primitive})))
+ {.#Nominal array.nominal})))
(def .public (flat_array type)
(-> Type [Nat Type])
(with_expansions [<default> [0 type]]
(when type
- {.#Primitive name (list element_type)}
- (if (text#= array.primitive name)
+ {.#Nominal name (list element_type)}
+ (if (text#= array.nominal name)
(.let [[depth element_type] (flat_array element_type)]
[(++ depth) element_type])
<default>)
@@ -511,8 +511,8 @@
(if (at ..equivalence = before it)
after
(when it
- {.#Primitive name co_variant}
- {.#Primitive name (list#each again co_variant)}
+ {.#Nominal name co_variant}
+ {.#Nominal name (list#each again co_variant)}
(,, (with_template [<tag>]
[{<tag> left right}