Skip to content

Commit

Permalink
fix docs formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
domenkozar committed Jan 3, 2024
1 parent d71088d commit 32b7af0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ go2 = Stamina.retryFor Stamina.defaults handler $ \retryStatus -> do
```haskell
main = undefined
```
</details>
</details>
4 changes: 4 additions & 0 deletions src/Stamina.hs
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,19 @@ data RetryAction
-- The backoff delays between retries grow exponentially plus a random jitter.
-- The backoff for retry attempt number _attempt_ is computed as:
--
-- @
-- backoffExpBase ** (attempt - 1) + random(0, backoffJitter)
-- @
--
-- With the default values, the backoff for the first 5 attempts will be:
--
-- @
-- 2 ** 0 + random(0, 1) = 1 + random(0, 1)
-- 2 ** 1 + random(0, 1) = 2 + random(0, 1)
-- 2 ** 2 + random(0, 1) = 4 + random(0, 1)
-- 2 ** 3 + random(0, 1) = 8 + random(0, 1)
-- 2 ** 4 + random(0, 1) = 16 + random(0, 1)
-- @
--
-- If all retries fail, the last exception is let through.
retry :: (MonadCatch m, MonadIO m) => RetrySettings -> (RetryStatus -> m a) -> m a
Expand Down

0 comments on commit 32b7af0

Please sign in to comment.