diff options
Diffstat (limited to 'stdlib/source/test/lux/control/state.lux')
-rw-r--r-- | stdlib/source/test/lux/control/state.lux | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/stdlib/source/test/lux/control/state.lux b/stdlib/source/test/lux/control/state.lux index 81c10a970..728304f50 100644 --- a/stdlib/source/test/lux/control/state.lux +++ b/stdlib/source/test/lux/control/state.lux @@ -20,14 +20,14 @@ [\\library ["[0]" / (.only State)]]) -(def: (with_conditions [state output] computation) +(def (with_conditions [state output] computation) (-> [Nat Nat] (State Nat Nat) Bit) (|> computation (/.result state) product.right (n.= output))) -(def: basics +(def basics (do random.monad [state random.nat value random.nat] @@ -54,18 +54,18 @@ /.get))) ))) -(def: (injection value) +(def (injection value) (All (_ s) (Injection (State s))) (function (_ state) [state value])) -(def: (comparison init) +(def (comparison init) (All (_ s) (-> s (Comparison (State s)))) (function (_ == left right) (== (product.right (/.result init left)) (product.right (/.result init right))))) -(def: structures +(def structures Test (do random.monad [state random.nat] @@ -78,7 +78,7 @@ ($monad.spec ..injection (..comparison state) /.monad)) ))) -(def: loops +(def loops Test (do [! random.monad] [limit (|> random.nat (at ! each (n.% 10))) @@ -100,7 +100,7 @@ (n.= 1 state')))))) ))) -(def: monad_transformer +(def monad_transformer Test (do random.monad [state random.nat @@ -120,7 +120,7 @@ (n.= (n.+ left right) output'))))) ))) -(def: .public test +(def .public test Test (<| (_.covering /._) (all _.and |