package instances
- Alphabetic
- Public
- Protected
Type Members
- class CatsAsyncForTask extends CatsBaseForTask with Async[Task]
Cats type class instance of Task for
cats.effect.Async
andCoflatMap
(and implicitly forApplicative
,Monad
,MonadError
, etc).Cats type class instance of Task for
cats.effect.Async
andCoflatMap
(and implicitly forApplicative
,Monad
,MonadError
, etc).References:
- class CatsBaseForTask extends MonadError[Task, Throwable] with CoflatMap[Task] with SemigroupK[Task]
Cats type class instances for Task for
cats.MonadError
andCoflatMap
(and implicitly forApplicative
,Monad
, etc).Cats type class instances for Task for
cats.MonadError
andCoflatMap
(and implicitly forApplicative
,Monad
, etc).References:
- class CatsConcurrentEffectForTask extends CatsEffectForTask with ConcurrentEffect[Task]
Cats type class instances of Task for
cats.effect.ConcurrentEffect
.Cats type class instances of Task for
cats.effect.ConcurrentEffect
.Note this is a separate class from CatsConcurrentForTask, because we need an implicit Scheduler in scope in order to trigger the execution of a
Task
. However we cannot inherit directly fromCatsConcurrentForTask
, because it would create conflicts due to that one having a higher priority but being a super-type.References:
- class CatsConcurrentForTask extends CatsAsyncForTask with Concurrent[Task]
Cats type class instance of Task for
cats.effect.Concurrent
.Cats type class instance of Task for
cats.effect.Concurrent
.References:
- class CatsEffectForTask extends CatsBaseForTask with Effect[Task]
Cats type class instances of Task for
cats.effect.Effect
(and implicitly forApplicative
,Monad
,MonadError
,Sync
, etc).Cats type class instances of Task for
cats.effect.Effect
(and implicitly forApplicative
,Monad
,MonadError
,Sync
, etc).Note this is a separate class from CatsAsyncForTask, because we need an implicit Scheduler in scope in order to trigger the execution of a
Task
. However we cannot inherit directly fromCatsAsyncForTask
, because it would create conflicts due to that one having a higher priority but being a super-type.References:
- class CatsMonadToMonoid[F[_], A] extends CatsMonadToSemigroup[F, A] with Monoid[F[A]]
Given that
A
has acats.Semigroup
implementation, this builds aSemigroup[F[A]]
instance for anyF[_]
data type that implementscats.Monad
.Given that
A
has acats.Semigroup
implementation, this builds aSemigroup[F[A]]
instance for anyF[_]
data type that implementscats.Monad
.Used for both Task and monix.eval.Coeval.
NOTE: nothing in this implementation is specific to Monix or to
cats-effect
, but these instances are not provided by default by Cats for any monad, probably because they aren't useful for every monad. - class CatsMonadToSemigroup[F[_], A] extends Semigroup[F[A]]
Given that
A
has acats.Monoid
implementation, this builds aSemigroup[F[A]]
instance for anyF[_]
data type that implementscats.effect.Sync
.Given that
A
has acats.Monoid
implementation, this builds aSemigroup[F[A]]
instance for anyF[_]
data type that implementscats.effect.Sync
.Used for both Task and monix.eval.Coeval.
NOTE: nothing in this implementation is specific to Monix or to
cats-effect
, but these instances are not provided by default by Cats for any monad, probably because they aren't useful for every monad. - class CatsParallelForTask extends Parallel[Task]
cats.Parallel
type class instance for Task.cats.Parallel
type class instance for Task.A
cats.Parallel
instances means thatTask
can be used for processing tasks in parallel (with non-deterministic effects ordering).References:
- class CatsSyncForCoeval extends Sync[Coeval] with CoflatMap[Coeval] with SemigroupK[Coeval]
Cats type class instances for Coeval.
Cats type class instances for Coeval.
As can be seen the implemented type classes are for now
cats.effect.Sync
andCoflatMap
. Notably missing is theComonad
type class, whichCoeval
should never implement.References:
Value Members
- object CatsConcurrentForTask extends CatsConcurrentForTask
Default and reusable instance for CatsConcurrentForTask.
Default and reusable instance for CatsConcurrentForTask.
Globally available in scope, as it is returned by Task.catsAsync.
- object CatsParallelForTask extends CatsParallelForTask
- object CatsSyncForCoeval extends CatsSyncForCoeval
Default and reusable instance for CatsSyncForCoeval.
Default and reusable instance for CatsSyncForCoeval.
Globally available in scope, as it is returned by Coeval.catsSync.
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.catnap exposes pure abstractions built on top of the Cats-Effect type classes:
monix.eval is for dealing with evaluation of results, thus exposing Task and Coeval.
monix.reactive exposes the
Observable
pattern:Observable
implementationsmonix.tail exposes Iterant for purely functional pull based streaming:
Batch
andBatchCursor
, the alternatives to Scala'sIterable
andIterator
respectively that we are using within Iterant's encodingYou can control evaluation with type you choose - be it Task, Coeval, cats.effect.IO or your own as long as you provide correct cats-effect or cats typeclass instance.