packages feed

nqe 0.2.0.0 → 0.3.0.0

raw patch · 3 files changed

+3/−16 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

- Control.Concurrent.NQE: timeout :: forall m b. (MonadUnliftIO m) => Int -> m b -> m (Maybe b)

Files

nqe.cabal view
@@ -2,10 +2,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: 19f64f288f8fa8f0b4739515e746d714754ce23701b7de65011a179d52826f16+-- hash: a9ba15118eebb5f3b7c7996d90bc459e31f1d09bc3773d436c88a55e4fb6b3a6  name:           nqe-version:        0.2.0.0+version:        0.3.0.0 synopsis:       Concurrency library in the style of Erlang/OTP description:    Minimalistic actor library inspired by Erlang/OTP with support for supervisor hierarchies and asynchronous messages, as well as abstractions for synchronous communication and easy management of TCP connections. category:       Control
src/Control/Concurrent/NQE/Process.hs view
@@ -1,13 +1,11 @@ {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE FlexibleContexts          #-}-{-# LANGUAGE LambdaCase                #-} {-# LANGUAGE MultiParamTypeClasses     #-} {-# LANGUAGE RankNTypes                #-} module Control.Concurrent.NQE.Process where  import           Control.Monad import           UnliftIO-import           UnliftIO.Concurrent  type Reply a = a -> STM () type Listen a = a -> STM ()@@ -99,13 +97,3 @@  receiveMatchSTM :: (Mailbox mbox) => mbox msg -> (msg -> Maybe a) -> STM a receiveMatchSTM mbox f = dispatchSTM [f] mbox--timeout ::-       forall m b. (MonadUnliftIO m)-    => Int-    -> m b-    -> m (Maybe b)-timeout n action =-    race (liftIO $ threadDelay n) action >>= \case-        Left () -> return Nothing-        Right r -> return $ Just r
test/Spec.hs view
@@ -13,8 +13,7 @@ import           Data.Conduit.TMChan import           Data.Text              (Text) import           Test.Hspec-import           UnliftIO.Async-import           UnliftIO.STM+import           UnliftIO  data Pong = Pong deriving (Eq, Show) newtype Ping = Ping (Pong -> STM ())