Logo Orsak

Orsak Namespace

Type/Module Description

AsyncResult<'a, 'e>

The result of running an effect: a ValueTask of a FSharpResult.

Builder

The eff computation expression, and mkEffect.

CancellationSource

Effects for reading and cancelling the environment's CancellationTokenSource.

DefaultRandom

An IRandomGenerator backed by a Random.

Effect (Module)

Functions for running, combining, recovering and repeating effects.

Effect (Type)

Creates effects. Effect.Create turns a function of an environment into an effect, and is how effects are made from the interfaces that describe side effects. The function may return a plain value, a Result, a Task, a ValueTask or an Async, of a value or of a Result; returning a Result lets the effect fail.

Effect<'r, 'a, 'e>

Describes an effect that can either succeed with , or fail with . The effect is 'cold', and only starts when run with an .

EffectDelegate<'r, 'a, 'e>

The function an Effect wraps: given an environment, it starts the effect.

EffectList<'r, 'a, 'e>

An effect that produces a list, as built by the effList computation expression.

EffectListBuilder

The effList computation expression.

EffectSeqDelegate<'r, 'a, 'e>

The function an EffSeq wraps: given an environment, it creates the sequence.

EffSeq

Creates effect sequences, EffSeq.

EffSeq<'r, 'a, 'e>

An effectful stream: like Effect, it requires an environment to start, but it produces a sequence of over time, as an async enumerable, and can fail with . Written with the effSeq computation expression.

EffSeqBuilder

The effSeq computation expression.

GuidGenerator

Effects for generating Guids through an IGuidGenProvider.

ICacheProvider

Provides an IMemoryCache to effects, as part of an environment.

ICancellationProvider

Provides a CancellationTokenSource to effects, as part of an environment.

IGuidGenerator

Generates Guids. An effect interface, so that code creating ids can be run with a deterministic generator in tests.

IGuidGenProvider

Provides an IGuidGenerator to effects, as part of an environment.

ILoggerProvider

Provides an ILogger to effects, as part of an environment.

IProvide<'t>

A marker for an environment that provides an effect of type . An interface marked with [<GenRunner>] from Orsak.Myriad lists the effects its environment provides by inheriting this.

IRandom

Generates random numbers. An effect interface, so that code using randomness can be run with a seeded or fixed generator in tests.

IRandomGenerator

An alias of IRandom.

IRandomGeneratorProvider

Provides an IRandomGenerator to effects, as part of an environment.

IRandomProvider

ITimeProvider

Provides a TimeProvider to effects, as part of an environment. Using TimeProvider.System in production and a fake time provider in tests makes time-dependent effects testable.

MemoryCache

Effects for caching values in the environment's IMemoryCache.

Random

Effects for generating random numbers through an IRandomProvider.

Time

Effects for reading the time through an ITimeProvider.

Type something to start searching.