packages feed

extensible-effects-concurrent 0.16.1 → 0.17.0

raw patch · 5 files changed

+14/−10 lines, 5 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

- Control.Eff.Concurrent: spawnLinkObserverationQueue :: forall o q a. (Typeable o, Show o, HasLogging IO q, Lifted IO q, HasCallStack) => Server (ObserverRegistry o) -> Int -> Eff (ObservationQueueReader o : InterruptableProcess q) a -> Eff (InterruptableProcess q) a
- Control.Eff.Concurrent.Api.Observer.Queue: spawnLinkObserverationQueue :: forall o q a. (Typeable o, Show o, HasLogging IO q, Lifted IO q, HasCallStack) => Server (ObserverRegistry o) -> Int -> Eff (ObservationQueueReader o : InterruptableProcess q) a -> Eff (InterruptableProcess q) a
+ Control.Eff.Concurrent: spawnLinkObservationQueue :: forall o q a. (Typeable o, Show o, HasLogging IO q, Lifted IO q, HasCallStack) => Server (ObserverRegistry o) -> Int -> Eff (ObservationQueueReader o : InterruptableProcess q) a -> Eff (InterruptableProcess q) a
+ Control.Eff.Concurrent.Api.Observer.Queue: spawnLinkObservationQueue :: forall o q a. (Typeable o, Show o, HasLogging IO q, Lifted IO q, HasCallStack) => Server (ObserverRegistry o) -> Int -> Eff (ObservationQueueReader o : InterruptableProcess q) a -> Eff (InterruptableProcess q) a

Files

ChangeLog.md view
@@ -1,5 +1,9 @@ # Changelog for extensible-effects-concurrent +## 0.17.0++- Rename misspelled `spawnLinkObserverationQueue` to `spawnLinkObservationQueue`+ ## 0.16.1  - Export `ObserverRegistry` constructors for custom event registration handling
extensible-effects-concurrent.cabal view
@@ -1,5 +1,5 @@ name:           extensible-effects-concurrent-version:        0.16.1+version:        0.17.0 description:    Please see the README on GitHub at <https://github.com/sheyll/extensible-effects-concurrent#readme> synopsis:       Message passing concurrency as extensible-effect homepage:       https://github.com/sheyll/extensible-effects-concurrent#readme
src/Control/Eff/Concurrent.hs view
@@ -208,7 +208,7 @@                                                 , readObservationQueue                                                 , tryReadObservationQueue                                                 , flushObservationQueue-                                                , spawnLinkObserverationQueue+                                                , spawnLinkObservationQueue                                                 ) import           Control.Eff.Concurrent.Process.ForkIOScheduler                                                 ( schedule
src/Control/Eff/Concurrent/Api/Observer.hs view
@@ -127,7 +127,7 @@ toObserver :: Typeable o => Server (Observer o) -> Observer o toObserver = toObserverFor Observed --- | Create an 'Observer' that conditionally accepts all observeration of the+-- | Create an 'Observer' that conditionally accepts all observations of the -- given type and applies the given function to them; the function takes an observation and returns an 'Api' -- cast that the observer server is compatible to. --
src/Control/Eff/Concurrent/Api/Observer/Queue.hs view
@@ -5,7 +5,7 @@   , readObservationQueue   , tryReadObservationQueue   , flushObservationQueue-  , spawnLinkObserverationQueue+  , spawnLinkObservationQueue   ) where @@ -29,7 +29,7 @@ import           GHC.Stack  -- | Contains a 'TBQueue' capturing observations received by 'enqueueObservationsRegistered'--- or 'spawnLinkObserverationQueue'.+-- or 'spawnLinkObservationQueue'. newtype ObservationQueue a = ObservationQueue (TBQueue a)  -- | A 'Reader' for an 'ObservationQueue'.@@ -38,7 +38,7 @@ logPrefix :: forall o proxy . (HasCallStack, Typeable o) => proxy o -> String logPrefix px = "observation queue: " ++ show (typeRep px) --- | Read queued observations captured and enqueued in the shared 'TBQueue' by 'spawnLinkObserverationQueue'.+-- | Read queued observations captured and enqueued in the shared 'TBQueue' by 'spawnLinkObservationQueue'. -- This blocks until something was captured or an interrupt or exceptions was thrown. For a non-blocking -- variant use 'tryReadObservationQueue' or 'flushObservationQueue'. readObservationQueue@@ -54,7 +54,7 @@   ObservationQueue q <- ask @(ObservationQueue o)   liftIO (atomically (readTBQueue q)) --- | Read queued observations captured and enqueued in the shared 'TBQueue' by 'spawnLinkObserverationQueue'.+-- | Read queued observations captured and enqueued in the shared 'TBQueue' by 'spawnLinkObservationQueue'. -- Return the oldest enqueued observation immediately or 'Nothing' if the queue is empty. -- Use 'readObservationQueue' to block until an observation is observed. tryReadObservationQueue@@ -70,7 +70,7 @@   ObservationQueue q <- ask @(ObservationQueue o)   liftIO (atomically (tryReadTBQueue q)) --- | Read at once all currently queued observations captured and enqueued in the shared 'TBQueue' by 'spawnLinkObserverationQueue'.+-- | Read at once all currently queued observations captured and enqueued in the shared 'TBQueue' by 'spawnLinkObservationQueue'. -- This returns immediately all currently enqueued 'Observation's. For a blocking -- variant use 'readObservationQueue'. flushObservationQueue@@ -96,14 +96,14 @@ -- can be obtained by 'readObservationQueue'. All observations are captured up to -- the queue size limit, such that the first message received will be first message -- returned by 'readObservationQueue'.-spawnLinkObserverationQueue+spawnLinkObservationQueue   :: forall o q a    . (Typeable o, Show o, HasLogging IO q, Lifted IO q, HasCallStack)   => Server (ObserverRegistry o)   -> Int   -> Eff (ObservationQueueReader o ': InterruptableProcess q) a   -> Eff (InterruptableProcess q) a-spawnLinkObserverationQueue oSvr queueLimit k = withQueue+spawnLinkObservationQueue oSvr queueLimit k = withQueue   queueLimit   (do     ObservationQueue q <- ask @(ObservationQueue o)