smithy4s icon indicating copy to clipboard operation
smithy4s copied to clipboard

smithy4s-cats: provide transformers for EitherT

Open kubukoz opened this issue 1 year ago • 2 comments

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.

kubukoz avatar Oct 17 '24 23:10 kubukoz

I don't have a problem with that

Baccata avatar Oct 21 '24 07:10 Baccata

we could also have some derivation of Transformation / conversions of ~> so that smithy4s.~> can be used interchangeably with cats.~>.

kubukoz avatar Oct 21 '24 14:10 kubukoz