diff options
author | Eduardo Julian | 2017-11-16 01:45:40 -0400 |
---|---|---|
committer | Eduardo Julian | 2017-11-16 01:45:40 -0400 |
commit | 4abfd5413b5a7aa540d7c06b387e3426ff5c532c (patch) | |
tree | 7f5ba092e7493ce5642e0dc4069913825ec97494 /stdlib/test | |
parent | 37b94ba49afb272c63ec66e42d56b8fba35cea9f (diff) |
- Added "Process" type for IO operations that can fail.
Diffstat (limited to '')
-rw-r--r-- | stdlib/test/test/lux/concurrency/actor.lux | 12 | ||||
-rw-r--r-- | stdlib/test/test/lux/concurrency/frp.lux | 4 | ||||
-rw-r--r-- | stdlib/test/test/lux/concurrency/promise.lux | 2 |
3 files changed, 9 insertions, 9 deletions
diff --git a/stdlib/test/test/lux/concurrency/actor.lux b/stdlib/test/test/lux/concurrency/actor.lux index c6c127fde..8abcae045 100644 --- a/stdlib/test/test/lux/concurrency/actor.lux +++ b/stdlib/test/test/lux/concurrency/actor.lux @@ -1,6 +1,6 @@ (;module: lux - (lux [io #- run] + (lux [io #+ IO io] (control ["M" monad #+ do Monad] ["ex" exception]) (data [number] @@ -34,26 +34,26 @@ (context: "Actors" ($_ seq (test "Can check if an actor is alive." - (io;run (do Monad<IO> + (io;run (do io;Monad<IO> [counter (new@Counter +0)] (wrap (&;alive? counter))))) (test "Can kill actors." - (io;run (do Monad<IO> + (io;run (do io;Monad<IO> [counter (new@Counter +0) killed? (&;kill counter)] (wrap (and killed? (not (&;alive? counter))))))) (test "Can poison actors." - (io;run (do Monad<IO> + (io;run (do io;Monad<IO> [counter (new@Counter +0) poisoned? (&;poison counter)] (wrap (and poisoned? (not (&;alive? counter))))))) (test "Cannot kill an already dead actor." - (io;run (do Monad<IO> + (io;run (do io;Monad<IO> [counter (new@Counter +0) first-time (&;kill counter) second-time (&;kill counter)] @@ -61,7 +61,7 @@ (not second-time)))))) (test "Cannot poison an already dead actor." - (io;run (do Monad<IO> + (io;run (do io;Monad<IO> [counter (new@Counter +0) first-time (&;kill counter) second-time (&;poison counter)] diff --git a/stdlib/test/test/lux/concurrency/frp.lux b/stdlib/test/test/lux/concurrency/frp.lux index 21a650882..3fb3d847a 100644 --- a/stdlib/test/test/lux/concurrency/frp.lux +++ b/stdlib/test/test/lux/concurrency/frp.lux @@ -1,6 +1,6 @@ (;module: lux - (lux [io #- run] + (lux [io #+ IO io] (control ["M" monad #+ do Monad]) (data [number] text/format) @@ -11,7 +11,7 @@ (def: (to-channel values) (-> (List Int) (&;Channel Int)) (let [_channel (&;channel Int)] - (io;run (do Monad<IO> + (io;run (do io;Monad<IO> [_ (M;map @ (function [value] (&;write value _channel)) values) _ (&;close _channel)] diff --git a/stdlib/test/test/lux/concurrency/promise.lux b/stdlib/test/test/lux/concurrency/promise.lux index 6ebc5ee5a..26193851a 100644 --- a/stdlib/test/test/lux/concurrency/promise.lux +++ b/stdlib/test/test/lux/concurrency/promise.lux @@ -1,6 +1,6 @@ (;module: lux - (lux [io #- run] + (lux [io #+ IO io] (control ["M" monad #+ do Monad] pipe) (data [number] |