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.
-
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. -
retry UnliftIO.Retry No documentation available.
retryPolicy :: forall (m :: Type -> Type) . Monad m => (RetryStatus -> Maybe Int) -> RetryPolicyM mretry UnliftIO.Retry Helper for making simplified policies that don't use the monadic context.
retryPolicyDefault :: forall (m :: Type -> Type) . Monad m => RetryPolicyM mretry UnliftIO.Retry Default retry policy
-
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. -
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. retryWith :: Int -> a -> Retry ahspec-contrib Test.Hspec.Contrib.Retry Retry evaluating example that may be failed until success.
retrySt :: forall m st (es :: Set Type) . Monad m => HandleSt' st m es -> HandleSt st m esmoffy Control.Moffy.Handle No documentation available.
retryWithRateLimit :: (MonadHttp m, MonadCatch m) => m a -> m agemini-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.
retryJob :: Project -> Int -> GitLab (Either (Response ByteString) (Maybe Job))gitlab-haskell GitLab.API.Jobs Retry a single job of a project.