diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/lux/control/concurrency/actor.lux | 26 | ||||
-rw-r--r-- | stdlib/source/lux/control/concurrency/frp.lux | 12 | ||||
-rw-r--r-- | stdlib/source/lux/control/concurrency/promise.lux | 12 | ||||
-rw-r--r-- | stdlib/source/lux/control/concurrency/semaphore.lux | 4 | ||||
-rw-r--r-- | stdlib/source/lux/control/concurrency/stm.lux | 6 |
5 files changed, 30 insertions, 30 deletions
diff --git a/stdlib/source/lux/control/concurrency/actor.lux b/stdlib/source/lux/control/concurrency/actor.lux index 97c080273..f9ab10327 100644 --- a/stdlib/source/lux/control/concurrency/actor.lux +++ b/stdlib/source/lux/control/concurrency/actor.lux @@ -53,8 +53,8 @@ [current (promise.poll read)] (case current (#.Some [head tail]) - (:: ! map (|>> (#.Cons head)) - (pending tail)) + (\ ! map (|>> (#.Cons head)) + (pending tail)) #.None (wrap #.Nil)))) @@ -111,12 +111,12 @@ (let [[obituary _] (get@ #obituary (:representation actor))] (|> obituary promise.poll - (:: io.functor map - (|>> (case> #.None - yes + (\ io.functor map + (|>> (case> #.None + yes - _ - no)))))) + _ + no)))))) (def: #export (obituary actor) (All [s] (-> (Actor s) (IO (Maybe (Obituary s))))) @@ -219,7 +219,7 @@ (def: actor-decl^ (Parser [Text (List Text)]) (<>.either (<c>.form (<>.and <c>.local-identifier (<>.some <c>.local-identifier))) - (<>.and <c>.local-identifier (:: <>.monad wrap (list))))) + (<>.and <c>.local-identifier (\ <>.monad wrap (list))))) (type: On-MailC [[Text Text Text] Code]) @@ -288,10 +288,10 @@ Nat ((on-stop cause state) - (:: promise.monad wrap - (log! (if (exception.match? ..poisoned cause) - (format "Counter was poisoned: " (%.nat state)) - cause)))) + (\ promise.monad wrap + (log! (if (exception.match? ..poisoned cause) + (format "Counter was poisoned: " (%.nat state)) + cause)))) (message: #export (count! {increment Nat} state self Any) (let [state' (n.+ increment state)] @@ -357,7 +357,7 @@ (def: reference^ (Parser [Name (List Text)]) (<>.either (<c>.form (<>.and <c>.identifier (<>.some <c>.local-identifier))) - (<>.and <c>.identifier (:: <>.monad wrap (list))))) + (<>.and <c>.identifier (\ <>.monad wrap (list))))) (syntax: #export (message: {export csr.export} diff --git a/stdlib/source/lux/control/concurrency/frp.lux b/stdlib/source/lux/control/concurrency/frp.lux index f4dbffe81..4709a0cad 100644 --- a/stdlib/source/lux/control/concurrency/frp.lux +++ b/stdlib/source/lux/control/concurrency/frp.lux @@ -134,7 +134,7 @@ [?ma ma] (case ?ma (#.Some [a ma']) - (exec (io.run (:: sink feed a)) + (exec (io.run (\ sink feed a)) (recur ma')) #.None @@ -142,7 +142,7 @@ (recur mma')) #.None - (wrap (: Any (io.run (:: sink close)))))))) + (wrap (: Any (io.run (\ sink close)))))))) output)))) (type: #export (Subscriber a) @@ -226,7 +226,7 @@ (exec (io.run (loop [_ []] (do io.monad [value action - _ (:: sink feed value)] + _ (\ sink feed value)] (promise.await recur (promise.wait milli-seconds))))) [output sink]))) @@ -251,7 +251,7 @@ [cons channel] (case cons (#.Some [head tail]) - (if (:: equivalence = previous head) + (if (\ equivalence = previous head) (distinct' equivalence previous tail) (wrap (#.Some [head (distinct' equivalence head tail)]))) @@ -276,8 +276,8 @@ [cons channel] (case cons (#.Some [head tail]) - (:: ! map (|>> (#.Cons head)) - (consume tail)) + (\ ! map (|>> (#.Cons head)) + (consume tail)) #.None (wrap #.Nil)))) diff --git a/stdlib/source/lux/control/concurrency/promise.lux b/stdlib/source/lux/control/concurrency/promise.lux index 017ad67a8..e4835b8d8 100644 --- a/stdlib/source/lux/control/concurrency/promise.lux +++ b/stdlib/source/lux/control/concurrency/promise.lux @@ -60,7 +60,7 @@ (All [a] (-> (Promise a) (IO (Maybe a)))) (|>> :representation atom.read - (:: io.functor map product.left))) + (\ io.functor map product.left))) (def: #export (await f promise) (All [a] (-> (-> a (IO Any)) (Promise a) (IO Any))) @@ -81,12 +81,12 @@ {#.doc "Checks whether a promise's value has already been resolved."} (All [a] (-> (Promise a) (IO Bit))) (|>> ..poll - (:: io.functor map - (|>> (case> #.None - #0 + (\ io.functor map + (|>> (case> #.None + #0 - (#.Some _) - #1))))) + (#.Some _) + #1))))) (structure: #export functor (Functor Promise) diff --git a/stdlib/source/lux/control/concurrency/semaphore.lux b/stdlib/source/lux/control/concurrency/semaphore.lux index 36ac7cd34..a405b7b3e 100644 --- a/stdlib/source/lux/control/concurrency/semaphore.lux +++ b/stdlib/source/lux/control/concurrency/semaphore.lux @@ -32,7 +32,7 @@ {#.doc "A tool for controlling access to resources by multiple concurrent processes."} (def: most-positions-possible - (.nat (:: i.interval top))) + (.nat (\ i.interval top))) (def: #export (semaphore initial-open-positions) (-> Nat Semaphore) @@ -163,7 +163,7 @@ (do promise.monad [_ (..signal turnstile)] (recur (inc step))) - (:: promise.monad wrap [])))) + (\ promise.monad wrap [])))) (template [<phase> <update> <goal> <turnstile>] [(def: (<phase> (^:representation barrier)) diff --git a/stdlib/source/lux/control/concurrency/stm.lux b/stdlib/source/lux/control/concurrency/stm.lux index d5684cf97..523aa5567 100644 --- a/stdlib/source/lux/control/concurrency/stm.lux +++ b/stdlib/source/lux/control/concurrency/stm.lux @@ -54,7 +54,7 @@ (do ! [_ (monad.map ! (function (_ sink) (do ! - [result (:: sink feed new-value)] + [result (\ sink feed new-value)] (case result (#try.Success _) (wrap []) @@ -94,8 +94,8 @@ (list.find (function (_ [_var _original _current]) (is? (:coerce (Var Any) var) (:coerce (Var Any) _var)))) - (:: maybe.monad map (function (_ [_var _original _current]) - _current)) + (\ maybe.monad map (function (_ [_var _original _current]) + _current)) (:assume) )) |