aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/concurrency/stm.lux
diff options
context:
space:
mode:
authorEduardo Julian2018-07-03 19:49:04 -0400
committerEduardo Julian2018-07-03 19:49:04 -0400
commitaac5a7796939cd705d955acb616cbff38474606d (patch)
tree567f60f65afb2a94299336a72ea105f00a16b63d /stdlib/source/lux/concurrency/stm.lux
parentd3f5e1f4baa667bc2eb72edd542cf5d8cd3924ce (diff)
- Re-named "@abstraction" to ":abstraction" and "@representation" to ":representation".
Diffstat (limited to '')
-rw-r--r--stdlib/source/lux/concurrency/stm.lux12
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)]