Handler

turbolift.Handler
See theHandler companion trait
object Handler

Attributes

Companion
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Handler.type

Members list

Value members

Concrete methods

def flatHandle[F[_], G[_], L, N1, N2](h: Computation[Handler[F, G, L, N1], N2]): Handler[F, G, L, N1 & N2]

Transforms a computation of a handler, into a new handler.

Transforms a computation of a handler, into a new handler.

Useful for effectful creation of handlers. Effects requested to create the handler are absorbed by the handler itself, into its own (additional) dependencies.

Attributes

def fromFunction[F[_], G[_], L, N](fun: [A, U] => (x$1: Computation[F[A], U & L]) => Computation[G[A], U & N]): Handler[F, G, L, N]
def identity[F[_]]: Handler[F, F, Any, Any]
def phantom[Fx]: Handler[Identity, Identity, Fx, Any]

Extensions

Extensions

extension [F[_], S, L, N](thiz: Handler[F, Tuple2, L, N])
def ***![S2, S3, L2, N2](that: Handler[Identity, Tuple2, L2, N2])(using ET: ExtendTuple[S, S2, S3]): Handler[F, Tuple2, L & L2, N & N2]

Composes 2 independent handlers, also flattening their nested Tuple2 results.

Composes 2 independent handlers, also flattening their nested Tuple2 results.

((_, S1), S2) ~> (_, (S1, S2))
((_, S1, S2), S3) ~> (_, (S1, S2, S3))
((_, S1, S2, S3), S4) ~> (_, (S1, S2, S3, S4))
...

Attributes

def dropState: Handler[F, Identity, L, N]

Transforms this handler, by dropping the second element of its Tuple2 result.

Transforms this handler, by dropping the second element of its Tuple2 result.

Attributes

def eval: Handler[F, Identity, L, N]

Alias for dropState.

Alias for dropState.

Attributes

def exec: Handler[F, Const[S], L, N]

Alias for justState.

Alias for justState.

Attributes

def justState: Handler[F, Const[S], L, N]

Transforms this handler, by dropping the first element of its Tuple2 result.

Transforms this handler, by dropping the first element of its Tuple2 result.

Attributes

def mapState[S2](f: S => S2): Handler[F, Tuple2, L, N]

Transforms this handler, by mapping the second element of its Tuple2 result.

Transforms this handler, by mapping the second element of its Tuple2 result.

Attributes

def mapStateEff[S2, U](f: S => Computation[S2, U]): Handler[F, Tuple2, L, N & U]

Like mapState, but the mapping function is effectful.

Like mapState, but the mapping function is effectful.

Attributes

def tapStateEff[S2, U](f: S => Computation[Unit, U]): Handler[F, Tuple2, L, N & U]

Like mapStateEff, but the mapping is executed for its effects only.

Like mapStateEff, but the mapping is executed for its effects only.

Attributes

extension [F[_], L, N](thiz: Handler[F, Option, L, N])
def getOrDie(message: => String): Handler[F, Identity, L, N]

Transforms this handler, by deconstructing its Option result.

Transforms this handler, by deconstructing its Option result.

Attributes

def getOrElse(default: => Nothing): Handler[F, Identity, L, N]

Transforms this handler, by deconstructing its Option result.

Transforms this handler, by deconstructing its Option result.

Attributes

def toEither[E](e: => E): Handler[F, [_] =>> Either[E, _$36], L, N]

Transforms this handler, by mapping its Option result to Either.

Transforms this handler, by mapping its Option result to Either.

Attributes

def toTry(e: => Throwable): Handler[F, Try, L, N]

Transforms this handler, by mapping its Option result to Try.

Transforms this handler, by mapping its Option result to Try.

Attributes

def toVector: Handler[F, Vector, L, N]

Transforms this handler, by mapping its Option result to Vector.

Transforms this handler, by mapping its Option result to Vector.

Attributes

def unsafeGet: Handler[F, Identity, L, N]

Transforms this handler, by deconstructing its Option result.

Transforms this handler, by deconstructing its Option result.

Attributes

def |||![L2, N2](that: Handler[Identity, Option, L2, N2]): Handler[F, Option, L & L2, N & N2]

Composes 2 independent handlers, also flattening their nested Option results.

Composes 2 independent handlers, also flattening their nested Option results.

Option[Option[_]] ~> Option[_]

Attributes

extension [F[_], E, L, N](thiz: Handler[F, [_] =>> Either[E, _$39], L, N])
def getOrDie(message: E => String): Handler[F, Identity, L, N]

Transforms this handler, by deconstructing its Either result.

Transforms this handler, by deconstructing its Either result.

Attributes

def getOrElse(default: E => Nothing): Handler[F, Identity, L, N]

Transforms this handler, by deconstructing its Either result.

Transforms this handler, by deconstructing its Either result.

Attributes

def mapLeft[E2](f: E => E2): Handler[F, [_] =>> Either[E2, _$40], L, N]

Transforms this handler, by mapping the Left branch of its Either result.

Transforms this handler, by mapping the Left branch of its Either result.

Attributes

def mapLeftEff[E2, U](f: E => Computation[E2, U]): Handler[F, [_] =>> Either[E2, _$41], L, N & U]

Like mapLeft, but the mapping function is effectful.

Like mapLeft, but the mapping function is effectful.

Attributes

def tapLeftEff[U](f: E => Computation[Unit, U]): Handler[F, [_] =>> Either[E, _$43], L, N & U]

Like mapLeftEff, but the mapping is executed for its effects only.

Like mapLeftEff, but the mapping is executed for its effects only.

Attributes

def toOption: Handler[F, Option, L, N]

Transforms this handler, by mapping its Either result to Option.

Transforms this handler, by mapping its Either result to Option.

Attributes

def toTry(implicit ev: E <:< Throwable): Handler[F, Try, L, N]

Transforms this handler, by mapping its Either result to Try.

Transforms this handler, by mapping its Either result to Try.

Attributes

def |||![E2, L2, N2](that: Handler[Identity, [_] =>> Either[E2, _$44], L2, N2]): Handler[F, [_] =>> Either[E | E2, _$45], L & L2, N & N2]

Composes 2 independent handlers, also flattening their nested Either results.

Composes 2 independent handlers, also flattening their nested Either results.

Either[E2, Either[E1, _]] ~> Either[E1 | E2, _]

Attributes