aboutsummaryrefslogtreecommitdiff
path: root/source/lux/meta/lux.lux
diff options
context:
space:
mode:
Diffstat (limited to 'source/lux/meta/lux.lux')
-rw-r--r--source/lux/meta/lux.lux13
1 files changed, 7 insertions, 6 deletions
diff --git a/source/lux/meta/lux.lux b/source/lux/meta/lux.lux
index e1d821ff0..bc859b823 100644
--- a/source/lux/meta/lux.lux
+++ b/source/lux/meta/lux.lux
@@ -7,7 +7,8 @@
## You must not remove this notice, or any other, from this software.
(;import lux
- (.. macro)
+ (.. macro
+ ast)
(lux/control (monoid #as m)
(functor #as F)
(monad #as M #refer (#only do))
@@ -119,7 +120,7 @@
(:: Lux/Monad (M;wrap ident))))
(def #export (macro-expand syntax)
- (-> Syntax (Lux (List Syntax)))
+ (-> AST (Lux (List AST)))
(case syntax
(#;Meta [_ (#;FormS (#;Cons [(#;Meta [_ (#;SymbolS macro-name)]) args]))])
(do Lux/Monad
@@ -139,7 +140,7 @@
(:: Lux/Monad (M;wrap (list syntax)))))
(def #export (macro-expand-all syntax)
- (-> Syntax (Lux (List Syntax)))
+ (-> AST (Lux (List AST)))
(case syntax
(#;Meta [_ (#;FormS (#;Cons [(#;Meta [_ (#;SymbolS macro-name)]) args]))])
(do Lux/Monad
@@ -161,7 +162,7 @@
(do Lux/Monad
[harg+ (macro-expand-all harg)
targs+ (M;map% Lux/Monad macro-expand-all targs)]
- (M;wrap (list (form$ (list:++ harg+ (:: List/Monad (M;join (: (List (List Syntax)) targs+))))))))
+ (M;wrap (list (form$ (list:++ harg+ (:: List/Monad (M;join (: (List (List AST)) targs+))))))))
(#;Meta [_ (#;TupleS members)])
(do Lux/Monad
@@ -172,7 +173,7 @@
(:: Lux/Monad (M;wrap (list syntax)))))
(def #export (gensym prefix state)
- (-> Text (Lux Syntax))
+ (-> Text (Lux AST))
(#;Right [(update@ #;seed (i+ 1) state)
(symbol$ ["__gensym__" (:: I;Int/Show (S;show (get@ #;seed state)))])]))
@@ -189,7 +190,7 @@
(#;Left msg)))
(def #export (macro-expand-1 token)
- (-> Syntax (Lux Syntax))
+ (-> AST (Lux AST))
(do Lux/Monad
[token+ (macro-expand token)]
(case token+