[Haskell-cafe] ANN: retry 0.1 - retry combinators for monadic actions that often fail

Ozgun Ataman ozataman at gmail.com
Wed Mar 13 05:14:10 CET 2013


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20130313/92c4915b/attachment.htm>


More information about the Haskell-Cafe mailing list