diff options
Diffstat (limited to 'stdlib/source/specification/compositor/generation')
-rw-r--r-- | stdlib/source/specification/compositor/generation/common.lux | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/stdlib/source/specification/compositor/generation/common.lux b/stdlib/source/specification/compositor/generation/common.lux index 19041bbb7..cf94de3a9 100644 --- a/stdlib/source/specification/compositor/generation/common.lux +++ b/stdlib/source/specification/compositor/generation/common.lux @@ -17,6 +17,8 @@ ["%" format {"+" format}]] [collection ["[0]" list]]] + [macro + ["^" pattern]] [math ["r" random {"+" Random}]] [tool @@ -245,9 +247,9 @@ (synthesis.i64 +0))} (run (..safe "lux text index")) (pipe.case - (^multi {try.#Success valueV} - [(:as (Maybe Nat) valueV) - {.#Some valueV}]) + (^.multi {try.#Success valueV} + [(:as (Maybe Nat) valueV) + {.#Some valueV}]) (n.= 0 valueV) _ @@ -257,9 +259,9 @@ (synthesis.i64 +0))} (run (..safe "lux text index")) (pipe.case - (^multi {try.#Success valueV} - [(:as (Maybe Nat) valueV) - {.#Some valueV}]) + (^.multi {try.#Success valueV} + [(:as (Maybe Nat) valueV) + {.#Some valueV}]) (n.= sample_size valueV) _ @@ -272,9 +274,9 @@ (synthesis.i64 length))} (run (..safe "lux text clip")) (pipe.case - (^multi {try.#Success valueV} - [(:as (Maybe Text) valueV) - {.#Some valueV}]) + (^.multi {try.#Success valueV} + [(:as (Maybe Text) valueV) + {.#Some valueV}]) (text#= expected valueV) _ @@ -288,9 +290,9 @@ (synthesis.i64 char_idx))} (run (..safe "lux text char")) (pipe.case - (^multi {try.#Success valueV} - [(:as (Maybe Int) valueV) - {.#Some valueV}]) + (^.multi {try.#Success valueV} + [(:as (Maybe Int) valueV) + {.#Some valueV}]) (text.contains? ("lux i64 char" valueV) sample_lower) @@ -322,9 +324,9 @@ (list (synthesis.text message))}]))} (run (..safe "lux try")) (pipe.case - (^multi {try.#Success valueV} - [(:as (Try Text) valueV) - {try.#Failure error}]) + (^.multi {try.#Success valueV} + [(:as (Try Text) valueV) + {try.#Failure error}]) (text.contains? message error) _ @@ -336,9 +338,9 @@ synthesis.#body (synthesis.text message)]))} (run (..safe "lux try")) (pipe.case - (^multi {try.#Success valueV} - [(:as (Try Text) valueV) - {try.#Success valueV}]) + (^.multi {try.#Success valueV} + [(:as (Try Text) valueV) + {try.#Success valueV}]) (text#= message valueV) _ |