Skip to content

Can't use MonadError syntax for EitherT #2022

@wedens

Description

@wedens

With introduction (#1644) of prioritised MonadError instance for F: MonadError in EitherT[F, E, A], it's now impossible to use MonadError syntax for handling E.
It makes it difficult to upgrade to 1.0.0-RC1 as this syntax is used quite a bit in a project.

implicit val merr: MonadError[IO, Throwable] = ???
type M[A] = EitherT[IO, Error, A]
val a: M[A] = ???
a.ensure(Error)(predicate) // type mismatch: found Error, required Throwable

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions