suspend 0.1.0.0 → 0.1.0.1
raw patch · 2 files changed
+8/−4 lines, 2 filesdep +transformers-basePVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependencies added: transformers-base
API changes (from Hackage documentation)
- Control.Concurrent.Suspend.Lifted: suspend :: Delay -> IO ()
+ Control.Concurrent.Suspend.Lifted: suspend :: MonadBase IO m => Delay -> m ()
Files
src/Control/Concurrent/Suspend/Lifted.hs view
@@ -1,3 +1,5 @@+{-# LANGUAGE FlexibleContexts #-}+ module Control.Concurrent.Suspend.Lifted ( suspend @@ -13,6 +15,7 @@ ------------------------------------------------------------------------------ import Control.Concurrent.Lifted (threadDelay) import Control.Monad (when)+import Control.Monad.Base (MonadBase) ------------------------------------------------------------------------------ import Control.Concurrent.Delay ------------------------------------------------------------------------------@@ -23,7 +26,7 @@ -- -- There is no guarantee that the thread will be rescheduled promptly when the -- delay has expired, but the thread will never continue to run earlier than specified.-suspend :: Delay -> IO ()+suspend :: MonadBase IO m => Delay -> m () suspend (Delay us) = when (us > 0) $ do let wait = min us $ fromIntegral (maxBound :: Int) threadDelay (fromIntegral wait)
suspend.cabal view
@@ -1,5 +1,5 @@ name: suspend-version: 0.1.0.0+version: 0.1.0.1 synopsis: Simple package that allows for long thread suspensions. description: Simple package that allows for long thread suspensions. Uses newtype wrapper (of Int64 at the moment) to represent delay. license: BSD3@@ -25,8 +25,9 @@ Control.Concurrent.Delay build-depends:- base == 4.5.*- , lifted-base == 0.1.*+ base == 4.5.*+ , lifted-base == 0.1.*+ , transformers-base == 0.4.* hs-source-dirs: src ghc-options: -Wall -fwarn-unused-imports