From 91c0619657bcf2ac520e7dd2912188f66bbe2157 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Tue, 2 Jul 2019 23:36:02 -0400 Subject: Re-name "lux/data/error" to "lux/control/try". --- stdlib/source/spec/compositor/generation/case.lux | 24 +++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'stdlib/source/spec/compositor/generation/case.lux') diff --git a/stdlib/source/spec/compositor/generation/case.lux b/stdlib/source/spec/compositor/generation/case.lux index 5b1187210..43069bcb4 100644 --- a/stdlib/source/spec/compositor/generation/case.lux +++ b/stdlib/source/spec/compositor/generation/case.lux @@ -4,9 +4,9 @@ [abstract [monad (#+ do)]] [control - [pipe (#+ case>)]] + [pipe (#+ case>)] + ["." try (#+ Try)]] [data - ["." error (#+ Error)] ["." text ("#@." equivalence) ["%" format (#+ format)]] [collection @@ -36,11 +36,11 @@ (n/= (dec size) idx)) (def: #export (verify expected) - (-> Frac (Error Any) Bit) - (|>> (case> (#error.Success actual) + (-> Frac (Try Any) Bit) + (|>> (case> (#try.Success actual) (f/= expected (:coerce Frac actual)) - (#error.Failure error) + (#try.Failure _) false))) (def: case @@ -228,7 +228,7 @@ (def: special-pattern-path Path ($_ synthesis.path/alt - (<| error.assume + (<| try.assume (phase.run [extension/synthesis.bundle synthesis.init]) (case.path phase/synthesis.phase @@ -250,28 +250,28 @@ (_.test "CODE" (|> special-input (run "special-input") - (case> (#error.Success output) + (case> (#try.Success output) true - (#error.Failure error) + (#try.Failure _) false))) (_.test "PATTERN-MATCHING 0" (|> (synthesis.branch/case [special-input special-path]) (run "special-path") - (case> (#error.Success output) + (case> (#try.Success output) true - (#error.Failure error) + (#try.Failure _) false))) (_.test "PATTERN-MATCHING 1" (|> (synthesis.branch/case [special-input special-pattern-path]) (run "special-pattern-path") - (case> (#error.Success output) + (case> (#try.Success output) true - (#error.Failure error) + (#try.Failure _) false))) )) -- cgit v1.2.3