package types
- Alphabetic
- Public
- All
Type Members
-
trait
AllSyntax extends Syntax with Syntax with Syntax with Syntax with Syntax with Syntax with Syntax
Groups all syntax extensions.
-
trait
Applicative[F[_]] extends Serializable with Type[F]
The
Applicative
type-class is a Functor that also adds the capability of lifting a value in the context.The
Applicative
type-class is a Functor that also adds the capability of lifting a value in the context.Described in Applicative Programming with Effects.
To implement
Functor
:- inherit from Functor.Type in derived type-classes
- inherit from Functor.Instance when implementing instances
The purpose of this type-class is to support the data-types in the Monix library and it is considered a shim for a lawful type-class to be supplied by libraries such as Cats or Scalaz or equivalent.
CREDITS: The type-class encoding has been inspired by the Scato project by Aloïs Cochard and Scalaz 8 and the type has been extracted from Cats.
-
trait
Cobind[F[_]] extends Serializable with Type[F]
A type-class providing the
coflatMap
operation, the dual offlatMap
.A type-class providing the
coflatMap
operation, the dual offlatMap
.To implement
Cobind
:- inherit from Cobind.Type in derived type-classes
- inherit from Cobind.Instance when implementing instances
The purpose of this type-class is to support the data-types in the Monix library and it is considered a shim for a lawful type-class to be supplied by libraries such as Cats or Scalaz or equivalent.
CREDITS: The type-class encoding has been inspired by the Scato project by Aloïs Cochard and Scalaz 8 and the type has been extracted from Cats.
-
trait
Comonad[F[_]] extends Serializable with Type[F]
The
Comonad
type-class is the dual of Monad.The
Comonad
type-class is the dual of Monad. Whereas Monads allow for the composition of effectful functions, Comonads allow for composition of functions that extract the value from their context.To implement
Comonad
:- inherit from Comonad.Type in derived type-classes
- inherit from Comonad.Instance when implementing instances
The purpose of this type-class is to support the data-types in the Monix library and it is considered a shim for a lawful type-class to be supplied by libraries such as Cats or Scalaz or equivalent.
CREDITS: The type-class encoding has been inspired by the Scato project by Aloïs Cochard and Scalaz 8 and the type has been extracted from Cats.
-
trait
Functor[F[_]] extends Serializable
A functor provides the
map
operation that allows lifting anf
function into the functor context and applying it.A functor provides the
map
operation that allows lifting anf
function into the functor context and applying it.To implement
Functor
:- inherit from Functor.Type in derived type-classes
- inherit from Functor.Instance when implementing instances
The purpose of this type-class is to support the data-types in the Monix library and it is considered a shim for a lawful type-class to be supplied by libraries such as Cats or Scalaz or equivalent.
CREDITS: The type-class encoding has been inspired by the Scato project by Aloïs Cochard and Scalaz 8 and the type has been extracted from Cats.
-
trait
Memoizable[F[_]] extends Serializable with Type[F]
A type-class for
F[A]
monads that are suspendable and whose evaluation can be memoized, along with a guarantee that the captured side-effects only happen once.A type-class for
F[A]
monads that are suspendable and whose evaluation can be memoized, along with a guarantee that the captured side-effects only happen once.The
memoize
operation takes anF[_]
instance and returns a newF
that guarantees that its evaluation and all related side-effects only happen once, with the results to be reused on subsequent evaluations.Note that the
memoize
operation can be a no-op. For example Scala'sFuture
doesn't need to do anything special as memoization happens by default and idempotency is guaranteed. -
trait
Monad[F[_]] extends Serializable with Type[F]
The
Monad
type-class is a structure that represents computations defined as sequences of steps: : a type with a monad structure defines what it means to chain operations together, or nest functions of that type.The
Monad
type-class is a structure that represents computations defined as sequences of steps: : a type with a monad structure defines what it means to chain operations together, or nest functions of that type.See: Monads for functional programming
To implement
Monad
:- inherit from Monad.Type in derived type-classes
- inherit from Monad.Instance when implementing instances
The purpose of this type-class is to support the data-types in the Monix library and it is considered a shim for a lawful type-class to be supplied by libraries such as Cats or Scalaz or equivalent.
CREDITS: The type-class encoding has been inspired by the Scato project by Aloïs Cochard and Scalaz 8 and the type has been extracted from Cats.
-
trait
MonadError[F[_], E] extends Serializable with Type[F]
The
MonadError
type-class describes monads that can do error handling.The
MonadError
type-class describes monads that can do error handling.To implement
MonadError
:- inherit from MonadError.Type in derived type-classes
- inherit from MonadError.Instance when implementing instances
The purpose of this type-class is to support the data-types in the Monix library and it is considered a shim for a lawful type-class to be supplied by libraries such as Cats or Scalaz or equivalent.
CREDITS: The type-class encoding has been inspired by the Scato project by Aloïs Cochard and Scalaz 8 and the type has been extracted from Cats.
-
trait
MonadEval[F[_]] extends Serializable with Type[F]
Type-class describing a Monad which also supports lifting a by-name value into the monadic context.
Type-class describing a Monad which also supports lifting a by-name value into the monadic context.
To implement
MonadEval
:- inherit from MonadEval.Type in derived type-classes
- inherit from MonadEval.Instance when implementing instances
The purpose of this type-class is to support the data-types in the Monix library and it is considered a shim for a lawful type-class to be supplied by libraries such as Cats or Scalaz or equivalent.
CREDITS: The type-class encoding has been inspired by the Scato project by Aloïs Cochard and Scalaz 8 and the type has been inspired by Cats and FS2.
-
trait
MonadFilter[F[_]] extends Serializable with Type[F]
The
MonadFilter
type-class is equipped with an additional operation which allows us to create an "Empty" value for the Monad (for whatever "empty" makes sense for that particular monad).The
MonadFilter
type-class is equipped with an additional operation which allows us to create an "Empty" value for the Monad (for whatever "empty" makes sense for that particular monad). This is of particular interest to us since it allows us to add afilter
method to a Monad, which is used when pattern matching or using guards in for comprehensions.To implement
MonadFilter
:- inherit from MonadFilter.Type in derived type-classes
- inherit from MonadFilter.Instance when implementing instances
The purpose of this type-class is to support the data-types in the Monix library and it is considered a shim for a lawful type-class to be supplied by libraries such as Cats or Scalaz or equivalent.
CREDITS: The type-class encoding has been inspired by the Scato project by Aloïs Cochard and Scalaz 8 and the type has been extracted from Cats.
-
trait
MonadRec[F[_]] extends Serializable with Type[F]
This type-class represents monads with a tail-recursive
flatMap
implementation.This type-class represents monads with a tail-recursive
flatMap
implementation.Based on Phil Freeman's Stack Safety for Free.
To implement
MonadRec
:- inherit from MonadRec.Type in derived type-classes
- inherit from MonadRec.Instance when implementing instances
The purpose of this type-class is to support the data-types in the Monix library and it is considered a shim for a lawful type-class to be supplied by libraries such as Cats or Scalaz or equivalent.
CREDITS: The type-class encoding has been inspired by the Scato project by Aloïs Cochard and Scalaz 8 and the type has been extracted from Cats.
-
trait
MonoidK[F[_]] extends Serializable with Type[F]
MonoidK
is a universal monoid which operates on kinds.MonoidK
is a universal monoid which operates on kinds.To implement
MonoidK
:- inherit from MonoidK.Type in derived type-classes
- inherit from MonoidK.Instance when implementing instances
The purpose of this type-class is to support the data-types in the Monix library and it is considered a shim for a lawful type-class to be supplied by libraries such as Cats or Scalaz or equivalent.
CREDITS: The type-class encoding has been inspired by the Scato project by Aloïs Cochard and Scalaz 8 and the type has been extracted from Cats.
-
trait
SemigroupK[F[_]] extends Serializable
SemigroupK
is a universal semigroup which operates on kinds.SemigroupK
is a universal semigroup which operates on kinds.To implement
SemigroupK
:- inherit from SemigroupK.Type in derived type-classes
- inherit from SemigroupK.Instance when implementing instances
The purpose of this type-class is to support the data-types in the Monix library and it is considered a shim for a lawful type-class to be supplied by libraries such as Cats or Scalaz or equivalent.
CREDITS: The type-class encoding has been inspired by the Scato project by Aloïs Cochard and Scalaz 8 and the type has been extracted from Cats.
-
trait
Suspendable[F[_]] extends Serializable with Type[F]
Type-class describing a Monad which also supports lifting a by-name value into the monadic context.
Type-class describing a Monad which also supports lifting a by-name value into the monadic context.
To implement
Suspendable
:- inherit from Suspendable.Type in derived type-classes
- inherit from Suspendable.Instance when implementing instances
The purpose of this type-class is to support the data-types in the Monix library and it is considered a shim for a lawful type-class to be supplied by libraries such as Cats or Scalaz or equivalent.
CREDITS: The type-class encoding has been inspired by the Scato project by Aloïs Cochard and Scalaz 8 and the type has been inspired by Cats and FS2.
Value Members
- object Applicative extends Serializable
- object Cobind extends Serializable
- object Comonad extends Serializable
- object Functor extends Serializable
- object Memoizable extends Serializable
- object Monad extends Serializable
- object MonadError extends Serializable
- object MonadEval extends Serializable
- object MonadFilter extends Serializable
- object MonadRec extends Serializable
- object MonoidK extends Serializable
- object SemigroupK extends Serializable
- object Suspendable extends Serializable
-
object
syntax extends AllSyntax
Provides syntax (extension methods) for usage of monix.types instances.
Provides syntax (extension methods) for usage of monix.types instances.
Usage:
import monix.types.syntax._
Do not combine with Cats or Scalaz syntax in the same context.
This is the API documentation for the Monix library.
Package Overview
monix.execution exposes lower level primitives for dealing with asynchronous execution:
Atomic
types, as alternative tojava.util.concurrent.atomic
monix.eval is for dealing with evaluation of results, thus exposing Task and Coeval.
monix.reactive exposes the
Observable
pattern:Observable
implementationsmonix.types implements type-class shims, to be translated to type-classes provided by libraries such as Cats or Scalaz.
monix.cats is the optional integration with the Cats library, providing translations for the types described in
monix.types
.monix.scalaz is the optional integration with the Scalaz library, providing translations for the types described in
monix.types
.