packages feed

retry 0.7.5.0 → 0.7.5.1

raw patch · 3 files changed

+10/−3 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

changelog.md view
@@ -1,3 +1,6 @@+0.7.5.1+* Improve haddocks for fullJitterBackoff.+ 0.7.5.0 * Add Semigroup instance when the Semigroup class is available through base. 
retry.cabal view
@@ -14,7 +14,7 @@         case we should hang back for a bit and retry the query instead         of simply raising an exception. -version:             0.7.5.0+version:             0.7.5.1 synopsis:            Retry combinators for monadic actions that may fail license:             BSD3 license-file:        LICENSE
src/Control/Retry.hs view
@@ -302,7 +302,7 @@ -- increase by a factor of two. exponentialBackoff     :: Int-    -- ^ First delay in microseconds+    -- ^ Base delay in microseconds     -> RetryPolicy exponentialBackoff base = retryPolicy $ \ RetryStatus { rsIterNumber = n } ->   Just $! base `boundedMult` boundedPow 2 n@@ -316,7 +316,11 @@ -- temp = min(cap, base * 2 ** attempt) -- -- sleep = temp \/ 2 + random_between(0, temp \/ 2)-fullJitterBackoff :: MonadIO m => Int -> RetryPolicyM m+fullJitterBackoff+    :: MonadIO m+    => Int+    -- ^ Base delay in microseconds+    -> RetryPolicyM m fullJitterBackoff base = RetryPolicyM $ \ RetryStatus { rsIterNumber = n } -> do   let d = (base `boundedMult` boundedPow 2 n) `div` 2   rand <- liftIO $ randomRIO (0, d)