Package arrow.fx.coroutines

Types

Link copied to clipboard
abstract class ArrowFxSpec(iterations: Int = 250, spec: ArrowFxSpec.() -> Unit = {})

Simple overwritten Kotest StringSpec (UnitSpec) to reduce stress on tests.

Link copied to clipboard
class NamedThreadFactory(mkName: (Int) -> String) : ThreadFactory
Link copied to clipboard
data class SideEffect(var counter: Int = 0)

Functions

Link copied to clipboard
inline fun <A> assertThrowable(executable: () -> A): Throwable

Example usage:

Link copied to clipboard
suspend fun <A> awaitExitCase(send: <ERROR CLASS><Unit>, exit: <ERROR CLASS><<ERROR CLASS>>): A
suspend fun <A> awaitExitCase(start: <ERROR CLASS><Unit>, exit: <ERROR CLASS><<ERROR CLASS>>): A
Link copied to clipboard
fun <ERROR CLASS>.charRange(): <ERROR CLASS><CharRange>
Link copied to clipboard
fun <A> either(e: <ERROR CLASS><Throwable, A>): <ERROR CLASS><<ERROR CLASS><Throwable, A>>
fun <L, R> <ERROR CLASS>.either(left: <ERROR CLASS><L>, right: <ERROR CLASS><R>): <ERROR CLASS><<ERROR CLASS><L, R>>
Link copied to clipboard
fun <A> <ERROR CLASS>.flow(arbA: <ERROR CLASS><A>): <ERROR CLASS><<ERROR CLASS><A>>
Link copied to clipboard
fun <O> <ERROR CLASS>.function(arb: <ERROR CLASS><O>): <ERROR CLASS><() -> O>
Link copied to clipboard
fun <A, B> <ERROR CLASS>.functionAToB(arb: <ERROR CLASS><B>): <ERROR CLASS><(A) -> B>
Link copied to clipboard
fun <ERROR CLASS>.intRange(min: Int = Int.MIN_VALUE, max: Int = Int.MAX_VALUE): <ERROR CLASS><IntRange>
Link copied to clipboard
fun leftException(e: Throwable): <ERROR CLASS><<ERROR CLASS><Throwable, out <ERROR CLASS>>>
Link copied to clipboard
fun <ERROR CLASS>.longRange(min: Long = Long.MIN_VALUE, max: Long = Long.MAX_VALUE): <ERROR CLASS><LongRange>
Link copied to clipboard
fun <A> <ERROR CLASS>.nullable(arb: <ERROR CLASS><A>): <ERROR CLASS><A?>
Link copied to clipboard
fun <A> <ERROR CLASS><Throwable, A>.rethrow(): A

Useful for testing success & error scenarios with an Either generator

Link copied to clipboard
suspend fun CoroutineContext.shift()
Link copied to clipboard
suspend fun <A> A.suspend(): A
suspend fun Throwable.suspend(): Nothing
Link copied to clipboard
fun <A> A.suspended(): suspend () -> A
Link copied to clipboard
fun <ERROR CLASS>.throwable(): <ERROR CLASS><Throwable>
Link copied to clipboard
fun <A> Result<A>.toEither(): <ERROR CLASS><Throwable, A>
Link copied to clipboard
fun <ERROR CLASS>.unit(): <ERROR CLASS><Unit>
Link copied to clipboard
fun <L, R> <ERROR CLASS>.validated(left: <ERROR CLASS><L>, right: <ERROR CLASS><R>): <ERROR CLASS><<ERROR CLASS><L, R>>
Link copied to clipboard
fun <L, R> <ERROR CLASS>.validatedNel(left: <ERROR CLASS><L>, right: <ERROR CLASS><R>): <ERROR CLASS><<ERROR CLASS><L, R>>

Properties

Link copied to clipboard
val single: Resource<CoroutineContext>
Link copied to clipboard
val singleThreadName: String
Link copied to clipboard
val threadName: suspend () -> String