effect_dart library

A powerful Effect library for Dart inspired by Effect-TS.

This library provides functional programming patterns for managing side effects, errors, and dependencies in a type-safe and composable way.

Classes

Cause<E>
Represents the cause of an effect failure.
Context<R>
A collection that holds contextual data (services/dependencies) required by effects.
Die
Represents a failure caused by an unexpected defect/throwable
Effect<A, E, R>
The Effect type represents an immutable description of a workflow or operation that is lazily executed.
Either<L, R>
Represents a value that can be either a Left (error) or Right (success).
Exit<A, E>
Represents the result of executing an Effect.
Fail<E>
Represents a failure caused by an expected error
Failure<A, E>
Represents a failed exit with a cause
Fiber<A, E>
A fiber represents a lightweight thread of execution for an effect.
Left<L, R>
Represents the left side of Either (typically an error)
NamedTag<T>
A convenience class for creating service tags with a name.
Represents the right side of Either (typically a success value)
Runtime
The Effect Runtime System that executes effects.
Success<A, E>
Represents a successful exit with a value
Tag<T>
A tag class for creating strongly-typed service identifiers.

Extensions

EffectRunner on Effect<A, E, R>
Helper to run effects without explicitly creating a runtime
EffectTypes on Effect<A, E, R>
Utility class for extracting types from Effect
EitherExtensions on Either<L, R>
Extension methods for working with Either