arrow-typeclasses / arrow.typeclasses

Package arrow.typeclasses


Alternative interface Alternative<F> : Applicative<F>, MonoidK<F>
Applicative interface Applicative<F> : Functor<F>
ApplicativeError interface ApplicativeError<F, E> : Applicative<F>
Bifoldable interface Bifoldable<F>
Bifunctor interface Bifunctor<F>
Bimonad interface Bimonad<F> : Monad<F>, Comonad<F>
BindingInContextContinuation interface BindingInContextContinuation<in T> : Continuation<T>
Category interface Category<F>
CocomposedFunctor interface CocomposedFunctor<F, X> : Functor<Conested<F, X>>
Comonad interface Comonad<F> : Functor<F>
ComonadContinuation open class ComonadContinuation<F, A : Any> : Serializable, Continuation<A>, Comonad<F>
ComposedAlternative interface ComposedAlternative<F, G> : Alternative<Nested<F, G>>, ComposedApplicative<F, G>, ComposedMonoidK<F, G>
ComposedApplicative interface ComposedApplicative<F, G> : Applicative<Nested<F, G>>, ComposedFunctor<F, G>
ComposedBifoldable interface ComposedBifoldable<F, G> : Bifoldable<Nested<F, G>>
ComposedBifunctor interface ComposedBifunctor<F, G> : Bifunctor<Nested<F, G>>
ComposedContravariant interface ComposedContravariant<F, G> : Functor<Nested<F, G>>
ComposedContravariantCovariant interface ComposedContravariantCovariant<F, G> : Contravariant<Nested<F, G>>
ComposedCovariantContravariant interface ComposedCovariantContravariant<F, G> : Contravariant<Nested<F, G>>
ComposedFoldable interface ComposedFoldable<F, G> : Foldable<Nested<F, G>>
ComposedFunctor interface ComposedFunctor<F, G> : Functor<Nested<F, G>>
ComposedInvariant interface ComposedInvariant<F, G> : Invariant<Nested<F, G>>
ComposedInvariantContravariant interface ComposedInvariantContravariant<F, G> : Invariant<Nested<F, G>>
ComposedInvariantCovariant interface ComposedInvariantCovariant<F, G> : Invariant<Nested<F, G>>
ComposedMonoidK interface ComposedMonoidK<F, G> : MonoidK<Nested<F, G>>, ComposedSemigroupK<F, G>
ComposedSemigroupK interface ComposedSemigroupK<F, G> : SemigroupK<Nested<F, G>>
ComposedTraverse interface ComposedTraverse<F, G> : Traverse<Nested<F, G>>, ComposedFoldable<F, G>
Conested interface Conested<out F, out B>
A type to represent λ[α => KindF,α,C]
Const data class Const<A, out T> : ConstOf<A, T>
Continuation interface Continuation<in T> : Continuation<T>
Contravariant interface Contravariant<F> : Invariant<F>
Decidable interface Decidable<F> : Divisible<F>
Decidable is a typeclass modeling contravariant decision. Decidable is the contravariant version of Alternative.
Divide interface Divide<F> : Contravariant<F>
Divide is a typeclass that models the divide part of divide and conquer.
Divisible interface Divisible<F> : Divide<F>
Divisible extends Divide by providing an empty value
Eq interface Eq<in F>
Foldable interface Foldable<F>
ForConst class ForConst
ForMonoid class ForMonoid
Functor interface Functor<F> : Invariant<F>
Hash interface Hash<in F> : Eq<F>
A type class used to represent hashing for objects of type F
Inject interface Inject<F, G>
Inject type class as described in “Data types a la carte” (Swierstra 2008).
Invariant interface Invariant<F>
Monad interface Monad<F> : Selective<F>
MonadContinuation open class MonadContinuation<F, A> : Continuation<Kind<F, A>>, Monad<F>, BindSyntax<F>
MonadError interface MonadError<F, E> : ApplicativeError<F, E>, Monad<F>
MonadErrorContinuation open class MonadErrorContinuation<F, A> : MonadContinuation<F, A>, MonadThrow<F>
MonadThrow interface MonadThrow<F> : MonadError<F, Throwable>
Monoid interface Monoid<A> : Semigroup<A>, MonoidOf<A>
MonoidK interface MonoidK<F> : SemigroupK<F>
Nested interface Nested<out F, out G>
A type to represent λ[α => KindF,G,α]
NonEmptyReducible interface NonEmptyReducible<F, G> : Reducible<F>
Order interface Order<F> : Eq<F>
Profunctor interface Profunctor<F>
Reducible interface Reducible<F> : Foldable<F>
Selective interface Selective<F> : Applicative<F>
Semigroup interface Semigroup<A>
SemigroupK interface SemigroupK<F>
Semigroupal interface Semigroupal<F>
Semiring interface Semiring<A> : Monoid<A>
Show interface Show<in A>
Traverse interface Traverse<F> : Functor<F>, Foldable<F>

Type Aliases

BinestedType typealias BinestedType<F, G, A, B> = Kind2<Nested<F, G>, A, B>
BiunnestedType typealias BiunnestedType<F, G, A, B> = Kind2<F, Kind2<G, A, B>, Kind2<G, A, B>>
ConestedType typealias ConestedType<F, A, B> = Kind<Conested<F, B>, A>
ConstOf typealias ConstOf<A, T> = Kind2<ForConst, A, T>
ConstPartialOf typealias ConstPartialOf<A> = Kind<ForConst, A>
CounnestedType typealias CounnestedType<F, A, B> = Kind<Kind<F, A>, B>
MonoidOf typealias MonoidOf<A> = Kind<ForMonoid, A>
NestedType typealias NestedType<F, G, A> = Kind<Nested<F, G>, A>
UnnestedType typealias UnnestedType<F, G, A> = Kind<F, Kind<G, A>>

Extensions for External Classes



ap fun <A, T, U> ConstOf<A, T>.ap(SG: Semigroup<A>, ff: ConstOf<A, (T) -> U>): Const<A, U>
binest fun <F, G, A, B> BiunnestedType<F, G, A, B>.binest(): BinestedType<F, G, A, B>
biunnest fun <F, G, A, B> BinestedType<F, G, A, B>.biunnest(): BiunnestedType<F, G, A, B>
cobinding fun <F, B : Any> Comonad<F>.cobinding(c: suspend ComonadContinuation<F, *>.() -> B): B
Entry point for monad bindings which enables for comprehension. The underlying impl is based on coroutines. A coroutine is initiated and inside MonadContinuation suspended yielding to flatMap once all the flatMap binds are completed the underlying monad is returned from the act of executing the coroutine
combine fun <A, T> ConstOf<A, T>.combine(SG: Semigroup<A>, that: ConstOf<A, T>): Const<A, T>
compose fun <F, G> Foldable<F>.compose(GT: Foldable<G>): ComposedFoldable<F, G>
fun <F, G> Traverse<F>.compose(GT: Traverse<G>, GA: Applicative<G>): Traverse<Nested<F, G>>
fun <F, G> SemigroupK<F>.compose(): SemigroupK<Nested<F, G>>
fun <F, G> MonoidK<F>.compose(): MonoidK<Nested<F, G>>
fun <F, G> Invariant<F>.compose(GF: Invariant<G>): Invariant<Nested<F, G>>
fun <F, G> Functor<F>.compose(GF: Functor<G>): Functor<Nested<F, G>>
fun <F, G> Contravariant<F>.compose(GF: Contravariant<G>): Functor<Nested<F, G>>
fun <F, G> Applicative<F>.compose(GA: Applicative<G>): Applicative<Nested<F, G>>
fun <F, G> Alternative<F>.compose(GA: Applicative<G>): Alternative<Nested<F, G>>
fun <F, G> Bifoldable<F>.compose(BG: Bifoldable<G>): Bifoldable<Nested<F, G>>
fun <F, G> Bifunctor<F>.compose(BG: Bifunctor<G>): Bifunctor<Nested<F, G>>
composeContravariant fun <F, G> Invariant<F>.composeContravariant(GF: Contravariant<G>): Invariant<Nested<F, G>>
fun <F, G> Functor<F>.composeContravariant(GF: Contravariant<G>): Contravariant<Nested<F, G>>
composeFunctor fun <F, G> Invariant<F>.composeFunctor(GF: Functor<G>): Invariant<Nested<F, G>>
fun <F, G> Contravariant<F>.composeFunctor(GF: Functor<G>): Contravariant<Nested<F, G>>
conest fun <F, A, B> CounnestedType<F, A, B>.conest(): ConestedType<F, A, B>
const fun <A> A.const(): Const<A, Nothing>
counnest fun <F, A, B> ConestedType<F, A, B>.counnest(): CounnestedType<F, A, B>
fix fun <A, T> ConstOf<A, T>.fix(): Const<A, T>
fun <A> MonoidOf<A>.fix(): Monoid<A>
nest fun <F, G, A> UnnestedType<F, G, A>.nest(): NestedType<F, G, A>
sequence fun <T, A, G> ConstOf<A, Kind<G, T>>.sequence(GA: Applicative<G>): Kind<G, Const<A, T>>
unnest fun <F, G, A> NestedType<F, G, A>.unnest(): UnnestedType<F, G, A>
value fun <A, T> ConstOf<A, T>.value(): A

Type Class Hierarchy