GenTemporalTests

trait GenTemporalTests[F <: ([_$1] =>> Any), E] extends GenSpawnTests[F, E] with ClockTests[F]
Companion
object
trait ClockTests[F]
trait GenSpawnTests[F, E]
trait UniqueTests[F]
trait MonadErrorTests[F, E]
trait MonadTests[F]
trait FlatMapTests[F]
trait ApplicativeErrorTests[F, E]
trait ApplicativeTests[F]
trait ApplyTests[F]
trait SemigroupalTests[F]
trait FunctorTests[F]
trait InvariantTests[F]
trait Laws
class Object
trait Matchable
class Any
trait AsyncTests[F]

Type members

Inherited classlikes

class SimpleRuleSet(name: String, props: (String, Prop)*)
Convenience class for rule sets without parents and bases.
Inhertied from
Laws
trait HasOneParent
Convenience trait to mix into subclasses of RuleSet for
rule sets which only have one parent.
Inhertied from
Laws
class DefaultRuleSet(val name: String, val parent: Option[RuleSet], val props: (String, Prop)*)
Convenience class for rule sets which may have a parent, but no bases.
Inhertied from
Laws
trait RuleSet
This trait abstracts over the various ways how the laws of a type class
can depend on the laws of other type classes. An instance of this trait is
called a ''rule set''.
For that matter, we divide type classes into ''kinds'', where the classes
of one kind share the number of operations and meaning. For example,
Semigroup, Monoid and Group all belong to the same kind. On the
other hand, their additive variants also belong to a common kind, but to
a different one.
Users of this trait should extend the outer trait Laws and create
specialized subtypes for each kind of type class. (See
DefaultRuleSet for an example.)
Consider this example hierarchy:
Semigroup
   |   \
Monoid   AdditiveSemigroup
   |   \        |
Group     AdditiveMonoid
       \        |
          AdditiveGroup
They all define their own laws, as well as a couple of parent classes.
If we want to check the laws of AdditiveGroup, we want to avoid checking
properties twice, i.e. do not want to check Monoid laws via Group and
also via AdditiveMonoid.
To address this problem, we define the parent in the same kind as
''parent'', and other parents as ''bases''. In this example, the parent of
AdditiveGroup is AdditiveMonoid, and its only basis is Group. On the other
hand, the parent of Group is Monoid, and it does not have any bases.
The set of all properties of a certain class is now defined as union of
these sets:
- the properties of the class itself
- recursively, the properties of all its parents (ignoring their bases)
- recursively, the set of ''all'' properties of its bases
Looking at our example, that means that AdditiveGroup includes the
Monoid law only once, because it is the parent of its basis. The
same laws are ignored by its parent AdditiveMonoid, hence no redundant
checks occur.
Of course, classes can have multiple parents and multiple (named) bases.
The only requirement here is that ''inside one kind'', the identifier of
a property is unique, since duplicates are eliminated. To avoid name
clashes ''between different kinds'', the names of properties pulled in
via a basis are prefixed with the name of the basis.
For better type-safety, ''parents'' are only allowed to come from the
same outer instance of Laws, whereas ''bases'' are allowed to come
from anywhere.
Inhertied from
Laws

Value members

Methods

def temporal[A, B, C](tolerance: FiniteDuration)(evidence$1: Arbitrary[A], evidence$2: Eq[A], evidence$3: Arbitrary[B], evidence$4: Eq[B], evidence$5: Arbitrary[C], evidence$6: Eq[C], ArbFA: Arbitrary[F[A]], ArbFB: Arbitrary[F[B]], ArbFC: Arbitrary[F[C]], ArbFU: Arbitrary[F[Unit]], ArbFAtoB: Arbitrary[F[A => B]], ArbFBtoC: Arbitrary[F[B => C]], ArbE: Arbitrary[E], ArbFiniteDuration: Arbitrary[FiniteDuration], CogenA: Cogen[A], CogenB: Cogen[B], CogenC: Cogen[C], CogenE: Cogen[E], EqFA: Eq[F[A]], EqFB: Eq[F[B]], EqFC: Eq[F[C]], EqFU: Eq[F[Unit]], EqE: Eq[E], EqFAB: Eq[F[Either[A, B]]], EqFEitherEU: Eq[F[Either[E, Unit]]], EqFEitherEA: Eq[F[Either[E, A]]], EqFEitherUA: Eq[F[Either[Unit, A]]], EqFEitherAU: Eq[F[Either[A, Unit]]], EqFOutcomeEA: Eq[F[Outcome[F, E, A]]], EqFOutcomeEU: Eq[F[Outcome[F, E, Unit]]], EqFABC: Eq[F[(A, B, C)]], EqFInt: Eq[F[Int]], OrdFFD: Order[F[FiniteDuration]], GroupFD: Group[FiniteDuration], exec: F[Boolean] => Prop, iso: Isomorphisms[F], faPP: F[A] => Pretty, fuPP: F[Unit] => Pretty, ePP: E => Pretty, foaPP: F[Outcome[F, E, A]] => Pretty, feauPP: F[Either[A, Unit]] => Pretty, feuaPP: F[Either[Unit, A]] => Pretty, fouPP: F[Outcome[F, E, Unit]] => Pretty): RuleSet

Fields

Inherited methods

def emptyRuleSet: RuleSet
Empty rule set.
Inhertied from
Laws
def stackUnsafeMonad[A, B, C](evidence$7: Arbitrary[A], evidence$8: Eq[A], evidence$9: Arbitrary[B], evidence$10: Eq[B], evidence$11: Arbitrary[C], evidence$12: Eq[C], ArbFA: Arbitrary[F[A]], ArbFB: Arbitrary[F[B]], ArbFC: Arbitrary[F[C]], ArbFAtoB: Arbitrary[F[A => B]], ArbFBtoC: Arbitrary[F[B => C]], CogenA: Cogen[A], CogenB: Cogen[B], CogenC: Cogen[C], EqFA: Eq[F[A]], EqFB: Eq[F[B]], EqFC: Eq[F[C]], EqFABC: Eq[F[(A, B, C)]], EqFInt: Eq[F[Int]], iso: Isomorphisms[F]): RuleSet
Inhertied from
MonadTests
def invariant[A, B, C](evidence$1: Arbitrary[A], evidence$2: Arbitrary[B], evidence$3: Arbitrary[C], ArbFA: Arbitrary[F[A]], CogenA: Cogen[A], CogenB: Cogen[B], CogenC: Cogen[C], EqFA: Eq[F[A]], EqFC: Eq[F[C]]): RuleSet
Inhertied from
InvariantTests
def clock(exec: F[Boolean] => Prop): RuleSet
Inhertied from
ClockTests
def apply[A, B, C](evidence$1: Arbitrary[A], evidence$2: Arbitrary[B], evidence$3: Arbitrary[C], ArbFA: Arbitrary[F[A]], ArbFB: Arbitrary[F[B]], ArbFC: Arbitrary[F[C]], ArbFAtoB: Arbitrary[F[A => B]], ArbFBtoC: Arbitrary[F[B => C]], CogenA: Cogen[A], CogenB: Cogen[B], CogenC: Cogen[C], EqFA: Eq[F[A]], EqFC: Eq[F[C]], EqFABC: Eq[F[(A, B, C)]], iso: Isomorphisms[F]): RuleSet
Inhertied from
ApplyTests
def unique(exec: F[Boolean] => Prop): RuleSet
Inhertied from
UniqueTests
def applicative[A, B, C](evidence$1: Arbitrary[A], evidence$2: Arbitrary[B], evidence$3: Arbitrary[C], ArbFA: Arbitrary[F[A]], ArbFB: Arbitrary[F[B]], ArbFC: Arbitrary[F[C]], ArbFAtoB: Arbitrary[F[A => B]], ArbFBtoC: Arbitrary[F[B => C]], CogenA: Cogen[A], CogenB: Cogen[B], CogenC: Cogen[C], EqFA: Eq[F[A]], EqFB: Eq[F[B]], EqFC: Eq[F[C]], EqFABC: Eq[F[(A, B, C)]], iso: Isomorphisms[F]): RuleSet
Inhertied from
ApplicativeTests
def flatMap[A, B, C](evidence$1: Arbitrary[A], evidence$2: Arbitrary[B], evidence$3: Arbitrary[C], ArbFA: Arbitrary[F[A]], ArbFB: Arbitrary[F[B]], ArbFC: Arbitrary[F[C]], ArbFAtoB: Arbitrary[F[A => B]], ArbFBtoC: Arbitrary[F[B => C]], CogenA: Cogen[A], CogenB: Cogen[B], CogenC: Cogen[C], EqFA: Eq[F[A]], EqFB: Eq[F[B]], EqFC: Eq[F[C]], EqFABC: Eq[F[(A, B, C)]], iso: Isomorphisms[F]): RuleSet
Inhertied from
FlatMapTests
def spawn[A, B, C](evidence$1: Arbitrary[A], evidence$2: Eq[A], evidence$3: Arbitrary[B], evidence$4: Eq[B], evidence$5: Arbitrary[C], evidence$6: Eq[C], ArbFA: Arbitrary[F[A]], ArbFB: Arbitrary[F[B]], ArbFC: Arbitrary[F[C]], ArbFU: Arbitrary[F[Unit]], ArbFAtoB: Arbitrary[F[A => B]], ArbFBtoC: Arbitrary[F[B => C]], ArbE: Arbitrary[E], CogenA: Cogen[A], CogenB: Cogen[B], CogenC: Cogen[C], CogenE: Cogen[E], EqFA: Eq[F[A]], EqFB: Eq[F[B]], EqFC: Eq[F[C]], EqFU: Eq[F[Unit]], EqE: Eq[E], EqFAB: Eq[F[Either[A, B]]], EqFEitherEU: Eq[F[Either[E, Unit]]], EqFEitherEA: Eq[F[Either[E, A]]], EqFEitherUA: Eq[F[Either[Unit, A]]], EqFEitherAU: Eq[F[Either[A, Unit]]], EqFOutcomeEA: Eq[F[Outcome[F, E, A]]], EqFOutcomeEU: Eq[F[Outcome[F, E, Unit]]], EqFABC: Eq[F[(A, B, C)]], EqFInt: Eq[F[Int]], iso: Isomorphisms[F], faPP: F[A] => Pretty, fuPP: F[Unit] => Pretty, ePP: E => Pretty, foaPP: F[Outcome[F, E, A]] => Pretty, feauPP: F[Either[A, Unit]] => Pretty, feuaPP: F[Either[Unit, A]] => Pretty, fouPP: F[Outcome[F, E, Unit]] => Pretty): RuleSet
Inhertied from
GenSpawnTests
def functor[A, B, C](evidence$1: Arbitrary[A], evidence$2: Arbitrary[B], evidence$3: Arbitrary[C], ArbFA: Arbitrary[F[A]], CogenA: Cogen[A], CogenB: Cogen[B], CogenC: Cogen[C], EqFA: Eq[F[A]], EqFC: Eq[F[C]]): RuleSet
Inhertied from
FunctorTests
def monad[A, B, C](evidence$1: Arbitrary[A], evidence$2: Eq[A], evidence$3: Arbitrary[B], evidence$4: Eq[B], evidence$5: Arbitrary[C], evidence$6: Eq[C], ArbFA: Arbitrary[F[A]], ArbFB: Arbitrary[F[B]], ArbFC: Arbitrary[F[C]], ArbFAtoB: Arbitrary[F[A => B]], ArbFBtoC: Arbitrary[F[B => C]], CogenA: Cogen[A], CogenB: Cogen[B], CogenC: Cogen[C], EqFA: Eq[F[A]], EqFB: Eq[F[B]], EqFC: Eq[F[C]], EqFABC: Eq[F[(A, B, C)]], EqFInt: Eq[F[Int]], iso: Isomorphisms[F]): RuleSet
Inhertied from
MonadTests
def applicativeError[A, B, C](evidence$1: Arbitrary[A], evidence$2: Eq[A], evidence$3: Arbitrary[B], evidence$4: Eq[B], evidence$5: Arbitrary[C], evidence$6: Eq[C], ArbFA: Arbitrary[F[A]], ArbFB: Arbitrary[F[B]], ArbFC: Arbitrary[F[C]], ArbFU: Arbitrary[F[Unit]], ArbFAtoB: Arbitrary[F[A => B]], ArbFBtoC: Arbitrary[F[B => C]], ArbE: Arbitrary[E], CogenA: Cogen[A], CogenB: Cogen[B], CogenC: Cogen[C], CogenE: Cogen[E], EqFA: Eq[F[A]], EqFB: Eq[F[B]], EqFC: Eq[F[C]], EqE: Eq[E], EqFEitherEU: Eq[F[Either[E, Unit]]], EqFEitherEA: Eq[F[Either[E, A]]], EqEitherTFEA: Eq[EitherT[F, E, A]], EqFABC: Eq[F[(A, B, C)]], iso: Isomorphisms[F]): RuleSet
Inhertied from
ApplicativeErrorTests
def monadCancel[A, B, C](evidence$1: Arbitrary[A], evidence$2: Eq[A], evidence$3: Arbitrary[B], evidence$4: Eq[B], evidence$5: Arbitrary[C], evidence$6: Eq[C], ArbFA: Arbitrary[F[A]], ArbFB: Arbitrary[F[B]], ArbFC: Arbitrary[F[C]], ArbFU: Arbitrary[F[Unit]], ArbFAtoB: Arbitrary[F[A => B]], ArbFBtoC: Arbitrary[F[B => C]], ArbE: Arbitrary[E], CogenA: Cogen[A], CogenB: Cogen[B], CogenC: Cogen[C], CogenE: Cogen[E], EqFA: Eq[F[A]], EqFB: Eq[F[B]], EqFC: Eq[F[C]], EqFU: Eq[F[Unit]], EqE: Eq[E], EqFEitherEU: Eq[F[Either[E, Unit]]], EqFEitherEA: Eq[F[Either[E, A]]], EqFABC: Eq[F[(A, B, C)]], EqFInt: Eq[F[Int]], iso: Isomorphisms[F], faPP: F[A] => Pretty, fuPP: F[Unit] => Pretty, ePP: E => Pretty): RuleSet
Inhertied from
MonadCancelTests
def monadError[A, B, C](evidence$1: Arbitrary[A], evidence$2: Eq[A], evidence$3: Arbitrary[B], evidence$4: Eq[B], evidence$5: Arbitrary[C], evidence$6: Eq[C], ArbFA: Arbitrary[F[A]], ArbFB: Arbitrary[F[B]], ArbFC: Arbitrary[F[C]], ArbFU: Arbitrary[F[Unit]], ArbFAtoB: Arbitrary[F[A => B]], ArbFBtoC: Arbitrary[F[B => C]], ArbE: Arbitrary[E], CogenA: Cogen[A], CogenB: Cogen[B], CogenC: Cogen[C], CogenE: Cogen[E], EqFA: Eq[F[A]], EqFB: Eq[F[B]], EqFC: Eq[F[C]], EqE: Eq[E], EqFEitherEU: Eq[F[Either[E, Unit]]], EqFEitherEA: Eq[F[Either[E, A]]], EqEitherTFEA: Eq[EitherT[F, E, A]], EqFABC: Eq[F[(A, B, C)]], EqFInt: Eq[F[Int]], iso: Isomorphisms[F]): RuleSet
Inhertied from
MonadErrorTests
def semigroupal[A, B, C](evidence$2: Arbitrary[A], evidence$3: Arbitrary[B], evidence$4: Arbitrary[C], iso: Isomorphisms[F], ArbFA: Arbitrary[F[A]], ArbFB: Arbitrary[F[B]], ArbFC: Arbitrary[F[C]], EqFA: Eq[F[A]], EqFABC: Eq[F[(A, B, C)]]): RuleSet
Inhertied from
SemigroupalTests