Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

smithy4s-cats: provide transformers for EitherT #1611

Open
kubukoz opened this issue Oct 17, 2024 · 2 comments
Open

smithy4s-cats: provide transformers for EitherT #1611

kubukoz opened this issue Oct 17, 2024 · 2 comments
Labels
good first issue Good for newcomers

Comments

@kubukoz
Copy link
Member

kubukoz commented Oct 17, 2024

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 kubukoz added the good first issue Good for newcomers label Oct 17, 2024
@Baccata
Copy link
Contributor

Baccata commented Oct 21, 2024

I don't have a problem with that

@kubukoz
Copy link
Member Author

kubukoz commented Oct 21, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants