Hoogle Search

Within LTS Haskell 24.64 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. retrySTM :: STM a

    unliftio UnliftIO.STM

    Renamed retry for unqualified export

  2. retryBool :: Exception e => (e -> Bool) -> Int -> IO a -> IO a

    extra Control.Exception.Extra

    Retry an operation at most n times (n must be positive), while the exception value and type match a predicate. If the operation fails the nth time it will throw that final exception.

  3. retryBool :: Exception e => (e -> Bool) -> Int -> IO a -> IO a

    extra Extra

    Retry an operation at most n times (n must be positive), while the exception value and type match a predicate. If the operation fails the nth time it will throw that final exception.

  4. retryOnBusy :: (MonadUnliftIO m, MonadLoggerIO m) => m a -> m a

    persistent-sqlite Database.Persist.Sqlite

    Retry if a Busy is thrown, following an exponential backoff strategy.

  5. retryOnError :: (Functor m, MonadIO m, MonadError e m) => RetryPolicyM m -> (RetryStatus -> e -> m Bool) -> (RetryStatus -> m a) -> m a

    retry Control.Retry

    No documentation available.

  6. retryPolicy :: forall (m :: Type -> Type) . Monad m => (RetryStatus -> Maybe Int) -> RetryPolicyM m

    retry Control.Retry

    Helper for making simplified policies that don't use the monadic context.

  7. retryPolicyDefault :: forall (m :: Type -> Type) . Monad m => RetryPolicyM m

    retry Control.Retry

    Default retry policy

  8. retrying :: MonadIO m => RetryPolicyM m -> (RetryStatus -> b -> m Bool) -> (RetryStatus -> m b) -> m b

    retry Control.Retry

    Retry combinator for actions that don't raise exceptions, but signal in their type the outcome has failed. Examples are the Maybe, Either and EitherT monads. Let's write a function that always fails and watch this combinator retry it 5 additional times following the initial run:

    >>> import Data.Maybe
    
    >>> let f _ = putStrLn "Running action" >> return Nothing
    
    >>> retrying retryPolicyDefault (const $ return . isNothing) f
    Running action
    Running action
    Running action
    Running action
    Running action
    Running action
    Nothing
    
    Note how the latest failing result is returned after all retries have been exhausted.

  9. retryingDynamic :: MonadIO m => RetryPolicyM m -> (RetryStatus -> b -> m RetryAction) -> (RetryStatus -> m b) -> m b

    retry Control.Retry

    Same as retrying, but with the ability to override the delay of the retry policy based on information obtained after initiation. For example, if the action to run is a HTTP request that turns out to fail with a status code 429 ("too many requests"), the response may contain a "Retry-After" HTTP header which specifies the number of seconds the client should wait until performing the next request. This function allows overriding the delay calculated by the given retry policy with the delay extracted from this header value. In other words, given an arbitrary RetryPolicyM rp, the following invocation will always delay by 1000 microseconds:

    retryingDynamic rp (\_ _ -> return $ ConsultPolicyOverrideDelay 1000) f
    
    Note that a RetryPolicys decision to not perform a retry cannot be overridden. Ie. when to stop retrying is always decided by the retry policy, regardless of the returned RetryAction value.

  10. retryOnError :: (Functor m, MonadIO m, MonadError e m) => RetryPolicyM m -> (RetryStatus -> e -> m Bool) -> (RetryStatus -> m a) -> m a

    retry UnliftIO.Retry

    No documentation available.

Page 4 of many | Previous | Next