fix docs formatting

This commit is contained in:
Domen Kožar 2024-01-03 12:51:52 +00:00
parent d71088dd52
commit 32b7af0901
2 changed files with 5 additions and 1 deletions

View File

@ -70,4 +70,4 @@ go2 = Stamina.retryFor Stamina.defaults handler $ \retryStatus -> do
```haskell
main = undefined
```
</details>
</details>

View File

@ -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