Header menu logo TDesu.FSharp

TDesu.FSharp Namespace

Core utilities: operators, Guard, UnixTime, String, Option, Result, Validation, Clock, StateMachine, NumericParsing.

Type/Module Description

Boolean

Builders

Byte

Char

DateTimeOffset

Decimal

Double

FakeClock

Fake clock for testing. Allows manual time control. Not thread-safe.

Guard

Guard module — validate-and-throw in one call.

Guid

IClock

Abstraction over system clock for testable time-dependent code. let clock = SystemClock.Instance let now = clock.UtcNow // In tests: let fake = FakeClock(DateTimeOffset(2024, 1, 1, 0, 0, 0, TimeSpan.Zero)) fake.Advance(TimeSpan.FromHours 1.)

Int16

Int32

Int64

Operators

Option

Regex

Result

Single

StateMachine

Generic finite state machine: state + event → new state + effects.

String

String utility functions — functional wrappers over String methods.

SystemClock

Default clock implementation using the real system clock.

UnixTime

Fast cached Unix timestamp — avoids repeated syscalls. Updated lazily, accurate to ~15ms (system timer resolution).

Validation

Combinators for Validation.

Validation<'TValue, 'TError>

Applicative validation: collects ALL errors instead of short-circuiting. Use and! in the validation { } CE to run validators in parallel and collect errors.

ValidationBuilder

Computation expression builder for Validation workflows. Use let! for monadic (short-circuit) and and! for applicative (collect errors).

ValidationCE

Computation expression instance for Validation workflows: validation { ... }.

ValueOption

Type something to start searching.