aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/test/test/luxc/analyser/case.lux
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--new-luxc/test/test/luxc/analyser/case.lux9
1 files changed, 5 insertions, 4 deletions
diff --git a/new-luxc/test/test/luxc/analyser/case.lux b/new-luxc/test/test/luxc/analyser/case.lux
index 983dff6f5..f75ebce00 100644
--- a/new-luxc/test/test/luxc/analyser/case.lux
+++ b/new-luxc/test/test/luxc/analyser/case.lux
@@ -6,6 +6,7 @@
(data [bool "B/" Eq<Bool>]
["R" result]
[product]
+ [maybe]
[text "T/" Eq<Text>]
text/format
(coll [list "L/" Monad<List>]
@@ -111,8 +112,8 @@
(r/map product;right gen-primitive)
(do r;Monad<Random>
[choice (|> r;nat (:: @ map (n.% (list;size variant-tags))))
- #let [choiceT (assume (list;nth choice variant-tags))
- choiceC (assume (list;nth choice primitivesC))]]
+ #let [choiceT (maybe;assume (list;nth choice variant-tags))
+ choiceC (maybe;assume (list;nth choice primitivesC))]]
(wrap (` ((~ choiceT) (~ choiceC)))))
(do r;Monad<Random>
[size (|> r;nat (:: @ map (n.% +3)))
@@ -156,10 +157,10 @@
redundant-branchesC (<| (L/map (branch outputC))
list;concat
(list (list;take redundancy-idx redundant-patterns)
- (list (assume (list;nth redundancy-idx redundant-patterns)))
+ (list (maybe;assume (list;nth redundancy-idx redundant-patterns)))
(list;drop redundancy-idx redundant-patterns)))
heterogeneous-branchesC (list;concat (list (list;take heterogeneous-idx exhaustive-branchesC)
- (list (let [[_pattern _body] (assume (list;nth heterogeneous-idx exhaustive-branchesC))]
+ (list (let [[_pattern _body] (maybe;assume (list;nth heterogeneous-idx exhaustive-branchesC))]
[_pattern heterogeneousC]))
(list;drop (n.inc heterogeneous-idx) exhaustive-branchesC)))
]]