diff options
author | Eduardo Julian | 2022-06-16 00:48:19 -0400 |
---|---|---|
committer | Eduardo Julian | 2022-06-16 00:48:19 -0400 |
commit | 9e2f1e76f2c8df01ed7687d934c3210fcf676bd6 (patch) | |
tree | 115fab5bd8a5f53dc0d13ce5453095324a83496f /stdlib/source/specification/compositor | |
parent | f92c806ee8da63f04bbefbf558f6249bacdb47ea (diff) |
De-sigil-ification: suffix : [Part 13]
Diffstat (limited to 'stdlib/source/specification/compositor')
8 files changed, 42 insertions, 42 deletions
diff --git a/stdlib/source/specification/compositor/analysis/type.lux b/stdlib/source/specification/compositor/analysis/type.lux index d1115fbfa..8aae58f13 100644 --- a/stdlib/source/specification/compositor/analysis/type.lux +++ b/stdlib/source/specification/compositor/analysis/type.lux @@ -20,7 +20,7 @@ ["[1]/[0]" scope] ["[1]/[0]" type]]]]]]) -(def: (check_success+ expander state extension params output_type) +(def (check_success+ expander state extension params output_type) (-> Expander State+ Text (List Code) Type Bit) (|> (analysis/scope.with_scope "" (analysis/type.with_type output_type @@ -33,7 +33,7 @@ {try.#Failure _} false))) -(def: check +(def check (Random [Code Type Code]) (`` (all r.either (~~ (with_template [<random> <type> <code>] @@ -51,7 +51,7 @@ [(r.upper_case_alpha 5) {0 #0 "#Text" {0 #0}} code.text] ))))) -(def: .public (spec expander state) +(def .public (spec expander state) (-> Expander State+ Test) (do r.monad [[typeC exprT exprC] ..check diff --git a/stdlib/source/specification/compositor/common.lux b/stdlib/source/specification/compositor/common.lux index 947131032..50383371b 100644 --- a/stdlib/source/specification/compositor/common.lux +++ b/stdlib/source/specification/compositor/common.lux @@ -31,7 +31,7 @@ (generation.State+ anchor expression directive) what))) -(def: (runner (open "[0]") state) +(def (runner (open "[0]") state) (Instancer Runner) (function (_ evaluation_name expressionS) (do try.monad @@ -42,7 +42,7 @@ (phase expressionS)))] (at host evaluate! evaluation_name expressionG)))) -(def: (definer (open "[0]") state) +(def (definer (open "[0]") state) (Instancer Definer) (function (_ lux_name expressionS) (do try.monad @@ -56,7 +56,7 @@ (phase (synthesis.constant lux_name))))] (at host evaluate! "definer" definitionG)))) -(def: .public (executors target expander platform +(def .public (executors target expander platform analysis_bundle generation_bundle directive_bundle program extender) (All (_ anchor expression directive) 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) |