aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/concurrency/frp.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/lux/concurrency/frp.lux')
-rw-r--r--stdlib/source/lux/concurrency/frp.lux12
1 files changed, 6 insertions, 6 deletions
diff --git a/stdlib/source/lux/concurrency/frp.lux b/stdlib/source/lux/concurrency/frp.lux
index caa1173c2..28d7be094 100644
--- a/stdlib/source/lux/concurrency/frp.lux
+++ b/stdlib/source/lux/concurrency/frp.lux
@@ -12,14 +12,14 @@
## [Types]
(abstract: #export (Channel a)
{#.doc "An asynchronous channel to distribute values."}
- (Atom (List (-> a (IO Top))))
+ (Atom (List (-> a (IO Any))))
(def: #export (channel _)
- (All [a] (-> Top (Channel a)))
+ (All [a] (-> Any (Channel a)))
(@abstraction (atom (list))))
(def: #export (listen listener (^@representation channel))
- (All [a] (-> (-> a (IO Top)) (Channel a) (IO Top)))
+ (All [a] (-> (-> a (IO Any)) (Channel a) (IO Any)))
## TODO: Simplify when possible.
(do io.Monad<IO>
[_ (atom.update (|>> (#.Cons listener)) channel)]
@@ -27,7 +27,7 @@
(def: #export (publish (^@representation channel) value)
{#.doc "Publish to a channel."}
- (All [a] (-> (Channel a) a (IO Top)))
+ (All [a] (-> (Channel a) a (IO Any)))
(do io.Monad<IO>
[listeners (atom.read channel)]
(monad.map @ (function (_ listener) (listener value)) listeners)))
@@ -46,7 +46,7 @@
(def: #export (pipe output input)
{#.doc "Copy/pipe the contents of a channel on to another."}
- (All [a] (-> (Channel a) (Channel a) (IO Top)))
+ (All [a] (-> (Channel a) (Channel a) (IO Any)))
(listen (publish output)
input))
@@ -76,7 +76,7 @@
output)))
(def: #export (periodic time)
- (-> Nat (Channel Top))
+ (-> Nat (Channel Any))
(let [output (channel [])]
(exec (io.run
(loop [_ []]