aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/macro.lux
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/library/lux/macro.lux24
1 files changed, 13 insertions, 11 deletions
diff --git a/stdlib/source/library/lux/macro.lux b/stdlib/source/library/lux/macro.lux
index e455b55f4..4df6e733d 100644
--- a/stdlib/source/library/lux/macro.lux
+++ b/stdlib/source/library/lux/macro.lux
@@ -29,10 +29,10 @@
((as Macro' macro) args)
{.#None}
- (# //.monad in (list syntax))))
+ (at //.monad in (list syntax))))
_
- (# //.monad in (list syntax))))
+ (at //.monad in (list syntax))))
(def: .public (expansion syntax)
(-> Code (Meta (List Code)))
@@ -46,13 +46,13 @@
[top_level_expansion ((as Macro' macro) args)]
(|> top_level_expansion
(monad.each //.monad expansion)
- (# ! each list#conjoint)))
+ (at ! each list#conjoint)))
{.#None}
- (# //.monad in (list syntax))))
+ (at //.monad in (list syntax))))
_
- (# //.monad in (list syntax))))
+ (at //.monad in (list syntax))))
(def: .public (full_expansion syntax)
(-> Code (Meta (List Code)))
@@ -89,14 +89,14 @@
(in (list (code.tuple (list#conjoint members')))))
_
- (# //.monad in (list syntax))))
+ (at //.monad in (list syntax))))
(def: .public (symbol prefix)
(-> Text (Meta Code))
(do //.monad
[id //.seed]
(in (|> id
- (# nat.decimal encoded)
+ (at nat.decimal encoded)
(all text#composite "__gensym__" prefix)
[""] code.symbol))))
@@ -104,7 +104,7 @@
(-> Code (Meta Text))
(case ast
[_ {.#Symbol [_ name]}]
- (# //.monad in name)
+ (at //.monad in name)
_
(//.failure (text#composite "Code is not a local symbol: " (code.format ast)))))
@@ -184,13 +184,13 @@
before terms])
(case times
0
- (# //.monad in before)
+ (at //.monad in before)
_
(do [! //.monad]
[after (|> before
(monad.each ! ..single_expansion)
- (# ! each list#conjoint))]
+ (at ! each list#conjoint))]
(again (-- times) after))))
_
@@ -198,4 +198,6 @@
(macro: .public (final it)
(let [! //.monad]
- (# ! each list#conjoint (monad.each ! ..expansion it))))
+ (|> it
+ (monad.each ! ..expansion)
+ (at ! each list#conjoint))))