Table of contents


ReaderTaskEither (interface)

Signature

export interface ReaderTaskEither<R, E, A> {
  (r: R): TaskEither<E, A>
}

Added in v2.0.0

URI (type alias)

Signature

export type URI = typeof URI

Added in v2.0.0

URI (constant)

Signature

export const URI: "ReaderTaskEither" = ...

Added in v2.0.0

ask (constant)

Signature

export const ask: <R, E = ...

Added in v2.0.0

asks (constant)

Signature

export const asks: <R, E = ...

Added in v2.0.0

fromTaskEither (constant)

Signature

export const fromTaskEither: <R, E, A>(ma: TaskEither<E, A>) => ReaderTaskEither<R, E, A> = ...

Added in v2.0.0

readerTaskEither (constant)

Signature

export const readerTaskEither: Monad3<URI> & Bifunctor3<URI> & Alt3<URI> & MonadTask3<URI> & MonadThrow3<URI> = ...

Added in v2.0.0

readerTaskEitherSeq (constant)

Like readerTaskEither but ap is sequential

Signature

export const readerTaskEitherSeq: typeof readerTaskEither = ...

Added in v2.0.0

right (constant)

Signature

export const right: <R, E = ...

Added in v2.0.0

rightReader (constant)

Signature

export const rightReader: <R, E = ...

Added in v2.0.0

bracket (function)

Make sure that a resource is cleaned up in the event of an exception (). The release action is called regardless of whether the body action throws () or returns.

(*) i.e. returns a Left

Signature

export function bracket<R, E, A, B>(
  aquire: ReaderTaskEither<R, E, A>,
  use: (a: A) => ReaderTaskEither<R, E, B>,
  release: (a: A, e: Either<E, B>) => ReaderTaskEither<R, E, void>
): ReaderTaskEither<R, E, B> { ... }

Added in v2.0.4

fold (function)

Signature

export function fold<R, E, A, B>(
  onLeft: (e: E) => Reader<R, Task<B>>,
  onRight: (a: A) => Reader<R, Task<B>>
): (ma: ReaderTaskEither<R, E, A>) => Reader<R, Task<B>> { ... }

Added in v2.0.0

fromIOEither (function)

Signature

export function fromIOEither<R, E, A>(ma: IOEither<E, A>): ReaderTaskEither<R, E, A> { ... }

Added in v2.0.0

fromReaderEither (function)

Signature

export function fromReaderEither<R, E, A>(ma: ReaderEither<R, E, A>): ReaderTaskEither<R, E, A> { ... }

Added in v2.0.0

getApplyMonoid (function)

Signature

export function getApplyMonoid<R, E, A>(M: Monoid<A>): Monoid<ReaderTaskEither<R, E, A>> { ... }

Added in v2.0.0

getApplySemigroup (function)

Signature

export function getApplySemigroup<R, E, A>(S: Semigroup<A>): Semigroup<ReaderTaskEither<R, E, A>> { ... }

Added in v2.0.0

getOrElse (function)

Signature

export function getOrElse<R, E, A>(
  onLeft: (e: E) => Reader<R, Task<A>>
): (ma: ReaderTaskEither<R, E, A>) => Reader<R, Task<A>> { ... }

Added in v2.0.0

getReaderTaskValidation (function)

Signature

export function getReaderTaskValidation<E>(
  S: Semigroup<E>
): Monad3C<URI, E> & Bifunctor3C<URI, E> & Alt3C<URI, E> & MonadTask3C<URI, E> & MonadThrow3C<URI, E> { ... }

Added in v2.3.0

getSemigroup (function)

Signature

export function getSemigroup<R, E, A>(S: Semigroup<A>): Semigroup<ReaderTaskEither<R, E, A>> { ... }

Added in v2.0.0

left (function)

Signature

export function left<R, E = never, A = never>(e: E): ReaderTaskEither<R, E, A> { ... }

Added in v2.0.0

leftIO (function)

Signature

export function leftIO<R, E = never, A = never>(me: IO<E>): ReaderTaskEither<R, E, A> { ... }

Added in v2.0.0

leftReader (function)

Signature

export function leftReader<R, E = never, A = never>(me: Reader<R, E>): ReaderTaskEither<R, E, A> { ... }

Added in v2.0.0

leftTask (function)

Signature

export function leftTask<R, E = never, A = never>(me: Task<E>): ReaderTaskEither<R, E, A> { ... }

Added in v2.0.0

local (function)

Signature

export function local<Q, R>(f: (f: Q) => R): <E, A>(ma: ReaderTaskEither<R, E, A>) => ReaderTaskEither<Q, E, A> { ... }

Added in v2.0.0

orElse (function)

Signature

export function orElse<R, E, A, M>(
  onLeft: (e: E) => ReaderTaskEither<R, M, A>
): (ma: ReaderTaskEither<R, E, A>) => ReaderTaskEither<R, M, A> { ... }

Added in v2.0.0

rightIO (function)

Signature

export function rightIO<R, E = never, A = never>(ma: IO<A>): ReaderTaskEither<R, E, A> { ... }

Added in v2.0.0

rightTask (function)

Signature

export function rightTask<R, E = never, A = never>(ma: Task<A>): ReaderTaskEither<R, E, A> { ... }

Added in v2.0.0

run (function)

Signature

export function run<R, E, A>(ma: ReaderTaskEither<R, E, A>, r: R): Promise<Either<E, A>> { ... }

Added in v2.0.0

swap (function)

Signature

export function swap<R, E, A>(ma: ReaderTaskEither<R, E, A>): ReaderTaskEither<R, A, E> { ... }

Added in v2.0.0

alt (export)

Signature

<R, E, A>(that: () => ReaderTaskEither<R, E, A>) => (fa: ReaderTaskEither<R, E, A>) => ReaderTaskEither<R, E, A>

Added in v2.0.0

ap (export)

Signature

<R, E, A>(fa: ReaderTaskEither<R, E, A>) => <B>(fab: ReaderTaskEither<R, E, (a: A) => B>) => ReaderTaskEither<R, E, B>

Added in v2.0.0

apFirst (export)

Signature

<R, E, B>(fb: ReaderTaskEither<R, E, B>) => <A>(fa: ReaderTaskEither<R, E, A>) => ReaderTaskEither<R, E, A>

Added in v2.0.0

apSecond (export)

Signature

<R, E, B>(fb: ReaderTaskEither<R, E, B>) => <A>(fa: ReaderTaskEither<R, E, A>) => ReaderTaskEither<R, E, B>

Added in v2.0.0

bimap (export)

Signature

<E, G, A, B>(f: (e: E) => G, g: (a: A) => B) => <R>(fa: ReaderTaskEither<R, E, A>) => ReaderTaskEither<R, G, B>

Added in v2.0.0

chain (export)

Signature

<R, E, A, B>(f: (a: A) => ReaderTaskEither<R, E, B>) => (ma: ReaderTaskEither<R, E, A>) => ReaderTaskEither<R, E, B>

Added in v2.0.0

chainFirst (export)

Signature

<R, E, A, B>(f: (a: A) => ReaderTaskEither<R, E, B>) => (ma: ReaderTaskEither<R, E, A>) => ReaderTaskEither<R, E, A>

Added in v2.0.0

filterOrElse (export)

Signature

{ <E, A, B>(refinement: Refinement<A, B>, onFalse: (a: A) => E): <R>(ma: ReaderTaskEither<R, E, A>) => ReaderTaskEither<R, E, B>; <E, A>(predicate: Predicate<A>, onFalse: (a: A) => E): <R>(ma: ReaderTaskEither<R, E, A>) => ReaderTaskEither<R, E, A>; }

Added in v2.0.0

flatten (export)

Signature

<R, E, A>(mma: ReaderTaskEither<R, E, ReaderTaskEither<R, E, A>>) => ReaderTaskEither<R, E, A>

Added in v2.0.0

fromEither (export)

Signature

<R, E, A>(ma: Either<E, A>) => ReaderTaskEither<R, E, A>

Added in v2.0.0

fromOption (export)

Signature

<E>(onNone: () => E) => <R, A>(ma: Option<A>) => ReaderTaskEither<R, E, A>

Added in v2.0.0

fromPredicate (export)

Signature

{ <E, A, B>(refinement: Refinement<A, B>, onFalse: (a: A) => E): <U>(a: A) => ReaderTaskEither<U, E, B>; <E, A>(predicate: Predicate<A>, onFalse: (a: A) => E): <R>(a: A) => ReaderTaskEither<R, E, A>; }

Added in v2.0.0

map (export)

Signature

<A, B>(f: (a: A) => B) => <R, E>(fa: ReaderTaskEither<R, E, A>) => ReaderTaskEither<R, E, B>

Added in v2.0.0

mapLeft (export)

Signature

<E, G>(f: (e: E) => G) => <R, A>(fa: ReaderTaskEither<R, E, A>) => ReaderTaskEither<R, G, A>

Added in v2.0.0