retry 0.9.2.0 → 0.9.2.1
raw patch · 3 files changed
+6/−2 lines, 3 filesdep ~mtl
Dependency ranges changed: mtl
Files
- changelog.md +3/−0
- retry.cabal +1/−1
- src/Control/Retry.hs +2/−1
changelog.md view
@@ -1,3 +1,6 @@+0.9.2.1+* Use explicit import for `lift` which allows for mtl-2.3 compatibility [PR 80](https://github.com/Soostone/retry/pull/80)+ 0.9.2.0 * Add `retryOnError` [PR 44](https://github.com/Soostone/retry/pull/44)
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.9.2.0+version: 0.9.2.1 synopsis: Retry combinators for monadic actions that may fail license: BSD3 license-file: LICENSE
src/Control/Retry.hs view
@@ -97,6 +97,7 @@ import Control.Monad.Catch import Control.Monad.Except import Control.Monad.IO.Class as MIO+import Control.Monad.Trans.Class as TC import Control.Monad.Trans.Maybe import Control.Monad.Trans.State import Data.List (foldl')@@ -850,7 +851,7 @@ simulatePolicy :: Monad m => Int -> RetryPolicyM m -> m [(Int, Maybe Int)] simulatePolicy n (RetryPolicyM f) = flip evalStateT defaultRetryStatus $ forM [0..n] $ \i -> do stat <- get- delay <- lift (f stat)+ delay <- TC.lift (f stat) put $! stat { rsIterNumber = i + 1 , rsCumulativeDelay = rsCumulativeDelay stat `boundedPlus` fromMaybe 0 delay