diff options
Diffstat (limited to '')
26 files changed, 244 insertions, 210 deletions
diff --git a/stdlib/source/specification/aedifex/repository.lux b/stdlib/source/specification/aedifex/repository.lux index a0812b443..f5f278e7c 100644 --- a/stdlib/source/specification/aedifex/repository.lux +++ b/stdlib/source/specification/aedifex/repository.lux @@ -12,8 +12,9 @@ ["_[1]" \\test]]] [math ["[0]" random]] - ["_" test (.only Test) - ["[0]" unit]]]] + [test + ["[0]" unit] + ["_" property (.only Test)]]]] [\\program ["[0]" / (.only) ["[1][0]" remote] diff --git a/stdlib/source/specification/compositor.lux b/stdlib/source/specification/compositor.lux index 6a6ff9cfb..1caf89d56 100644 --- a/stdlib/source/specification/compositor.lux +++ b/stdlib/source/specification/compositor.lux @@ -1,22 +1,24 @@ (.require - [lux (.except) - ["_" test (.only Test)] - [abstract - [monad (.only do)]] - [control - ["[0]" io (.only IO)] - ["[0]" try]] - [math - ["r" random]] - [meta - [compiler - ["[0]" analysis] - ["[0]" declaration] - [phase - [macro (.only Expander)] - [generation (.only Bundle)]] - [default - [platform (.only Platform)]]]]] + [library + [lux (.except) + [abstract + [monad (.only do)]] + [control + ["[0]" io (.only IO)] + ["[0]" try]] + [math + ["r" random]] + [meta + [compiler + ["[0]" analysis] + ["[0]" declaration] + [phase + [macro (.only Expander)] + [generation (.only Bundle)]] + [default + [platform (.only Platform)]]]] + [test + ["_" property (.only Test)]]]] ["[0]" / ["[1][0]" common (.only Runner Definer)] ["[1]./" analysis @@ -60,8 +62,8 @@ (case ?state,runner,definer {try.#Success [[declaration_bundle declaration_state] runner definer]} (..test runner definer - (the [declaration.#analysis declaration.#state] declaration_state) - expander) + (the [declaration.#analysis declaration.#state] declaration_state) + expander) {try.#Failure error} (_.failure error)))) diff --git a/stdlib/source/specification/compositor/analysis/type.lux b/stdlib/source/specification/compositor/analysis/type.lux index 89ee8646f..acd970ebc 100644 --- a/stdlib/source/specification/compositor/analysis/type.lux +++ b/stdlib/source/specification/compositor/analysis/type.lux @@ -1,23 +1,25 @@ (.require - [lux (.except) - ["_" test (.only Test)] - [abstract - [monad (.only do)]] - [control - ["[0]" pipe] - ["[0]" io] - ["[0]" try]] - [math - ["r" random (.only Random)]] - [meta - ["[0]" code] - [compiler - [analysis (.only State+)] - ["[0]" phase - [macro (.only Expander)] - ["[0]" analysis - ["[1]/[0]" scope] - ["[1]/[0]" type]]]]]]) + [library + [lux (.except) + [abstract + [monad (.only do)]] + [control + ["[0]" pipe] + ["[0]" io] + ["[0]" try]] + [math + ["r" random (.only Random)]] + [meta + ["[0]" code] + [compiler + [analysis (.only State+)] + ["[0]" phase + [macro (.only Expander)] + ["[0]" analysis + ["[1]/[0]" scope] + ["[1]/[0]" type]]]]] + [test + ["_" property (.only Test)]]]]) (def (check_success+ expander state extension params output_type) (-> Expander State+ Text (List Code) Type Bit) diff --git a/stdlib/source/specification/compositor/generation/case.lux b/stdlib/source/specification/compositor/generation/case.lux index 6ac785a12..ba1168ad0 100644 --- a/stdlib/source/specification/compositor/generation/case.lux +++ b/stdlib/source/specification/compositor/generation/case.lux @@ -1,30 +1,32 @@ (.require - [lux (.except case) - ["_" test (.only Test)] - [abstract - [monad (.only do)]] - [control - ["[0]" pipe] - ["[0]" try (.only Try)]] - [data - ["[0]" text (.use "[1]#[0]" equivalence) - ["%" \\format (.only format)]] - [number - ["n" nat] - ["f" frac]] - [collection - ["[0]" list (.use "[1]#[0]" mix)]]] - [math - ["r" random (.only Random)]] - [meta - [compiler - ["[0]" reference] - ["[0]" analysis] - ["[0]" synthesis (.only Path Synthesis)] - ["[0]" phase - ["[1]/[0]" synthesis - ["[0]" case]] - ["[0]" extension/synthesis]]]]] + [library + [lux (.except case) + [abstract + [monad (.only do)]] + [control + ["[0]" pipe] + ["[0]" try (.only Try)]] + [data + ["[0]" text (.use "[1]#[0]" equivalence) + ["%" \\format (.only format)]] + [number + ["n" nat] + ["f" frac]] + [collection + ["[0]" list (.use "[1]#[0]" mix)]]] + [math + ["r" random (.only Random)]] + [meta + [compiler + ["[0]" reference] + ["[0]" analysis] + ["[0]" synthesis (.only Path Synthesis)] + ["[0]" phase + ["[1]/[0]" synthesis + ["[0]" case]] + ["[0]" extension/synthesis]]]] + [test + ["_" property (.only Test)]]]] [/// [common (.only Runner)]]) diff --git a/stdlib/source/specification/compositor/generation/common.lux b/stdlib/source/specification/compositor/generation/common.lux index ba691bde7..e203a6098 100644 --- a/stdlib/source/specification/compositor/generation/common.lux +++ b/stdlib/source/specification/compositor/generation/common.lux @@ -1,30 +1,32 @@ (.require - [lux (.except i64) - ["_" test (.only Test)] - [abstract - [monad (.only do)]] - [control - ["[0]" pipe] - ["[0]" try (.only Try)]] - [data - ["[0]" bit (.use "[1]#[0]" equivalence)] - [number - ["[0]" i64] - ["n" nat] - ["i" int] - ["f" frac]] - ["[0]" text (.use "[1]#[0]" equivalence) - ["%" \\format (.only format)]] - [collection - ["[0]" list]]] - [math - ["r" random (.only Random)]] - [meta - [macro - ["^" pattern]] - [compiler - ["[0]" reference] - ["[0]" synthesis]]]] + [library + [lux (.except i64) + [abstract + [monad (.only do)]] + [control + ["[0]" pipe] + ["[0]" try (.only Try)]] + [data + ["[0]" bit (.use "[1]#[0]" equivalence)] + [number + ["[0]" i64] + ["n" nat] + ["i" int] + ["f" frac]] + ["[0]" text (.use "[1]#[0]" equivalence) + ["%" \\format (.only format)]] + [collection + ["[0]" list]]] + [math + ["r" random (.only Random)]] + [meta + [macro + ["^" pattern]] + [compiler + ["[0]" reference] + ["[0]" synthesis]]] + [test + ["_" property (.only Test)]]]] ["[0]" // ["[1][0]" case] [// diff --git a/stdlib/source/specification/compositor/generation/function.lux b/stdlib/source/specification/compositor/generation/function.lux index 2fb9714e0..92d0bdaa2 100644 --- a/stdlib/source/specification/compositor/generation/function.lux +++ b/stdlib/source/specification/compositor/generation/function.lux @@ -1,23 +1,25 @@ (.require - [lux (.except function) - ["_" test (.only Test)] - [abstract - [monad (.only do)] - ["[0]" enum]] - [control - ["[0]" maybe]] - [data - [number - ["n" nat]] - [collection - ["[0]" list (.use "[1]#[0]" functor)]]] - [math - ["r" random (.only Random) (.use "[1]#[0]" monad)]] - [meta - [compiler - [analysis (.only Arity)] - ["[0]" reference (.only Register)] - ["[0]" synthesis (.only Synthesis)]]]] + [library + [lux (.except function) + [abstract + [monad (.only do)] + ["[0]" enum]] + [control + ["[0]" maybe]] + [data + [number + ["n" nat]] + [collection + ["[0]" list (.use "[1]#[0]" functor)]]] + [math + ["r" random (.only Random) (.use "[1]#[0]" monad)]] + [meta + [compiler + [analysis (.only Arity)] + ["[0]" reference (.only Register)] + ["[0]" synthesis (.only Synthesis)]]]] + [test + ["_" property (.only Test)]]] ["[0]" // ["[1][0]" case] [// diff --git a/stdlib/source/specification/compositor/generation/primitive.lux b/stdlib/source/specification/compositor/generation/primitive.lux index fcb6bd050..43637f7a2 100644 --- a/stdlib/source/specification/compositor/generation/primitive.lux +++ b/stdlib/source/specification/compositor/generation/primitive.lux @@ -1,22 +1,24 @@ (.require - [lux (.except) - ["_" test (.only Test)] - [abstract - [monad (.only do)]] - [control - ["[0]" pipe] - ["[0]" try]] - [data - ["[0]" bit (.use "[1]#[0]" equivalence)] - [number - ["f" frac]] - ["[0]" text (.use "[1]#[0]" equivalence) - ["%" \\format (.only format)]]] - [math - ["r" random]] - [meta - [compiler - ["[0]" synthesis]]]] + [library + [lux (.except) + [abstract + [monad (.only do)]] + [control + ["[0]" pipe] + ["[0]" try]] + [data + ["[0]" bit (.use "[1]#[0]" equivalence)] + [number + ["f" frac]] + ["[0]" text (.use "[1]#[0]" equivalence) + ["%" \\format (.only format)]]] + [math + ["r" random]] + [meta + [compiler + ["[0]" synthesis]]] + [test + ["_" property (.only Test)]]]] [/// [common (.only Runner)]]) diff --git a/stdlib/source/specification/compositor/generation/reference.lux b/stdlib/source/specification/compositor/generation/reference.lux index 27441f349..5e7516f20 100644 --- a/stdlib/source/specification/compositor/generation/reference.lux +++ b/stdlib/source/specification/compositor/generation/reference.lux @@ -1,21 +1,23 @@ (.require - [lux (.except symbol) - ["_" test (.only Test)] - [abstract - [monad (.only do)]] - [control - ["[0]" pipe] - ["[0]" try]] - [data - [number - ["n" nat] - ["f" frac]]] - [meta - [compiler - ["[0]" reference] - ["[0]" synthesis]]] - [math - ["r" random (.only Random)]]] + [library + [lux (.except symbol) + [abstract + [monad (.only do)]] + [control + ["[0]" pipe] + ["[0]" try]] + [data + [number + ["n" nat] + ["f" frac]]] + [meta + [compiler + ["[0]" reference] + ["[0]" synthesis]]] + [math + ["r" random (.only Random)]] + [test + ["_" property (.only Test)]]]] [/// [common (.only Runner Definer)]]) diff --git a/stdlib/source/specification/compositor/generation/structure.lux b/stdlib/source/specification/compositor/generation/structure.lux index 5521c6303..9ab5d02f2 100644 --- a/stdlib/source/specification/compositor/generation/structure.lux +++ b/stdlib/source/specification/compositor/generation/structure.lux @@ -1,28 +1,30 @@ (.require - [lux (.except) - ["_" test (.only Test)] - ["[0]" ffi (.only import)] - [abstract - [monad (.only do)]] - [control - ["[0]" pipe] - ["[0]" maybe] - ["[0]" try]] - [data - [number - ["n" nat] - ["i" int]] - ["[0]" text (.use "[1]#[0]" equivalence) - ["%" \\format (.only format)]] - [collection - ["[0]" array (.only Array)] - ["[0]" list (.use "[1]#[0]" functor)]]] - [math - ["r" random]] - [meta - [compiler - ["[0]" analysis] - ["[0]" synthesis]]]] + [library + [lux (.except) + ["[0]" ffi (.only import)] + [abstract + [monad (.only do)]] + [control + ["[0]" pipe] + ["[0]" maybe] + ["[0]" try]] + [data + [number + ["n" nat] + ["i" int]] + ["[0]" text (.use "[1]#[0]" equivalence) + ["%" \\format (.only format)]] + [collection + ["[0]" array (.only Array)] + ["[0]" list (.use "[1]#[0]" functor)]]] + [math + ["r" random]] + [meta + [compiler + ["[0]" analysis] + ["[0]" synthesis]]] + [test + ["_" property (.only Test)]]]] [/// [common (.only Runner)]]) diff --git a/stdlib/source/specification/lux/abstract/apply.lux b/stdlib/source/specification/lux/abstract/apply.lux index 460469078..607024f11 100644 --- a/stdlib/source/specification/lux/abstract/apply.lux +++ b/stdlib/source/specification/lux/abstract/apply.lux @@ -1,7 +1,6 @@ (.require [library [lux (.except) - ["_" test (.only Test)] [abstract [monad (.only do)]] [control @@ -11,7 +10,9 @@ [number ["n" nat]]] [meta - ["[0]" type]]]] + ["[0]" type]] + [test + ["_" property (.only Test)]]]] [\\library ["[0]" / (.only Apply)]] [// diff --git a/stdlib/source/specification/lux/abstract/codec.lux b/stdlib/source/specification/lux/abstract/codec.lux index 7ed8612b1..c2dd86e90 100644 --- a/stdlib/source/specification/lux/abstract/codec.lux +++ b/stdlib/source/specification/lux/abstract/codec.lux @@ -1,13 +1,14 @@ (.require [library [lux (.except) - ["_" test (.only Test)] [abstract [monad (.only do)]] [control ["[0]" try]] [math - ["[0]" random (.only Random)]]]] + ["[0]" random (.only Random)]] + [test + ["_" property (.only Test)]]]] [\\library ["[0]" / (.only) [// diff --git a/stdlib/source/specification/lux/abstract/comonad.lux b/stdlib/source/specification/lux/abstract/comonad.lux index 9bd0ec336..2583715f2 100644 --- a/stdlib/source/specification/lux/abstract/comonad.lux +++ b/stdlib/source/specification/lux/abstract/comonad.lux @@ -1,13 +1,14 @@ (.require [library [lux (.except) - ["_" test (.only Test)] [abstract [monad (.only do)]] [math ["[0]" random] [number - ["n" nat]]]]] + ["n" nat]]] + [test + ["_" property (.only Test)]]]] [\\library ["[0]" / (.only CoMonad)]] [// diff --git a/stdlib/source/specification/lux/abstract/enum.lux b/stdlib/source/specification/lux/abstract/enum.lux index 84cd03321..f510a345e 100644 --- a/stdlib/source/specification/lux/abstract/enum.lux +++ b/stdlib/source/specification/lux/abstract/enum.lux @@ -1,11 +1,12 @@ (.require [library [lux (.except) - ["_" test (.only Test)] [abstract [monad (.only do)]] [math - ["[0]" random (.only Random)]]]] + ["[0]" random (.only Random)]] + [test + ["_" property (.only Test)]]]] [\\library ["[0]" /]]) diff --git a/stdlib/source/specification/lux/abstract/equivalence.lux b/stdlib/source/specification/lux/abstract/equivalence.lux index 215a015fe..cc760886f 100644 --- a/stdlib/source/specification/lux/abstract/equivalence.lux +++ b/stdlib/source/specification/lux/abstract/equivalence.lux @@ -1,13 +1,14 @@ (.require [library [lux (.except) - ["_" test (.only Test)] [abstract [monad (.only do)]] [data ["[0]" bit (.use "[1]#[0]" equivalence)]] [math - ["[0]" random (.only Random)]]]] + ["[0]" random (.only Random)]] + [test + ["_" property (.only Test)]]]] [\\library ["[0]" / (.only Equivalence)]]) diff --git a/stdlib/source/specification/lux/abstract/functor.lux b/stdlib/source/specification/lux/abstract/functor.lux index 383037e9e..232e9316a 100644 --- a/stdlib/source/specification/lux/abstract/functor.lux +++ b/stdlib/source/specification/lux/abstract/functor.lux @@ -1,7 +1,6 @@ (.require [library [lux (.except) - ["_" test (.only Test)] [abstract [equivalence (.only Equivalence)] [monad (.only do)]] @@ -10,7 +9,9 @@ [math ["[0]" random] [number - ["n" nat]]]]] + ["n" nat]]] + [test + ["_" property (.only Test)]]]] [\\library ["[0]" / (.only Functor)]]) @@ -27,9 +28,9 @@ (do [! random.monad] [sample (at ! each injection random.nat)] (_.test "Identity." - ((comparison n.=) - (@//each function.identity sample) - sample)))) + ((comparison n.=) + (@//each function.identity sample) + sample)))) (def (homomorphism injection comparison (open "@//[0]")) (All (_ f) (-> (Injection f) (Comparison f) (Functor f) Test)) @@ -37,9 +38,9 @@ [sample random.nat increase (at ! each n.+ random.nat)] (_.test "Homomorphism." - ((comparison n.=) - (@//each increase (injection sample)) - (injection (increase sample)))))) + ((comparison n.=) + (@//each increase (injection sample)) + (injection (increase sample)))))) (def (composition injection comparison (open "@//[0]")) (All (_ f) (-> (Injection f) (Comparison f) (Functor f) Test)) @@ -48,9 +49,9 @@ increase (at ! each n.+ random.nat) decrease (at ! each n.- random.nat)] (_.test "Composition." - ((comparison n.=) - (|> sample (@//each increase) (@//each decrease)) - (|> sample (@//each (|>> increase decrease))))))) + ((comparison n.=) + (|> sample (@//each increase) (@//each decrease)) + (|> sample (@//each (|>> increase decrease))))))) (def .public (spec injection comparison functor) (All (_ f) (-> (Injection f) (Comparison f) (Functor f) Test)) diff --git a/stdlib/source/specification/lux/abstract/functor/contravariant.lux b/stdlib/source/specification/lux/abstract/functor/contravariant.lux index 3f02e35c8..aa7d63d43 100644 --- a/stdlib/source/specification/lux/abstract/functor/contravariant.lux +++ b/stdlib/source/specification/lux/abstract/functor/contravariant.lux @@ -1,7 +1,6 @@ (.require [library [lux (.except) - ["_" test (.only Test)] [abstract [equivalence (.only Equivalence)] [monad (.only do)]] @@ -10,7 +9,9 @@ [math ["[0]" random] [number - ["n" nat]]]]] + ["n" nat]]] + [test + ["_" property (.only Test)]]]] [\\library ["[0]" / (.only Functor)]]) diff --git a/stdlib/source/specification/lux/abstract/hash.lux b/stdlib/source/specification/lux/abstract/hash.lux index b66181035..d95fef663 100644 --- a/stdlib/source/specification/lux/abstract/hash.lux +++ b/stdlib/source/specification/lux/abstract/hash.lux @@ -1,13 +1,14 @@ (.require [library [lux (.except) - ["_" test (.only Test)] [abstract [monad (.only do)]] [math ["[0]" random (.only Random)] [number - ["n" nat]]]]] + ["n" nat]]] + [test + ["_" property (.only Test)]]]] [\\library ["[0]" /]]) diff --git a/stdlib/source/specification/lux/abstract/interval.lux b/stdlib/source/specification/lux/abstract/interval.lux index 51688e4ce..0de229d65 100644 --- a/stdlib/source/specification/lux/abstract/interval.lux +++ b/stdlib/source/specification/lux/abstract/interval.lux @@ -1,12 +1,13 @@ (.require [library [lux (.except) - ["_" test (.only Test)] [abstract [monad (.only do)] ["[0]" order]] [math - ["[0]" random (.only Random)]]]] + ["[0]" random (.only Random)]] + [test + ["_" property (.only Test)]]]] [\\library ["[0]" /]]) diff --git a/stdlib/source/specification/lux/abstract/mix.lux b/stdlib/source/specification/lux/abstract/mix.lux index d4f0bcadc..f1389f9e3 100644 --- a/stdlib/source/specification/lux/abstract/mix.lux +++ b/stdlib/source/specification/lux/abstract/mix.lux @@ -1,13 +1,14 @@ (.require [library [lux (.except) - ["_" test (.only Test)] [abstract [monad (.only do)]] [math ["[0]" random] [number - ["n" nat]]]]] + ["n" nat]]] + [test + ["_" property (.only Test)]]]] [// [functor (.only Injection Comparison)]] [\\library diff --git a/stdlib/source/specification/lux/abstract/monad.lux b/stdlib/source/specification/lux/abstract/monad.lux index 3613a3214..422ce8cb8 100644 --- a/stdlib/source/specification/lux/abstract/monad.lux +++ b/stdlib/source/specification/lux/abstract/monad.lux @@ -1,11 +1,12 @@ (.require [library [lux (.except) - ["_" test (.only Test)] [math ["[0]" random] [number - ["n" nat]]]]] + ["n" nat]]] + [test + ["_" property (.only Test)]]]] [\\library ["[0]" / (.only do)]] [// diff --git a/stdlib/source/specification/lux/abstract/monoid.lux b/stdlib/source/specification/lux/abstract/monoid.lux index 78f387f5f..fe69e9f6b 100644 --- a/stdlib/source/specification/lux/abstract/monoid.lux +++ b/stdlib/source/specification/lux/abstract/monoid.lux @@ -1,11 +1,12 @@ (.require [library [lux (.except) - ["_" test (.only Test)] [abstract [monad (.only do)]] [math - ["[0]" random (.only Random)]]]] + ["[0]" random (.only Random)]] + [test + ["_" property (.only Test)]]]] [\\library ["[0]" / (.only) [// diff --git a/stdlib/source/specification/lux/abstract/order.lux b/stdlib/source/specification/lux/abstract/order.lux index 3ec435fb8..ae7dc3355 100644 --- a/stdlib/source/specification/lux/abstract/order.lux +++ b/stdlib/source/specification/lux/abstract/order.lux @@ -1,11 +1,12 @@ (.require [library [lux (.except) - ["_" test (.only Test)] [abstract [monad (.only do)]] [math - ["[0]" random (.only Random)]]]] + ["[0]" random (.only Random)]] + [test + ["_" property (.only Test)]]]] [\\library ["[0]" /]]) diff --git a/stdlib/source/specification/lux/world/console.lux b/stdlib/source/specification/lux/world/console.lux index cb17b4338..9fc830fd2 100644 --- a/stdlib/source/specification/lux/world/console.lux +++ b/stdlib/source/specification/lux/world/console.lux @@ -13,7 +13,8 @@ ["%" \\format (.only format)]]] [math ["[0]" random]] - ["_" test (.only Test) + [test + ["_" property (.only Test)] ["[0]" unit]]]] [\\library ["[0]" /]]) diff --git a/stdlib/source/specification/lux/world/environment.lux b/stdlib/source/specification/lux/world/environment.lux index fb6600bfe..066ad2783 100644 --- a/stdlib/source/specification/lux/world/environment.lux +++ b/stdlib/source/specification/lux/world/environment.lux @@ -14,7 +14,8 @@ ["[0]" list]]] [math ["[0]" random]] - ["_" test (.only Test) + [test + ["_" property (.only Test)] ["[0]" unit]]]] [\\library ["[0]" /]]) diff --git a/stdlib/source/specification/lux/world/file.lux b/stdlib/source/specification/lux/world/file.lux index 0f642d2aa..b70555b6f 100644 --- a/stdlib/source/specification/lux/world/file.lux +++ b/stdlib/source/specification/lux/world/file.lux @@ -28,7 +28,8 @@ [world [time ["[0]" instant (.only Instant) (.use "[1]#[0]" equivalence)]]] - ["_" test (.only Test) + [test + ["_" property (.only Test)] ["[0]" unit]]]] [\\library ["[0]" /]]) diff --git a/stdlib/source/specification/lux/world/shell.lux b/stdlib/source/specification/lux/world/shell.lux index bf507b536..be41059a0 100644 --- a/stdlib/source/specification/lux/world/shell.lux +++ b/stdlib/source/specification/lux/world/shell.lux @@ -16,7 +16,8 @@ [number ["n" nat] ["i" int]]] - ["_" test (.only Test) + [test + ["_" property (.only Test)] ["[0]" unit]]]] [\\library ["[0]" / (.only) |