extensible-effects-concurrent 0.12.0 → 0.12.1
raw patch · 4 files changed
+15/−10 lines, 4 files
Files
- ChangeLog.md +4/−0
- extensible-effects-concurrent.cabal +2/−2
- src/Control/Eff/Concurrent/Api/Observer/Queue.hs +4/−3
- src/Control/Eff/Log/Channel.hs +5/−5
ChangeLog.md view
@@ -1,5 +1,9 @@ # Changelog for extensible-effects-concurrent +## 0.12.1++- Fix build errors with GHC-8.6+ ## 0.12.0 - Add implicit SchedulerProxy
extensible-effects-concurrent.cabal view
@@ -1,5 +1,5 @@ name: extensible-effects-concurrent-version: 0.12.0+version: 0.12.1 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@@ -7,7 +7,7 @@ author: Sven Heyll maintainer: sven.heyll@gmail.com category: Concurrency, Control, Effect-tested-with: GHC==8.4.3, GHC==8.4.4+tested-with: GHC==8.2.2, GHC==8.4.3, GHC==8.4.4, GHC==8.6.1 copyright: Copyright Sven Heyll license: BSD3 license-file: LICENSE
src/Control/Eff/Concurrent/Api/Observer/Queue.hs view
@@ -168,18 +168,19 @@ ) withQueue- :: forall a b e+ :: forall a b e len . ( HasCallStack , Typeable a , Show (Observation a) , HasLogging IO e , MonadCatch (Eff e)+ , Integral len )- => Int+ => len -> Eff (ObservationQueueReader a ': e) b -> Eff e b withQueue queueLimit e = do- q <- liftIO (newTBQueueIO queueLimit)+ q <- liftIO (newTBQueueIO (fromIntegral queueLimit)) res <- Safe.tryAny (runReader (ObservationQueue q) e) rest <- liftIO (atomically (flushTBQueue q)) unless
src/Control/Eff/Log/Channel.hs view
@@ -43,15 +43,15 @@ -- > -- withAsyncLogChannel- :: forall message a- . (NFData message)- => Int -- ^ Size of the log message input queue. If the queue is full, message- -- are dropped silently.+ :: forall message a len+ . (NFData message, Integral len)+ => len -- ^ Size of the log message input queue. If the queue is full, message+ -- are dropped silently. -> LogWriter message IO -- ^ An IO action to write the log messages -> (LogChannel message -> IO a) -> IO a withAsyncLogChannel queueLen ioWriter action = do- msgQ <- newTBQueueIO (fromIntegral @Int queueLen)+ msgQ <- newTBQueueIO (fromIntegral queueLen) withAsync (logLoop msgQ) (action . ConcurrentLogChannel msgQ) where logLoop tq = do