Skip to content

Latest commit

 

History

History
33 lines (23 loc) · 1.97 KB

README.md

File metadata and controls

33 lines (23 loc) · 1.97 KB

tryt.scala

Build Status Latest version Latest version Scaladoc

tryt.scala contains Scalaz monad transformers for exception handling.

There are two monad transformers: the invariant TryT and the covariant TryT. Unlike scala.EitherT's, those TryT transformers handle both exceptions thrown by native Java or Scala methods and exceptions raised by MonadError.raiseError.

Covariant TryT

Covariant TryT works with monadic data types whose kind is F[+A], like scalaz.concurrent.Future or scalaz.Name.

To use covariant TryT, add the following setting to your build.sbt,

libraryDependencies += "com.thoughtworks.tryt" %% "covariant" % "latest.release"

and check the Scaladoc for usage.

Invariant TryT

Invariant TryT works with all monadic data types

To use invariant TryT, add the following setting to your build.sbt,

libraryDependencies += "com.thoughtworks.tryt" %% "invariant" % "latest.release"

and check the Scaladoc for usage.