Skip to content

Conversation

majocha
Copy link
Contributor

@majocha majocha commented Jul 31, 2025

Revived #17018

Implements fsharp/fslang-suggestions#1006

TODO:

  • write some tests
  • decide how to deal with DoBang
  • RFC FS-1330
  • add example usage / implementations for some basic CEs to tests.

Copy link
Contributor

github-actions bot commented Jul 31, 2025

❗ Release notes required


✅ Found changes and release notes in following paths:

Change path Release notes path Description
src/Compiler docs/release-notes/.FSharp.Compiler.Service/10.0.100.md
LanguageFeatures.fsi docs/release-notes/.Language/preview.md

@vzarytovskii
Copy link
Member

Nice

@majocha
Copy link
Contributor Author

majocha commented Aug 1, 2025

So, some tests are up and running. I will fill them up with all imaginable tail call / non-tailcall combinations.

OTOH Applying this to TaskBuilder is very tricky and probably hopeless, given its type signature.
It returns just a running task and binds to awaitables that also may or may not be already running. I cannot come up with anything that wouldn't be horrendous (like for example communicating between TaskBuilder state machines via an AsyncLocal side channel to signal that we're executing in a recursive taill-call context).

It might be more useful for other computation expressions.

@majocha majocha changed the title WIP: Computational expressions tail calls support, revived Computational expressions tail calls support, revived Aug 1, 2025
@majocha majocha marked this pull request as ready for review August 3, 2025 10:56
@majocha majocha requested a review from a team as a code owner August 3, 2025 10:56
majocha and others added 2 commits August 3, 2025 19:10
@edgarfgp edgarfgp requested a review from T-Gro August 6, 2025 09:17
@github-project-automation github-project-automation bot moved this from New to In Progress in F# Compiler and Tooling Aug 6, 2025
@T-Gro T-Gro enabled auto-merge (squash) August 6, 2025 14:08
@T-Gro T-Gro merged commit 8a47c17 into dotnet:main Aug 6, 2025
36 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in F# Compiler and Tooling Aug 6, 2025
@majocha majocha deleted the tailcalls-ce branch August 7, 2025 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants