Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Library Effects

Flix provides several built-in library effects for common I/O operations. These effects all have default handlers, so no explicit runWithIO is needed in main.

EffectDescription
AssertRuntime assertions (assertTrue, assertEq, etc.) with configurable handlers.
LoggerStructured logging at five severity levels with filtering and collection.
Math.RandomGenerating pseudorandom numbers, with optional seeded determinism.
Net.Http / Net.HttpsSending HTTP requests with a fluent API, middleware (retries, rate limiting, circuit breakers).
Sys.ConsoleTerminal I/O: reading input, printing to stdout/stderr, prompts, and menus.
Sys.EnvAccessing environment variables, system properties, and platform information.
Sys.ExitTerminating the program with a specific exit code.
Sys.ProcessSpawning and managing OS processes.
Time.ClockQuerying the current wall-clock time in various units.
Time.SleepPausing the current thread with composable middleware (jitter, caps, logging).