trait
IsCovariant[F[_]] extends AnyRef
Abstract Value Members
-
abstract
def
liftLiskovCo[A, B](implicit ev: <~<[A, B]): <~<[F[A], F[B]]
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
final
def
==(arg0: Any): Boolean
-
final
def
asInstanceOf[T0]: T0
-
def
clone(): AnyRef
-
-
-
def
finalize(): Unit
-
final
def
getClass(): Class[_]
-
def
hashCode(): Int
-
-
final
def
isInstanceOf[T0]: Boolean
-
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
def
substCo[G[+_], A, B](g: G[F[A]])(implicit ev: <~<[A, B]): G[F[B]]
-
def
substCt[G[-_], A, B](g: G[F[B]])(implicit ev: <~<[A, B]): G[F[A]]
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toString(): String
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
-
def
widen[A, B](fa: F[A])(implicit ev: <~<[A, B]): F[B]
Type constructors that are covariant with respect to subtyping.
A type constructor
F[_]
admits an instanceIsCovariant[F]
iffF[A]
is a subtype ofF[B]
wheneverA
is a subtype ofB
.The Scala language represents this natively using the
[+A]
notation on type constructors. The factory scalaCovariant provides an instance of this typeclass for any such type. However, type constructors which behave covariantly despite not being thus notated can also implement this typeclass. The factory force constructs an instance ofIsCovariant
for any type, based on the programmer's assertion that it is indeed covariant.Note the relationship between this typeclass and Functor: whereas Functor instances are covariant functors in the "category" of Scala types and functions, instances of this typeclass are covariant functors in the "category" of Scala types and subtyping relations.