cps.monads.catsEffect
Members list
Type members
Classlikes
part of asyncScope
part of asyncScope
Attributes
- See also
-
asyncScope
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Supertypes
-
trait CpsAsyncEffectMonadInstanceContext[F]trait CpsAsyncMonadInstanceContext[F]trait CpsAsyncEffectMonad[F]trait CpsTryEffectMonad[F]trait CpsEffectMonad[F]trait CpsAsyncMonad[F]class CatsMonadThrow[F]trait CpsTryMonadInstanceContext[F]trait CpsTryMonad[F]trait CpsTrySupport[F]trait CpsThrowMonad[F]trait CpsThrowSupport[F]trait CatsMonad[F]trait CpsMonad[F]class Objecttrait Matchableclass AnyShow all
- Known subtypes
-
class CatsConcurrent[F]class CatsIOCpsAsyncMonad
Attributes
- Supertypes
-
trait CpsConcurrentEffectMonadInstanceContext[F]trait CpsConcurrentMonadInstanceContext[F]trait CpsConcurrentEffectMonad[F]trait CpsConcurrentMonad[F]class CatsAsync[F]trait CpsAsyncEffectMonadInstanceContext[F]trait CpsAsyncMonadInstanceContext[F]trait CpsAsyncEffectMonad[F]trait CpsTryEffectMonad[F]trait CpsEffectMonad[F]trait CpsAsyncMonad[F]class CatsMonadThrow[F]trait CpsTryMonadInstanceContext[F]trait CpsTryMonad[F]trait CpsTrySupport[F]trait CpsThrowMonad[F]trait CpsThrowSupport[F]trait CatsMonad[F]trait CpsMonad[F]class Objecttrait Matchableclass AnyShow all
- Known subtypes
-
class CatsIOCpsAsyncMonad
CpsAsyncMonad for cats-effect.
CpsAsyncMonad for cats-effect.
Attributes
- Supertypes
-
class CatsConcurrent[IO]trait CpsConcurrentEffectMonadInstanceContext[IO]trait CpsConcurrentMonadInstanceContext[IO]trait CpsConcurrentEffectMonad[IO]trait CpsConcurrentMonad[IO]class CatsAsync[IO]trait CpsAsyncEffectMonadInstanceContext[IO]trait CpsAsyncMonadInstanceContext[IO]trait CpsAsyncEffectMonad[IO]trait CpsTryEffectMonad[IO]trait CpsEffectMonad[IO]trait CpsAsyncMonad[IO]class CatsMonadThrow[IO]trait CpsTryMonadInstanceContext[IO]trait CpsTryMonad[IO]trait CpsTrySupport[IO]trait CpsThrowMonad[IO]trait CpsThrowSupport[IO]trait CatsMonad[IO]trait CpsMonad[IO]class Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait CpsMonad[F]class Objecttrait Matchableclass Any
- Known subtypes
-
class CatsMonadPure[F]class CatsMonadThrow[F]class CatsAsync[F]class CatsConcurrent[F]class CatsIOCpsAsyncMonad
Attributes
- Supertypes
-
trait CpsPureMonadInstanceContext[F]trait CatsMonad[F]trait CpsMonad[F]class Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait CpsTryMonadInstanceContext[F]trait CpsTryMonad[F]trait CpsTrySupport[F]trait CpsThrowMonad[F]trait CpsThrowSupport[F]trait CatsMonad[F]trait CpsMonad[F]class Objecttrait Matchableclass AnyShow all
- Known subtypes
Value members
Concrete methods
Produce effect with resource-aware scope block.
Produce effect with resource-aware scope block.
val effect = asyncScope[IO] {
val reader = await(openFile(input))
val writer = await(openFile(output))
writer.transformFrom(0,Long.MaxValue,reader)
}
Here evaluation of effect will open reader and wrier, transfer data and then close reader and writer. block inside asyncScope evaluated in CpsResourceMonad[[X]=>>Resource[F,X]]
Attributes
- See also
-
[cps.monads.catsEffect.CpsResourceMonad]
Givens
Givens
into F[T] to [A] =>> Resource[F,A] for using inside asyncScope
into F[T] to [A] =>> Resource[F,A] for using inside asyncScope
Attributes
Extensions
Extensions
Pseudo-synchronious syntax for resource, which can be used in async block.
Pseudo-synchronious syntax for resource, which can be used in async block.
Usage: assuming we have:
def open(file: File): Resource[IO, BufferedReader]
we can
async[IO] {
....
open(file).useOn{ buffer =>
await(doSomething)
buffer.write(r)
result
}
}
Attributes
Pseudo-synchronious syntax for resource, which can be used in async block.
Pseudo-synchronious syntax for resource, which can be used in async block.
async[IO] {
....
using(openFile){ buffer =>
await(doSomething)
buffer.write(r)
result
}
}
Attributes
Pseudo-synchronious syntax for resource, which can be used in async block.
Pseudo-synchronious syntax for resource, which can be used in async block.
async[IO] {
....
using(openFile){ buffer =>
await(doSomething)
buffer.write(r)
result
}
}
Attributes
Pseudo-synchronious syntax for resource, which can be used in async block.
Pseudo-synchronious syntax for resource, which can be used in async block.
async[IO] {
....
using(openFile){ buffer =>
await(doSomething)
buffer.write(r)
result
}
}