diff options
Diffstat (limited to 'stdlib/source/lux/concurrency/stm.lux')
-rw-r--r-- | stdlib/source/lux/concurrency/stm.lux | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/stdlib/source/lux/concurrency/stm.lux b/stdlib/source/lux/concurrency/stm.lux index 5c9e2d68c..9fef9f59e 100644 --- a/stdlib/source/lux/concurrency/stm.lux +++ b/stdlib/source/lux/concurrency/stm.lux @@ -20,20 +20,20 @@ (def: #export (var value) {#.doc "Creates a new STM var, with a default value."} (All [a] (-> a (Var a))) - (@abstraction (atom.atom [value (list)]))) + (:abstraction (atom.atom [value (list)]))) (def: read!! (All [a] (-> (Var a) a)) - (|>> @representation atom.read io.run product.left)) + (|>> :representation atom.read io.run product.left)) - (def: #export (read! (^@representation var)) + (def: #export (read! (^:representation var)) {#.doc "Reads var immediately, without going through a transaction."} (All [a] (-> (Var a) (IO a))) (|> var atom.read (:: io.Functor<IO> map product.left))) - (def: (write! new-value (^@representation var)) + (def: (write! new-value (^:representation var)) (All [a] (-> a (Var a) (IO Any))) (do io.Monad<IO> [(^@ old [_value _observers]) (atom.read var) @@ -42,7 +42,7 @@ (do @ [_ (monad.map @ (function (_ f) (f new-value)) _observers)] (wrap [])) - (write! new-value (@abstraction var))))) + (write! new-value (:abstraction var))))) ## TODO: Remove when possible (def: (helper|follow var) @@ -53,7 +53,7 @@ (All [a] (-> (Var a) (IO (frp.Channel a)))) (do io.Monad<IO> [#let [channel (helper|follow target) - target (@representation target)] + target (:representation target)] _ (atom.update (function (_ [value observers]) [value (#.Cons (frp.publish channel) observers)]) target)] |