aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/specification/compositor/generation
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/specification/compositor/generation')
-rw-r--r--stdlib/source/specification/compositor/generation/case.lux28
-rw-r--r--stdlib/source/specification/compositor/generation/common.lux16
-rw-r--r--stdlib/source/specification/compositor/generation/function.lux10
-rw-r--r--stdlib/source/specification/compositor/generation/primitive.lux4
-rw-r--r--stdlib/source/specification/compositor/generation/reference.lux8
-rw-r--r--stdlib/source/specification/compositor/generation/structure.lux6
6 files changed, 36 insertions, 36 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)
diff --git a/stdlib/source/specification/compositor/generation/common.lux b/stdlib/source/specification/compositor/generation/common.lux
index 85ea2a496..fabd44907 100644
--- a/stdlib/source/specification/compositor/generation/common.lux
+++ b/stdlib/source/specification/compositor/generation/common.lux
@@ -30,11 +30,11 @@
[//
[common (.only Runner)]]])
-(def: safe
+(def safe
(-> Text Text)
(text.replaced " " "_"))
-(def: (bit run)
+(def (bit run)
(-> Runner Test)
(do r.monad
[param r.i64
@@ -76,7 +76,7 @@
(let [param (n.% 64 param)])))
))))
-(def: (i64 run)
+(def (i64 run)
(-> Runner Test)
(do r.monad
[param (|> r.i64 (r.only (|>> ("lux i64 =" 0) not)))
@@ -122,11 +122,11 @@
))
))))
-(def: simple_frac
+(def simple_frac
(Random Frac)
(|> r.nat (at r.monad each (|>> (n.% 1000) .int i.frac))))
-(def: (f64 run)
+(def (f64 run)
(-> Runner Test)
(do r.monad
[param (|> ..simple_frac (r.only (|>> (f.= +0.0) not)))
@@ -179,7 +179,7 @@
(//case.verify subject)))
))))
-(def: (text run)
+(def (text run)
(-> Runner Test)
(do [! r.monad]
[sample_size (|> r.nat (at ! each (|>> (n.% 10) (n.max 1))))
@@ -300,7 +300,7 @@
false)))
)))
-(def: (io run)
+(def (io run)
(-> Runner Test)
(do r.monad
[message (r.alphabetic 5)]
@@ -358,7 +358,7 @@
false)))
)))
-(def: .public (spec runner)
+(def .public (spec runner)
(-> Runner Test)
(all _.and
(..bit runner)
diff --git a/stdlib/source/specification/compositor/generation/function.lux b/stdlib/source/specification/compositor/generation/function.lux
index 86c495c3b..a7cb2de43 100644
--- a/stdlib/source/specification/compositor/generation/function.lux
+++ b/stdlib/source/specification/compositor/generation/function.lux
@@ -23,19 +23,19 @@
[//
[common (.only Runner)]]])
-(def: max_arity
+(def max_arity
Arity
10)
-(def: arity
+(def arity
(Random Arity)
(|> r.nat (r#each (|>> (n.% max_arity) (n.max 1)))))
-(def: (local arity)
+(def (local arity)
(-> Arity (Random Register))
(|> r.nat (r#each (|>> (n.% arity) ++))))
-(def: function
+(def function
(Random [Arity Register Synthesis])
(do r.monad
[arity ..arity
@@ -46,7 +46,7 @@
synthesis.#arity arity
synthesis.#body (synthesis.variable/local local)])])))
-(def: .public (spec run)
+(def .public (spec run)
(-> Runner Test)
(do [! r.monad]
[[arity local functionS] ..function
diff --git a/stdlib/source/specification/compositor/generation/primitive.lux b/stdlib/source/specification/compositor/generation/primitive.lux
index 540fc289b..f927d5dd2 100644
--- a/stdlib/source/specification/compositor/generation/primitive.lux
+++ b/stdlib/source/specification/compositor/generation/primitive.lux
@@ -20,13 +20,13 @@
[///
[common (.only Runner)]])
-(def: (f/=' reference subject)
+(def (f/=' reference subject)
(-> Frac Frac Bit)
(or (f.= reference subject)
(and (f.not_a_number? reference)
(f.not_a_number? subject))))
-(def: .public (spec run)
+(def .public (spec run)
(-> Runner Test)
(`` (all _.and
(~~ (with_template [<evaluation_name> <synthesis> <gen> <test>]
diff --git a/stdlib/source/specification/compositor/generation/reference.lux b/stdlib/source/specification/compositor/generation/reference.lux
index f8f68c51e..c7ba5c2bf 100644
--- a/stdlib/source/specification/compositor/generation/reference.lux
+++ b/stdlib/source/specification/compositor/generation/reference.lux
@@ -19,12 +19,12 @@
[///
[common (.only Runner Definer)]])
-(def: symbol
+(def symbol
(Random Symbol)
(let [symbol_part (r.upper_case_alpha 5)]
[(r.and symbol_part symbol_part)]))
-(def: (definition define)
+(def (definition define)
(-> Definer Test)
(do r.monad
[name ..symbol
@@ -38,7 +38,7 @@
{try.#Failure _}
false)))))
-(def: (variable run)
+(def (variable run)
(-> Runner Test)
(do [! r.monad]
[register (|> r.nat (at ! each (n.% 100)))
@@ -55,7 +55,7 @@
{try.#Failure _}
false)))))
-(def: .public (spec runner definer)
+(def .public (spec runner definer)
(-> Runner Definer Test)
(all _.and
(..definition definer)
diff --git a/stdlib/source/specification/compositor/generation/structure.lux b/stdlib/source/specification/compositor/generation/structure.lux
index 3d6b482ad..bfc6621b9 100644
--- a/stdlib/source/specification/compositor/generation/structure.lux
+++ b/stdlib/source/specification/compositor/generation/structure.lux
@@ -28,7 +28,7 @@
(import java/lang/Integer)
-(def: (variant run)
+(def (variant run)
(-> Runner Test)
(do [! r.monad]
[num_tags (|> r.nat (at ! each (|>> (n.% 10) (n.max 2))))
@@ -64,7 +64,7 @@
{try.#Failure _}
false)))))
-(def: (tuple run)
+(def (tuple run)
(-> Runner Test)
(do [! r.monad]
[size (|> r.nat (at ! each (|>> (n.% 10) (n.max 2))))
@@ -83,7 +83,7 @@
{try.#Failure _}
false)))))
-(def: .public (spec runner)
+(def .public (spec runner)
(-> Runner Test)
(all _.and
(..variant runner)