Rebind is a Scala port/remake of the Haskell retry library. One
of the main differences is it is designed to work with
DisjunctionT's instead of
Rebind is cross-built/published against Scala 2.10 and 2.11 with Scalaz 7.1 - Scalaz is (currently) its only dependency.
To use it in your project, add the following to your SBT build definition:
resolvers += "adelbertc" at "http://dl.bintray.com/adelbertc/maven" libraryDependencies += "com.adelbertc" %% "rebind-core" % "0.2.0"
Despite the small bit of code that it is, there may well be breaking changes in the following versions.
Example usage can be found in the tests.
Because Rebind abstracts out the
F[_] : Monad used in the
DisjunctionT, it should (hopefully) be pretty easy
to make it work with libraries like Doobie or
Dispatch. The general idea is to get your "action" (probably
in the form of
scalaz.effect.IO) and then use Rebind to specify how you want to
retry in the case of failure to get a new retrying action back. The operations are stack stafe so long as
is - common examples are
Code is provided under the BSD 3-Clause license available at http://opensource.org/licenses/BSD-3-Clause, as well as in the LICENSE file. This is the same license used as the retry library.