aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/spec/compositor/generation/case.lux
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/spec/compositor/generation/case.lux24
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)))
))