diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/lux/control/concurrency/actor.lux | 4 | ||||
-rw-r--r-- | stdlib/source/lux/control/concurrency/process.lux | 6 | ||||
-rw-r--r-- | stdlib/source/lux/control/concurrency/semaphore.lux | 9 |
3 files changed, 13 insertions, 6 deletions
diff --git a/stdlib/source/lux/control/concurrency/actor.lux b/stdlib/source/lux/control/concurrency/actor.lux index 6487801df..87bfabd4d 100644 --- a/stdlib/source/lux/control/concurrency/actor.lux +++ b/stdlib/source/lux/control/concurrency/actor.lux @@ -11,6 +11,8 @@ ["s" code (#+ Parser)]]] [data ["." product] + [number + ["n" nat]] [text ["%" format (#+ format)]] [collection @@ -327,7 +329,7 @@ (message: #export Counter (count! [increment Nat] state self Nat) - (let [state' (n/+ increment state)] + (let [state' (n.+ increment state)] (promise.resolved (#try.Success [state' state'])))) (message: #export (Stack a) diff --git a/stdlib/source/lux/control/concurrency/process.lux b/stdlib/source/lux/control/concurrency/process.lux index 7cb569ee9..d31edfb59 100644 --- a/stdlib/source/lux/control/concurrency/process.lux +++ b/stdlib/source/lux/control/concurrency/process.lux @@ -8,6 +8,8 @@ ["ex" exception (#+ exception:)] ["." io (#+ IO io)]] [data + [number + ["n" nat]] [collection ["." list]]]] [// @@ -142,8 +144,8 @@ [#let [now (.nat ("lux io current-time")) [ready pending] (list.partition (function (_ process) (|> (get@ #creation process) - (n/+ (get@ #delay process)) - (n/<= now))) + (n.+ (get@ #delay process)) + (n.<= now))) processes)] swapped? (atom.compare-and-swap processes pending runner)] (if swapped? diff --git a/stdlib/source/lux/control/concurrency/semaphore.lux b/stdlib/source/lux/control/concurrency/semaphore.lux index fab5d4498..ade45984e 100644 --- a/stdlib/source/lux/control/concurrency/semaphore.lux +++ b/stdlib/source/lux/control/concurrency/semaphore.lux @@ -2,6 +2,9 @@ [lux #* [abstract [monad (#+ do)]] + [data + [number + ["n" nat]]] [control ["." io (#+ IO)]] [type @@ -100,7 +103,7 @@ (wrap output))) ) -(def: #export limit (refinement.refinement (n/> 0))) +(def: #export limit (refinement.refinement (n.> 0))) (`` (type: #export Limit (~~ (refinement.type limit)))) (abstract: #export Barrier @@ -121,7 +124,7 @@ (def: (un-block times turnstile) (-> Nat Semaphore (Promise Any)) (loop [step 0] - (if (n/< times step) + (if (n.< times step) (do promise.monad [_ (signal turnstile)] (recur (inc step))) @@ -134,7 +137,7 @@ [#let [limit (refinement.un-refine (get@ #limit barrier)) goal <goal> count (io.run (atom.update <update> (get@ #count barrier)))] - _ (if (n/= goal count) + _ (if (n.= goal count) (un-block limit (get@ <turnstile> barrier)) (wrap []))] (wait (get@ <turnstile> barrier))))] |