diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/test/lux/target/ruby.lux | 178 |
1 files changed, 89 insertions, 89 deletions
diff --git a/stdlib/source/test/lux/target/ruby.lux b/stdlib/source/test/lux/target/ruby.lux index 58cf47c7b..603cded95 100644 --- a/stdlib/source/test/lux/target/ruby.lux +++ b/stdlib/source/test/lux/target/ruby.lux @@ -68,19 +68,19 @@ (_.cover [/.nil] (..nil /.nil)) (_.cover [/.bool] - (expression (|>> (:as Bit) (bit#= bool)) + (expression (|>> (as Bit) (bit#= bool)) (/.bool bool))) (_.cover [/.int] - (expression (|>> (:as Int) (i.= int)) + (expression (|>> (as Int) (i.= int)) (/.int int))) (_.cover [/.float] - (expression (|>> (:as Frac) (f.= float)) + (expression (|>> (as Frac) (f.= float)) (/.float float))) (_.cover [/.string] - (expression (|>> (:as Text) (text#= string)) + (expression (|>> (as Text) (text#= string)) (/.string string))) (_.cover [/.symbol] - (expression (|>> (:as Text) (text#= string)) + (expression (|>> (as Text) (text#= string)) (/.do "id2name" (list) {.#None} (/.symbol string)))) ))) @@ -93,14 +93,14 @@ (~~ (template [</> <lux>] [(_.cover [</>] (let [expected (<lux> left right)] - (expression (|>> (:as Bit) (bit#= expected)) + (expression (|>> (as Bit) (bit#= expected)) (</> (/.bool left) (/.bool right)))))] [/.or .or] [/.and .and] )) (_.cover [/.not] - (expression (|>> (:as Bit) (bit#= (not left))) + (expression (|>> (as Bit) (bit#= (not left))) (/.not (/.bool left)))) )))) @@ -114,7 +114,7 @@ (~~ (template [</> <lux> <pre>] [(_.cover [</>] (let [expected (<lux> (<pre> parameter) (<pre> subject))] - (expression (|>> (:as Frac) (f.= expected)) + (expression (|>> (as Frac) (f.= expected)) (</> (/.float (<pre> parameter)) (/.float (<pre> subject))))))] [/.+ f.+ |>] @@ -127,7 +127,7 @@ (~~ (template [</> <lux>] [(_.cover [</>] (let [expected (<lux> parameter subject)] - (expression (|>> (:as Bit) (bit#= expected)) + (expression (|>> (as Bit) (bit#= expected)) (</> (/.float parameter) (/.float subject)))))] [/.< f.<] @@ -154,7 +154,7 @@ (~~ (template [</> <lux>] [(_.cover [</>] (let [expected (<lux> left right)] - (expression (|>> (:as Frac) f.int (i.= expected)) + (expression (|>> (as Frac) f.int (i.= expected)) (</> (/.int left) (/.int right)))))] [/.bit_or i64.or] @@ -162,19 +162,19 @@ [/.bit_and i64.and] )) (_.cover [/.bit_not] - (expression (|>> (:as Int) (i.= (i64.not left))) + (expression (|>> (as Int) (i.= (i64.not left))) (/.bit_not (/.int left)))) (_.cover [/.opposite] - (expression (|>> (:as Int) (i.= (i.* -1 left))) + (expression (|>> (as Int) (i.= (i.* -1 left))) (/.opposite (/.int left)))) (_.cover [/.bit_shl] (let [expected (i64.left_shifted shift i16)] - (expression (|>> (:as Frac) f.int (i.= expected)) + (expression (|>> (as Frac) f.int (i.= expected)) (/.bit_shl (/.int (.int shift)) (/.int i16))))) (_.cover [/.bit_shr] (let [expected (i.right_shifted shift i16)] - (expression (|>> (:as Frac) f.int (i.= expected)) + (expression (|>> (as Frac) f.int (i.= expected)) (/.bit_shr (/.int (.int shift)) (/.int i16))))) )))) @@ -194,15 +194,15 @@ from (/.int (.int from))]] ($_ _.and (_.cover [/.array /.item] - (and (expression (|>> (:as Frac) (f.= expected)) + (and (expression (|>> (as Frac) (f.= expected)) (/.item (/.int (.int index)) (/.array (list#each /.float items)))) - (expression (|>> (:as Bit)) + (expression (|>> (as Bit)) (|> (/.array (list#each /.float items)) (/.item (/.int (.int size))) (/.= /.nil))))) (_.cover [/.array_range] - (expression (|>> (:as Int) (i.= (.int (++ plus)))) + (expression (|>> (as Int) (i.= (.int (++ plus)))) (|> (/.array (list#each /.float items)) (/.array_range from to) (/.the "length")))) @@ -219,9 +219,9 @@ dummy (/.string dummy)]] ($_ _.and (_.cover [/.hash] - (and (expression (|>> (:as Frac) (f.= expected)) + (and (expression (|>> (as Frac) (f.= expected)) (/.item field (/.hash (list [field (/.float expected)])))) - (expression (|>> (:as Bit)) + (expression (|>> (as Bit)) (|> (/.hash (list [field (/.float expected)])) (/.item dummy) (/.= /.nil))))) @@ -251,18 +251,18 @@ (/.return (/.+ $arg/0 $arg/0)))]] ($_ _.and (_.cover [/.the] - (expression (|>> (:as Int) (i.= (.int size))) + (expression (|>> (as Int) (i.= (.int size))) (|> (/.array (list#each /.float items)) (/.the "length")))) (_.cover [/.do] (expression (let [expected (|> items (list.item index) (maybe.else f.not_a_number))] - (|>> (:as Frac) (f.= expected))) + (|>> (as Frac) (f.= expected))) (|> (/.array (list#each /.float items)) (/.do "at" (list (/.int (.int index))) {.#None})))) (_.cover [/.class] - (expression (|>> (:as Frac) (f.= (f.+ single single))) + (expression (|>> (as Frac) (f.= (f.+ single single))) (|> ($_ /.then (/.set (list $class) (/.class [/.#parameters (list) /.#body double])) @@ -272,7 +272,7 @@ [(list)] (/.lambda {.#None}) (/.apply_lambda/* (list))))) (_.cover [/.new /.initialize] - (expression (|>> (:as Frac) (f.= single)) + (expression (|>> (as Frac) (f.= single)) (|> ($_ /.then (/.set (list $class) (/.class [/.#parameters (list) /.#body ($_ /.then @@ -287,7 +287,7 @@ [(list)] (/.lambda {.#None}) (/.apply_lambda/* (list))))) (_.cover [/.alias_method/2] - (expression (|>> (:as Frac) (f.= (f.+ single single))) + (expression (|>> (as Frac) (f.= (f.+ single single))) (|> ($_ /.then (/.set (list $class) (/.class [/.#parameters (list) /.#body ($_ /.then @@ -302,7 +302,7 @@ (_.for [/.module] ($_ _.and (_.cover [/.include/1] - (expression (|>> (:as Frac) (f.= (f.+ single single))) + (expression (|>> (as Frac) (f.= (f.+ single single))) (|> ($_ /.then (/.set (list $class) (/.module [/.#parameters (list) /.#body double])) @@ -314,7 +314,7 @@ [(list)] (/.lambda {.#None}) (/.apply_lambda/* (list))))) (_.cover [/.extend/1] - (expression (|>> (:as Frac) (f.= (f.+ single single))) + (expression (|>> (as Frac) (f.= (f.+ single single))) (|> ($_ /.then (/.set (list $class) (/.module [/.#parameters (list) /.#body double])) @@ -340,7 +340,7 @@ (_.for [/.stdout] ($_ _.and (_.cover [/.print/1] - (expression (|>> (:as Text) (text#= expected)) + (expression (|>> (as Text) (text#= expected)) (|> ($_ /.then (/.statement (/.require/1 (/.string "stringio"))) (/.set (list $old) /.stdout) @@ -353,7 +353,7 @@ [(list)] (/.lambda {.#None}) (/.apply_lambda/* (list))))) (_.cover [/.print/2] - (expression (|>> (:as Text) (text#= expected)) + (expression (|>> (as Text) (text#= expected)) (|> ($_ /.then (/.statement (/.require/1 (/.string "stringio"))) (/.set (list $old) /.stdout) @@ -368,7 +368,7 @@ (_.for [/.stdin] ($_ _.and (_.cover [/.gets/0] - (expression (|>> (:as Text) (text#= (format left text.\n))) + (expression (|>> (as Text) (text#= (format left text.\n))) (|> ($_ /.then (/.statement (/.require/1 (/.string "stringio"))) (/.set (list $old) /.stdin) @@ -380,7 +380,7 @@ [(list)] (/.lambda {.#None}) (/.apply_lambda/* (list))))) (_.cover [/.last_string_read] - (expression (|>> (:as Text) (text#= (format right text.\n))) + (expression (|>> (as Text) (text#= (format right text.\n))) (|> ($_ /.then (/.statement (/.require/1 (/.string "stringio"))) (/.set (list $old) /.stdin) @@ -392,7 +392,7 @@ [(list)] (/.lambda {.#None}) (/.apply_lambda/* (list))))) (_.cover [/.last_line_number_read] - (expression (|>> (:as Nat) (n.= 2)) + (expression (|>> (as Nat) (n.= 2)) /.last_line_number_read)) )) ))) @@ -419,12 +419,12 @@ ..test|io (_.cover [/.?] (let [expected (if test then else)] - (expression (|>> (:as Frac) (f.= expected)) + (expression (|>> (as Frac) (f.= expected)) (/.? (/.bool test) (/.float then) (/.float else))))) (_.cover [/.comment] - (expression (|>> (:as Frac) (f.= then)) + (expression (|>> (as Frac) (f.= then)) (/.comment comment (/.float then)))) ))) @@ -437,7 +437,7 @@ pattern (# ! each /.string (random.ascii/lower 11))] ($_ _.and (_.cover [/.global] - (expression (|>> (:as Text) (text#= "global-variable")) + (expression (|>> (as Text) (text#= "global-variable")) (|> ($_ /.then (/.set (list $global) (/.float float/0)) (/.return (/.defined?/1 $global))) @@ -445,26 +445,26 @@ (/.apply_lambda/* (list))))) (_.cover [/.script_name] (expression (let [file (format (# file.default separator) packager.main_file)] - (|>> (:as Text) + (|>> (as Text) (text.ends_with? file))) /.script_name)) (_.cover [/.input_record_separator] - (expression (|>> (:as Text) + (expression (|>> (as Text) (text#= text.\n)) /.input_record_separator)) (_.cover [/.output_record_separator] (..nil /.output_record_separator)) (_.cover [/.process_id] - (expression (|>> (:as Nat) (n.= 0) not) + (expression (|>> (as Nat) (n.= 0) not) /.process_id)) (_.cover [/.case_insensitivity_flag] - (expression (|>> (:as Bit) (bit#= false)) + (expression (|>> (as Bit) (bit#= false)) /.case_insensitivity_flag)) (_.cover [/.command_line_arguments] - (expression (|>> (:as Int) (i.= +0)) + (expression (|>> (as Int) (i.= +0)) (/.the "length" /.command_line_arguments))) (_.cover [/.last_string_matched] - (expression (|>> (:as Bit)) + (expression (|>> (as Bit)) (|> ($_ /.then (/.statement (|> (/.manual "Regexp") @@ -474,7 +474,7 @@ [(list)] (/.lambda {.#None}) (/.apply_lambda/* (list))))) (_.cover [/.last_regexp_match] - (expression (|>> (:as Bit)) + (expression (|>> (as Bit)) (|> (/.return (|> (/.manual "Regexp") (/.new (list pattern) {.#None}) (/.do "match" (list pattern) {.#None}) @@ -490,12 +490,12 @@ $foreign (# ! each /.local (random.ascii/lower 10))] ($_ _.and (_.cover [/.local] - (expression (|>> (:as Frac) (f.= (f.+ float/0 float/0))) + (expression (|>> (as Frac) (f.= (f.+ float/0 float/0))) (|> (/.return (/.+ $foreign $foreign)) [(list $foreign)] (/.lambda {.#None}) (/.apply_lambda/* (list (/.float float/0)))))) (_.cover [/.set] - (expression (|>> (:as Frac) (f.= (f.+ float/0 float/0))) + (expression (|>> (as Frac) (f.= (f.+ float/0 float/0))) (|> ($_ /.then (/.set (list $foreign) (/.float float/0)) (/.return (/.+ $foreign $foreign))) @@ -518,7 +518,7 @@ random.nat)] ($_ _.and (_.cover [/.instance] - (expression (|>> (:as Frac) (f.= float/0)) + (expression (|>> (as Frac) (f.= float/0)) (|> ($_ /.then (/.set (list $class) (/.class [/.#parameters (list) /.#body ($_ /.then @@ -533,7 +533,7 @@ [(list)] (/.lambda {.#None}) (/.apply_lambda/* (list))))) (_.cover [/.attr_reader/*] - (expression (|>> (:as Frac) (f.= float/0)) + (expression (|>> (as Frac) (f.= float/0)) (|> ($_ /.then (/.set (list $class) (/.class [/.#parameters (list) /.#body ($_ /.then @@ -547,7 +547,7 @@ [(list)] (/.lambda {.#None}) (/.apply_lambda/* (list))))) (_.cover [/.attr_writer/*] - (expression (|>> (:as Frac) (f.= float/0)) + (expression (|>> (as Frac) (f.= float/0)) (|> ($_ /.then (/.set (list $class) (/.class [/.#parameters (list) /.#body ($_ /.then @@ -563,7 +563,7 @@ [(list)] (/.lambda {.#None}) (/.apply_lambda/* (list))))) (_.cover [/.attr_accessor/*] - (expression (|>> (:as Frac) (f.= float/0)) + (expression (|>> (as Frac) (f.= float/0)) (|> ($_ /.then (/.set (list $class) (/.class [/.#parameters (list) /.#body (/.attr_accessor/* (list instance))])) @@ -590,7 +590,7 @@ random.nat)] ($_ _.and (_.cover [/.static /.class_variable_set /.class_variable_get] - (expression (|>> (:as Int) (i.= int/0)) + (expression (|>> (as Int) (i.= int/0)) (|> ($_ /.then (/.set (list $class) (/.class [/.#parameters (list) /.#body (/.function $method (list) @@ -616,18 +616,18 @@ (<| (_.for [/.LVar*]) ($_ _.and (_.cover [/.variadic] - (expression (|>> (:as Int) .nat (n.= arity)) + (expression (|>> (as Int) .nat (n.= arity)) (|> (/.return (/.the "length" $inputs)) [(list (/.variadic $inputs))] (/.lambda {.#None}) (/.apply_lambda/* vals)))) (_.cover [/.splat] - (expression (|>> (:as Int) .nat (n.= arity)) + (expression (|>> (as Int) .nat (n.= arity)) (|> (/.return (/.the "length" (/.array (list (/.splat $inputs))))) [(list (/.variadic $inputs))] (/.lambda {.#None}) (/.apply_lambda/* vals)))))) (<| (_.for [/.LVar**]) (_.cover [/.variadic_kv /.double_splat] - (expression (|>> (:as Int) .nat (n.= arity)) + (expression (|>> (as Int) .nat (n.= arity)) (|> (/.return (/.the "length" $inputs)) [(list (/.variadic_kv $inputs))] (/.lambda {.#None}) (/.apply_lambda/* (list (/.double_splat (/.hash (list.zipped/2 keys vals))))))))) @@ -642,10 +642,10 @@ $constant (# ! each /.constant (random.ascii/lower 10))] ($_ _.and (_.cover [/.defined?/1] - (and (expression (|>> (:as Bit)) + (and (expression (|>> (as Bit)) (|> (/.defined?/1 $foreign) (/.= /.nil))) - (expression (|>> (:as Text) (text#= "local-variable")) + (expression (|>> (as Text) (text#= "local-variable")) (|> ($_ /.then (/.set (list $foreign) (/.float float/0)) (/.return (/.defined?/1 $foreign))) @@ -653,7 +653,7 @@ (/.apply_lambda/* (list)))))) (_.for [/.CVar] (_.cover [/.constant] - (expression (|>> (:as Text) (text#= "constant")) + (expression (|>> (as Text) (text#= "constant")) (|> ($_ /.then (/.set (list $constant) (/.float float/0)) (/.return (/.defined?/1 $constant))) @@ -680,7 +680,7 @@ (<| (_.for [/.Var]) ..test|var) (_.cover [/.Access] - (and (expression (|>> (:as Frac) (f.= (f.+ float/0 float/0))) + (and (expression (|>> (as Frac) (f.= (f.+ float/0 float/0))) (let [@ (/.item (/.int +0) $foreign)] (|> ($_ /.then (/.set (list $foreign) (/.array (list $foreign))) @@ -688,7 +688,7 @@ (/.return @)) [(list $foreign)] (/.lambda {.#None}) (/.apply_lambda/* (list (/.float float/0)))))) - (expression (|>> (:as Frac) (f.= (f.+ float/0 float/0))) + (expression (|>> (as Frac) (f.= (f.+ float/0 float/0))) (let [@ (/.item field $foreign)] (|> ($_ /.then (/.set (list $foreign) (/.hash (list [field $foreign]))) @@ -731,7 +731,7 @@ ($_ _.and (_.cover [/.break] (let [expected (i.* (.int expected_inner_iterations) input)] - (expression (|>> (:as Frac) f.int (i.= expected)) + (expression (|>> (as Frac) f.int (i.= expected)) (|> ($_ /.then (/.set (list $inner_index) (/.int +0)) (/.set (list $output) (/.int +0)) @@ -747,7 +747,7 @@ (/.apply_lambda/* (list (/.int input))))))) (_.cover [/.next] (let [expected (i.* (.int (n.- expected_inner_iterations full_inner_iterations)) input)] - (expression (|>> (:as Frac) f.int (i.= expected)) + (expression (|>> (as Frac) f.int (i.= expected)) (|> ($_ /.then (/.set (list $inner_index) (/.int +0)) (/.set (list $output) (/.int +0)) @@ -763,7 +763,7 @@ (/.apply_lambda/* (list (/.int input))))))) (_.cover [/.redo] (let [expected (i.* (.int (n.- expected_inner_iterations full_inner_iterations)) input)] - (expression (|>> (:as Frac) f.int (i.= expected)) + (expression (|>> (as Frac) f.int (i.= expected)) (|> ($_ /.then (/.set (list $inner_index) (/.int +0)) (/.set (list $output) (/.int +0)) @@ -790,7 +790,7 @@ expected (i.* (.int iterations) input)]] ($_ _.and (_.cover [/.while] - (expression (|>> (:as Int) (i.= expected)) + (expression (|>> (as Int) (i.= expected)) (|> ($_ /.then (/.set (list $index) (/.int +0)) (/.set (list $output) (/.int +0)) @@ -803,7 +803,7 @@ [(list $input)] (/.lambda {.#None}) (/.apply_lambda/* (list (/.int input)))))) (_.cover [/.for_in] - (expression (|>> (:as Int) (i.= expected)) + (expression (|>> (as Int) (i.= expected)) (|> ($_ /.then (/.set (list $output) (/.int +0)) (/.for_in $index (/.array (list.repeated iterations (/.int input))) @@ -835,13 +835,13 @@ dummy_tag (/.int dummy_tag)]] ($_ _.and (_.cover [/.begin] - (expression (|>> (:as Frac) (f.= expected)) + (expression (|>> (as Frac) (f.= expected)) (|> (/.begin (/.return (/.float expected)) (list [(list) $ex (/.return (/.float dummy))])) [(list)] (/.lambda {.#None}) (/.apply_lambda/* (list))))) (_.cover [/.Rescue /.throw/1] - (expression (|>> (:as Frac) (f.= expected)) + (expression (|>> (as Frac) (f.= expected)) (|> (/.begin ($_ /.then (/.throw/1 (/.string error)) (/.return (/.float dummy))) @@ -849,7 +849,7 @@ [(list)] (/.lambda {.#None}) (/.apply_lambda/* (list))))) (_.cover [/.raise] - (expression (|>> (:as Frac) (f.= expected)) + (expression (|>> (as Frac) (f.= expected)) (|> (/.begin ($_ /.then (/.statement (/.raise (/.string error))) (/.return (/.float dummy))) @@ -857,20 +857,20 @@ [(list)] (/.lambda {.#None}) (/.apply_lambda/* (list))))) (_.cover [/.catch /.throw/2] - (and (expression (|>> (:as Frac) (f.= expected)) + (and (expression (|>> (as Frac) (f.= expected)) (<| (/.apply_lambda/* (list)) (/.lambda {.#None}) [(list)] /.return (/.catch expected_tag) [(list)] (/.throw/2 expected_tag (/.float expected)))) - (expression (|>> (:as Frac) (f.= expected)) + (expression (|>> (as Frac) (f.= expected)) (<| (/.apply_lambda/* (list)) (/.lambda {.#None}) [(list)] /.return (/.catch expected_tag) [(list)] /.statement (/.catch dummy_tag) [(list)] (/.throw/2 expected_tag (/.float expected)))) - (expression (|>> (:as Frac) (f.= expected)) + (expression (|>> (as Frac) (f.= expected)) (<| (/.apply_lambda/* (list)) (/.lambda {.#None}) [(list)] /.return @@ -878,7 +878,7 @@ /.statement (/.catch expected_tag) [(list)] (/.throw/2 expected_tag (/.float expected)))))) (_.cover [/.latest_error_message] - (expression (|>> (:as Text) (text#= error)) + (expression (|>> (as Text) (text#= error)) (|> (/.begin ($_ /.then (/.statement (/.raise (/.string error))) (/.return (/.float dummy))) @@ -890,12 +890,12 @@ [(list)] (/.lambda {.#None}) (/.apply_lambda/* (list)) ..nil) - (expression (|>> (:as Bit) (bit#= true)) + (expression (|>> (as Bit) (bit#= true)) (|> (/.begin ($_ /.then (/.statement (/.raise (/.string error))) (/.return (/.float dummy))) (list [(list) $ex (/.return ($_ /.and - (/.do "kind_of?" (list (: /.CVar (/.manual "Array"))) {.#None} /.latest_error_location) + (/.do "kind_of?" (list (is /.CVar (/.manual "Array"))) {.#None} /.latest_error_location) (/.> (/.int +0) (/.the "length" /.latest_error_location))))])) [(list)] (/.lambda {.#None}) (/.apply_lambda/* (list)))))) @@ -917,23 +917,23 @@ $arg/2 (# ! each /.local (random.ascii/lower 12))] ($_ _.and (_.cover [/.lambda /.return] - (and (expression (|>> (:as Frac) (f.= float/0)) + (and (expression (|>> (as Frac) (f.= float/0)) (|> (/.return (/.float float/0)) [(list)] (/.lambda {.#None}) (/.apply_lambda/* (list)))) - (expression (|>> (:as Frac) f.nat (n.= iterations)) + (expression (|>> (as Frac) f.nat (n.= iterations)) (|> (/.return (/.? (/.< (/.int (.int iterations)) $arg/0) (/.apply_lambda/* (list (/.+ (/.int +1) $arg/0)) $self) $arg/0)) [(list $arg/0)] (/.lambda {.#Some $self}) (/.apply_lambda/* (list (/.int +0))))))) (_.cover [/.apply_lambda/*] - (expression (|>> (:as Frac) (f.= ($_ f.+ float/0 float/1 float/2))) + (expression (|>> (as Frac) (f.= ($_ f.+ float/0 float/1 float/2))) (|> (/.return ($_ /.+ $arg/0 $arg/1 $arg/2)) [(list $arg/0 $arg/1 $arg/2)] (/.lambda {.#None}) (/.apply_lambda/* (list (/.float float/0) (/.float float/1) (/.float float/2)))))) (_.cover [/.function] - (expression (|>> (:as Frac) f.nat (n.= iterations)) + (expression (|>> (as Frac) f.nat (n.= iterations)) (|> ($_ /.then (/.function $self (list $arg/0) (/.return (/.? (/.< (/.int (.int iterations)) $arg/0) @@ -943,7 +943,7 @@ [(list)] (/.lambda {.#None}) (/.apply_lambda/* (list))))) (_.cover [/.apply/*] - (expression (|>> (:as Frac) (f.= ($_ f.+ float/0 float/1 float/2))) + (expression (|>> (as Frac) (f.= ($_ f.+ float/0 float/1 float/2))) (|> ($_ /.then (/.function $self (list $arg/0 $arg/1 $arg/2) (/.return ($_ /.+ $arg/0 $arg/1 $arg/2))) @@ -970,14 +970,14 @@ ??? random.bit] ($_ _.and (_.cover [/.if] - (expression (|>> (:as Frac) (f.= (if ??? float/0 float/1))) + (expression (|>> (as Frac) (f.= (if ??? float/0 float/1))) (|> (/.if (/.bool ???) (/.return (/.float float/0)) (/.return (/.float float/1))) [(list)] (/.lambda {.#None}) (/.apply_lambda/* (list))))) (_.cover [/.when] - (expression (|>> (:as Frac) (f.= (if ??? float/0 float/1))) + (expression (|>> (as Frac) (f.= (if ??? float/0 float/1))) (|> ($_ /.then (/.when (/.bool ???) (/.return (/.float float/0))) @@ -999,22 +999,22 @@ random.int)] ($_ _.and (_.cover [/.statement] - (expression (|>> (:as Frac) (f.= float/0)) + (expression (|>> (as Frac) (f.= float/0)) (|> ($_ /.then (/.statement (/.+ $arg/0 $arg/0)) (/.return $arg/0)) [(list $arg/0)] (/.lambda {.#None}) (/.apply_lambda/* (list (/.float float/0)))))) (_.cover [/.then] - (expression (|>> (:as Frac) (f.= float/0)) + (expression (|>> (as Frac) (f.= float/0)) (|> ($_ /.then (/.return $arg/0) (/.return $arg/1)) [(list $arg/0 $arg/1)] (/.lambda {.#None}) (/.apply_lambda/* (list (/.float float/0) (/.float float/1)))))) (_.cover [/.require/1] - (let [$JSON (: /.CVar (/.manual "JSON"))] - (expression (|>> (:as Text) (text#= expected)) + (let [$JSON (is /.CVar (/.manual "JSON"))] + (expression (|>> (as Text) (text#= expected)) (|> ($_ /.then (/.statement (/.require/1 (/.string "json"))) (/.return (let [json (/.do "parse" (list $arg/0) {.#None} $JSON)] @@ -1030,13 +1030,13 @@ (def: random_expression (Random /.Expression) - (let [literal (: (Random /.Literal) - ($_ random.either - (random#each /.bool random.bit) - (random#each /.float random.frac) - (random#each /.int random.int) - (random#each /.string (random.ascii/lower 5)) - ))] + (let [literal (is (Random /.Literal) + ($_ random.either + (random#each /.bool random.bit) + (random#each /.float random.frac) + (random#each /.int random.int) + (random#each /.string (random.ascii/lower 5)) + ))] ($_ random.either literal ))) @@ -1053,7 +1053,7 @@ (_.cover [/.code /.manual] (|> (/.manual (/.code expected)) - (: /.Expression) + (is /.Expression) (/#= expected))) (_.for [/.Expression] ..test|expression) |