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 arrow
    Definition Classes
    cats
  • package conversions
    Definition Classes
    cats
  • package data
    Definition Classes
    cats
  • package evidence
    Definition Classes
    cats
  • package free
    Definition Classes
    cats
  • Cofree
  • ContravariantCoyoneda
  • Coyoneda
  • Free
  • FreeApplicative
  • FreeInvariantMonoidal
  • FreeT
  • Trampoline
  • Yoneda
  • package instances
    Definition Classes
    cats
  • package kernel
    Definition Classes
    cats
  • package syntax
    Definition Classes
    cats
p

cats

free

package free

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

Type Members

  1. final case class Cofree[S[_], A](head: A, tail: Eval[S[Cofree[S, A]]]) extends Product with Serializable

    A free comonad for some branching functor S.

    A free comonad for some branching functor S. Branching is done lazily using Eval. A tree with data at the branches, as opposed to Free which is a tree with data at the leaves. Not an instruction set functor made into a program monad as in Free, but an instruction set's outputs as a functor made into a tree of the possible worlds reachable using the instruction set.

    This Scala implementation of Cofree and its usages are derived from Scalaz's Cofree, originally written by Rúnar Bjarnason.

  2. sealed abstract class ContravariantCoyoneda[F[_], A] extends Serializable

    The free contravariant functor on F.

    The free contravariant functor on F. This is isomorphic to F as long as F itself is a contravariant functor. The function from F[A] to ContravariantCoyoneda[F,A] exists even when F is not a contravariant functor. Implemented using a List of functions for stack-safety.

  3. sealed abstract class Coyoneda[F[_], A] extends Serializable

    The dual view of the Yoneda lemma.

    The dual view of the Yoneda lemma. The free functor on F. This is isomorphic to F as long as F itself is a functor. The function from F[A] to Coyoneda[F,A] exists even when F is not a functor. Implemented using a List of functions for stack-safety.

  4. sealed abstract class Free[S[_], A] extends Product with Serializable with FreeFoldStep[S, A]

    A free operational monad for some functor S.

    A free operational monad for some functor S. Binding is done using the heap instead of the stack, allowing tail-call elimination.

  5. sealed abstract class FreeApplicative[F[_], A] extends Product with Serializable

    Applicative Functor for Free, implementation inspired by https://github.com/safareli/free/pull/31/

  6. sealed abstract class FreeInvariantMonoidal[F[_], A] extends Product with Serializable

    Invariant Monoidal for Free

  7. sealed abstract class FreeT[S[_], M[_], A] extends Product with Serializable

    FreeT is a monad transformer for Free monads over a Functor S

    FreeT is a monad transformer for Free monads over a Functor S

    Stack safety for Free and FreeT is based on the paper Stack Safety for Free by Phil Freeman

    This Scala implementation of FreeT and its usages are derived from Scalaz's FreeT, originally written by Brian McKenna.

  8. type Trampoline[A] = Free[Function0, A]

    Alias for the free monad over the Function0 functor.

  9. abstract class Yoneda[F[_], A] extends Serializable

    The cofree functor for F.

    The cofree functor for F. The Yoneda lemma says that Yoneda[F,A] is isomorphic to F[A] for any functor F. The function from Yoneda[F, A] to F[A] exists even when we have forgotten that F is a functor. Can be seen as a partially applied map for the functor F.

Value Members

  1. object Cofree extends CofreeInstances with Serializable
  2. object ContravariantCoyoneda extends Serializable
  3. object Coyoneda extends Serializable
  4. object Free extends FreeInstances with Serializable
  5. object FreeApplicative extends Serializable
  6. object FreeInvariantMonoidal extends Serializable
  7. object FreeT extends FreeTInstances with Serializable
  8. object Trampoline extends TrampolineFunctions
  9. object Yoneda extends Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped