Hoogle Search

Within LTS Haskell 23.26 (ghc-9.8.4)

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

  1. 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.

  2. 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.

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

    retry UnliftIO.Retry

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

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

    retry UnliftIO.Retry

    Default retry policy

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

    retry UnliftIO.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.

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

    retry UnliftIO.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.

  7. retryWith :: Int -> a -> Retry a

    hspec-contrib Test.Hspec.Contrib.Retry

    Retry evaluating example that may be failed until success.

  8. retrySt :: forall m st (es :: Set Type) . Monad m => HandleSt' st m es -> HandleSt st m es

    moffy Control.Moffy.Handle

    No documentation available.

  9. retryWithRateLimit :: (MonadHttp m, MonadCatch m) => m a -> m a

    gemini-exports Web.Gemini

    Attempt a request & retry if a 429 RateLimited error is returned. We attempt to parse the retry wait time from the message field but fallback to one second.

  10. retryJob :: Project -> Int -> GitLab (Either (Response ByteString) (Maybe Job))

    gitlab-haskell GitLab.API.Jobs

    Retry a single job of a project.

Page 5 of many | Previous | Next