Syntax3

izumi.functional.bio.syntax.Syntax3
See theSyntax3 companion object
trait Syntax3 extends ImplicitPuns

All implicit syntax in BIO is available automatically without wildcard imports with the help of so-called "implicit punning", as in the following example:

 import izumi.functional.bio.Monad2

 def loop[F[+_, +_]: Monad2]: F[Nothing, Nothing] = {
   val unitEffect: F[Nothing, Unit] = Monad2[F].unit
   unitEffect.flatMap(loop)
 }

Note that a .flatMap method is available on the unitEffect value of an abstract type parameter F, even though we did not import any syntax implicits using a wildcard import.

The flatMap method was added by the implicit punning on the Monad2 name. In short, implicit punning just means that instead of creating a companion object for a type with the same name as the type, we create "companion" implicit conversions with the same name. So that whenever you import the type, you are also always importing the syntax-providing implicit conversions.

This happens to be a great fit for Tagless Final Style, since nearly all TF code will import the names of the used typeclasses.

Implicit Punning for typeclass syntax relieves the programmer from having to manually import syntax implicits in every file in their codebase.

Attributes

Note:

The order of conversions is such to allow otherwise conflicting type classes to not conflict, e.g. code using constraints such as def x[F[+_, +_]: Functor2: Applicative2: Monad2] will compile and run normally when using syntax, despite ambiguity of implicits caused by all 3 implicits inheriting from Functor2. This is because, due to the priority order being from most-specific to least-specific, the Monad2 syntax will be used in such a case, where the Monad2[F] implicit is actually unambiguous.

Companion:
object
Graph
Supertypes

Members list

Concise view

Value members

Concrete methods

def F[FR[_, _, _]](implicit FR: Functor3[FR]): Functor3[FR]

A convenient dependent summoner for BIO hierarchy. Auto-narrows to the most powerful available class:

A convenient dependent summoner for BIO hierarchy. Auto-narrows to the most powerful available class:

 import izumi.functional.bio.{F, Temporal2}

 def y[F[+_, +_]: Temporal2] = {
   F.timeout(5.seconds)(F.forever(F.unit))
 }

Attributes

Inherited methods

final def Applicative3[FR[_, _, _] : Applicative3]: Applicative3[FR]

Attributes

Inherited from:
ImplicitPuns17

Attributes

Inherited from:
ImplicitPuns8
final def Arrow3[FR[_, _, _] : Arrow3]: Arrow3[FR]

Attributes

Inherited from:
ImplicitPuns14
final def ArrowChoice3[FR[_, _, _] : ArrowChoice3]: ArrowChoice3[FR]

Attributes

Inherited from:
ImplicitPuns13
final def Ask3[FR[_, _, _] : Ask3]: Ask3[FR]

Attributes

Inherited from:
ImplicitPuns12
final def Async3[FR[_, _, _] : Async3]: Async3[FR]

Attributes

Inherited from:
ImplicitPuns1
final def Bifunctor3[FR[_, _, _] : Bifunctor3]: Bifunctor3[FR]

Attributes

Inherited from:
ImplicitPuns18
final def Bracket3[FR[_, _, _] : Bracket3]: Bracket3[FR]

Attributes

Inherited from:
ImplicitPuns6
final def Concurrent3[FR[_, _, _] : Concurrent3]: Concurrent3[FR]

Attributes

Inherited from:
ImplicitPuns2
final def Error3[FR[_, _, _] : Error3]: Error3[FR]

Attributes

Inherited from:
ImplicitPuns7
final def Fork3[FR[_, _, _] : Fork3]: Fork3[FR]

Attributes

Inherited from:
ImplicitPuns
final def Functor3[FR[_, _, _] : Functor3]: Functor3[FR]

Attributes

Inherited from:
ImplicitPuns19
final def Guarantee3[FR[_, _, _] : Guarantee3]: Guarantee3[FR]

Attributes

Inherited from:
ImplicitPuns9
final def IO3[FR[_, _, _] : IO3]: IO3[FR]

Attributes

Inherited from:
ImplicitPuns4
final def IO3[FR[_, _, _], A](effect: => A)(implicit F: IO3[FR]): FR[Any, Throwable, A]

Shorthand for IO3#syncThrowable

Shorthand for IO3#syncThrowable

 IO3(println("Hello world!"))

Attributes

Inherited from:
ImplicitPuns4
final def Local3[FR[_, _, _] : Local3]: Local3[FR]

Attributes

Inherited from:
ImplicitPuns10
final def Monad3[FR[_, _, _] : Monad3]: Monad3[FR]

Attributes

Inherited from:
ImplicitPuns16
final def MonadAsk3[FR[_, _, _] : MonadAsk3]: MonadAsk3[FR]

Attributes

Inherited from:
ImplicitPuns11
final def Panic3[FR[_, _, _] : Panic3]: Panic3[FR]

Attributes

Inherited from:
ImplicitPuns5
final def Parallel3[FR[_, _, _] : Parallel3]: Parallel3[FR]

Attributes

Inherited from:
ImplicitPuns3
final def Profunctor3[FR[_, _, _] : Profunctor3]: Profunctor3[FR]

Attributes

Inherited from:
ImplicitPuns15
final def Temporal3[FR[_, _, _] : Temporal3]: Temporal3[FR]

Attributes

Inherited from:
ImplicitPuns

Implicits

Inherited implicits

final implicit def Applicative3[FR[_, _, _] : Applicative3, R, E, A](self: FR[R, E, A]): ApplicativeOps[FR, R, E, A]

Attributes

Inherited from:
ImplicitPuns17
final implicit def ApplicativeError3[FR[_, _, _] : ApplicativeError3, R, E, A](self: FR[R, E, A]): ApplicativeErrorOps[FR, R, E, A]

Attributes

Inherited from:
ImplicitPuns8
final implicit def Arrow3[FR[_, _, _] : Functor3, R, E, A](self: FR[R, E, A]): FunctorOps[FR, R, E, A]

Attributes

Inherited from:
ImplicitPuns14
final implicit def Arrow3[FR[_, _, _] : Arrow3, R, E, A](self: FR[R, E, A]): ArrowOps[FR, R, E, A]

Attributes

Inherited from:
ImplicitPuns14
final implicit def ArrowChoice3[FR[_, _, _] : Functor3, R, E, A](self: FR[R, E, A]): FunctorOps[FR, R, E, A]

Attributes

Inherited from:
ImplicitPuns13
final implicit def ArrowChoice3[FR[_, _, _] : ArrowChoice3, R, E, A](self: FR[R, E, A]): ArrowChoiceOps[FR, R, E, A]

Attributes

Inherited from:
ImplicitPuns13
final implicit def Ask3[FR[_, _, _] : Applicative3, R, E, A](self: FR[R, E, A]): ApplicativeOps[FR, R, E, A]

Attributes

Inherited from:
ImplicitPuns12
final implicit def Async3[FR[_, _, _] : Async3, R, E, A](self: FR[R, E, A]): AsyncOps[FR, R, E, A]

Attributes

Inherited from:
ImplicitPuns1
final implicit def Bifunctor3[FR[_, _, _] : Functor3, R, E, A](self: FR[R, E, A]): FunctorOps[FR, R, E, A]

Attributes

Inherited from:
ImplicitPuns18
final implicit def Bifunctor3[FR[_, _, _] : Bifunctor3, R, E, A](self: FR[R, E, A]): BifunctorOps[FR, R, E, A]

Attributes

Inherited from:
ImplicitPuns18
final implicit def Bracket3[FR[_, _, _] : Bracket3, R, E, A](self: FR[R, E, A]): BracketOps[FR, R, E, A]

Attributes

Inherited from:
ImplicitPuns6
final implicit def Concurrent3[FR[_, _, _] : Panic3, R, E, A](self: FR[R, E, A]): PanicOps[FR, R, E, A]

Attributes

Inherited from:
ImplicitPuns2
final implicit def Concurrent3[FR[_, _, _] : Concurrent3, R, E, A](self: FR[R, E, A]): ConcurrentOps[FR, R, E, A]

Attributes

Inherited from:
ImplicitPuns2
final implicit def Error3[FR[_, _, _] : Error3, R, E, A](self: FR[R, E, A]): ErrorOps[FR, R, E, A]

Attributes

Inherited from:
ImplicitPuns7
final implicit def Fork3[FR[_, _, _] : Fork3, R, E, A](self: FR[R, E, A]): ForkOps[FR, R, E, A]

Attributes

Inherited from:
ImplicitPuns
final implicit def Functor3[FR[_, _, _] : Functor3, R, E, A](self: FR[R, E, A]): FunctorOps[FR, R, E, A]

Attributes

Inherited from:
ImplicitPuns19
final implicit def Guarantee3[FR[_, _, _] : Guarantee3, R, E, A](self: FR[R, E, A]): GuaranteeOps[FR, R, E, A]

Attributes

Inherited from:
ImplicitPuns9
final implicit def IO3[FR[_, _, _] : IO3, R, E, A](self: FR[R, E, A]): IOOps[FR, R, E, A]

Attributes

Inherited from:
ImplicitPuns4
final implicit def Local3[FR[_, _, _] : Local3, R, E, A](self: FR[R, E, A])(implicit evidence$28: Local3[FR], d: DummyImplicit): LocalOpsKleisliSyntax[FR, R, E, A]

Attributes

Inherited from:
ImplicitPuns10
final implicit def Local3[FR[_, _, _] : Monad3, R, E, A](self: FR[R, E, A]): MonadOps[FR, R, E, A]

Attributes

Inherited from:
ImplicitPuns10
final implicit def Local3[FR[_, _, _] : Local3, R, E, A](self: FR[R, E, A]): LocalOps[FR, R, E, A]

Attributes

Inherited from:
ImplicitPuns10
final implicit def Monad3[FR[_, _, _] : Monad3, R, E, A](self: FR[R, E, A]): MonadOps[FR, R, E, A]

Attributes

Inherited from:
ImplicitPuns16
final implicit def MonadAsk3[FR[_, _, _] : Monad3, R, E, A](self: FR[R, E, A]): MonadOps[FR, R, E, A]

Attributes

Inherited from:
ImplicitPuns11
final implicit def Panic3[FR[_, _, _] : Panic3, R, E, A](self: FR[R, E, A]): PanicOps[FR, R, E, A]

Attributes

Inherited from:
ImplicitPuns5
final implicit def Parallel3[F[_, _, _] : Monad3, R, E, A](self: F[R, E, A]): MonadOps[F, R, E, A]

Attributes

Inherited from:
ImplicitPuns3
final implicit def Parallel3[FR[_, _, _] : Parallel3, R, E, A](self: FR[R, E, A]): ParallelOps[FR, R, E, A]

Attributes

Inherited from:
ImplicitPuns3
final implicit def Profunctor3[FR[_, _, _] : Functor3, R, E, A](self: FR[R, E, A]): FunctorOps[FR, R, E, A]

Attributes

Inherited from:
ImplicitPuns15
final implicit def Profunctor3[FR[_, _, _] : Profunctor3, R, E, A](self: FR[R, E, A]): ProfunctorOps[FR, R, E, A]

Attributes

Inherited from:
ImplicitPuns15
final implicit def Temporal3[FR[_, _, _] : Error3, R, E, A](self: FR[R, E, A]): ErrorOps[FR, R, E, A]

Attributes

Inherited from:
ImplicitPuns
final implicit def Temporal3[FR[_, _, _] : Temporal3, R, E, A](self: FR[R, E, A]): TemporalOps[FR, R, E, A]

Attributes

Inherited from:
ImplicitPuns