Packages

  • package root
    Definition Classes
    root
  • package izumi
    Definition Classes
    root
  • package functional
    Definition Classes
    izumi
  • package bio

    Current hierarchy (use http://www.nomnoml.com/ to render, rendered: https://izumi.7mind.io/bio/media/bio-relationship-hierarchy.svg)

    Current hierarchy (use http://www.nomnoml.com/ to render, rendered: https://izumi.7mind.io/bio/media/bio-relationship-hierarchy.svg)

    [Functor2]<--[Bifunctor2]
    [Bifunctor2]<--[ApplicativeError2]
    [Functor2]<--[Applicative2]
    [Applicative2]<--[Guarantee2]
    [Applicative2]<--[Monad2]
    [Guarantee2]<--[ApplicativeError2]
    [ApplicativeError2]<--[Error2]
    [Monad2]<--[Error2]
    [Error2]<--[Bracket2]
    [Bracket2]<--[Panic2]
    [Panic2]<--[IO2]
    [IO2]<--[Async2]
    
    [Monad2]<--[Parallel2]
    [Parallel2]<--[Concurrent2]
    [Concurrent2]<--[Async2]
    
    [Error2]<--[Temporal2]

    Auxiliary algebras:

    [cats.effect.*]<:--[CatsConversions]
    
    [Fork2]<:--[Fiber2]
    
    [BlockingIO2]
    
    [Primitives2]
    
    [Primitives2]<:--[Ref2]
    [Primitives2]<:--[Semaphore2]
    [Primitives2]<:--[Promise2]
    
    [PrimitivesM2]
    [PrimitivesM2]<:--[RefM2]
    [PrimitivesM2]<:--[Mutex2]
    
    [Entropy1]<:--[Entropy2]
    [Clock1]<:--[Clock2]
    
    [UnsafeRun2]

    Raw inheritance hierarchy:

    [Functor2]<--[Applicative2]
    [Applicative2]<--[Guarantee2]
    [Applicative2]<--[Monad2]
    [Guarantee2]<--[ApplicativeError2]
    [Bifunctor2]<--[ApplicativeError2]
    [ApplicativeError2]<--[Error2]
    [Monad2]<--[Error2]
    [Error2]<--[Bracket2]
    [Bracket2]<--[Panic2]
    [Panic2]<--[IO2]
    
    [Parallel2]<--[Concurrent2]
    [Concurrent2]<--[Async2]
    [IO2]<--[Async2]
    
    [Temporal2]

    current hierarchy roots:

    bifunctor:

    • Functor3
    • Bifunctor3
    • Parallel3
    • Temporal3

    standalone:

    • Fork3
    • BlockingIO3
    • Primitives3
    • PrimitivesM3
    Definition Classes
    functional
  • package syntax
    Definition Classes
    bio
  • Syntax2

trait Syntax2 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.

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.

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Syntax2
  2. ImplicitPuns
  3. ImplicitPuns1
  4. ImplicitPuns2
  5. ImplicitPuns3
  6. ImplicitPuns4
  7. ImplicitPuns5
  8. ImplicitPuns6
  9. ImplicitPuns7
  10. ImplicitPuns8
  11. ImplicitPuns9
  12. ImplicitPuns10
  13. ImplicitPuns11
  14. ImplicitPuns12
  15. ImplicitPuns13
  16. AnyRef
  17. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def Applicative2[F[+_, +_]](implicit arg0: Applicative2[F]): Applicative2[F]
    Definition Classes
    ImplicitPuns11
    Annotations
    @inline()
  5. implicit final def Applicative2[F[+_, +_], E, A](self: F[E, A])(implicit arg0: Applicative2[F]): ApplicativeOps[F, E, A]
    Definition Classes
    ImplicitPuns11
    Annotations
    @inline()
  6. final def ApplicativeError2[F[+_, +_]](implicit arg0: ApplicativeError2[F]): ApplicativeError2[F]
    Definition Classes
    ImplicitPuns8
    Annotations
    @inline()
  7. implicit final def ApplicativeError2[F[+_, +_], E, A](self: F[E, A])(implicit arg0: ApplicativeError2[F]): ApplicativeErrorOps[F, E, A]
    Definition Classes
    ImplicitPuns8
    Annotations
    @inline()
  8. final def Async2[F[+_, +_]](implicit arg0: Async2[F]): Async2[F]
    Definition Classes
    ImplicitPuns1
    Annotations
    @inline()
  9. implicit final def Async2[F[+_, +_], E, A](self: F[E, A])(implicit arg0: Async2[F]): AsyncOps[F, E, A]
    Definition Classes
    ImplicitPuns1
    Annotations
    @inline()
  10. final def Bifunctor2[F[+_, +_]](implicit arg0: Bifunctor2[F]): Bifunctor2[F]
    Definition Classes
    ImplicitPuns12
    Annotations
    @inline()
  11. implicit final def Bifunctor2[F[+_, +_], E, A](self: F[E, A])(implicit arg0: Functor2[F]): FunctorOps[F, E, A]
    Definition Classes
    ImplicitPuns12
    Annotations
    @inline()
  12. implicit final def Bifunctor2[F[+_, +_], E, A](self: F[E, A])(implicit arg0: Bifunctor2[F]): BifunctorOps[F, E, A]
    Definition Classes
    ImplicitPuns12
    Annotations
    @inline()
  13. final def Bracket2[F[+_, +_]](implicit arg0: Bracket2[F]): Bracket2[F]
    Definition Classes
    ImplicitPuns6
    Annotations
    @inline()
  14. implicit final def Bracket2[F[+_, +_], E, A](self: F[E, A])(implicit arg0: Bracket2[F]): BracketOps[F, E, A]
    Definition Classes
    ImplicitPuns6
    Annotations
    @inline()
  15. final def Concurrent2[F[+_, +_]](implicit arg0: Concurrent2[F]): Concurrent2[F]
    Definition Classes
    ImplicitPuns2
    Annotations
    @inline()
  16. implicit final def Concurrent2[F[+_, +_], E, A](self: F[E, A])(implicit arg0: Panic2[F]): PanicOps[F, E, A]
    Definition Classes
    ImplicitPuns2
    Annotations
    @inline()
  17. implicit final def Concurrent2[F[+_, +_], E, A](self: F[E, A])(implicit arg0: Concurrent2[F]): ConcurrentOps[F, E, A]
    Definition Classes
    ImplicitPuns2
    Annotations
    @inline()
  18. final def Error2[F[+_, +_]](implicit arg0: Error2[F]): Error2[F]
    Definition Classes
    ImplicitPuns7
    Annotations
    @inline()
  19. implicit final def Error2[F[+_, +_], E, A](self: F[E, A])(implicit arg0: Error2[F]): ErrorOps[F, E, A]
    Definition Classes
    ImplicitPuns7
    Annotations
    @inline()
  20. def F[F[+_, +_]](implicit F: Functor2[F]): F.F.type

    A convenient dependent summoner for BIO hierarchy.

    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))
    }
  21. final def Fork2[F[+_, +_]](implicit arg0: Fork2[F]): Fork2[F]
    Definition Classes
    ImplicitPuns
    Annotations
    @inline()
  22. implicit final def Fork2[F[+_, +_], E, A](self: F[E, A])(implicit arg0: Fork2[F]): ForkOps[F, E, A]
    Definition Classes
    ImplicitPuns
    Annotations
    @inline()
  23. final def Functor2[F[+_, +_]](implicit arg0: Functor2[F]): Functor2[F]
    Definition Classes
    ImplicitPuns13
    Annotations
    @inline()
  24. implicit final def Functor2[F[+_, +_], E, A](self: F[E, A])(implicit arg0: Functor2[F]): FunctorOps[F, E, A]
    Definition Classes
    ImplicitPuns13
    Annotations
    @inline()
  25. final def Guarantee2[F[+_, +_]](implicit arg0: Guarantee2[F]): Guarantee2[F]
    Definition Classes
    ImplicitPuns9
    Annotations
    @inline()
  26. implicit final def Guarantee2[F[+_, +_], E, A](self: F[E, A])(implicit arg0: Guarantee2[F]): GuaranteeOps[F, E, A]
    Definition Classes
    ImplicitPuns9
    Annotations
    @inline()
  27. final def IO2[F[+_, +_]](implicit arg0: IO2[F]): IO2[F]
    Definition Classes
    ImplicitPuns4
    Annotations
    @inline()
  28. final def IO2[F[+_, +_], A](effect: => A)(implicit F: IO2[F]): F[Throwable, A]

    Shorthand for IO2#syncThrowable

    Shorthand for IO2#syncThrowable

    IO2(println("Hello world!"))
    Definition Classes
    ImplicitPuns4
    Annotations
    @inline()
  29. implicit final def IO2[F[+_, +_], E, A](self: F[E, A])(implicit arg0: IO2[F]): IOOps[F, E, A]
    Definition Classes
    ImplicitPuns4
    Annotations
    @inline()
  30. final def Monad2[F[+_, +_]](implicit arg0: Monad2[F]): Monad2[F]
    Definition Classes
    ImplicitPuns10
    Annotations
    @inline()
  31. implicit final def Monad2[F[+_, +_], E, A](self: F[E, A])(implicit arg0: Monad2[F]): MonadOps[F, E, A]
    Definition Classes
    ImplicitPuns10
    Annotations
    @inline()
  32. final def Panic2[F[+_, +_]](implicit arg0: Panic2[F]): Panic2[F]
    Definition Classes
    ImplicitPuns5
    Annotations
    @inline()
  33. implicit final def Panic2[F[+_, +_], E, A](self: F[E, A])(implicit arg0: Panic2[F]): PanicOps[F, E, A]
    Definition Classes
    ImplicitPuns5
    Annotations
    @inline()
  34. final def Parallel2[F[+_, +_]](implicit arg0: Parallel2[F]): Parallel2[F]
    Definition Classes
    ImplicitPuns3
    Annotations
    @inline()
  35. implicit final def Parallel2[F[+_, +_], E, A](self: F[E, A])(implicit arg0: Monad2[F]): MonadOps[F, E, A]
    Definition Classes
    ImplicitPuns3
    Annotations
    @inline()
  36. implicit final def Parallel2[F[+_, +_], E, A](self: F[E, A])(implicit arg0: Parallel2[F]): ParallelOps[F, E, A]
    Definition Classes
    ImplicitPuns3
    Annotations
    @inline()
  37. final def Temporal2[F[+_, +_]](implicit arg0: Temporal2[F]): Temporal2[F]
    Definition Classes
    ImplicitPuns
    Annotations
    @inline()
  38. implicit final def Temporal2[F[+_, +_], E, A](self: F[E, A])(implicit arg0: Error2[F]): ErrorOps[F, E, A]
    Definition Classes
    ImplicitPuns
    Annotations
    @inline()
  39. implicit final def Temporal2[F[+_, +_], E, A](self: F[E, A])(implicit arg0: Temporal2[F]): TemporalOps[F, E, A]
    Definition Classes
    ImplicitPuns
    Annotations
    @inline()
  40. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  41. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  42. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  43. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  44. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  45. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  46. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  47. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  48. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  49. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  50. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  51. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  52. def toString(): String
    Definition Classes
    AnyRef → Any
  53. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  54. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  55. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from ImplicitPuns

Inherited from ImplicitPuns1

Inherited from ImplicitPuns2

Inherited from ImplicitPuns3

Inherited from ImplicitPuns4

Inherited from ImplicitPuns5

Inherited from ImplicitPuns6

Inherited from ImplicitPuns7

Inherited from ImplicitPuns8

Inherited from ImplicitPuns9

Inherited from ImplicitPuns10

Inherited from ImplicitPuns11

Inherited from ImplicitPuns12

Inherited from ImplicitPuns13

Inherited from AnyRef

Inherited from Any

Ungrouped