Compiler
@implicitNotFound("Cannot find an implicit Compiler[F, G]. This typically means you need a Concurrent[F] in scope") sealed trait Compiler[F <: ([_$1] =>> Any), G <: ([_$2] =>> Any)]
Provides compilation of a
Stream[F, O]
to a G[*]
.In the most common case,
are other common instantiations like
F = G = IO
or another "fully featured" effect type. However, thereare other common instantiations like
F = Pure, G = Id
, which allows compiling aStream[Pure, A]
in to pure values.For the common case where
super charged
-
- both
- only
Support for stream interruption requires compilation to an effect which has a
F = G
, the target
implicit constructor provides an instance ofCompiler[F, F]
-- target
requires a Compiler.Target[F]
instance. The Compiler.Target[F]
is asuper 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]
instancesSupport for stream interruption requires compilation to an effect which has a
Concurrent
instance.- Companion
- object
class Object
trait Matchable
class Any