aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/lux/control/state.lux
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/test/lux/control/state.lux29
1 files changed, 15 insertions, 14 deletions
diff --git a/stdlib/source/test/lux/control/state.lux b/stdlib/source/test/lux/control/state.lux
index cb7c94b83..72284ba5c 100644
--- a/stdlib/source/test/lux/control/state.lux
+++ b/stdlib/source/test/lux/control/state.lux
@@ -18,7 +18,7 @@
[text
["%" format (#+ format)]]]
[math
- ["r" random]]]
+ ["." random]]]
{1
["." / (#+ State)]})
@@ -30,9 +30,9 @@
(n.= output)))
(def: basics
- (do r.monad
- [state r.nat
- value r.nat]
+ (do random.monad
+ [state random.nat
+ value random.nat]
($_ _.and
(_.cover [/.State /.get]
(with-conditions [state state]
@@ -58,7 +58,8 @@
(def: (injection value)
(All [s] (Injection (State s)))
- (function (_ state) [state value]))
+ (function (_ state)
+ [state value]))
(def: (comparison init)
(All [s] (-> s (Comparison (State s))))
@@ -68,9 +69,9 @@
(def: structures
Test
- (do r.monad
- [state r.nat
- value r.nat]
+ (do random.monad
+ [state random.nat
+ value random.nat]
($_ _.and
(_.with-cover [/.functor]
($functor.spec ..injection (..comparison state) /.functor))
@@ -82,8 +83,8 @@
(def: loops
Test
- (do r.monad
- [limit (|> r.nat (:: @ map (n.% 10)))
+ (do random.monad
+ [limit (|> random.nat (:: @ map (n.% 10)))
#let [condition (do /.monad
[state /.get]
(wrap (n.< limit state)))]]
@@ -104,10 +105,10 @@
(def: monad-transformer
Test
- (do r.monad
- [state r.nat
- left r.nat
- right r.nat]
+ (do random.monad
+ [state random.nat
+ left random.nat
+ right random.nat]
(let [(^open "io@.") io.monad]
(_.cover [/.State' /.with /.lift /.run']
(|> (: (/.State' io.IO Nat Nat)