aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/macro/pattern.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/library/lux/macro/pattern.lux')
-rw-r--r--stdlib/source/library/lux/macro/pattern.lux16
1 files changed, 8 insertions, 8 deletions
diff --git a/stdlib/source/library/lux/macro/pattern.lux b/stdlib/source/library/lux/macro/pattern.lux
index 4e6811c93..ecad74d18 100644
--- a/stdlib/source/library/lux/macro/pattern.lux
+++ b/stdlib/source/library/lux/macro/pattern.lux
@@ -1,6 +1,6 @@
(.using
[library
- [lux (.except or template let |> `)]])
+ [lux (.except or let with_template |> `)]])
(def: locally
(macro (_ tokens lux)
@@ -13,7 +13,7 @@
_
{.#Left ""}))))
-(.template [<name>]
+(.with_template [<name>]
[(def: <name> (..locally <name>))]
[list#size]
@@ -85,7 +85,7 @@
_
(failure (..wrong_syntax_error (symbol ..or))))))
-(def: .public template
+(def: .public with_template
(macro (_ tokens)
(case tokens
(pattern (partial_list [_ {.#Form (list [_ {.#Tuple bindings}]
@@ -110,10 +110,10 @@
(meta#in (list#composite output branches))
{.#None}
- (failure (..wrong_syntax_error (symbol ..template))))
+ (failure (..wrong_syntax_error (symbol ..with_template))))
_
- (failure (..wrong_syntax_error (symbol ..template))))))
+ (failure (..wrong_syntax_error (symbol ..with_template))))))
(def: .public multi
(macro (_ tokens)
@@ -185,7 +185,7 @@
{.#Item [init inits']}
(.` {.#Item (~ init) (~ (untemplated_partial_list last inits'))})))
-(.template [<tag> <name>]
+(.with_template [<tag> <name>]
[(def: (<name> g!meta untemplated_pattern elems)
(-> Code (-> Code (Meta Code))
(-> (List Code) (Meta Code)))
@@ -211,7 +211,7 @@
(do meta_monad
[g!meta (..generated_symbol "g!meta")]
(case pattern
- (..template [<tag> <gen>]
+ (..with_template [<tag> <gen>]
[[_ {<tag> value}]
(in (.` [(~ g!meta) {<tag> (~ (<gen> value))}]))])
([.#Bit bit$]
@@ -228,7 +228,7 @@
[_ {.#Form {.#Item [[_ {.#Symbol ["" "~+"]}] {.#Item [spliced {.#End}]}]}}]
(failure "Cannot use (~+) inside of `code` unless it is the last element in a form or a tuple.")
- (template [<tag> <untemplated>]
+ (..with_template [<tag> <untemplated>]
[[_ {<tag> elems}]
(<untemplated> g!meta untemplated_pattern elems)])
([.#Form ..untemplated_form]