diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/lux/concurrency/stm.lux | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/stdlib/source/lux/concurrency/stm.lux b/stdlib/source/lux/concurrency/stm.lux index ed9f28038..946f9bac4 100644 --- a/stdlib/source/lux/concurrency/stm.lux +++ b/stdlib/source/lux/concurrency/stm.lux @@ -127,20 +127,20 @@ (def: #export (follow target) {#;doc "Creates a channel that will receive all changes to the value of the given var."} - (All [a] (-> (Var a) (IO (frp;Chan a)))) - (let [head (frp;chan ($ +0)) - chan-var (var head) + (All [a] (-> (Var a) (IO (frp;Channel a)))) + (let [head (frp;channel ($ +0)) + channel-var (var head) observer (function [label value] - (case (io;run (|> chan-var raw-read (frp;write value))) + (case (io;run (|> channel-var raw-read (frp;write value))) #;None - ## By closing the output Chan, the + ## By closing the output Channel, the ## observer becomes obsolete. (atom;update (function [[value observers]] [value (dict;remove label observers)]) target) (#;Some tail') - (write! tail' chan-var)))] + (write! tail' channel-var)))] (do Monad<IO> [_ (atom;update (function [[value observers]] (let [label (Nat/encode (L/fold (function [key base] @@ -226,7 +226,7 @@ (atom false)) (def: (process-commit commits) - (-> (frp;Chan [(STM Unit) (P;Promise Unit)]) + (-> (frp;Channel [(STM Unit) (P;Promise Unit)]) (P;Promise Unit)) (do P;Monad<Promise> [?head+tail commits] @@ -257,7 +257,7 @@ (if was-first? (do Monad<IO> [inputs (follow pending-commits)] - (exec (process-commit (:! (frp;Chan [(STM Unit) (P;Promise Unit)]) + (exec (process-commit (:! (frp;Channel [(STM Unit) (P;Promise Unit)]) inputs)) (wrap []))) (wrap []))) |