aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/specification/compositor/generation/case.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/specification/compositor/generation/case.lux')
-rw-r--r--stdlib/source/specification/compositor/generation/case.lux28
1 files changed, 14 insertions, 14 deletions
diff --git a/stdlib/source/specification/compositor/generation/case.lux b/stdlib/source/specification/compositor/generation/case.lux
index c76cd5037..e1603a517 100644
--- a/stdlib/source/specification/compositor/generation/case.lux
+++ b/stdlib/source/specification/compositor/generation/case.lux
@@ -28,17 +28,17 @@
[///
[common (.only Runner)]])
-(def: limit Nat 10)
+(def limit Nat 10)
-(def: size
+(def size
(Random Nat)
(|> r.nat (at r.monad each (|>> (n.% ..limit) (n.max 2)))))
-(def: (tail? size idx)
+(def (tail? size idx)
(-> Nat Nat Bit)
(n.= (-- size) idx))
-(def: .public (verify expected)
+(def .public (verify expected)
(-> Frac (Try Any) Bit)
(|>> (pipe.case
{try.#Success actual}
@@ -47,7 +47,7 @@
{try.#Failure _}
false)))
-(def: case
+(def case
(Random [Synthesis Path])
(<| r.rec (function (_ case))
(`` (all r.either
@@ -97,7 +97,7 @@
(in [caseS caseP]))
))))
-(def: (let_spec run)
+(def (let_spec run)
(-> Runner Test)
(do r.monad
[value r.safe_frac]
@@ -108,7 +108,7 @@
(run "let_spec")
(verify value)))))
-(def: (if_spec run)
+(def (if_spec run)
(-> Runner Test)
(do r.monad
[on_true r.safe_frac
@@ -121,7 +121,7 @@
(run "if_spec")
(verify (if verdict on_true on_false))))))
-(def: (case_spec run)
+(def (case_spec run)
(-> Runner Test)
(do r.monad
[[inputS pathS] ..case
@@ -138,7 +138,7 @@
(run "case_spec")
(verify on_success)))))
-(def: special_input
+(def special_input
Synthesis
(let [_cursor_ (is Synthesis
(synthesis.tuple (list (synthesis.text .prelude)
@@ -182,7 +182,7 @@
(_item_ (__tuple__ (list (__symbol__ ["" "tail"]))))
))))
-(def: special_path
+(def special_path
Path
(let [_end_ (synthesis.path/side {.#Left 0})
_item_ (synthesis.path/side {.#Right 0})
@@ -208,7 +208,7 @@
... THEN
(synthesis.path/then (synthesis.bit #0))))))
-(def: special_pattern
+(def special_pattern
analysis.Pattern
(let [... [_ {#Tuple {#Item arg args'}}]
head (<| analysis.pattern/tuple (list (analysis.pattern/bind 2))
@@ -225,7 +225,7 @@
(<| analysis.pattern/variant [0 #1]
(analysis.pattern/tuple (list head tail)))))
-(def: special_pattern_path
+(def special_pattern_path
Path
(all synthesis.path/alt
(<| try.trusted
@@ -240,7 +240,7 @@
(synthesis.path/then (synthesis.bit #0)))))
... TODO: Get rid of this ASAP
-(def: (special_spec run)
+(def (special_spec run)
(-> Runner Test)
(all _.and
(_.property "==="
@@ -278,7 +278,7 @@
false)))
))
-(def: .public (spec run)
+(def .public (spec run)
(-> Runner Test)
(all _.and
(..special_spec run)