diff options
author | Eduardo Julian | 2021-09-12 15:39:55 -0400 |
---|---|---|
committer | Eduardo Julian | 2021-09-12 15:39:55 -0400 |
commit | 2dbbaaec93a53f8dd0b96a0028b9cf125c9066cd (patch) | |
tree | 14bc8b5abe09b46ef005c3ff7cf132f1d98ddf0d /stdlib/source/specification/lux/abstract | |
parent | dda05bca0956af5e5b3875c4cc36e61aa04772e4 (diff) |
Re-named \ => # && \\ => ##
Diffstat (limited to 'stdlib/source/specification/lux/abstract')
7 files changed, 47 insertions, 47 deletions
diff --git a/stdlib/source/specification/lux/abstract/apply.lux b/stdlib/source/specification/lux/abstract/apply.lux index f14a43aa5..9b52df567 100644 --- a/stdlib/source/specification/lux/abstract/apply.lux +++ b/stdlib/source/specification/lux/abstract/apply.lux @@ -15,49 +15,49 @@ [// [functor {"+" [Injection Comparison]}]]) -(def: (identity injection comparison (^open "\[0]")) +(def: (identity injection comparison (^open "#[0]")) (All (_ f) (-> (Injection f) (Comparison f) (Apply f) Test)) (do [! random.monad] - [sample (\ ! each injection random.nat)] + [sample (# ! each injection random.nat)] (_.test "Identity." ((comparison n.=) - (\on sample (injection function.identity)) + (#on sample (injection function.identity)) sample)))) -(def: (homomorphism injection comparison (^open "\[0]")) +(def: (homomorphism injection comparison (^open "#[0]")) (All (_ f) (-> (Injection f) (Comparison f) (Apply f) Test)) (do [! random.monad] [sample random.nat - increase (\ ! each n.+ random.nat)] + increase (# ! each n.+ random.nat)] (_.test "Homomorphism." ((comparison n.=) - (\on (injection sample) (injection increase)) + (#on (injection sample) (injection increase)) (injection (increase sample)))))) -(def: (interchange injection comparison (^open "\[0]")) +(def: (interchange injection comparison (^open "#[0]")) (All (_ f) (-> (Injection f) (Comparison f) (Apply f) Test)) (do [! random.monad] [sample random.nat - increase (\ ! each n.+ random.nat)] + increase (# ! each n.+ random.nat)] (_.test "Interchange." ((comparison n.=) - (\on (injection sample) (injection increase)) - (\on (injection increase) (injection (: (-> (-> Nat Nat) Nat) + (#on (injection sample) (injection increase)) + (#on (injection increase) (injection (: (-> (-> Nat Nat) Nat) (function (_ f) (f sample))))))))) -(def: (composition injection comparison (^open "\[0]")) +(def: (composition injection comparison (^open "#[0]")) (All (_ f) (-> (Injection f) (Comparison f) (Apply f) Test)) (do [! random.monad] [sample random.nat - increase (\ ! each n.+ random.nat) - decrease (\ ! each n.- random.nat)] + increase (# ! each n.+ random.nat) + decrease (# ! each n.- random.nat)] (_.test "Composition." ((comparison n.=) (|> (injection function.composite) - (\on (injection increase)) - (\on (injection decrease)) - (\on (injection sample))) - (\on (\on (injection sample) + (#on (injection increase)) + (#on (injection decrease)) + (#on (injection sample))) + (#on (#on (injection sample) (injection increase)) (injection decrease)))))) diff --git a/stdlib/source/specification/lux/abstract/comonad.lux b/stdlib/source/specification/lux/abstract/comonad.lux index ee28bfb49..e465bee7e 100644 --- a/stdlib/source/specification/lux/abstract/comonad.lux +++ b/stdlib/source/specification/lux/abstract/comonad.lux @@ -17,7 +17,7 @@ (All (_ f) (-> (Injection f) (CoMonad f) Test)) (do [! random.monad] [sample random.nat - morphism (\ ! each (function (_ diff) + morphism (# ! each (function (_ diff) (|>> _//out (n.+ diff))) random.nat) .let [start (injection sample)]] @@ -39,10 +39,10 @@ (All (_ f) (-> (Injection f) (Comparison f) (CoMonad f) Test)) (do [! random.monad] [sample random.nat - increase (\ ! each (function (_ diff) + increase (# ! each (function (_ diff) (|>> _//out (n.+ diff))) random.nat) - decrease (\ ! each (function (_ diff) + decrease (# ! each (function (_ diff) (|>> _//out(n.- diff))) random.nat) .let [start (injection sample) diff --git a/stdlib/source/specification/lux/abstract/enum.lux b/stdlib/source/specification/lux/abstract/enum.lux index 26fdf0828..4b0a66fa1 100644 --- a/stdlib/source/specification/lux/abstract/enum.lux +++ b/stdlib/source/specification/lux/abstract/enum.lux @@ -9,19 +9,19 @@ [\\library ["[0]" /]]) -(def: .public (spec (^open "\[0]") gen_sample) +(def: .public (spec (^open "_#[0]") gen_sample) (All (_ a) (-> (/.Enum a) (Random a) Test)) (do random.monad [sample gen_sample] (<| (_.for [/.Enum]) ($_ _.and (_.test "Successor and predecessor are inverse functions." - (and (\= (|> sample \succ \pred) - sample) - (\= (|> sample \pred \succ) - sample) - (not (\= (\succ sample) - sample)) - (not (\= (\pred sample) - sample)))) + (and (_#= (|> sample _#succ _#pred) + sample) + (_#= (|> sample _#pred _#succ) + sample) + (not (_#= (_#succ sample) + sample)) + (not (_#= (_#pred sample) + sample)))) )))) diff --git a/stdlib/source/specification/lux/abstract/functor.lux b/stdlib/source/specification/lux/abstract/functor.lux index 37e38ad42..b446b565c 100644 --- a/stdlib/source/specification/lux/abstract/functor.lux +++ b/stdlib/source/specification/lux/abstract/functor.lux @@ -25,7 +25,7 @@ (def: (identity injection comparison (^open "@//[0]")) (All (_ f) (-> (Injection f) (Comparison f) (Functor f) Test)) (do [! random.monad] - [sample (\ ! each injection random.nat)] + [sample (# ! each injection random.nat)] (_.test "Identity." ((comparison n.=) (@//each function.identity sample) @@ -35,7 +35,7 @@ (All (_ f) (-> (Injection f) (Comparison f) (Functor f) Test)) (do [! random.monad] [sample random.nat - increase (\ ! each n.+ random.nat)] + increase (# ! each n.+ random.nat)] (_.test "Homomorphism." ((comparison n.=) (@//each increase (injection sample)) @@ -44,9 +44,9 @@ (def: (composition injection comparison (^open "@//[0]")) (All (_ f) (-> (Injection f) (Comparison f) (Functor f) Test)) (do [! random.monad] - [sample (\ ! each injection random.nat) - increase (\ ! each n.+ random.nat) - decrease (\ ! each n.- random.nat)] + [sample (# ! each injection random.nat) + increase (# ! each n.+ random.nat) + decrease (# ! each n.- random.nat)] (_.test "Composition." ((comparison n.=) (|> sample (@//each increase) (@//each decrease)) diff --git a/stdlib/source/specification/lux/abstract/hash.lux b/stdlib/source/specification/lux/abstract/hash.lux index 65b78a5cb..1671647b3 100644 --- a/stdlib/source/specification/lux/abstract/hash.lux +++ b/stdlib/source/specification/lux/abstract/hash.lux @@ -11,12 +11,12 @@ [\\library ["[0]" /]]) -(def: .public (spec (^open "\[0]") random) +(def: .public (spec (^open "_#[0]") random) (All (_ a) (-> (/.Hash a) (Random a) Test)) (do random.monad [parameter random subject random] (_.cover [/.Hash] - (if (\= parameter subject) - (n.= (\hash parameter) (\hash subject)) + (if (_#= parameter subject) + (n.= (_#hash parameter) (_#hash subject)) true)))) diff --git a/stdlib/source/specification/lux/abstract/monad.lux b/stdlib/source/specification/lux/abstract/monad.lux index e193e1ecd..7de5df858 100644 --- a/stdlib/source/specification/lux/abstract/monad.lux +++ b/stdlib/source/specification/lux/abstract/monad.lux @@ -15,7 +15,7 @@ (All (_ f) (-> (Injection f) (Comparison f) (/.Monad f) Test)) (do [! random.monad] [sample random.nat - morphism (\ ! each (function (_ diff) + morphism (# ! each (function (_ diff) (|>> (n.+ diff) _//in)) random.nat)] (_.test "Left identity." @@ -36,10 +36,10 @@ (All (_ f) (-> (Injection f) (Comparison f) (/.Monad f) Test)) (do [! random.monad] [sample random.nat - increase (\ ! each (function (_ diff) + increase (# ! each (function (_ diff) (|>> (n.+ diff) _//in)) random.nat) - decrease (\ ! each (function (_ diff) + decrease (# ! each (function (_ diff) (|>> (n.- diff) _//in)) random.nat)] (_.test "Associativity." diff --git a/stdlib/source/specification/lux/abstract/monoid.lux b/stdlib/source/specification/lux/abstract/monoid.lux index dba042a60..531a246a2 100644 --- a/stdlib/source/specification/lux/abstract/monoid.lux +++ b/stdlib/source/specification/lux/abstract/monoid.lux @@ -11,7 +11,7 @@ [// [equivalence {"+" [Equivalence]}]]]]) -(def: .public (spec (^open "\[0]") (^open "\[0]") gen_sample) +(def: .public (spec (^open "_#[0]") (^open "_#[0]") gen_sample) (All (_ a) (-> (Equivalence a) (/.Monoid a) (Random a) Test)) (do random.monad [sample gen_sample @@ -21,12 +21,12 @@ (<| (_.for [/.Monoid]) ($_ _.and (_.test "Left identity." - (\= sample - (\composite \identity sample))) + (_#= sample + (_#composite _#identity sample))) (_.test "Right identity." - (\= sample - (\composite sample \identity))) + (_#= sample + (_#composite sample _#identity))) (_.test "Associativity." - (\= (\composite left (\composite mid right)) - (\composite (\composite left mid) right))) + (_#= (_#composite left (_#composite mid right)) + (_#composite (_#composite left mid) right))) )))) |