ComonadLaws

cats.laws.ComonadLaws
See theComonadLaws companion object
trait ComonadLaws[F[_]] extends CoflatMapLaws[F]

Laws that must be obeyed by any Comonad.

Attributes

Companion
object
Source
ComonadLaws.scala
Graph
Supertypes
trait CoflatMapLaws[F]
trait FunctorLaws[F]
trait InvariantLaws[F]
class Object
trait Matchable
class Any
Show all
Known subtypes
trait BimonadLaws[F]

Members list

Value members

Concrete methods

def cokleisliLeftIdentity[A, B](fa: F[A], f: (F[A]) => B): IsEq[B]

extract is the left identity element under left-to-right composition of cats.data.Cokleisli arrows.

extract is the left identity element under left-to-right composition of cats.data.Cokleisli arrows. This is analogous to comonadLeftIdentity.

Attributes

Source
ComonadLaws.scala
def cokleisliRightIdentity[A, B](fa: F[A], f: (F[A]) => B): IsEq[B]

extract is the right identity element under left-to-right composition of cats.data.Cokleisli arrows.

extract is the right identity element under left-to-right composition of cats.data.Cokleisli arrows. This is analogous to comonadRightIdentity.

Attributes

Source
ComonadLaws.scala
def comonadLeftIdentity[A](fa: F[A]): IsEq[F[A]]

Attributes

Source
ComonadLaws.scala
def comonadRightIdentity[A, B](fa: F[A], f: (F[A]) => B): IsEq[B]

Attributes

Source
ComonadLaws.scala
def extractCoflattenIdentity[A](fa: F[A]): IsEq[F[A]]

Attributes

Source
ComonadLaws.scala
def mapCoflatMapCoherence[A, B](fa: F[A], f: A => B): IsEq[F[B]]

Attributes

Source
ComonadLaws.scala
def mapCoflattenIdentity[A](fa: F[A]): IsEq[F[A]]

Attributes

Source
ComonadLaws.scala

Inherited methods

def coflatMapAssociativity[A, B, C](fa: F[A], f: (F[A]) => B, g: (F[B]) => C): IsEq[F[C]]

Attributes

Inherited from:
CoflatMapLaws
Source
CoflatMapLaws.scala
def coflatMapIdentity[A, B](fa: F[A]): IsEq[F[F[A]]]

Attributes

Inherited from:
CoflatMapLaws
Source
CoflatMapLaws.scala
def coflattenCoherence[A, B](fa: F[A], f: (F[A]) => B): IsEq[F[B]]

Attributes

Inherited from:
CoflatMapLaws
Source
CoflatMapLaws.scala
def coflattenThroughMap[A](fa: F[A]): IsEq[F[F[F[A]]]]

Attributes

Inherited from:
CoflatMapLaws
Source
CoflatMapLaws.scala
def cokleisliAssociativity[A, B, C, D](f: (F[A]) => B, g: (F[B]) => C, h: (F[C]) => D, fa: F[A]): IsEq[D]

The composition of cats.data.Cokleisli arrows is associative.

The composition of cats.data.Cokleisli arrows is associative. This is analogous to coflatMapAssociativity.

Attributes

Inherited from:
CoflatMapLaws
Source
CoflatMapLaws.scala
def covariantComposition[A, B, C](fa: F[A], f: A => B, g: B => C): IsEq[F[C]]

Attributes

Inherited from:
FunctorLaws
Source
FunctorLaws.scala
def covariantIdentity[A](fa: F[A]): IsEq[F[A]]

Attributes

Inherited from:
FunctorLaws
Source
FunctorLaws.scala
def invariantComposition[A, B, C](fa: F[A], f1: A => B, f2: B => A, g1: B => C, g2: C => B): IsEq[F[C]]

Attributes

Inherited from:
InvariantLaws
Source
InvariantLaws.scala
def invariantIdentity[A](fa: F[A]): IsEq[F[A]]

Attributes

Inherited from:
InvariantLaws
Source
InvariantLaws.scala
def mapOrKeepToMapEquivalence[A, A1 >: A](fa: F[A], pf: PartialFunction[A, A1]): IsEq[F[A1]]

Attributes

Inherited from:
FunctorLaws
Source
FunctorLaws.scala

Implicits

Implicits

implicit override def F: Comonad[F]

Attributes

Definition Classes
Source
ComonadLaws.scala