From 9e2f1e76f2c8df01ed7687d934c3210fcf676bd6 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Thu, 16 Jun 2022 00:48:19 -0400 Subject: De-sigil-ification: suffix : [Part 13] --- .../specification/compositor/generation/case.lux | 28 +++++++++++----------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'stdlib/source/specification/compositor/generation/case.lux') 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) -- cgit v1.2.3