Repository F# setup
open System
open System.IO
open System.Threading
open System.Threading.Tasks
open Axial
open Axial.Layers
open Axial.Console
open Axial.FileSystem
open Axial.Hosting
open Axial.Hosting.Browser
open Axial.Hosting.Node
open Axial.HttpClient
open Axial.PlatformService
open Axial.Process
open Axial.State
open Axial.Telemetry
open Axial.Telemetry.JavaScriptThe Flow Type
A Flow is an immutable, cold description of work. Nothing runs until an execution interprets the description with an environment:
let workflow : Flow<AppEnv, LoadUserError, User> =
flow {
let! loadUser = Flow.envWith _.LoadUser
return! loadUser 42
}
let completed = workflow |> Flow.startTask live| Parameter | Meaning |
|---|---|
'env |
Dependencies supplied when the workflow runs |
'error |
Expected failures the caller can handle |
'value |
The value produced on success |
Aliases such as Flow<'value> and EnvFlow<'env, 'value> abbreviate the same type with unused channels fixed.
In this section
- Reading the type — the three channels, the aliases, and what each alias expands to.
- Creating flows — constructors for values, failures, and interop sources.
- Running flows — executions, outcomes, and boundary conversions.
- The flow builder —
flow { }binding rules for flows, tasks, and results. - Combining flows — sequencing, mapping, and channel transformations.
- Task and async interop — moving between Flow,
Task, andAsync. - Troubleshooting types — the compiler errors produced when channels do not line up.
- Resources — acquiring something that must be released.

