mirror of
https://github.com/cachix/stamina.hs.git
synced 2024-09-11 18:37:48 +03:00
fix ci
This commit is contained in:
parent
2daca2799b
commit
c8d625bf05
@ -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
|
||||
@ -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"
|
||||
```
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user