Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
domenkozar committed Dec 30, 2023
1 parent 2daca27 commit c8d625b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ A retry Haskell library for humans:
```haskell
import qualified Stamina
import Control.Monad.Catch (throwM)
import Control.Monad.IO.Class (MonadIO)

go :: IO ()
go = do
Expand All @@ -35,13 +36,13 @@ go = do

```haskell

isDoesNotExistError :: IOError -> Stamina.RetryAction
isDoesNotExistError _ = return Stamina.Retry
handler :: (MonadIO m) => IOError -> m Stamina.RetryAction
handler _ = return Stamina.Retry

go2 :: IO ()
go2 = do
defaults <- Stamina.defaults
Stamina.retryOnExceptions defaults isDoesNotExistError $ \retryStatus -> do
Stamina.retryOnExceptions defaults handler $ \retryStatus -> do
throwM $ userError "nope"
```

Expand Down

0 comments on commit c8d625b

Please sign in to comment.