typelevel / typelevel/cats

Given MonadError[F, Z], EitherT[F, E, ?] should provide a MonadError[..., Either[Z, E]]

Open
#2,261 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Scala
Stars
5.5k
Forks
1.2k
Avg merge
2d 10h
Merged PRs (30d)
5

Description

The title says it all, basically.

It's a known fact that something like EitherT[IO, E, ?] has two channels of failing: by raising the Throwable in IO and by raising a E in an inner Either. Instead of prioritizing the former, I suggest we expose the ability to work with both channels of failure directly by using a coproduct type.

Same applies to OptionT[F, A]

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files or tests. Start by locating the EitherT and OptionT definitions and their existing MonadError instances, then trace how the outer F failure and inner Either or Option failure are represented. Done means exposing both failure channels through the proposed coproduct-based MonadError behavior for EitherT and OptionT.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.