cps
Members list
Packages
Type members
Classlikes
AsynsShift is a marker base trait for typeclass, which provides 'shifted' variants of the hight-order methods of T,
which called when we need to pass a cps-transformed function as an argument for this method.
AsynsShift is a marker base trait for typeclass, which provides 'shifted' variants of the hight-order methods of T,
which called when we need to pass a cps-transformed function as an argument for this method.
The general convention is next:
- Let us have object
O
and methodm(f: A=>B):R
which accept hight-order argumentf: A=>B.
(for example - map in List). - If we want to defined transformation of argument for any monad F, we should define the
AsyncShift[O]
with methodm[F[_],...](o:O, m:CpsMonad[F])(f: A=>F[B])
. - Return type of this method can be F[R] or R or AsyncSubst[R].
Also we should define a given instance of AsyncShift[O], visible from our async block. I.e. implementation for our list will look as:
class MyShiftedList[T] extentds AsyncShift[List[T]] {
def map[F[_],S](m:CpsMonad[M], c:List[T])(f: T=>F[S]): F[List[T]] =
... // implementation here
}
transparent inline given myShiftedList[T]: AsyncShift[List[T]] = MyShiftedList[T]()
After this, you can freely use awaits inside "List.map":
async {
....
val fetched = uris.map(uri => await(fetch(uri)))
...
}
see https://rssh.github.io/dotty-cps-async/HighOrderFunctions.html
Attributes
- Companion
- object
- Source
- AsyncShift.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
class FutureCMAsyncShiftobject FutureCMAsyncShiftclass BreaksAsyncShiftobject NonLocalReturnsAsyncShiftobject BoundaryAsyncShiftclass TryAsyncShift[T]object TryModuleAsyncShiftobject UsingAsyncShiftclass ArrayOpsAsyncShift[A]class ListAsyncShift[A]class RangeAsyncShift[R]class OptionAsyncShift[T]Show all
Companion object where defined given AsyncShift instances for Scala standard library objects.
Companion object where defined given AsyncShift instances for Scala standard library objects.
Attributes
- See also
-
[cps.AsyncShift]
- Companion
- trait
- Source
- AsyncShift.scala
- Supertypes
-
trait AsyncShiftLowPriority2trait AsyncShiftLowPriority1trait AsyncShiftLowPriority0class Objecttrait Matchableclass AnyShow all
- Self type
-
AsyncShift.type
Attributes
- Source
- AsyncShift.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
Attributes
- Source
- AsyncShift.scala
- Supertypes
- Known subtypes
-
trait AsyncShiftLowPriority2object AsyncShift
Attributes
- Source
- AsyncShift.scala
- Supertypes
- Known subtypes
-
object AsyncShift
Async Effect Monad
Async Effect Monad
Attributes
- Source
- CpsMonad.scala
- Supertypes
-
trait CpsTryEffectMonad[F]trait CpsEffectMonad[F]trait CpsAsyncMonad[F]trait CpsTryMonad[F]trait CpsTrySupport[F]trait CpsThrowMonad[F]trait CpsThrowSupport[F]trait CpsMonad[F]class Objecttrait Matchableclass AnyShow all
- Known subtypes
-
trait CpsAsyncEffectMonadInstanceContext[F]trait CpsConcurrentEffectMonad[F]
Attributes
- Source
- CpsMonadContext.scala
- Supertypes
-
trait CpsAsyncMonadInstanceContext[F]trait CpsTryMonadInstanceContext[F]trait CpsAsyncEffectMonad[F]trait CpsTryEffectMonad[F]trait CpsEffectMonad[F]trait CpsAsyncMonad[F]trait CpsTryMonad[F]trait CpsTrySupport[F]trait CpsThrowMonad[F]trait CpsThrowSupport[F]trait CpsMonad[F]class Objecttrait Matchableclass AnyShow all
- Known subtypes
Monad, which is compatible with passing data via callbacks.
Monad, which is compatible with passing data via callbacks.
Interoperability with Future: allows
async[F]{ .. await[Future](..) ... }
Attributes
- Companion
- object
- Source
- CpsMonad.scala
- Supertypes
-
trait CpsTryMonad[F]trait CpsTrySupport[F]trait CpsThrowMonad[F]trait CpsThrowSupport[F]trait CpsMonad[F]class Objecttrait Matchableclass AnyShow all
- Known subtypes
-
trait CpsAsyncEffectMonad[F]trait CpsAsyncEffectMonadInstanceContext[F]trait CpsConcurrentEffectMonad[F]trait CpsAsyncMonadInstanceContext[F]trait CpsConcurrentMonadInstanceContext[F]trait CpsConcurrentMonad[F]trait CpsSchedulingMonad[F]class FutureAsyncMonadAPIShow all
Attributes
- Companion
- trait
- Source
- CpsMonad.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
CpsAsyncMonad.type
Attributes
- Source
- CpsMonadContext.scala
- Supertypes
-
trait CpsTryMonadInstanceContext[F]trait CpsAsyncMonad[F]trait CpsTryMonad[F]trait CpsTrySupport[F]trait CpsThrowMonad[F]trait CpsThrowSupport[F]trait CpsMonad[F]class Objecttrait Matchableclass AnyShow all
- Known subtypes
-
trait CpsAsyncEffectMonadInstanceContext[F]trait CpsConcurrentMonadInstanceContext[F]
Attributes
- Source
- CpsMonadContext.scala
- Supertypes
-
trait CpsConcurrentMonad[F]trait CpsAsyncMonad[F]trait CpsTryMonad[F]trait CpsTrySupport[F]trait CpsThrowMonad[F]trait CpsThrowSupport[F]trait CpsMonad[F]class Objecttrait Matchableclass AnyShow all
Marker trait for concurrent effect monads.
Marker trait for concurrent effect monads.
Attributes
- Source
- CpsMonad.scala
- Supertypes
-
trait CpsAsyncEffectMonad[F]trait CpsTryEffectMonad[F]trait CpsEffectMonad[F]trait CpsConcurrentMonad[F]trait CpsAsyncMonad[F]trait CpsTryMonad[F]trait CpsTrySupport[F]trait CpsThrowMonad[F]trait CpsThrowSupport[F]trait CpsMonad[F]class Objecttrait Matchableclass AnyShow all
- Known subtypes
Attributes
- Source
- CpsMonadContext.scala
- Supertypes
-
trait CpsAsyncEffectMonadInstanceContext[F]trait CpsConcurrentMonadInstanceContext[F]trait CpsAsyncMonadInstanceContext[F]trait CpsTryMonadInstanceContext[F]trait CpsConcurrentEffectMonad[F]trait CpsAsyncEffectMonad[F]trait CpsTryEffectMonad[F]trait CpsEffectMonad[F]trait CpsConcurrentMonad[F]trait CpsAsyncMonad[F]trait CpsTryMonad[F]trait CpsTrySupport[F]trait CpsThrowMonad[F]trait CpsThrowSupport[F]trait CpsMonad[F]class Objecttrait Matchableclass AnyShow all
Monad, where we can define an effect of starting operation in different execution flow.
Monad, where we can define an effect of starting operation in different execution flow.
Attributes
- Companion
- object
- Source
- CpsMonad.scala
- Supertypes
-
trait CpsAsyncMonad[F]trait CpsTryMonad[F]trait CpsTrySupport[F]trait CpsThrowMonad[F]trait CpsThrowSupport[F]trait CpsMonad[F]class Objecttrait Matchableclass AnyShow all
- Known subtypes
-
trait CpsConcurrentEffectMonad[F]trait CpsConcurrentMonadInstanceContext[F]trait CpsSchedulingMonad[F]class FutureAsyncMonadAPIShow all
Attributes
- Companion
- trait
- Source
- CpsMonad.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
CpsConcurrentMonad.type
Attributes
- Source
- CpsMonadContext.scala
- Supertypes
-
trait CpsTryMonadContext[F]trait CpsThrowMonadContext[F]trait CpsMonadContext[F]class Objecttrait Matchableclass AnyShow all
Attributes
- Source
- CpsMonadContext.scala
- Supertypes
-
trait CpsAsyncMonadInstanceContext[F]trait CpsTryMonadInstanceContext[F]trait CpsConcurrentMonad[F]trait CpsAsyncMonad[F]trait CpsTryMonad[F]trait CpsTrySupport[F]trait CpsThrowMonad[F]trait CpsThrowSupport[F]trait CpsMonad[F]class Objecttrait Matchableclass AnyShow all
- Known subtypes
Base trait of CpsContextMonad which provide Ctx
as a monad context Mixin this trait into your CosMonad in cases, when you monad have internal API and you potentially want to use moand context as generic type.
Base trait of CpsContextMonad which provide Ctx
as a monad context Mixin this trait into your CosMonad in cases, when you monad have internal API and you potentially want to use moand context as generic type.
Attributes
- Source
- CpsMonadContext.scala
- Supertypes
- Known subtypes
Marker trait, which mark effect monad, where actual evaluation of expression happens after building a monad, during effect evaluation stage.
Marker trait, which mark effect monad, where actual evaluation of expression happens after building a monad, during effect evaluation stage.
evaluation of expression inside async block always delayed.
Attributes
- Companion
- object
- Source
- CpsMonad.scala
- Supertypes
- Known subtypes
-
trait CpsTryEffectMonad[F]trait CpsAsyncEffectMonad[F]trait CpsAsyncEffectMonadInstanceContext[F]trait CpsConcurrentEffectMonad[F]
Attributes
- Companion
- trait
- Source
- CpsMonad.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
CpsEffectMonad.type
Basic CpsMonad operations. Implementing this typeclass is enough to use async/await with supports of basic control-flow constructions (if, loops, but no exceptions).
Basic CpsMonad operations. Implementing this typeclass is enough to use async/await with supports of basic control-flow constructions (if, loops, but no exceptions).
Attributes
- Companion
- object
- Source
- CpsMonad.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
class FutureAsyncMonadAPItrait CpsEffectMonad[F]trait CpsTryEffectMonad[F]trait CpsAsyncEffectMonad[F]trait CpsAsyncEffectMonadInstanceContext[F]trait CpsConcurrentEffectMonad[F]trait CpsPureMonadInstanceContext[F]trait CpsThrowMonad[F]class IterableCpsMonad[C]trait CpsThrowMonadInstanceContext[F]trait CpsTryMonad[F]object JSFutureCpsMonadobject CpsIdentityMonadobject FreeCpsMonadtrait CpsAsyncMonad[F]trait CpsAsyncMonadInstanceContext[F]trait CpsConcurrentMonadInstanceContext[F]trait CpsConcurrentMonad[F]trait CpsSchedulingMonad[F]trait CpsTryMonadInstanceContext[F]trait CpsMonadInstanceContext[F]Show all
Attributes
- Companion
- trait
- Source
- CpsMonad.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
CpsMonad.type
Base for context operations inside monad
Base for context operations inside monad
Attributes
- Companion
- object
- Source
- CpsMonadContext.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
class CpsPureMonadInstanceContextBody[F]trait CpsThrowMonadContext[F]class CpsThrowMonadInstanceContextBody[F]trait CpsTryMonadContext[F]class FutureContexttrait CpsConcurrentMonadContext[F]class CpsTryMonadInstanceContextBody[F]Show all
Attributes
- Companion
- trait
- Source
- CpsMonadContext.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
CpsMonadContext.type
Typeclass for inclusion of one monad context into another. If this inclusion exists, that we can call direct context encoding method over G[_] in F[_].
Typeclass for inclusion of one monad context into another. If this inclusion exists, that we can call direct context encoding method over G[_] in F[_].
Attributes
- Companion
- object
- Source
- CpsMonadContextInclusion.scala
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Companion
- trait
- Source
- CpsMonadContextInclusion.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
Attributes
- Source
- CpsMonadContextProvider.scala
- Supertypes
-
class Objecttrait Matchableclass Any
CpsMonadConversion -- conversion from F[_]
to G[_]
. If the given instance of such morphism exists, then await[F]
can be used inside async[G]
CpsMonadConversion -- conversion from F[_]
to G[_]
. If the given instance of such morphism exists, then await[F]
can be used inside async[G]
Attributes
- See also
- Companion
- object
- Source
- CpsMonadConversion.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
Attributes
- Companion
- trait
- Source
- CpsMonadConversion.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
CpsMonadConversion.type
Trait for minimal monad context, which provides an instance of CpsMonad. Mixin this trait into your monad in cases, when you monad have no internal API and not support try/catch operations.
Trait for minimal monad context, which provides an instance of CpsMonad. Mixin this trait into your monad in cases, when you monad have no internal API and not support try/catch operations.
Attributes
- Source
- CpsMonadContext.scala
- Supertypes
Attributes
- Source
- CpsMonadContext.scala
- Supertypes
Marker class which mean that CpsRuntimeAwait implemented in such way, that performance penalty in comparison with cps run is relative low and we can not to use cps transformation in async block for such monad.
Marker class which mean that CpsRuntimeAwait implemented in such way, that performance penalty in comparison with cps run is relative low and we can not to use cps transformation in async block for such monad.
Attributes
- Source
- CpsRuntimeAwait.scala
- Supertypes
When this typeclass is implemented for a monad F, dotty-cps-async can use runtime await invocations for handling of high-order functions when shifted variants are not available.
When this typeclass is implemented for a monad F, dotty-cps-async can use runtime await invocations for handling of high-order functions when shifted variants are not available.
Attributes
- Source
- CpsRuntimeAwait.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
trait CpsRuntimeAsyncAwait[F]
Indirect constructor for CpsRuntimeAwait[F] instance, which can be used in situation where runtime await instance can be build only inside of monad. (Example - cats.effect.IO)
Indirect constructor for CpsRuntimeAwait[F] instance, which can be used in situation where runtime await instance can be build only inside of monad. (Example - cats.effect.IO)
When this typeclass is implemented for a monad F, we also can process arguments of high-order functions wihout requiring of shifted variants.
Attributes
- Source
- CpsRuntimeAwait.scala
- Supertypes
-
class Objecttrait Matchableclass Any
Monad, where we can spawn some event and be sure that one be evaluated, event if we drop result.
Monad, where we can spawn some event and be sure that one be evaluated, event if we drop result.
Interoperability with Future: allows
async[Future]{
...
await[F](..)
...
}
Attributes
- Companion
- object
- Source
- CpsMonad.scala
- Supertypes
-
trait CpsConcurrentMonad[F]trait CpsAsyncMonad[F]trait CpsTryMonad[F]trait CpsTrySupport[F]trait CpsThrowMonad[F]trait CpsThrowSupport[F]trait CpsMonad[F]class Objecttrait Matchableclass AnyShow all
- Known subtypes
-
class FutureAsyncMonadAPI
Attributes
- Companion
- trait
- Source
- CpsMonad.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
CpsSchedulingMonad.type
Monad, where we can throw error but can catch one only outside of a monad context.
Monad, where we can throw error but can catch one only outside of a monad context.
An example as monad which interpret in sync context, such as Option or collections.
Attributes
- Source
- CpsMonad.scala
- Supertypes
- Known subtypes
-
class IterableCpsMonad[C]trait CpsThrowMonadInstanceContext[F]trait CpsTryMonad[F]object JSFutureCpsMonadobject CpsIdentityMonadobject FreeCpsMonadtrait CpsAsyncMonad[F]trait CpsAsyncEffectMonad[F]trait CpsAsyncEffectMonadInstanceContext[F]trait CpsConcurrentEffectMonad[F]trait CpsAsyncMonadInstanceContext[F]trait CpsConcurrentMonadInstanceContext[F]trait CpsConcurrentMonad[F]trait CpsSchedulingMonad[F]class FutureAsyncMonadAPItrait CpsTryEffectMonad[F]trait CpsTryMonadInstanceContext[F]trait CpsMonadInstanceContext[F]Show all
Attributes
- Source
- CpsMonadContext.scala
- Supertypes
- Known subtypes
-
class CpsThrowMonadInstanceContextBody[F]trait CpsTryMonadContext[F]class FutureContexttrait CpsConcurrentMonadContext[F]class CpsTryMonadInstanceContextBody[F]
Minimal monad context, which provides an instance of CpsThrowMonad. Use it if your monad supports throw operation but not try/catch.
Minimal monad context, which provides an instance of CpsThrowMonad. Use it if your monad supports throw operation but not try/catch.
Attributes
- Source
- CpsMonadContext.scala
- Supertypes
-
trait CpsThrowMonad[F]trait CpsThrowSupport[F]trait CpsMonad[F]class Objecttrait Matchableclass AnyShow all
- Known subtypes
Attributes
- Source
- CpsMonadContext.scala
- Supertypes
Throw support for monads, decoupled from monad itself.
Throw support for monads, decoupled from monad itself.
Attributes
- Source
- CpsMonad.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
trait CpsThrowMonad[F]class IterableCpsMonad[C]trait CpsThrowMonadInstanceContext[F]trait CpsTryMonad[F]object JSFutureCpsMonadobject CpsIdentityMonadobject FreeCpsMonadtrait CpsAsyncMonad[F]trait CpsAsyncEffectMonad[F]trait CpsAsyncEffectMonadInstanceContext[F]trait CpsConcurrentEffectMonad[F]trait CpsAsyncMonadInstanceContext[F]trait CpsConcurrentMonadInstanceContext[F]trait CpsConcurrentMonad[F]trait CpsSchedulingMonad[F]class FutureAsyncMonadAPItrait CpsTryEffectMonad[F]trait CpsTryMonadInstanceContext[F]trait CpsMonadInstanceContext[F]trait CpsTrySupport[F]Show all
Attributes
- Source
- CpsMonadContext.scala
- Supertypes
-
trait CpsTryMonad[F]trait CpsTrySupport[F]trait CpsThrowMonad[F]trait CpsThrowSupport[F]trait CpsMonad[F]class Objecttrait Matchableclass AnyShow all
- Known subtypes
-
class FutureAsyncMonadAPI
Effect with Try support
Effect with Try support
Attributes
- Source
- CpsMonad.scala
- Supertypes
-
trait CpsTryMonad[F]trait CpsTrySupport[F]trait CpsThrowMonad[F]trait CpsThrowSupport[F]trait CpsEffectMonad[F]trait CpsMonad[F]class Objecttrait Matchableclass AnyShow all
- Known subtypes
-
trait CpsAsyncEffectMonad[F]trait CpsAsyncEffectMonadInstanceContext[F]trait CpsConcurrentEffectMonad[F]
If you monad supports this typeclass, than you can use try/catch/finally inside await.
If you monad supports this typeclass, than you can use try/catch/finally inside await.
Attributes
- Companion
- object
- Source
- CpsMonad.scala
- Supertypes
-
trait CpsTrySupport[F]trait CpsThrowMonad[F]trait CpsThrowSupport[F]trait CpsMonad[F]class Objecttrait Matchableclass AnyShow all
- Known subtypes
-
object JSFutureCpsMonadobject CpsIdentityMonadobject FreeCpsMonadtrait CpsAsyncMonad[F]trait CpsAsyncEffectMonad[F]trait CpsAsyncEffectMonadInstanceContext[F]trait CpsConcurrentEffectMonad[F]trait CpsAsyncMonadInstanceContext[F]trait CpsConcurrentMonadInstanceContext[F]trait CpsConcurrentMonad[F]trait CpsSchedulingMonad[F]class FutureAsyncMonadAPItrait CpsTryEffectMonad[F]trait CpsTryMonadInstanceContext[F]trait CpsMonadInstanceContext[F]Show all
Attributes
- Companion
- trait
- Source
- CpsMonad.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
CpsTryMonad.type
Attributes
- Source
- CpsMonadContext.scala
- Supertypes
- Known subtypes
Minimal monad context, which provides an instance of CpsTryMonad. Use it if your monad supports throw and try/catch operations.
Minimal monad context, which provides an instance of CpsTryMonad. Use it if your monad supports throw and try/catch operations.
Attributes
- Source
- CpsMonadContext.scala
- Supertypes
-
trait CpsTryMonad[F]trait CpsTrySupport[F]trait CpsThrowMonad[F]trait CpsThrowSupport[F]trait CpsMonad[F]class Objecttrait Matchableclass AnyShow all
- Known subtypes
-
object JSFutureCpsMonadobject CpsIdentityMonadobject FreeCpsMonadtrait CpsAsyncMonadInstanceContext[F]trait CpsAsyncEffectMonadInstanceContext[F]trait CpsConcurrentMonadInstanceContext[F]trait CpsMonadInstanceContext[F]Show all
Attributes
- Source
- CpsMonadContext.scala
- Supertypes
-
trait CpsTryMonadContext[F]trait CpsThrowMonadContext[F]trait CpsMonadContext[F]class Objecttrait Matchableclass AnyShow all
Attributes
- Source
- CpsMonad.scala
- Supertypes
- Known subtypes
-
trait CpsTryMonad[F]object JSFutureCpsMonadobject CpsIdentityMonadobject FreeCpsMonadtrait CpsAsyncMonad[F]trait CpsAsyncEffectMonad[F]trait CpsAsyncEffectMonadInstanceContext[F]trait CpsConcurrentEffectMonad[F]trait CpsAsyncMonadInstanceContext[F]trait CpsConcurrentMonadInstanceContext[F]trait CpsConcurrentMonad[F]trait CpsSchedulingMonad[F]class FutureAsyncMonadAPItrait CpsTryEffectMonad[F]trait CpsTryMonadInstanceContext[F]trait CpsMonadInstanceContext[F]Show all
Deprecated classlikes
Attributes
- Deprecated
- true
- Source
- CpsMonadContext.scala
- Supertypes
-
trait CpsTryMonadInstanceContext[F]trait CpsTryMonad[F]trait CpsTrySupport[F]trait CpsThrowMonad[F]trait CpsThrowSupport[F]trait CpsMonad[F]class Objecttrait Matchableclass AnyShow all
Experimental classlikes
Attributes
- Experimental
- true
- Source
- CpsDirect.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
CpsDirect.type
Types
Direct style context marker, used to mark function, whritten in direct style. When function have given parameter of type CpsDirect[F] or return context lambda with CpsDirect[F] parameter, then compiler plugin will transform function result into monadic form. For example:
Direct style context marker, used to mark function, whritten in direct style. When function have given parameter of type CpsDirect[F] or return context lambda with CpsDirect[F] parameter, then compiler plugin will transform function result into monadic form. For example:
def fetch(url: String): CpsDirect[Future] ?=> String = ...
Attributes
- Source
- CpsDirect.scala
Deprecated types
Attributes
- Deprecated
- true
- Source
- CpsMonadContext.scala
Value members
Concrete methods
async block, which can contains awaits. better look on this as the first part of the next signature:
async block, which can contains awaits. better look on this as the first part of the next signature:
async[F](using CpsMonad[F])[T](inline body:T):F[T]
i.e. async return a transitional object, which accepts body and perform async transform with the given CpsMonad[F]
.
Attributes
- Source
- Async.scala
Generator syntax. usage:
Generator syntax. usage:
val s = asyncStream[fs.Stream[IO,Int]] { out =>
for(i <- 1 to N) out.emit(i)
}
Attributes
- Source
- AsyncStream.scala
Synonym for async
which can be better operation name for non-computation monads.
Synonym for async
which can be better operation name for non-computation monads.
Attributes
- Source
- Async.scala
Experimental methods
Pseudofunction, which can be used inside async block or in function with CpsDirect[F] context parameter, to 'asynchronize computation' (i.e. receive value of F[T]
from t:FT
). The main usage is in direct mode, where all computations are 'awaited' by default. Inside async block can be viewed as empty wrapper.
Pseudofunction, which can be used inside async block or in function with CpsDirect[F] context parameter, to 'asynchronize computation' (i.e. receive value of F[T]
from t:FT
). The main usage is in direct mode, where all computations are 'awaited' by default. Inside async block can be viewed as empty wrapper.
Type parameters
- F
-
- monad
- T
-
- type of expression
Value parameters
- ctx
-
- Monad context
- t
-
- expression in direct mode
Attributes
- Returns
-
t
expression represented in monadic form
- Todo
-
- currently attempt to makr t context-dependend(i.e. pss to asynchronized t: CpsMonadContext[F] ?=>T) leads to error during typing. Need to investigate and submit bug to dotty.
- Experimental
- true
- Source
- Async.scala
Attributes
- Experimental
- true
- Source
- Async.scala
Extensions
Extensions
Pseudofunction, which can be used inside async block, to 'await' (i.e. receive value of t:T
from ft:F[T]
).
Pseudofunction, which can be used inside async block, to 'await' (i.e. receive value of t:T
from ft:F[T]
).
Attributes
- Source
- Async.scala
Synonym for await