These

zio.prelude.These
See theThese companion trait
object These

Attributes

Companion
trait
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
These.type

Members list

Type members

Classlikes

final case class Both[+A, +B](left: A, right: B) extends These[A, B]

Attributes

Supertypes
trait These[A, B]
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class Left[+A](value: A) extends These[A, Nothing]

Attributes

Supertypes
trait These[A, Nothing]
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class Right[+B](value: B) extends These[Nothing, B]

Attributes

Supertypes
trait These[Nothing, B]
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Inherited types

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror

The name of the type

The name of the type

Attributes

Inherited from:
Mirror

Value members

Concrete methods

def both[A, B](a: A, b: B): These[A, B]

Constructs a Both with an A value and a B value.

Constructs a Both with an A value and a B value.

Attributes

def bothNonEmptyChunk[A, B](a: A, b: B): These[NonEmptyChunk[A], B]

Constructs a Both with an A value and a B value, wrapping the A value in a NonEmptyChunk. This is useful when using These to model computations that may both succeed and fail to use the Associative instance for NonEmptyChunk to accumulate all errors.

Constructs a Both with an A value and a B value, wrapping the A value in a NonEmptyChunk. This is useful when using These to model computations that may both succeed and fail to use the Associative instance for NonEmptyChunk to accumulate all errors.

Attributes

def fromEither[A, B](eab: Either[A, B]): These[A, B]

Constructs a These from an Either value.

Constructs a These from an Either value.

Attributes

def fromOption[A](ob: Option[A]): These[Unit, A]

Constructs a These from an Option value.

Constructs a These from an Option value.

Attributes

def fromOptions[A, B](opA: Option[A], opB: Option[B]): Option[These[A, B]]

Constructor from two options to an option of These.

Constructor from two options to an option of These.

Attributes

Constructs a These from a Validation value.

Constructs a These from a Validation value.

Attributes

def left[A](a: A): These[A, Nothing]

Constructs a Left with an A value.

Constructs a Left with an A value.

Attributes

def leftNonEmptyChunk[A](a: A): These[NonEmptyChunk[A], Nothing]

Constructs a Left with an A value, wrapping the A value in a NonEmptyChunk. This is useful when using These to model computations that may both succeed and fail to use the Associative instance for NonEmptyChunk to accumulate multiple errors.

Constructs a Left with an A value, wrapping the A value in a NonEmptyChunk. This is useful when using These to model computations that may both succeed and fail to use the Associative instance for NonEmptyChunk to accumulate multiple errors.

Attributes

def right[A](a: A): These[Nothing, A]

Constructs a Right with an A value.

Constructs a Right with an A value.

Attributes

Concrete fields

val unit: These[Nothing, Unit]

A Right with the Unit value.

A Right with the Unit value.

Attributes

Implicits

Implicits

Derives an Associative[These[A, B]] given an Associative[A] and an Associative[B].

Derives an Associative[These[A, B]] given an Associative[A] and an Associative[B].

Attributes

implicit def TheseAssociativeEither[A : Associative]: AssociativeEither[{ type lambda = [b] =>> These[A, b]; }#<none>]

The AssociativeEither instance for These.

The AssociativeEither instance for These.

Attributes

Derives a Commutative[These[A, B]] given a Commutative[A] and a Commutative[B].

Derives a Commutative[These[A, B]] given a Commutative[A] and a Commutative[B].

Attributes

implicit def TheseCommutativeBoth[A : Commutative]: CommutativeBoth[{ type lambda = [b] =>> These[A, b]; }#<none>]

The CommutativeBoth instance for These.

The CommutativeBoth instance for These.

Attributes

implicit def TheseCovariant[A]: Covariant[{ type lambda = [b] =>> These[A, b]; }#<none>]

The Covariant instance for These.

The Covariant instance for These.

Attributes

implicit def TheseDebug[A : Debug, B : Debug]: Debug[These[A, B]]

Derives a Debug[These[A, B]] given a Debug[A] and a Debug[B].

Derives a Debug[These[A, B]] given a Debug[A] and a Debug[B].

Attributes

implicit def TheseDeriveEqual[A : Equal]: DeriveEqual[{ type lambda = [b] =>> These[A, b]; }#<none>]

The DeriveEqual instance for These.

The DeriveEqual instance for These.

Attributes

implicit def TheseEqual[A : Equal, B : Equal]: Equal[These[A, B]]

Derives an Equal[These[A, B]] given an Equal[A] and an Equal[B].

Derives an Equal[These[A, B]] given an Equal[A] and an Equal[B].

Attributes

implicit def TheseForEach[A]: ForEach[{ type lambda = [b] =>> These[A, b]; }#<none>]

The ForEach instance for These.

The ForEach instance for These.

Attributes

implicit def TheseHash[A : Hash, B : Hash]: Hash[These[A, B]]

Derives a Hash[These[A, B]] given a Hash[A] and a Hash[B].

Derives a Hash[These[A, B]] given a Hash[A] and a Hash[B].

Attributes

implicit def TheseIdentityBoth[A : Associative]: IdentityBoth[{ type lambda = [b] =>> These[A, b]; }#<none>]

The IdentityBoth instance for These.

The IdentityBoth instance for These.

Attributes

implicit def TheseIdentityFlatten[A : Associative]: IdentityFlatten[{ type lambda = [b] =>> These[A, b]; }#<none>]

The IdentityFlatten instance for These.

The IdentityFlatten instance for These.

Attributes