Packages

  • package root
    Definition Classes
    root
  • package cats

    The cats root package contains all the trait signatures of most Scala type classes.

    The cats root package contains all the trait signatures of most Scala type classes.

    Cats type classes are implemented using the approach from the Type classes as objects and implicits article.

    For each type class, cats provides three pieces: - Its signature: a trait that is polymorphic on a type parameter. Type class traits inherit from other type classes to indicate that any implementation of the lower type class (e.g. Applicative) can also serve as an instance for the higuer type class (e.g. Functor). - Type class 'instances, which are classes and objects that implement one or more type class signatures for some specific types. Type class instances for several data types from the Java or Scala standard libraries are declared in the subpackage cats.instances. - Syntax extensions, each of which provides the methods of the type class defines as extension methods (which in Scala 2 are encoded as implicit classes) for values of any type F; given that an instance of the type class for the receiver type (this) is in the implicit scope. Symtax extensions are declared in the cats.syntax package. - A set of laws, that are also generic on the type of the class, and are only defined on the operations of the type class. The purpose of these laws is to declare some algebraic relations (equations) between Scala expressions involving the operations of the type class, and test (but not verify) that implemented instances satisfy those equations. Laws are defined in the cats-laws package.

    Although most of cats type classes are declared in this package, some are declared in other packages: - type classes that operate on base types (kind *), and their implementations for standard library types, are contained in cats.kernel, which is a different SBT project. However, they are re-exported from this package. - type classes of kind F[_, _], such as cats.arrow.Profunctor" or cats.arrow.Arrow, which are relevant for Functional Reactive Programming or optics, are declared in the cats.arrow package. - Also, those type classes that abstract over (pure or impure) functional runtime effects are declared in the cats-effect library. - Some type classes for which no laws can be provided are left out of the main road, in a small and dirty alley. These are the alleycats.

    Definition Classes
    root
  • package kernel
    Definition Classes
    cats
  • package instances
    Definition Classes
    kernel
  • package laws
    Definition Classes
    kernel
  • package discipline
  • BandLaws
  • BoundedEnumerableLaws
  • BoundedSemilatticeLaws
  • CommutativeGroupLaws
  • CommutativeMonoidLaws
  • CommutativeSemigroupLaws
  • EqLaws
  • GroupLaws
  • HashLaws
  • IsEq
  • IsEqArrow
  • LowerBoundedLaws
  • MonoidLaws
  • OrderLaws
  • PartialNextBoundedLaws
  • PartialNextLaws
  • PartialOrderLaws
  • PartialPreviousBoundedLaws
  • PartialPreviousLaws
  • PartialPreviousNextLaws
  • SemigroupLaws
  • SemilatticeLaws
  • SerializableLaws
  • UpperBoundedLaws

package laws

Source
package.scala
Linear Supertypes
Content Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. laws
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Package Members

  1. package discipline

Type Members

  1. trait BandLaws[A] extends SemigroupLaws[A]
  2. trait BoundedEnumerableLaws[A] extends PartialPreviousNextLaws[A] with PartialPreviousBoundedLaws[A] with PartialNextBoundedLaws[A]
  3. trait BoundedSemilatticeLaws[A] extends CommutativeMonoidLaws[A] with SemilatticeLaws[A]
  4. trait CommutativeGroupLaws[A] extends GroupLaws[A] with CommutativeMonoidLaws[A]
  5. trait CommutativeMonoidLaws[A] extends MonoidLaws[A] with CommutativeSemigroupLaws[A]
  6. trait CommutativeSemigroupLaws[A] extends SemigroupLaws[A]
  7. trait EqLaws[A] extends AnyRef
  8. trait GroupLaws[A] extends MonoidLaws[A]
  9. trait HashLaws[A] extends EqLaws[A]
  10. final case class IsEq[A](lhs: A, rhs: A) extends Product with Serializable

    Represents two values of the same type that are expected to be equal.

  11. implicit final class IsEqArrow[A] extends AnyVal
  12. trait LowerBoundedLaws[A] extends PartialOrderLaws[A]
  13. trait MonoidLaws[A] extends SemigroupLaws[A]
  14. trait OrderLaws[A] extends PartialOrderLaws[A]
  15. trait PartialNextBoundedLaws[A] extends PartialNextLaws[A] with UpperBoundedLaws[A]
  16. trait PartialNextLaws[A] extends PartialOrderLaws[A]
  17. trait PartialOrderLaws[A] extends EqLaws[A]
  18. trait PartialPreviousBoundedLaws[A] extends PartialPreviousLaws[A] with LowerBoundedLaws[A]
  19. trait PartialPreviousLaws[A] extends PartialOrderLaws[A]
  20. trait PartialPreviousNextLaws[A] extends PartialNextLaws[A] with PartialPreviousLaws[A] with OrderLaws[A]
  21. trait SemigroupLaws[A] extends AnyRef
  22. trait SemilatticeLaws[A] extends CommutativeSemigroupLaws[A] with BandLaws[A]
  23. trait UpperBoundedLaws[A] extends PartialOrderLaws[A]

Value Members

  1. object BandLaws
  2. object BoundedEnumerableLaws
  3. object BoundedSemilatticeLaws
  4. object CommutativeGroupLaws
  5. object CommutativeMonoidLaws
  6. object CommutativeSemigroupLaws
  7. object EqLaws
  8. object GroupLaws
  9. object HashLaws
  10. object LowerBoundedLaws
  11. object MonoidLaws
  12. object OrderLaws
  13. object PartialOrderLaws
  14. object PartialPreviousLaws
  15. object SemigroupLaws
  16. object SemilatticeLaws
  17. object SerializableLaws

    Check for Java Serializability.

    Check for Java Serializability.

    This law is only applicable on the JVM, but is something we want to be sure to enforce. Therefore, we use bricks.Platform to do a runtime check rather than create a separate jvm-laws project.

  18. object UpperBoundedLaws

Inherited from AnyRef

Inherited from Any

Ungrouped