From 41495e32d3f5f88b5f189f48dd4fdbfa883c6ac0 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Mon, 14 Mar 2022 18:27:37 -0400 Subject: De-sigil-ification: > --- .../specification/compositor/generation/case.lux | 98 +++++++++++----------- 1 file changed, 51 insertions(+), 47 deletions(-) (limited to 'stdlib/source/specification/compositor/generation/case.lux') diff --git a/stdlib/source/specification/compositor/generation/case.lux b/stdlib/source/specification/compositor/generation/case.lux index 7d6c81a7b..46fd92eb2 100644 --- a/stdlib/source/specification/compositor/generation/case.lux +++ b/stdlib/source/specification/compositor/generation/case.lux @@ -1,32 +1,32 @@ (.using - [lux {"-" case} - ["_" test {"+" Test}] - [abstract - [monad {"+" do}]] - [control - [pipe {"+" case>}] - ["[0]" try {"+" Try}]] - [data - ["[0]" text ("[1]#[0]" equivalence) - ["%" format {"+" format}]] - [number - ["n" nat] - ["f" frac]] - [collection - ["[0]" list ("[1]#[0]" mix)]]] - [math - ["r" random {"+" Random}]] - [tool - [compiler - ["[0]" reference] - ["[0]" analysis] - ["[0]" synthesis {"+" Path Synthesis}] - ["[0]" phase - ["[1]/[0]" synthesis - ["[0]" case]] - ["[0]" extension/synthesis]]]]] - [/// - [common {"+" Runner}]]) + [lux {"-" case} + ["_" test {"+" Test}] + [abstract + [monad {"+" do}]] + [control + ["[0]" pipe] + ["[0]" try {"+" Try}]] + [data + ["[0]" text ("[1]#[0]" equivalence) + ["%" format {"+" format}]] + [number + ["n" nat] + ["f" frac]] + [collection + ["[0]" list ("[1]#[0]" mix)]]] + [math + ["r" random {"+" Random}]] + [tool + [compiler + ["[0]" reference] + ["[0]" analysis] + ["[0]" synthesis {"+" Path Synthesis}] + ["[0]" phase + ["[1]/[0]" synthesis + ["[0]" case]] + ["[0]" extension/synthesis]]]]] + [/// + [common {"+" Runner}]]) (def: limit Nat 10) @@ -40,11 +40,12 @@ (def: .public (verify expected) (-> Frac (Try Any) Bit) - (|>> (case> {try.#Success actual} - (f.= expected (:as Frac actual)) + (|>> (pipe.case + {try.#Success actual} + (f.= expected (:as Frac actual)) - {try.#Failure _} - false))) + {try.#Failure _} + false))) (def: case (Random [Synthesis Path]) @@ -249,29 +250,32 @@ (_.test "CODE" (|> special_input (run "special_input") - (case> {try.#Success output} - true - - {try.#Failure _} - false))) + (pipe.case + {try.#Success output} + true + + {try.#Failure _} + false))) (_.test "PATTERN_MATCHING 0" (|> (synthesis.branch/case [special_input special_path]) (run "special_path") - (case> {try.#Success output} - true - - {try.#Failure _} - false))) + (pipe.case + {try.#Success output} + true + + {try.#Failure _} + false))) (_.test "PATTERN_MATCHING 1" (|> (synthesis.branch/case [special_input special_pattern_path]) (run "special_pattern_path") - (case> {try.#Success output} - true - - {try.#Failure _} - false))) + (pipe.case + {try.#Success output} + true + + {try.#Failure _} + false))) )) (def: .public (spec run) -- cgit v1.2.3