From 832a9361b632331e82a64c07baa560487ca8abde Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Tue, 29 Dec 2020 00:38:21 -0400 Subject: Moved "lux/data/number" to "lux/math/number". --- stdlib/source/spec/aedifex/repository.lux | 5 ++-- stdlib/source/spec/lux/abstract/apply.lux | 29 +++++++++++----------- stdlib/source/spec/lux/abstract/comonad.lux | 9 +++---- stdlib/source/spec/lux/abstract/fold.lux | 7 +++--- stdlib/source/spec/lux/abstract/functor.lux | 7 +++--- .../spec/lux/abstract/functor/contravariant.lux | 9 +++---- stdlib/source/spec/lux/abstract/hash.lux | 8 +++--- stdlib/source/spec/lux/abstract/monad.lux | 19 +++++++------- stdlib/source/spec/lux/world/shell.lux | 8 +++--- 9 files changed, 48 insertions(+), 53 deletions(-) (limited to 'stdlib/source/spec') diff --git a/stdlib/source/spec/aedifex/repository.lux b/stdlib/source/spec/aedifex/repository.lux index 35f26eabc..250bd3d01 100644 --- a/stdlib/source/spec/aedifex/repository.lux +++ b/stdlib/source/spec/aedifex/repository.lux @@ -15,6 +15,7 @@ ["." random]]] {#program ["." / + ["#." remote] ["/#" // #_ ["#." artifact (#+ Artifact) ["#/." extension]]]]} @@ -28,11 +29,11 @@ [expected (_binary.random 100)] (wrap ($_ _.and' (do promise.monad - [#let [uri/good (/.uri valid_artifact //artifact/extension.lux_library)] + [#let [uri/good (/remote.uri valid_artifact //artifact/extension.lux_library)] upload!/good (\ subject upload uri/good expected) download!/good (\ subject download uri/good) - #let [uri/bad (/.uri invalid_artifact //artifact/extension.lux_library)] + #let [uri/bad (/remote.uri invalid_artifact //artifact/extension.lux_library)] upload!/bad (\ subject upload uri/bad expected) download!/bad (\ subject download uri/bad)] (_.cover' [/.Repository] diff --git a/stdlib/source/spec/lux/abstract/apply.lux b/stdlib/source/spec/lux/abstract/apply.lux index 8b9884b26..a3218ae0c 100644 --- a/stdlib/source/spec/lux/abstract/apply.lux +++ b/stdlib/source/spec/lux/abstract/apply.lux @@ -1,50 +1,49 @@ (.module: [lux #* + ["_" test (#+ Test)] [abstract [monad (#+ do)]] - [data - [number - ["n" nat]]] [control ["." function]] [math - ["." random]] - ["_" test (#+ Test)]] + ["." random] + [number + ["n" nat]]]] {1 ["." / (#+ Apply)]} [// [functor (#+ Injection Comparison)]]) -(def: (identity injection comparison (^open "_//.")) +(def: (identity injection comparison (^open "\.")) (All [f] (-> (Injection f) (Comparison f) (Apply f) Test)) (do {! random.monad} [sample (\ ! map injection random.nat)] (_.test "Identity." ((comparison n.=) - (_//apply (injection function.identity) sample) + (\apply (injection function.identity) sample) sample)))) -(def: (homomorphism injection comparison (^open "_//.")) +(def: (homomorphism injection comparison (^open "\.")) (All [f] (-> (Injection f) (Comparison f) (Apply f) Test)) (do {! random.monad} [sample random.nat increase (\ ! map n.+ random.nat)] (_.test "Homomorphism." ((comparison n.=) - (_//apply (injection increase) (injection sample)) + (\apply (injection increase) (injection sample)) (injection (increase sample)))))) -(def: (interchange injection comparison (^open "_//.")) +(def: (interchange injection comparison (^open "\.")) (All [f] (-> (Injection f) (Comparison f) (Apply f) Test)) (do {! random.monad} [sample random.nat increase (\ ! map n.+ random.nat)] (_.test "Interchange." ((comparison n.=) - (_//apply (injection increase) (injection sample)) - (_//apply (injection (function (_ f) (f sample))) (injection increase)))))) + (\apply (injection increase) (injection sample)) + (\apply (injection (function (_ f) (f sample))) (injection increase)))))) -(def: (composition injection comparison (^open "_//.")) +(def: (composition injection comparison (^open "\.")) (All [f] (-> (Injection f) (Comparison f) (Apply f) Test)) (do {! random.monad} [sample random.nat @@ -52,12 +51,12 @@ decrease (\ ! map n.- random.nat)] (_.test "Composition." ((comparison n.=) - (_$ _//apply + (_$ \apply (injection function.compose) (injection increase) (injection decrease) (injection sample)) - ($_ _//apply + ($_ \apply (injection increase) (injection decrease) (injection sample)))))) diff --git a/stdlib/source/spec/lux/abstract/comonad.lux b/stdlib/source/spec/lux/abstract/comonad.lux index 5865381d2..42933a9e3 100644 --- a/stdlib/source/spec/lux/abstract/comonad.lux +++ b/stdlib/source/spec/lux/abstract/comonad.lux @@ -1,13 +1,12 @@ (.module: [lux #* + ["_" test (#+ Test)] [abstract [monad (#+ do)]] - [data - [number - ["n" nat]]] [math - ["." random]] - ["_" test (#+ Test)]] + ["." random] + [number + ["n" nat]]]] {1 ["." / (#+ CoMonad)]} [// diff --git a/stdlib/source/spec/lux/abstract/fold.lux b/stdlib/source/spec/lux/abstract/fold.lux index c1d87dba1..03421803f 100644 --- a/stdlib/source/spec/lux/abstract/fold.lux +++ b/stdlib/source/spec/lux/abstract/fold.lux @@ -3,11 +3,10 @@ ["_" test (#+ Test)] [abstract [monad (#+ do)]] - [data - [number - ["n" nat]]] [math - ["." random]]] + ["." random] + [number + ["n" nat]]]] [// [functor (#+ Injection Comparison)]] {1 ["." /]}) diff --git a/stdlib/source/spec/lux/abstract/functor.lux b/stdlib/source/spec/lux/abstract/functor.lux index f29e34554..88fc113ee 100644 --- a/stdlib/source/spec/lux/abstract/functor.lux +++ b/stdlib/source/spec/lux/abstract/functor.lux @@ -6,11 +6,10 @@ [monad (#+ do)]] [control ["." function]] - [data - [number - ["n" nat]]] [math - ["." random]]] + ["." random] + [number + ["n" nat]]]] {1 ["." / (#+ Functor)]}) diff --git a/stdlib/source/spec/lux/abstract/functor/contravariant.lux b/stdlib/source/spec/lux/abstract/functor/contravariant.lux index 8a2e237b6..f713b5c9e 100644 --- a/stdlib/source/spec/lux/abstract/functor/contravariant.lux +++ b/stdlib/source/spec/lux/abstract/functor/contravariant.lux @@ -1,16 +1,15 @@ (.module: [lux #* + ["_" test (#+ Test)] [abstract [equivalence (#+ Equivalence)] [monad (#+ do)]] - [data - [number - ["n" nat]]] [control ["." function]] [math - ["." random]] - ["_" test (#+ Test)]] + ["." random] + [number + ["n" nat]]]] {1 ["." / (#+ Functor)]}) diff --git a/stdlib/source/spec/lux/abstract/hash.lux b/stdlib/source/spec/lux/abstract/hash.lux index a87846d1c..17f8d12f2 100644 --- a/stdlib/source/spec/lux/abstract/hash.lux +++ b/stdlib/source/spec/lux/abstract/hash.lux @@ -4,11 +4,11 @@ [abstract [monad (#+ do)]] [data - ["." bit ("#\." equivalence)] - [number - ["n" nat]]] + ["." bit ("#\." equivalence)]] [math - ["." random (#+ Random)]]] + ["." random (#+ Random)] + [number + ["n" nat]]]] {1 ["." /]}) diff --git a/stdlib/source/spec/lux/abstract/monad.lux b/stdlib/source/spec/lux/abstract/monad.lux index 322de7b7b..a1e5a41e4 100644 --- a/stdlib/source/spec/lux/abstract/monad.lux +++ b/stdlib/source/spec/lux/abstract/monad.lux @@ -1,18 +1,17 @@ (.module: [lux #* - [data - [number - ["n" nat]]] + ["_" test (#+ Test)] [math - ["." random]] - ["_" test (#+ Test)]] + ["." random] + [number + ["n" nat]]]] {1 - ["." / (#+ Monad do)]} + ["." / (#+ do)]} [// [functor (#+ Injection Comparison)]]) (def: (left-identity injection comparison (^open "_//.")) - (All [f] (-> (Injection f) (Comparison f) (Monad f) Test)) + (All [f] (-> (Injection f) (Comparison f) (/.Monad f) Test)) (do {! random.monad} [sample random.nat morphism (\ ! map (function (_ diff) @@ -24,7 +23,7 @@ (morphism sample))))) (def: (right-identity injection comparison (^open "_//.")) - (All [f] (-> (Injection f) (Comparison f) (Monad f) Test)) + (All [f] (-> (Injection f) (Comparison f) (/.Monad f) Test)) (do random.monad [sample random.nat] (_.test "Right identity." @@ -33,7 +32,7 @@ (injection sample))))) (def: (associativity injection comparison (^open "_//.")) - (All [f] (-> (Injection f) (Comparison f) (Monad f) Test)) + (All [f] (-> (Injection f) (Comparison f) (/.Monad f) Test)) (do {! random.monad} [sample random.nat increase (\ ! map (function (_ diff) @@ -48,7 +47,7 @@ (|> (injection sample) (_//map (|>> increase (_//map decrease) _//join)) _//join))))) (def: #export (spec injection comparison monad) - (All [f] (-> (Injection f) (Comparison f) (Monad f) Test)) + (All [f] (-> (Injection f) (Comparison f) (/.Monad f) Test)) (<| (_.for [/.Monad]) ($_ _.and (..left-identity injection comparison monad) diff --git a/stdlib/source/spec/lux/world/shell.lux b/stdlib/source/spec/lux/world/shell.lux index 1a9d649b8..15e3012d0 100644 --- a/stdlib/source/spec/lux/world/shell.lux +++ b/stdlib/source/spec/lux/world/shell.lux @@ -14,12 +14,12 @@ [data ["." product] ["." text ("#\." equivalence) - ["%" format (#+ format)]] + ["%" format (#+ format)]]] + [math + ["." random] [number ["n" nat] - ["i" int]]] - [math - ["." random]]] + ["i" int]]]] {1 ["." / [// -- cgit v1.2.3