diff options
Diffstat (limited to 'stdlib/source/specification/compositor/generation/common.lux')
| -rw-r--r-- | stdlib/source/specification/compositor/generation/common.lux | 42 | 
1 files changed, 21 insertions, 21 deletions
| diff --git a/stdlib/source/specification/compositor/generation/common.lux b/stdlib/source/specification/compositor/generation/common.lux index e203a6098..b0f1c2390 100644 --- a/stdlib/source/specification/compositor/generation/common.lux +++ b/stdlib/source/specification/compositor/generation/common.lux @@ -28,7 +28,7 @@     [test      ["_" property (.only Test)]]]]   ["[0]" // -  ["[1][0]" case] +  ["[1][0]" when]    [//     [common (.only Runner)]]]) @@ -46,7 +46,7 @@                                      (|> {synthesis.#Extension <extension> (list (synthesis.i64 param)                                                                                  (synthesis.i64 subject))}                                          (run (..safe <extension>)) -                                        (pipe.case +                                        (pipe.when                                            {try.#Success valueT}                                            (n.= (<reference> param subject) (as Nat valueT)) @@ -67,7 +67,7 @@                                         (list (synthesis.i64 subject)                                               (synthesis.i64 param))}                   (run (..safe "lux i64 arithmetic-right-shift")) -                 (pipe.case +                 (pipe.when                     {try.#Success valueT}                     ("lux i64 ="                      (i64.arithmetic_right_shifted param subject) @@ -88,7 +88,7 @@                     [(_.test <extension>                        (|> {synthesis.#Extension <extension> (list (synthesis.i64 subject))}                            (run (..safe <extension>)) -                          (pipe.case +                          (pipe.when                              {try.#Success valueT}                              (<comp> (<prepare> subject) (as <type> valueT)) @@ -107,7 +107,7 @@                        (|> {synthesis.#Extension <extension> (list (synthesis.i64 param)                                                                    (synthesis.i64 subject))}                            (run (..safe <extension>)) -                          (pipe.case +                          (pipe.when                              {try.#Success valueT}                              (<comp> (<reference> param subject) (as <outputT> valueT)) @@ -139,7 +139,7 @@                        (|> {synthesis.#Extension <extension> (list (synthesis.f64 param)                                                                    (synthesis.f64 subject))}                            (run (..safe <extension>)) -                          (//case.verify (<reference> param subject))))] +                          (//when.verify (<reference> param subject))))]                     ["lux f64 +" f.+ f.=]                     ["lux f64 -" f.- f.=] @@ -152,7 +152,7 @@                        (|> {synthesis.#Extension <extension> (list (synthesis.f64 param)                                                                    (synthesis.f64 subject))}                            (run (..safe <extension>)) -                          (pipe.case +                          (pipe.when                              {try.#Success valueV}                              (bit#= (<text> param subject)                                     (as Bit valueV)) @@ -167,7 +167,7 @@                     [(_.test <extension>                        (|> {synthesis.#Extension <extension> (list)}                            (run (..safe <extension>)) -                          (//case.verify <reference>)))] +                          (//when.verify <reference>)))]                     ["lux f64 min"      ("lux f64 min")]                     ["lux f64 max"      ("lux f64 max")] @@ -178,7 +178,7 @@                          (|> subject synthesis.f64                              (list) {synthesis.#Extension "lux f64 i64"}                              (list) {synthesis.#Extension "lux i64 f64"})) -                   (//case.verify subject))) +                   (//when.verify subject)))               ))))  (def (text run) @@ -202,7 +202,7 @@           (_.test "Can compare texts for equality."             (and (|> {synthesis.#Extension "lux text =" (list sample_lowerS sample_lowerS)}                      (run (..safe "lux text =")) -                    (pipe.case +                    (pipe.when                        {try.#Success valueV}                        (as Bit valueV) @@ -210,7 +210,7 @@                        false))                  (|> {synthesis.#Extension "lux text =" (list sample_upperS sample_lowerS)}                      (run (..safe "lux text =")) -                    (pipe.case +                    (pipe.when                        {try.#Success valueV}                        (not (as Bit valueV)) @@ -219,7 +219,7 @@           (_.test "Can compare texts for order."             (|> {synthesis.#Extension "lux text <" (list sample_lowerS sample_upperS)}                 (run (..safe "lux text <")) -               (pipe.case +               (pipe.when                   {try.#Success valueV}                   (as Bit valueV) @@ -228,7 +228,7 @@           (_.test "Can get length of text."             (|> {synthesis.#Extension "lux text size" (list sample_lowerS)}                 (run (..safe "lux text size")) -               (pipe.case +               (pipe.when                   {try.#Success valueV}                   (n.= sample_size (as Nat valueV)) @@ -237,7 +237,7 @@           (_.test "Can concatenate text."             (|> {synthesis.#Extension "lux text size" (list concatenatedS)}                 (run (..safe "lux text size")) -               (pipe.case +               (pipe.when                   {try.#Success valueV}                   (n.= (n.* 2 sample_size) (as Nat valueV)) @@ -248,7 +248,7 @@                                            (list concatenatedS sample_lowerS                                                  (synthesis.i64 +0))}                      (run (..safe "lux text index")) -                    (pipe.case +                    (pipe.when                        (^.multi {try.#Success valueV}                                 [(as (Maybe Nat) valueV)                                  {.#Some valueV}]) @@ -260,7 +260,7 @@                                            (list concatenatedS sample_upperS                                                  (synthesis.i64 +0))}                      (run (..safe "lux text index")) -                    (pipe.case +                    (pipe.when                        (^.multi {try.#Success valueV}                                 [(as (Maybe Nat) valueV)                                  {.#Some valueV}]) @@ -275,7 +275,7 @@                                                                 (synthesis.i64 offset)                                                                 (synthesis.i64 length))}                                     (run (..safe "lux text clip")) -                                   (pipe.case +                                   (pipe.when                                       (^.multi {try.#Success valueV}                                                [(as (Maybe Text) valueV)                                                 {.#Some valueV}]) @@ -291,7 +291,7 @@                                       (list sample_lowerS                                             (synthesis.i64 char_idx))}                 (run (..safe "lux text char")) -               (pipe.case +               (pipe.when                   (^.multi {try.#Success valueV}                            [(as (Maybe Int) valueV)                             {.#Some valueV}]) @@ -311,7 +311,7 @@             (|> {synthesis.#Extension "lux io log"                                       (list (synthesis.text (format "LOG: " message)))}                 (run (..safe "lux io log")) -               (pipe.case +               (pipe.when                   {try.#Success valueV}                   true @@ -325,7 +325,7 @@                                                    synthesis.#body {synthesis.#Extension "lux io error"                                                                                          (list (synthesis.text message))}]))}                      (run (..safe "lux try")) -                    (pipe.case +                    (pipe.when                        (^.multi {try.#Success valueV}                                 [(as (Try Text) valueV)                                  {try.#Failure error}]) @@ -339,7 +339,7 @@                                                    synthesis.#arity 1                                                    synthesis.#body (synthesis.text message)]))}                      (run (..safe "lux try")) -                    (pipe.case +                    (pipe.when                        (^.multi {try.#Success valueV}                                 [(as (Try Text) valueV)                                  {try.#Success valueV}]) | 
