aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/specification/compositor/generation
diff options
context:
space:
mode:
authorEduardo Julian2022-03-15 07:24:35 -0400
committerEduardo Julian2022-03-15 07:24:35 -0400
commitbc36487224f670c23002cc4575c0dba3e5dc1be1 (patch)
tree01601f7e5d992ace77a16cfa90240ffc4511a7af /stdlib/source/specification/compositor/generation
parent4ef1ac1dfe0edd1a11bb7f1fd13c8b6cb8f1bab4 (diff)
De-sigil-ification: ^
Diffstat (limited to 'stdlib/source/specification/compositor/generation')
-rw-r--r--stdlib/source/specification/compositor/generation/common.lux38
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)
_