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 free
    Definition Classes
    cats
  • Cofree
  • ContravariantCoyoneda
  • Coyoneda
  • Free
  • FreeApplicative
  • FreeInvariantMonoidal
  • FreeT
  • Trampoline
  • Yoneda

object Free extends FreeInstances with Serializable

Source
Free.scala
Linear Supertypes
Serializable, Serializable, FreeInstances, FreeStructuralInstances, FreeInstances1, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Free
  2. Serializable
  3. Serializable
  4. FreeInstances
  5. FreeStructuralInstances
  6. FreeInstances1
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. implicit def catsFreeDeferForFree[S[_]]: Defer[[β$23$]Free[S, β$23$]]
    Definition Classes
    FreeInstances
  6. implicit def catsFreeDeferForId: Defer[[β$17$]Free[[A]A, β$17$]]
  7. implicit def catsFreeFoldableForFree[F[_]](implicit foldableF: Foldable[F]): Foldable[[β$25$]Free[F, β$25$]]
    Definition Classes
    FreeInstances1
  8. implicit def catsFreeMonadForFree[S[_]]: Monad[[β$20$]Free[S, β$20$]]

    Free[S, *] has a monad for any type constructor S[_].

    Free[S, *] has a monad for any type constructor S[_].

    Definition Classes
    FreeInstances
  9. implicit def catsFreeMonadForId: Monad[[β$16$]Free[[A]A, β$16$]]
  10. implicit def catsFreeTraverseForFree[F[_]](implicit traversableF: Traverse[F]): Traverse[[β$26$]Free[F, β$26$]]
    Definition Classes
    FreeInstances1
  11. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @IntrinsicCandidate()
  12. def compile[F[_], G[_]](fk: FunctionK[F, G]): FunctionK[[β$12$]Free[F, β$12$], [β$13$]Free[G, β$13$]]

    a FunctionK, suitable for composition, which calls compile

  13. def defer[F[_], A](value: ⇒ Free[F, A]): Free[F, A]

    Defer the creation of a Free[F, A] value.

  14. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  16. def foldMap[F[_], M[_]](fk: FunctionK[F, M])(implicit arg0: Monad[M]): FunctionK[[β$14$]Free[F, β$14$], M]

    a FunctionK, suitable for composition, which calls foldMap

  17. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  18. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  19. def injectRoll[F[_], G[_], A](ga: G[Free[F, A]])(implicit I: InjectK[G, F]): Free[F, A]
  20. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  21. def liftF[F[_], A](value: F[A]): Free[F, A]

    Lift an F[A] value into the free monad.

  22. def liftId[F[_]]: ~>[Id, [β$6$]Free[F, β$6$]]

    Same as pure but expressed as a FunctionK

    Same as pure but expressed as a FunctionK

    scala> import cats._
    scala> val fo = Free.liftId[Eval]("foo")
    val fo: cats.free.Free[Eval,String] = Free(...)
  23. def liftInject[G[_]]: FreeLiftInjectKPartiallyApplied[G]

    This method is used to defer the application of an InjectK[F, G] instance.

    This method is used to defer the application of an InjectK[F, G] instance. The actual work happens in FreeLiftInjectKPartiallyApplied#apply.

    This method exists to allow the G parameter to be bound independently of the F and A parameters below.

  24. def liftK[F[_]]: ~>[F, [β$4$]Free[F, β$4$]]

    Same as liftF, but expressed as a FunctionK for use with mapK

    Same as liftF, but expressed as a FunctionK for use with mapK

    scala> import cats._, data._, implicits._
    scala> val a: OptionT[Eval, Int] = 1.pure[OptionT[Eval, *]]
    scala> val b: OptionT[Free[Eval, *], Int] = a.mapK(Free.liftK)
    scala> b.value.run
    res0: Option[Int] = Some(1)
  25. def mapK[F[_], G[_]](fk: FunctionK[F, G]): FunctionK[[β$8$]Free[F, β$8$], [β$9$]Free[G, β$9$]]

    a FunctionK, suitable for composition, which calls mapK

  26. def match_[F[_], G[_], A](fa: Free[F, A])(implicit F: Functor[F], I: InjectK[G, F]): Option[G[Free[F, A]]]
  27. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  28. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  29. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  30. def pure[S[_], A](a: A): Free[S, A]

    Lift a pure A value into the free monad.

  31. def roll[F[_], A](value: F[Free[F, A]]): Free[F, A]

    Absorb a step into the free monad.

  32. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  33. def toString(): String
    Definition Classes
    AnyRef → Any
  34. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  36. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated
    Deprecated
  2. def inject[F[_], G[_]]: FreeInjectKPartiallyApplied[F, G]

    This method is used to defer the application of an InjectK[F, G] instance.

    This method is used to defer the application of an InjectK[F, G] instance. The actual work happens in FreeInjectKPartiallyApplied#apply.

    This method exists to allow the F and G parameters to be bound independently of the A parameter below.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.3.1) use liftInject

  3. def suspend[F[_], A](value: ⇒ Free[F, A]): Free[F, A]

    Suspend the creation of a Free[F, A] value.

    Suspend the creation of a Free[F, A] value.

    Annotations
    @deprecated
    Deprecated

    (Since version 1.0.0-MF) Use Free.defer.

Inherited from Serializable

Inherited from Serializable

Inherited from FreeInstances

Inherited from FreeStructuralInstances

Inherited from FreeInstances1

Inherited from AnyRef

Inherited from Any

Ungrouped