ANN: retry 0.1 - retry combinators for monadic actions that often fail

Dear Cafe, I'm happy to announce the availability of the retry package on Hackage[1] and Github[2]. The package provides a few useful combinators for monadic actions that often fail and should be retried in cases of a certain set of exceptions (or failure modes). Such cases are quite common when querying databases (e.g. ResponseTimeout) or uploading files (e.g. socket closed), particularly in busy production systems. The library exposes 'retrying' for failures encoded explicitly in the type and 'recovering' for failures through exceptions, respectively. You can choose either an "exponential back off" series of delays or a simple static delay between retries. In either case, there is a ceiling for the number of total retries. The haddocks provide further documentation and a few examples. This library simply wraps around the given actions and does not really do anything fancy or unexpected. Nevertheless, the widespread applicability of this functionality justified a generic package to address the need centrally. Suggestions and bug reports are most welcome. [1] http://hackage.haskell.org/package/retry [2] https://github.com/Soostone/retry Cheers, Ozgun

On 13/03/2013 05:14, Ozgun Ataman wrote:
In either case, there is a ceiling for the number of total retries.
This is something that I might want to use in many places. Is it possible to have an infinite number of retries, instead of specifying impossibly large values ?

Good point - I'll put an option in for the next release. On Wednesday, March 13, 2013 at 4:32 AM, Simon Marechal wrote:
On 13/03/2013 05:14, Ozgun Ataman wrote:
In either case, there is a ceiling for the number of total retries.
This is something that I might want to use in many places. Is it possible to have an infinite number of retries, instead of specifying impossibly large values ?
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org (mailto:Haskell-Cafe@haskell.org) http://www.haskell.org/mailman/listinfo/haskell-cafe
participants (2)
-
Ozgun Ataman
-
Simon Marechal