smithy4s
smithy4s copied to clipboard
smithy4s-cats: provide transformers for EitherT
Now that we have a Cats module, we should provide a generic (abstracting away IO) version of:
new Transformation.AbsorbError[EitherT[IO, *, *], IO] {
def apply[E, A](fa: EitherT[IO, E, A], injectError: E => Throwable): IO[A] =
fa.leftMap(injectError).rethrowT
}
and the corresponding Transformation.SurfaceError transformation.
I don't have a problem with that
we could also have some derivation of Transformation / conversions of ~> so that smithy4s.~> can be used interchangeably with cats.~>.