Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Oct 8, 2025

Summary

Adds a proper definition of task expressions with a link to the full documentation in the "task {…}" section of the F# 6 What's New article.

Changes

Updated the introduction to the task {…} section to:

  • Define what task expressions are for readers encountering them for the first time
  • Link to the task expressions documentation for detailed information
  • Clarify the relationship between task expressions and async expressions

Before

F# 6 includes native support for authoring .NET tasks in F# code. For example, consider...

After

F# 6 includes native support for authoring .NET tasks in F# code using [task expressions](../language-reference/task-expressions.md). Task expressions are similar to async expressions but allow you to author .NET tasks directly.

For example, consider...

Motivation

The original section introduced the task {…} syntax without defining what task expressions are or linking to their documentation. This left readers without a clear understanding of the feature or where to find more information.

Fixes #43686

Notes

  • The existing code example using Async.StartAsTask is correct - it demonstrates the "before F# 6" approach that task expressions improve upon
  • Follows Microsoft Writing Style Guide conventions
  • Uses relative link format per documentation guidelines
Original prompt

This section details on the original issue you should resolve

<issue_title>More proper definition of task example</issue_title>
<issue_description>
[Enter feedback here]


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
Async.StartAsTask should be Async.StartImmediateAsTask

Comments on the Issue (you are @copilot in this section)

@BillWagner To fix this, a definition for `task` expressions should be added, and it should link to this page: https://learn.microsoft.com/en-us/dotnet/fsharp/language-reference/task-expressions
Fixes #26890

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.


Internal previews

📄 File 🔗 Preview link
docs/fsharp/whats-new/fsharp-6.md docs/fsharp/whats-new/fsharp-6

@dotnet-policy-service dotnet-policy-service bot added the okr-quality Content-quality KR: Concerns article defects (bugs), freshness, or build warnings. label Oct 8, 2025
@Copilot Copilot AI changed the title [WIP] Fix definition of Async.StartAsTask to Async.StartImmediateAsTask Add task expressions definition and link in F# 6 What's New Oct 8, 2025
@Copilot Copilot AI requested a review from BillWagner October 8, 2025 19:24
Copilot finished work on behalf of BillWagner October 8, 2025 19:24
Copy link
Member

@BillWagner BillWagner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is ready for final review

@BillWagner BillWagner marked this pull request as ready for review October 9, 2025 13:36
@BillWagner BillWagner requested a review from a team as a code owner October 9, 2025 13:36
@Copilot Copilot AI review requested due to automatic review settings October 9, 2025 13:36
@BillWagner BillWagner requested a review from a team as a code owner October 9, 2025 13:36
@BillWagner BillWagner requested a review from IEvangelist October 9, 2025 13:36
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR improves the F# 6 documentation by adding a proper definition of task expressions with a link to detailed documentation. The change addresses a gap where the "task {…}" feature was introduced without adequate explanation or reference material.

  • Adds a clear definition of task expressions in the F# 6 What's New article
  • Includes a link to the comprehensive task expressions documentation
  • Clarifies the relationship between task expressions and async expressions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dotnet-fsharp/svc okr-quality Content-quality KR: Concerns article defects (bugs), freshness, or build warnings.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

More proper definition of task example
2 participants