aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/meta/type.lux
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/lux/meta/type.lux20
1 files changed, 10 insertions, 10 deletions
diff --git a/stdlib/source/lux/meta/type.lux b/stdlib/source/lux/meta/type.lux
index ad51b0c58..e7c630966 100644
--- a/stdlib/source/lux/meta/type.lux
+++ b/stdlib/source/lux/meta/type.lux
@@ -14,8 +14,8 @@
(def: (beta-reduce env type)
(-> (List Type) Type Type)
(case type
- (#;Host name params)
- (#;Host name (List/map (beta-reduce env) params))
+ (#;Primitive name params)
+ (#;Primitive name (List/map (beta-reduce env) params))
(^template [<tag>]
(<tag> left right)
@@ -46,7 +46,7 @@
(struct: #export _ (Eq Type)
(def: (= x y)
(case [x y]
- [(#;Host xname xparams) (#;Host yname yparams)]
+ [(#;Primitive xname xparams) (#;Primitive yname yparams)]
(and (Text/= xname yname)
(n.= (list;size yparams) (list;size xparams))
(List/fold (;function [[x y] prev] (and prev (= x y)))
@@ -167,9 +167,9 @@
(def: #export (to-ast type)
(-> Type Code)
(case type
- (#;Host name params)
- (` (#;Host (~ (code;text name))
- (list (~@ (List/map to-ast params)))))
+ (#;Primitive name params)
+ (` (#;Primitive (~ (code;text name))
+ (list (~@ (List/map to-ast params)))))
(^template [<tag>]
<tag>
@@ -206,13 +206,13 @@
(def: #export (to-text type)
(-> Type Text)
(case type
- (#;Host name params)
+ (#;Primitive name params)
(case params
#;Nil
- ($_ Text/compose "(host " name ")")
+ ($_ Text/compose "(primitive " name ")")
_
- ($_ Text/compose "(host " name " " (|> params (List/map to-text) list;reverse (list;interpose " ") (List/fold Text/compose "")) ")"))
+ ($_ Text/compose "(primitive " name " " (|> params (List/map to-text) list;reverse (list;interpose " ") (List/fold Text/compose "")) ")"))
#;Void
"Void"
@@ -351,4 +351,4 @@
(-> Nat Type Type)
(case level
+0 elem-type
- _ (#;Host "#Array" (list (array (n.dec level) elem-type)))))
+ _ (#;Primitive "#Array" (list (array (n.dec level) elem-type)))))