diff options
author | Eduardo Julian | 2019-07-02 23:36:02 -0400 |
---|---|---|
committer | Eduardo Julian | 2019-07-02 23:36:02 -0400 |
commit | 91c0619657bcf2ac520e7dd2912188f66bbe2157 (patch) | |
tree | f26675f263eb5f0285c1674b0777a7369248fe07 /stdlib/source/spec/compositor/generation/case.lux | |
parent | 4f191540f831a7bba0e262b1a6b598f99fb9b35c (diff) |
Re-name "lux/data/error" to "lux/control/try".
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/spec/compositor/generation/case.lux | 24 |
1 files changed, 12 insertions, 12 deletions
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))) )) |