-
Couldn't load subscription status.
- Fork 1.4k
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
A few operators can allow digging into terms of sum types, pushing error states onto the error channel; and a couple more can allow "popping" error states off the error channel.
trait ZIO[R, E, A] {
def left[B, C](implicit ev: A <:< Either[B, C]): ZIO[R, Option[E], B] = ???
def right[B, C](implicit ev: A <:< Either[B, C]): ZIO[R, Option[E], C] = ???
def some[B](implicit ev: A <:< Option[B]): ZIO[R, Option[E], B] = ???
def none[B](implicit ev: A <:< Option[B]): ZIO[R, Option[E], Unit] = ???
def head[B](implicit ev: A <:< List[B]): ZIO[R, Option[E], B] = ???
def fuseError[E1, E2 <: E1](default: E2)(implicit ev: E <: Option[E1]): ZIO[R, E1, B] = ???
def peelError[E1, A1 >: A](default: A1)(implicit ev: E <: Option[E1]): ZIO[R, E1, A1] = ???
}/cc @jczuchnowski who was thinking about these issues.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request