diff options
author | Eduardo Julian | 2022-03-16 08:37:23 -0400 |
---|---|---|
committer | Eduardo Julian | 2022-03-16 08:37:23 -0400 |
commit | bf53ee92fc3c33a4885aa227e55d24f7ba3cb2c4 (patch) | |
tree | 49683a62ae8e110c62b42a9a6386bb2ddb3c47c6 /stdlib/source/specification/compositor/generation | |
parent | d710d9f4fc098e7c243c8a5f23cd42683f13e07f (diff) |
De-sigil-ification: prefix :
Diffstat (limited to 'stdlib/source/specification/compositor/generation')
5 files changed, 79 insertions, 79 deletions
diff --git a/stdlib/source/specification/compositor/generation/case.lux b/stdlib/source/specification/compositor/generation/case.lux index 46fd92eb2..80faa246f 100644 --- a/stdlib/source/specification/compositor/generation/case.lux +++ b/stdlib/source/specification/compositor/generation/case.lux @@ -42,7 +42,7 @@ (-> Frac (Try Any) Bit) (|>> (pipe.case {try.#Success actual} - (f.= expected (:as Frac actual)) + (f.= expected (as Frac actual)) {try.#Failure _} false))) @@ -140,38 +140,38 @@ (def: special_input Synthesis - (let [_cursor_ (: Synthesis - (synthesis.tuple (list (synthesis.text .prelude_module) - (synthesis.i64 +901) - (synthesis.i64 +13)))) - _code_ (: (-> Synthesis Synthesis) - (function (_ content) - (synthesis.tuple (list _cursor_ content)))) - _end_ (: Synthesis - (synthesis.variant [0 #0 (synthesis.text "")])) - _item_ (: (-> Synthesis Synthesis Synthesis) - (function (_ head tail) - (synthesis.variant [0 #1 (synthesis.tuple (list head tail))]))) - _list_ (: (-> (List Synthesis) Synthesis) - (list#mix _item_ _end_))] - (let [__tuple__ (: (-> (List Synthesis) Synthesis) - (|>> list.reversed _list_ [9 #0] synthesis.variant _code_)) - __form__ (: (-> (List Synthesis) Synthesis) - (|>> list.reversed _list_ [7 #0] synthesis.variant _code_)) - __text__ (: (-> Text Synthesis) - (function (_ value) - (_code_ (synthesis.variant [5 #0 (synthesis.text value)])))) - __symbol__ (: (-> Symbol Synthesis) - (function (_ [module short]) - (_code_ (synthesis.variant [6 #0 (synthesis.tuple (list (synthesis.text module) - (synthesis.text short)))])))) - __list__ (: (-> (List Synthesis) Synthesis) - (list#mix (function (_ head tail) - (__form__ (list (__tag__ ["" "Item"]) head tail))) - (__tag__ ["" "End"]))) - __apply__ (: (-> Synthesis Synthesis Synthesis) - (function (_ func arg) - (__form__ (list func arg))))] + (let [_cursor_ (is Synthesis + (synthesis.tuple (list (synthesis.text .prelude_module) + (synthesis.i64 +901) + (synthesis.i64 +13)))) + _code_ (is (-> Synthesis Synthesis) + (function (_ content) + (synthesis.tuple (list _cursor_ content)))) + _end_ (is Synthesis + (synthesis.variant [0 #0 (synthesis.text "")])) + _item_ (is (-> Synthesis Synthesis Synthesis) + (function (_ head tail) + (synthesis.variant [0 #1 (synthesis.tuple (list head tail))]))) + _list_ (is (-> (List Synthesis) Synthesis) + (list#mix _item_ _end_))] + (let [__tuple__ (is (-> (List Synthesis) Synthesis) + (|>> list.reversed _list_ [9 #0] synthesis.variant _code_)) + __form__ (is (-> (List Synthesis) Synthesis) + (|>> list.reversed _list_ [7 #0] synthesis.variant _code_)) + __text__ (is (-> Text Synthesis) + (function (_ value) + (_code_ (synthesis.variant [5 #0 (synthesis.text value)])))) + __symbol__ (is (-> Symbol Synthesis) + (function (_ [module short]) + (_code_ (synthesis.variant [6 #0 (synthesis.tuple (list (synthesis.text module) + (synthesis.text short)))])))) + __list__ (is (-> (List Synthesis) Synthesis) + (list#mix (function (_ head tail) + (__form__ (list (__tag__ ["" "Item"]) head tail))) + (__tag__ ["" "End"]))) + __apply__ (is (-> Synthesis Synthesis Synthesis) + (function (_ func arg) + (__form__ (list func arg))))] (|> _end_ (_item_ (__apply__ (__symbol__ ["" "form$"]) (__list__ (list (__apply__ (__symbol__ ["" "tag$"]) diff --git a/stdlib/source/specification/compositor/generation/common.lux b/stdlib/source/specification/compositor/generation/common.lux index cf94de3a9..dc2bf6ec7 100644 --- a/stdlib/source/specification/compositor/generation/common.lux +++ b/stdlib/source/specification/compositor/generation/common.lux @@ -46,7 +46,7 @@ (run (..safe <extension>)) (pipe.case {try.#Success valueT} - (n.= (<reference> param subject) (:as Nat valueT)) + (n.= (<reference> param subject) (as Nat valueT)) {try.#Failure _} false) @@ -69,7 +69,7 @@ {try.#Success valueT} ("lux i64 =" (i64.arithmetic_right_shifted param subject) - (:as I64 valueT)) + (as I64 valueT)) {try.#Failure _} false) @@ -88,17 +88,17 @@ (run (..safe <extension>)) (pipe.case {try.#Success valueT} - (<comp> (<prepare> subject) (:as <type> valueT)) + (<comp> (<prepare> subject) (as <type> valueT)) {try.#Failure _} false) (let [subject <subject_expr>])))] ["lux i64 f64" Frac i.frac f.= subject] - ["lux i64 char" Text (|>> (:as Nat) text.from_code) text#= (|> subject - (:as Nat) - (n.% (i64.left_shifted 8 1)) - (:as Int))] + ["lux i64 char" Text (|>> (as Nat) text.from_code) text#= (|> subject + (as Nat) + (n.% (i64.left_shifted 8 1)) + (as Int))] )) (~~ (template [<extension> <reference> <outputT> <comp>] [(_.test <extension> @@ -107,7 +107,7 @@ (run (..safe <extension>)) (pipe.case {try.#Success valueT} - (<comp> (<reference> param subject) (:as <outputT> valueT)) + (<comp> (<reference> param subject) (as <outputT> valueT)) {try.#Failure _} false)))] @@ -153,7 +153,7 @@ (pipe.case {try.#Success valueV} (bit#= (<text> param subject) - (:as Bit valueV)) + (as Bit valueV)) _ false)))] @@ -202,7 +202,7 @@ (run (..safe "lux text =")) (pipe.case {try.#Success valueV} - (:as Bit valueV) + (as Bit valueV) _ false)) @@ -210,7 +210,7 @@ (run (..safe "lux text =")) (pipe.case {try.#Success valueV} - (not (:as Bit valueV)) + (not (as Bit valueV)) _ false)))) @@ -219,7 +219,7 @@ (run (..safe "lux text <")) (pipe.case {try.#Success valueV} - (:as Bit valueV) + (as Bit valueV) {try.#Failure _} false))) @@ -228,7 +228,7 @@ (run (..safe "lux text size")) (pipe.case {try.#Success valueV} - (n.= sample_size (:as Nat valueV)) + (n.= sample_size (as Nat valueV)) _ false))) @@ -237,7 +237,7 @@ (run (..safe "lux text size")) (pipe.case {try.#Success valueV} - (n.= (n.* 2 sample_size) (:as Nat valueV)) + (n.= (n.* 2 sample_size) (as Nat valueV)) _ false))) @@ -248,7 +248,7 @@ (run (..safe "lux text index")) (pipe.case (^.multi {try.#Success valueV} - [(:as (Maybe Nat) valueV) + [(as (Maybe Nat) valueV) {.#Some valueV}]) (n.= 0 valueV) @@ -260,27 +260,27 @@ (run (..safe "lux text index")) (pipe.case (^.multi {try.#Success valueV} - [(:as (Maybe Nat) valueV) + [(as (Maybe Nat) valueV) {.#Some valueV}]) (n.= sample_size valueV) _ false)))) - (let [test_clip (: (-> (I64 Any) (I64 Any) Text Bit) - (function (_ offset length expected) - (|> {synthesis.#Extension "lux text clip" - (list concatenatedS - (synthesis.i64 offset) - (synthesis.i64 length))} - (run (..safe "lux text clip")) - (pipe.case - (^.multi {try.#Success valueV} - [(:as (Maybe Text) valueV) - {.#Some valueV}]) - (text#= expected valueV) - - _ - false))))] + (let [test_clip (is (-> (I64 Any) (I64 Any) Text Bit) + (function (_ offset length expected) + (|> {synthesis.#Extension "lux text clip" + (list concatenatedS + (synthesis.i64 offset) + (synthesis.i64 length))} + (run (..safe "lux text clip")) + (pipe.case + (^.multi {try.#Success valueV} + [(as (Maybe Text) valueV) + {.#Some valueV}]) + (text#= expected valueV) + + _ + false))))] (_.test "Can clip text to extract sub-text." (and (test_clip 0 sample_size sample_lower) (test_clip sample_size sample_size sample_upper)))) @@ -291,7 +291,7 @@ (run (..safe "lux text char")) (pipe.case (^.multi {try.#Success valueV} - [(:as (Maybe Int) valueV) + [(as (Maybe Int) valueV) {.#Some valueV}]) (text.contains? ("lux i64 char" valueV) sample_lower) @@ -325,7 +325,7 @@ (run (..safe "lux try")) (pipe.case (^.multi {try.#Success valueV} - [(:as (Try Text) valueV) + [(as (Try Text) valueV) {try.#Failure error}]) (text.contains? message error) @@ -339,7 +339,7 @@ (run (..safe "lux try")) (pipe.case (^.multi {try.#Success valueV} - [(:as (Try Text) valueV) + [(as (Try Text) valueV) {try.#Success valueV}]) (text#= message valueV) @@ -351,7 +351,7 @@ (run (..safe "lux io current-time")) (pipe.case {try.#Success valueV} - (let [[pre post] (:as [Nat Nat] valueV)] + (let [[pre post] (as [Nat Nat] valueV)] (n.>= pre post)) {try.#Failure _} diff --git a/stdlib/source/specification/compositor/generation/primitive.lux b/stdlib/source/specification/compositor/generation/primitive.lux index a193aa16f..db50dc185 100644 --- a/stdlib/source/specification/compositor/generation/primitive.lux +++ b/stdlib/source/specification/compositor/generation/primitive.lux @@ -36,7 +36,7 @@ (|> (run <evaluation_name> (<synthesis> expected)) (pipe.case {try.#Success actual} - (<test> expected (:expected actual)) + (<test> expected (as_expected actual)) {try.#Failure _} false))))] diff --git a/stdlib/source/specification/compositor/generation/reference.lux b/stdlib/source/specification/compositor/generation/reference.lux index 87c7b605b..687c3ef88 100644 --- a/stdlib/source/specification/compositor/generation/reference.lux +++ b/stdlib/source/specification/compositor/generation/reference.lux @@ -33,7 +33,7 @@ (|> (define name (synthesis.f64 expected)) (pipe.case {try.#Success actual} - (f.= expected (:as Frac actual)) + (f.= expected (as Frac actual)) {try.#Failure _} false))))) @@ -50,7 +50,7 @@ (run "variable") (pipe.case {try.#Success actual} - (f.= expected (:as Frac actual)) + (f.= expected (as Frac actual)) {try.#Failure _} false))))) diff --git a/stdlib/source/specification/compositor/generation/structure.lux b/stdlib/source/specification/compositor/generation/structure.lux index 5fe2a809f..cf12ae152 100644 --- a/stdlib/source/specification/compositor/generation/structure.lux +++ b/stdlib/source/specification/compositor/generation/structure.lux @@ -44,19 +44,19 @@ (run "variant") (pipe.case {try.#Success valueT} - (let [valueT (:as (Array Any) valueT)] + (let [valueT (as (Array Any) valueT)] (and (n.= 3 (array.size valueT)) - (let [tag_out (:as java/lang/Integer (maybe.trusted (array.read! 0 valueT))) + (let [tag_out (as java/lang/Integer (maybe.trusted (array.read! 0 valueT))) last?_out (array.read! 1 valueT) - value_out (:as Any (maybe.trusted (array.read! 2 valueT))) - same_tag? (|> tag_out ffi.int_to_long (:as Nat) (n.= tag_in)) + value_out (as Any (maybe.trusted (array.read! 2 valueT))) + same_tag? (|> tag_out ffi.int_to_long (as Nat) (n.= tag_in)) same_flag? (case last?_out {.#Some last?_out'} - (and last?_in (text#= "" (:as Text last?_out'))) + (and last?_in (text#= "" (as Text last?_out'))) {.#None} (not last?_in)) - same_value? (|> value_out (:as Int) (i.= value_in))] + same_value? (|> value_out (as Int) (i.= value_in))] (and same_tag? same_flag? same_value?)))) @@ -74,10 +74,10 @@ (run "tuple") (pipe.case {try.#Success tuple_out} - (let [tuple_out (:as (Array Any) tuple_out)] + (let [tuple_out (as (Array Any) tuple_out)] (and (n.= size (array.size tuple_out)) (list.every? (function (_ [left right]) - (i.= left (:as Int right))) + (i.= left (as Int right))) (list.zipped/2 tuple_in (array.list tuple_out))))) {try.#Failure _} |