Add valueTaskValueOption CE for ValueTask<'T voption> computation expressions#348
Merged
Merged
Conversation
…sion) Co-authored-by: TheAngryByrd <1490044+TheAngryByrd@users.noreply.github.com>
Co-authored-by: TheAngryByrd <1490044+TheAngryByrd@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add taskValueOption and valueTaskValueOption CEs
Add Feb 24, 2026
valueTaskValueOption CE for ValueTask<'T voption> computation expressions
Collaborator
|
@copilot this is missing docs under |
Co-authored-by: TheAngryByrd <1490044+TheAngryByrd@users.noreply.github.com>
Contributor
Author
There was a problem hiding this comment.
Pull request overview
Adds a new valueTaskValueOption computation expression to FsToolkit.ErrorHandling, enabling ergonomic composition of ValueTask<'T voption> workflows in the same style as existing taskValueOption and related builders.
Changes:
- Introduces
ValueTaskValueOptionutility functions (map,bind,apply,zip,either,defaultValue,defaultWith) plus operator helpers. - Adds the
valueTaskValueOptioncomputation expression builder (state-machine-based) forValueTask<'T voption>. - Adds comprehensive unit tests and GitBook documentation for the new API surface.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/FsToolkit.ErrorHandling/ValueTaskValueOption.fs | New utility functions for working with ValueTask<'T voption>. |
| src/FsToolkit.ErrorHandling/ValueTaskValueOptionCE.fs | New computation expression builder for ValueTask<'T voption> (including and!/applicative support). |
| src/FsToolkit.ErrorHandling/ValueTaskValueOptionOp.fs | Adds operators (<!>, <*>, >>=) for ValueTaskValueOption. |
| src/FsToolkit.ErrorHandling/FsToolkit.ErrorHandling.fsproj | Includes the new source files in the build (non-Fable). |
| tests/FsToolkit.ErrorHandling.Tests/ValueTaskValueOptionCE.fs | Adds CE behavior tests mirroring existing CE test coverage patterns. |
| tests/FsToolkit.ErrorHandling.Tests/FsToolkit.ErrorHandling.Tests.fsproj | Includes the new test file (non-Fable). |
| tests/FsToolkit.ErrorHandling.Tests/Main.fs | Registers the new test suite in the aggregate test list. |
| gitbook/valueTaskValueOption/*.md | Adds end-user documentation pages for the new ValueTaskValueOption module and CE. |
| gitbook/SUMMARY.md | Adds the new ValueTaskValueOption section to GitBook navigation. |
TheAngryByrd
added a commit
that referenced
this pull request
Feb 27, 2026
- [Add IAsyncEnumerable support to task computation expressions](#347) Credits @Copilot - [Add `valueTaskValueOption` CE for `ValueTask<'T voption>` computation expressions](#348) Credits @Copilot - [Add `cancellableValueTaskOption` and `cancellableValueTaskResult` CEs for IcedTasks](#349) Credits @Copilot - [Add `Source` overloads to `taskResultOption` CE for interop with `Result`, `TaskResult`, `Option`, `Task`, and `Async`](#351) Credits @Copilot - [Add `requireSomeWith` and `requireNoneWith` for lazy error evaluation](#352) Credits @Copilot - [Add `TaskResult.ofCatchTask`](#353) Credits @Copilot - [Add comprehensive gitbook documentation for all public API surface](#354) Credits @Copilot
TheAngryByrd
added a commit
that referenced
this pull request
Feb 27, 2026
- [Add IAsyncEnumerable support to task computation expressions](#347) Credits @Copilot - [Add `valueTaskValueOption` CE for `ValueTask<'T voption>` computation expressions](#348) Credits @Copilot - [Add `cancellableValueTaskOption` and `cancellableValueTaskResult` CEs for IcedTasks](#349) Credits @Copilot - [Add `Source` overloads to `taskResultOption` CE for interop with `Result`, `TaskResult`, `Option`, `Task`, and `Async`](#351) Credits @Copilot - [Add `requireSomeWith` and `requireNoneWith` for lazy error evaluation](#352) Credits @Copilot - [Add `TaskResult.ofCatchTask`](#353) Credits @Copilot - [Add comprehensive gitbook documentation for all public API surface](#354) Credits @Copilot
TheAngryByrd
added a commit
that referenced
this pull request
Feb 27, 2026
- [Add IAsyncEnumerable support to task computation expressions](#347) Credits @Copilot - [Add `valueTaskValueOption` CE for `ValueTask<'T voption>` computation expressions](#348) Credits @Copilot - [Add `cancellableValueTaskOption` and `cancellableValueTaskResult` CEs for IcedTasks](#349) Credits @Copilot - [Add `Source` overloads to `taskResultOption` CE for interop with `Result`, `TaskResult`, `Option`, `Task`, and `Async`](#351) Credits @Copilot - [Add `requireSomeWith` and `requireNoneWith` for lazy error evaluation](#352) Credits @Copilot - [Add `TaskResult.ofCatchTask`](#353) Credits @Copilot - [Add comprehensive gitbook documentation for all public API surface](#354) Credits @Copilot Remove AutoGPT subproject reference
TheAngryByrd
added a commit
that referenced
this pull request
Feb 27, 2026
- [Add IAsyncEnumerable support to task computation expressions](#347) Credits @Copilot - [Add `valueTaskValueOption` CE for `ValueTask<'T voption>` computation expressions](#348) Credits @Copilot - [Add `cancellableValueTaskOption` and `cancellableValueTaskResult` CEs for IcedTasks](#349) Credits @Copilot - [Add `Source` overloads to `taskResultOption` CE for interop with `Result`, `TaskResult`, `Option`, `Task`, and `Async`](#351) Credits @Copilot - [Add `requireSomeWith` and `requireNoneWith` for lazy error evaluation](#352) Credits @Copilot - [Add `TaskResult.ofCatchTask`](#353) Credits @Copilot - [Add comprehensive gitbook documentation for all public API surface](#354) Credits @Copilot Remove AutoGPT subproject reference
TheAngryByrd
added a commit
that referenced
this pull request
Feb 27, 2026
- [Add IAsyncEnumerable support to task computation expressions](#347) Credits @Copilot - [Add `valueTaskValueOption` CE for `ValueTask<'T voption>` computation expressions](#348) Credits @Copilot - [Add `cancellableValueTaskOption` and `cancellableValueTaskResult` CEs for IcedTasks](#349) Credits @Copilot - [Add `Source` overloads to `taskResultOption` CE for interop with `Result`, `TaskResult`, `Option`, `Task`, and `Async`](#351) Credits @Copilot - [Add `requireSomeWith` and `requireNoneWith` for lazy error evaluation](#352) Credits @Copilot - [Add `TaskResult.ofCatchTask`](#353) Credits @Copilot - [Add comprehensive gitbook documentation for all public API surface](#354) Credits @Copilot
TheAngryByrd
added a commit
that referenced
this pull request
Feb 27, 2026
- [Add IAsyncEnumerable support to task computation expressions](#347) Credits @Copilot - [Add `valueTaskValueOption` CE for `ValueTask<'T voption>` computation expressions](#348) Credits @Copilot - [Add `cancellableValueTaskOption` and `cancellableValueTaskResult` CEs for IcedTasks](#349) Credits @Copilot - [Add `Source` overloads to `taskResultOption` CE for interop with `Result`, `TaskResult`, `Option`, `Task`, and `Async`](#351) Credits @Copilot - [Add `requireSomeWith` and `requireNoneWith` for lazy error evaluation](#352) Credits @Copilot - [Add `TaskResult.ofCatchTask`](#353) Credits @Copilot - [Add comprehensive gitbook documentation for all public API surface](#354) Credits @Copilot Remove AutoGPT subproject reference
This was referenced Mar 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ValueTaskValueOption.fswith utility functions insrc/FsToolkit.ErrorHandling/ValueTaskValueOptionCE.fswith computation expression builder (returningValueTask<'T voption>) insrc/FsToolkit.ErrorHandling/ValueTaskValueOptionOp.fswith operators insrc/FsToolkit.ErrorHandling/FsToolkit.ErrorHandling.fsprojto include new filesValueTaskValueOptionCE.fsintests/FsToolkit.ErrorHandling.Tests/FsToolkit.ErrorHandling.Tests.fsprojto include new test fileMain.fsto include new testsvalueTaskValueOption/ce.md,map.md,bind.md,apply.md,either.md,zip.md,others.md) and updateSUMMARY.mdOriginal prompt
taskValueOptionandvalueTaskValueOptionCEs #319💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.