fsharp-async-composition
Installation
SKILL.md
Contains Shell Commands
This skill contains shell command directives (!`command`) that may execute system commands. Review carefully before installing.
F# async composition
Most defects in this area compile. The code runs, but cancellation does not reach the work,
an Async never starts, a ValueTask is read twice, or an exception changes type. Choose the
builder from the boundary type, convert once at the boundary, and pass the token explicitly.
Builder choice
| Situation | Use |
|---|---|
Code returns Task or Task<'T> to .NET callers (ASP.NET, interfaces, libraries) |
task { } |
Interface or hot path returns ValueTask<'T> |
valueTask { } from IcedTasks, or task { } then ValueTask<'T>(t) at the edge |
| Work must be re-runnable or retried, or the token must flow implicitly | async { } |
Task-based code that must pass a token to bound Async and CancellableTask values |
cancellableTask { } from IcedTasks |
Task<Result<_,_>> |
taskResult { } from FsToolkit.ErrorHandling |