diff options
Diffstat (limited to 'stdlib/source/library/lux/macro/pattern.lux')
-rw-r--r-- | stdlib/source/library/lux/macro/pattern.lux | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/stdlib/source/library/lux/macro/pattern.lux b/stdlib/source/library/lux/macro/pattern.lux index d255d9a26..da050a5b8 100644 --- a/stdlib/source/library/lux/macro/pattern.lux +++ b/stdlib/source/library/lux/macro/pattern.lux @@ -70,7 +70,7 @@ (macro: .public (or tokens) (case tokens - (pattern (list& [_ {.#Form patterns}] body branches)) + (pattern (partial_list [_ {.#Form patterns}] body branches)) (case patterns {.#End} (failure (..wrong_syntax_error (symbol ..or))) @@ -85,10 +85,10 @@ (macro: .public (template tokens) (case tokens - (pattern (list& [_ {.#Form (list [_ {.#Tuple bindings}] - [_ {.#Tuple templates}])}] - [_ {.#Form data}] - branches)) + (pattern (partial_list [_ {.#Form (list [_ {.#Tuple bindings}] + [_ {.#Tuple templates}])}] + [_ {.#Form data}] + branches)) (case (is (Maybe (List Code)) (do maybe_monad [bindings' (monad#each maybe_monad symbol_short bindings) @@ -114,7 +114,7 @@ (macro: .public (multi tokens) (case tokens - (pattern (list& [_meta {.#Form levels}] body next_branches)) + (pattern (partial_list [_meta {.#Form levels}] body next_branches)) (do meta_monad [mlc (multi_level_case^ levels) .let [initial_bind? (case mlc @@ -145,23 +145,23 @@ (macro: .public (let tokens) (case tokens - (pattern (list& [_meta {.#Form (list [_ {.#Symbol ["" name]}] pattern)}] body branches)) + (pattern (partial_list [_meta {.#Form (list [_ {.#Symbol ["" name]}] pattern)}] body branches)) (.let [g!whole (local$ name)] - (meta#in (list& g!whole - (.` (case (~ g!whole) (~ pattern) (~ body))) - branches))) + (meta#in (partial_list g!whole + (.` (case (~ g!whole) (~ pattern) (~ body))) + branches))) _ (failure (..wrong_syntax_error (symbol ..let))))) (macro: .public (|> tokens) (case tokens - (pattern (list& [_meta {.#Form (list [_ {.#Symbol ["" name]}] [_ {.#Tuple steps}])}] body branches)) + (pattern (partial_list [_meta {.#Form (list [_ {.#Symbol ["" name]}] [_ {.#Tuple steps}])}] body branches)) (.let [g!name (local$ name)] - (meta#in (list& g!name - (.` (.let [(~ g!name) (.|> (~ g!name) (~+ steps))] - (~ body))) - branches))) + (meta#in (partial_list g!name + (.` (.let [(~ g!name) (.|> (~ g!name) (~+ steps))] + (~ body))) + branches))) _ (failure (..wrong_syntax_error (symbol ..|>))))) @@ -170,14 +170,14 @@ (-> Symbol Code) (.` [(~ (text$ module)) (~ (text$ name))])) -(def: (untemplated_list& last inits) +(def: (untemplated_partial_list last inits) (-> Code (List Code) Code) (case inits {.#End} last {.#Item [init inits']} - (.` {.#Item (~ init) (~ (untemplated_list& last inits'))}))) + (.` {.#Item (~ init) (~ (untemplated_partial_list last inits'))}))) (.template [<tag> <name>] [(def: (<name> g!meta untemplated_pattern elems) @@ -188,7 +188,7 @@ inits} (do meta_monad [=inits (monad#each meta_monad untemplated_pattern (list#reversed inits))] - (in (.` [(~ g!meta) {<tag> (~ (untemplated_list& spliced =inits))}]))) + (in (.` [(~ g!meta) {<tag> (~ (untemplated_partial_list spliced =inits))}]))) _ (do meta_monad @@ -232,10 +232,10 @@ (macro: .public (` tokens) (case tokens - (pattern (list& [_meta {.#Form (list template)}] body branches)) + (pattern (partial_list [_meta {.#Form (list template)}] body branches)) (do meta_monad [pattern (untemplated_pattern template)] - (in (list& pattern body branches))) + (in (partial_list pattern body branches))) (pattern (list template)) (do meta_monad |