Compiler

fs2.Compiler
See theCompiler companion object
sealed trait Compiler[F[_], G[_]]

Provides compilation of a Stream[F, O] to a G[*].

In the most common case, F = G = IO or another "fully featured" effect type. However, there are other common instantiations like F = Pure, G = Id, which allows compiling a Stream[Pure, A] in to pure values.

For the common case where F = G, the target implicit constructor provides an instance of Compiler[F, F] -- target requires a Compiler.Target[F] instance. The Compiler.Target[F] is a super charged MonadErrorThrow[F], providing additional capabilities needed for stream compilation. Compiler.Target[F] instances are given for all F[_] which have:

  • Concurrent[F] instances
  • both MonadCancelThrow[F] and Sync[F] intances
  • only Sync[F] instances Support for stream interruption requires compilation to an effect which has a Concurrent instance.

Attributes

Companion:
object
Source:
Compiler.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Concise view