SyncLaws

cats.effect.laws.SyncLaws
See theSyncLaws companion object
trait SyncLaws[F[_]] extends MonadCancelLaws[F, Throwable], ClockLaws[F], UniqueLaws[F]

Attributes

Companion
object
Source
SyncLaws.scala
Graph
Supertypes
trait UniqueLaws[F]
trait ClockLaws[F]
trait MonadLaws[F]
trait FlatMapLaws[F]
trait ApplicativeLaws[F]
trait ApplyLaws[F]
trait SemigroupalLaws[F]
trait FunctorLaws[F]
trait InvariantLaws[F]
class Object
trait Matchable
class Any
Show all
Known subtypes
trait AsyncLaws[F]

Members list

Value members

Concrete methods

def repeatedSuspendNotMemoized[A](a: A, f: A => A, hint: Type): IsEq[F[A]]

Attributes

Source
SyncLaws.scala
def suspendThrowIsRaiseError[A](e: Throwable, hint: Type): IsEq[F[A]]

Attributes

Source
SyncLaws.scala
def suspendValueIsPure[A](a: A, hint: Type): IsEq[F[A]]

Attributes

Source
SyncLaws.scala
def unsequencedSuspendIsNoop[A](a: A, f: A => A, hint: Type): IsEq[F[A]]

Attributes

Source
SyncLaws.scala

Inherited methods

override def adaptErrorPure[A](a: A, f: Throwable => Throwable): IsEq[F[A]]

Attributes

Definition Classes
Inherited from:
MonadErrorLaws
Source
MonadErrorLaws.scala
override def adaptErrorRaise[A](e: Throwable, f: Throwable => Throwable): IsEq[F[A]]

Attributes

Definition Classes
Inherited from:
MonadErrorLaws
Source
MonadErrorLaws.scala
def apProductConsistent[A, B](fa: F[A], f: F[A => B]): IsEq[F[B]]

Attributes

Inherited from:
ApplicativeLaws
Source
ApplicativeLaws.scala
def applicativeComposition[A, B, C](fa: F[A], fab: F[A => B], fbc: F[B => C]): IsEq[F[C]]

This law is applyComposition stated in terms of pure.

This law is applyComposition stated in terms of pure. It is a combination of applyComposition and applicativeMap and hence not strictly necessary.

Attributes

Inherited from:
ApplicativeLaws
Source
ApplicativeLaws.scala

Attributes

Inherited from:
ApplicativeErrorLaws
Source
ApplicativeErrorLaws.scala

Attributes

Inherited from:
ApplicativeErrorLaws
Source
ApplicativeErrorLaws.scala
def applicativeHomomorphism[A, B](a: A, f: A => B): IsEq[F[B]]

Attributes

Inherited from:
ApplicativeLaws
Source
ApplicativeLaws.scala
def applicativeIdentity[A](fa: F[A]): IsEq[F[A]]

Attributes

Inherited from:
ApplicativeLaws
Source
ApplicativeLaws.scala
def applicativeInterchange[A, B](a: A, ff: F[A => B]): IsEq[F[B]]

Attributes

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

Attributes

Inherited from:
ApplicativeLaws
Source
ApplicativeLaws.scala
def applicativeUnit[A](a: A): IsEq[F[A]]

Attributes

Inherited from:
ApplicativeLaws
Source
ApplicativeLaws.scala
def applyComposition[A, B, C](fa: F[A], fab: F[A => B], fbc: F[B => C]): IsEq[F[C]]

Attributes

Inherited from:
ApplyLaws
Source
ApplyLaws.scala

Attributes

Inherited from:
ApplicativeErrorLaws
Source
ApplicativeErrorLaws.scala

Attributes

Inherited from:
MonadCancelLaws
Source
MonadCancelLaws.scala
def canceledSequencesOnCancelInOrder(fin1: F[Unit], fin2: F[Unit]): IsEq[F[Unit]]

Attributes

Inherited from:
MonadCancelLaws
Source
MonadCancelLaws.scala

Attributes

Inherited from:
MonadCancelLaws
Source
MonadCancelLaws.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 flatMapAssociativity[A, B, C](fa: F[A], f: A => F[B], g: B => F[C]): IsEq[F[C]]

Attributes

Inherited from:
FlatMapLaws
Source
FlatMapLaws.scala
def flatMapConsistentApply[A, B](fa: F[A], fab: F[A => B]): IsEq[F[B]]

Attributes

Inherited from:
FlatMapLaws
Source
FlatMapLaws.scala
def flatMapFromTailRecMConsistency[A, B](fa: F[A], fn: A => F[B]): IsEq[F[B]]

It is possible to implement flatMap from tailRecM and map and it should agree with the flatMap implementation.

It is possible to implement flatMap from tailRecM and map and it should agree with the flatMap implementation.

Attributes

Inherited from:
FlatMapLaws
Source
FlatMapLaws.scala
def forceRAssociativity[A, B, C](fa: F[A], fb: F[B], fc: F[C]): IsEq[F[C]]

Attributes

Inherited from:
MonadCancelLaws
Source
MonadCancelLaws.scala
def forceRCanceledShortCircuits[A](fa: F[A]): IsEq[F[A]]

Attributes

Inherited from:
MonadCancelLaws
Source
MonadCancelLaws.scala
def forceRDiscardsError[A](e: Throwable, fa: F[A]): IsEq[F[A]]

Attributes

Inherited from:
MonadCancelLaws
Source
MonadCancelLaws.scala
def forceRDiscardsPure[A, B](a: A, fa: F[B]): IsEq[F[B]]

Attributes

Inherited from:
MonadCancelLaws
Source
MonadCancelLaws.scala
def guaranteeIsGuaranteeCase[A](fa: F[A], fin: F[Unit]): IsEq[F[A]]

Attributes

Inherited from:
MonadCancelLaws
Source
MonadCancelLaws.scala

Attributes

Inherited from:
ApplicativeErrorLaws
Source
ApplicativeErrorLaws.scala
def handleErrorPure[A](a: A, f: Throwable => A): IsEq[F[A]]

Attributes

Inherited from:
ApplicativeErrorLaws
Source
ApplicativeErrorLaws.scala

Attributes

Inherited from:
ApplicativeErrorLaws
Source
ApplicativeErrorLaws.scala
def handleErrorWithPure[A](a: A, f: Throwable => F[A]): IsEq[F[A]]

Attributes

Inherited from:
ApplicativeErrorLaws
Source
ApplicativeErrorLaws.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 kleisliAssociativity[A, B, C, D](f: A => F[B], g: B => F[C], h: C => F[D], a: A): IsEq[F[D]]

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

The composition of cats.data.Kleisli arrows is associative. This is analogous to flatMapAssociativity.

Attributes

Inherited from:
FlatMapLaws
Source
FlatMapLaws.scala
def kleisliLeftIdentity[A, B](a: A, f: A => F[B]): IsEq[F[B]]

pure is the left identity element under left-to-right composition of cats.data.Kleisli arrows.

pure is the left identity element under left-to-right composition of cats.data.Kleisli arrows. This is analogous to monadLeftIdentity.

Attributes

Inherited from:
MonadLaws
Source
MonadLaws.scala
def kleisliRightIdentity[A, B](a: A, f: A => F[B]): IsEq[F[B]]

pure is the right identity element under left-to-right composition of cats.data.Kleisli arrows.

pure is the right identity element under left-to-right composition of cats.data.Kleisli arrows. This is analogous to monadRightIdentity.

Attributes

Inherited from:
MonadLaws
Source
MonadLaws.scala
def map2EvalConsistency[A, B, C](fa: F[A], fb: F[B], f: (A, B) => C): IsEq[F[C]]

Attributes

Inherited from:
ApplyLaws
Source
ApplyLaws.scala
def map2ProductConsistency[A, B, C](fa: F[A], fb: F[B], f: (A, B) => C): IsEq[F[C]]

Attributes

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

Make sure that map and flatMap are consistent.

Make sure that map and flatMap are consistent.

Attributes

Inherited from:
MonadLaws
Source
MonadLaws.scala
def monadErrorEnsureConsistency[A](fa: F[A], e: Throwable, p: A => Boolean): IsEq[F[A]]

Attributes

Inherited from:
MonadErrorLaws
Source
MonadErrorLaws.scala
def monadErrorEnsureOrConsistency[A](fa: F[A], e: A => Throwable, p: A => Boolean): IsEq[F[A]]

Attributes

Inherited from:
MonadErrorLaws
Source
MonadErrorLaws.scala
def monadErrorLeftZero[A, B](e: Throwable, f: A => F[B]): IsEq[F[B]]

Attributes

Inherited from:
MonadErrorLaws
Source
MonadErrorLaws.scala
def monadLeftIdentity[A, B](a: A, f: A => F[B]): IsEq[F[B]]

Attributes

Inherited from:
MonadLaws
Source
MonadLaws.scala
def monadRightIdentity[A](fa: F[A]): IsEq[F[A]]

Attributes

Inherited from:
MonadLaws
Source
MonadLaws.scala
def monoidalLeftIdentity[A](fa: F[A]): (F[(Unit, A)], F[A])

Attributes

Inherited from:
ApplicativeLaws
Source
ApplicativeLaws.scala
def monoidalRightIdentity[A](fa: F[A]): (F[(A, Unit)], F[A])

Attributes

Inherited from:
ApplicativeLaws
Source
ApplicativeLaws.scala

Attributes

Inherited from:
ClockLaws
Source
ClockLaws.scala
def mproductConsistency[A, B](fa: F[A], fb: A => F[B]): IsEq[F[(A, B)]]

Attributes

Inherited from:
FlatMapLaws
Source
FlatMapLaws.scala
def onCancelAssociatesOverUncancelableBoundary[A](fa: F[A], fin: F[Unit]): IsEq[F[A]]

Attributes

Inherited from:
MonadCancelLaws
Source
MonadCancelLaws.scala
def onCancelImpliesUncancelable[A](fa: F[A], fin1: F[Unit], fin2: F[Unit]): IsEq[F[A]]

Attributes

Inherited from:
MonadCancelLaws
Source
MonadCancelLaws.scala
def onErrorPure[A](a: A, f: Throwable => F[Unit]): IsEq[F[A]]

Attributes

Inherited from:
ApplicativeErrorLaws
Source
ApplicativeErrorLaws.scala
def onErrorRaise[A](fa: F[A], e: Throwable, fb: F[Unit]): IsEq[F[A]]

Attributes

Inherited from:
ApplicativeErrorLaws
Source
ApplicativeErrorLaws.scala
def productLConsistency[A, B](fa: F[A], fb: F[B]): IsEq[F[A]]

Attributes

Inherited from:
ApplyLaws
Source
ApplyLaws.scala
def productRConsistency[A, B](fa: F[A], fb: F[B]): IsEq[F[B]]

Attributes

Inherited from:
ApplyLaws
Source
ApplyLaws.scala
def pureAttempt[A](a: A): IsEq[F[Either[E, A]]]

Attributes

Inherited from:
ApplicativeErrorLaws
Source
ApplicativeErrorLaws.scala

Attributes

Inherited from:
ApplicativeErrorLaws
Source
ApplicativeErrorLaws.scala
def redeemDerivedFromAttemptMap[A, B](fa: F[A], fe: Throwable => B, fs: A => B): IsEq[F[B]]

Attributes

Inherited from:
ApplicativeErrorLaws
Source
ApplicativeErrorLaws.scala
def redeemWithDerivedFromAttemptFlatMap[A, B](fa: F[A], fe: Throwable => F[B], fs: A => F[B]): IsEq[F[B]]

Attributes

Inherited from:
MonadErrorLaws
Source
MonadErrorLaws.scala

Attributes

Inherited from:
ApplicativeLaws
Source
ApplicativeLaws.scala
def rethrowAttempt[A](fa: F[A]): IsEq[F[A]]

Attributes

Inherited from:
MonadErrorLaws
Source
MonadErrorLaws.scala
def semigroupalAssociativity[A, B, C](fa: F[A], fb: F[B], fc: F[C]): (F[(A, (B, C))], F[((A, B), C)])

Attributes

Inherited from:
SemigroupalLaws
Source
SemigroupalLaws.scala
def tailRecMConsistentFlatMap[A](a: A, f: A => F[A]): IsEq[F[A]]

Attributes

Inherited from:
FlatMapLaws
Source
FlatMapLaws.scala
def uncancelableEliminatesOnCancel[A](fa: F[A], fin: F[Unit]): IsEq[F[A]]

Attributes

Inherited from:
MonadCancelLaws
Source
MonadCancelLaws.scala
def uncancelableFinalizers[A](fin: F[Unit]): IsEq[F[Unit]]

Attributes

Inherited from:
MonadCancelLaws
Source
MonadCancelLaws.scala
def uncancelableIdentity[A](fa: F[A]): IsEq[F[A]]

Attributes

Inherited from:
MonadCancelLaws
Source
MonadCancelLaws.scala

Attributes

Inherited from:
MonadCancelLaws
Source
MonadCancelLaws.scala

Attributes

Inherited from:
MonadCancelLaws
Source
MonadCancelLaws.scala
def uncancelablePollIsIdentity[A](fa: F[A]): IsEq[F[A]]

Attributes

Inherited from:
MonadCancelLaws
Source
MonadCancelLaws.scala

Attributes

Inherited from:
UniqueLaws
Source
UniqueLaws.scala

Inherited fields

lazy val tailRecMStackSafety: IsEq[F[Int]]

Attributes

Inherited from:
MonadLaws
Source
MonadLaws.scala

Implicits

Implicits

implicit val F: Sync[F]

Attributes

Source
SyncLaws.scala