From 5defb31c47fa2ca6df0208d1ca7ec7181df686c2 Mon Sep 17 00:00:00 2001 From: Vladimir Shchur Date: Sun, 6 Apr 2025 21:01:34 -0700 Subject: [PATCH 01/16] `and!` support in TaskBulder draft --- src/FSharp.Core/tasks.fs | 61 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/src/FSharp.Core/tasks.fs b/src/FSharp.Core/tasks.fs index 687bae5af85..2307c69c9ed 100644 --- a/src/FSharp.Core/tasks.fs +++ b/src/FSharp.Core/tasks.fs @@ -437,3 +437,64 @@ module MediumPriority = member inline this.ReturnFrom(computation: Async<'T>) : TaskCode<'T, 'T> = this.ReturnFrom(Async.StartImmediateAsTask computation) + + // This is required for type inference in tasks cases + member inline this.MergeSources(task1: Task<^TResult1>, task2: Task<^TResult2>) = + this.Run( + this.Bind(task1, fun (result1: ^TResult1) -> + this.Bind(task2, fun (result2: ^TResult2) -> + this.Return(result1, result2) + ) + ) + ) + + // This is required for type inference in tasks cases + member inline this.MergeSources< ^TaskLike2, ^TResult1, ^TResult2, ^Awaiter2 + when ^TaskLike2 : (member GetAwaiter: unit -> ^Awaiter2) + and ^Awaiter2 :> ICriticalNotifyCompletion + and ^Awaiter2: (member get_IsCompleted: unit -> bool) + and ^Awaiter2: (member GetResult: unit -> 'TResult2)> + (task1: Task<^TResult1>, task2: ^TaskLike2) + : Task<^TResult1 * ^TResult2> = + this.Run( + this.Bind(task1, fun (result1: ^TResult1) -> + this.Bind(task2, fun (result2: ^TResult2) -> + this.Return(result1, result2) + ) + ) + ) + + // This is required for type inference in tasks cases + member inline this.MergeSources< ^TaskLike1, ^TResult1, ^TResult2, ^Awaiter1 + when ^TaskLike1 : (member GetAwaiter: unit -> ^Awaiter1) + and ^Awaiter1 :> ICriticalNotifyCompletion + and ^Awaiter1: (member get_IsCompleted: unit -> bool) + and ^Awaiter1: (member GetResult: unit -> 'TResult1)> + (task1: ^TaskLike1, task2: Task<^TResult2>) + : Task<^TResult1 * ^TResult2> = + this.Run( + this.Bind(task1, fun (result1: ^TResult1) -> + this.Bind(task2, fun (result2: ^TResult2) -> + this.Return(result1, result2) + ) + ) + ) + + member inline this.MergeSources< ^TaskLike1, ^TaskLike2, ^TResult1, ^TResult2, ^Awaiter1, ^Awaiter2 + when ^TaskLike1: (member GetAwaiter: unit -> ^Awaiter1) + and ^TaskLike2 : (member GetAwaiter: unit -> ^Awaiter2) + and ^Awaiter1 :> ICriticalNotifyCompletion + and ^Awaiter2 :> ICriticalNotifyCompletion + and ^Awaiter1: (member get_IsCompleted: unit -> bool) + and ^Awaiter1: (member GetResult: unit -> ^TResult1) + and ^Awaiter2: (member get_IsCompleted: unit -> bool) + and ^Awaiter2: (member GetResult: unit -> ^TResult2)> + (task1: ^TaskLike1, task2: ^TaskLike2) + : Task<^TResult1 * ^TResult2> = + this.Run( + this.Bind(task1, fun (result1: ^TResult1) -> + this.Bind(task2, fun (result2: ^TResult2) -> + this.Return(result1, result2) + ) + ) + ) From be25c98428c509e0f4921b71cbf6311c1ebee753 Mon Sep 17 00:00:00 2001 From: Vladimir Shchur Date: Sun, 6 Apr 2025 21:31:12 -0700 Subject: [PATCH 02/16] Moved MergeSources from base class to implementation --- src/FSharp.Core/tasks.fs | 126 ++++++++++++++++++++------------------- 1 file changed, 64 insertions(+), 62 deletions(-) diff --git a/src/FSharp.Core/tasks.fs b/src/FSharp.Core/tasks.fs index 2307c69c9ed..fff4fe89676 100644 --- a/src/FSharp.Core/tasks.fs +++ b/src/FSharp.Core/tasks.fs @@ -216,7 +216,69 @@ type TaskBuilder() = sm.Data.MethodBuilder.Start(&sm) sm.Data.MethodBuilder.Task)) else - TaskBuilder.RunDynamic(code) + TaskBuilder.RunDynamic(code) + + // This is required for type inference in tasks cases + member inline this.MergeSources(task1: Task<^TResult1>, task2: Task<^TResult2>) + : Task<^TResult1 * ^TResult2> = + this.Run( + this.Bind(task1, fun (result1: ^TResult1) -> + this.Bind(task2, fun (result2: ^TResult2) -> + this.Return(result1, result2) + ) + ) + ) + + // This is required for type inference in tasks cases + member inline this.MergeSources< ^TaskLike2, ^TResult1, ^TResult2, ^Awaiter2 + when ^TaskLike2 : (member GetAwaiter: unit -> ^Awaiter2) + and ^Awaiter2 :> ICriticalNotifyCompletion + and ^Awaiter2: (member get_IsCompleted: unit -> bool) + and ^Awaiter2: (member GetResult: unit -> 'TResult2)> + (task1: Task<^TResult1>, task2: ^TaskLike2) + : Task<^TResult1 * ^TResult2> = + this.Run( + this.Bind(task1, fun (result1: ^TResult1) -> + this.Bind(task2, fun (result2: ^TResult2) -> + this.Return(result1, result2) + ) + ) + ) + + // This is required for type inference in tasks cases + member inline this.MergeSources< ^TaskLike1, ^TResult1, ^TResult2, ^Awaiter1 + when ^TaskLike1 : (member GetAwaiter: unit -> ^Awaiter1) + and ^Awaiter1 :> ICriticalNotifyCompletion + and ^Awaiter1: (member get_IsCompleted: unit -> bool) + and ^Awaiter1: (member GetResult: unit -> 'TResult1)> + (task1: ^TaskLike1, task2: Task<^TResult2>) + : Task<^TResult1 * ^TResult2> = + this.Run( + this.Bind(task1, fun (result1: ^TResult1) -> + this.Bind(task2, fun (result2: ^TResult2) -> + this.Return(result1, result2) + ) + ) + ) + + member inline this.MergeSources< ^TaskLike1, ^TaskLike2, ^TResult1, ^TResult2, ^Awaiter1, ^Awaiter2 + when ^TaskLike1: (member GetAwaiter: unit -> ^Awaiter1) + and ^TaskLike2 : (member GetAwaiter: unit -> ^Awaiter2) + and ^Awaiter1 :> ICriticalNotifyCompletion + and ^Awaiter2 :> ICriticalNotifyCompletion + and ^Awaiter1: (member get_IsCompleted: unit -> bool) + and ^Awaiter1: (member GetResult: unit -> ^TResult1) + and ^Awaiter2: (member get_IsCompleted: unit -> bool) + and ^Awaiter2: (member GetResult: unit -> ^TResult2)> + (task1: ^TaskLike1, task2: ^TaskLike2) + : Task<^TResult1 * ^TResult2> = + this.Run( + this.Bind(task1, fun (result1: ^TResult1) -> + this.Bind(task2, fun (result2: ^TResult2) -> + this.Return(result1, result2) + ) + ) + ) type BackgroundTaskBuilder() = @@ -272,6 +334,7 @@ type BackgroundTaskBuilder() = else BackgroundTaskBuilder.RunDynamic(code) + module TaskBuilder = let task = TaskBuilder() @@ -437,64 +500,3 @@ module MediumPriority = member inline this.ReturnFrom(computation: Async<'T>) : TaskCode<'T, 'T> = this.ReturnFrom(Async.StartImmediateAsTask computation) - - // This is required for type inference in tasks cases - member inline this.MergeSources(task1: Task<^TResult1>, task2: Task<^TResult2>) = - this.Run( - this.Bind(task1, fun (result1: ^TResult1) -> - this.Bind(task2, fun (result2: ^TResult2) -> - this.Return(result1, result2) - ) - ) - ) - - // This is required for type inference in tasks cases - member inline this.MergeSources< ^TaskLike2, ^TResult1, ^TResult2, ^Awaiter2 - when ^TaskLike2 : (member GetAwaiter: unit -> ^Awaiter2) - and ^Awaiter2 :> ICriticalNotifyCompletion - and ^Awaiter2: (member get_IsCompleted: unit -> bool) - and ^Awaiter2: (member GetResult: unit -> 'TResult2)> - (task1: Task<^TResult1>, task2: ^TaskLike2) - : Task<^TResult1 * ^TResult2> = - this.Run( - this.Bind(task1, fun (result1: ^TResult1) -> - this.Bind(task2, fun (result2: ^TResult2) -> - this.Return(result1, result2) - ) - ) - ) - - // This is required for type inference in tasks cases - member inline this.MergeSources< ^TaskLike1, ^TResult1, ^TResult2, ^Awaiter1 - when ^TaskLike1 : (member GetAwaiter: unit -> ^Awaiter1) - and ^Awaiter1 :> ICriticalNotifyCompletion - and ^Awaiter1: (member get_IsCompleted: unit -> bool) - and ^Awaiter1: (member GetResult: unit -> 'TResult1)> - (task1: ^TaskLike1, task2: Task<^TResult2>) - : Task<^TResult1 * ^TResult2> = - this.Run( - this.Bind(task1, fun (result1: ^TResult1) -> - this.Bind(task2, fun (result2: ^TResult2) -> - this.Return(result1, result2) - ) - ) - ) - - member inline this.MergeSources< ^TaskLike1, ^TaskLike2, ^TResult1, ^TResult2, ^Awaiter1, ^Awaiter2 - when ^TaskLike1: (member GetAwaiter: unit -> ^Awaiter1) - and ^TaskLike2 : (member GetAwaiter: unit -> ^Awaiter2) - and ^Awaiter1 :> ICriticalNotifyCompletion - and ^Awaiter2 :> ICriticalNotifyCompletion - and ^Awaiter1: (member get_IsCompleted: unit -> bool) - and ^Awaiter1: (member GetResult: unit -> ^TResult1) - and ^Awaiter2: (member get_IsCompleted: unit -> bool) - and ^Awaiter2: (member GetResult: unit -> ^TResult2)> - (task1: ^TaskLike1, task2: ^TaskLike2) - : Task<^TResult1 * ^TResult2> = - this.Run( - this.Bind(task1, fun (result1: ^TResult1) -> - this.Bind(task2, fun (result2: ^TResult2) -> - this.Return(result1, result2) - ) - ) - ) From 0d61b9193f5e6c122f4b9428d405ee8187014a21 Mon Sep 17 00:00:00 2001 From: Vladimir Shchur Date: Sun, 6 Apr 2025 22:01:01 -0700 Subject: [PATCH 03/16] Moved MergeSources methods once again --- src/FSharp.Core/tasks.fs | 129 ++++++++++++++++++++------------------- 1 file changed, 65 insertions(+), 64 deletions(-) diff --git a/src/FSharp.Core/tasks.fs b/src/FSharp.Core/tasks.fs index fff4fe89676..05503728d90 100644 --- a/src/FSharp.Core/tasks.fs +++ b/src/FSharp.Core/tasks.fs @@ -216,69 +216,7 @@ type TaskBuilder() = sm.Data.MethodBuilder.Start(&sm) sm.Data.MethodBuilder.Task)) else - TaskBuilder.RunDynamic(code) - - // This is required for type inference in tasks cases - member inline this.MergeSources(task1: Task<^TResult1>, task2: Task<^TResult2>) - : Task<^TResult1 * ^TResult2> = - this.Run( - this.Bind(task1, fun (result1: ^TResult1) -> - this.Bind(task2, fun (result2: ^TResult2) -> - this.Return(result1, result2) - ) - ) - ) - - // This is required for type inference in tasks cases - member inline this.MergeSources< ^TaskLike2, ^TResult1, ^TResult2, ^Awaiter2 - when ^TaskLike2 : (member GetAwaiter: unit -> ^Awaiter2) - and ^Awaiter2 :> ICriticalNotifyCompletion - and ^Awaiter2: (member get_IsCompleted: unit -> bool) - and ^Awaiter2: (member GetResult: unit -> 'TResult2)> - (task1: Task<^TResult1>, task2: ^TaskLike2) - : Task<^TResult1 * ^TResult2> = - this.Run( - this.Bind(task1, fun (result1: ^TResult1) -> - this.Bind(task2, fun (result2: ^TResult2) -> - this.Return(result1, result2) - ) - ) - ) - - // This is required for type inference in tasks cases - member inline this.MergeSources< ^TaskLike1, ^TResult1, ^TResult2, ^Awaiter1 - when ^TaskLike1 : (member GetAwaiter: unit -> ^Awaiter1) - and ^Awaiter1 :> ICriticalNotifyCompletion - and ^Awaiter1: (member get_IsCompleted: unit -> bool) - and ^Awaiter1: (member GetResult: unit -> 'TResult1)> - (task1: ^TaskLike1, task2: Task<^TResult2>) - : Task<^TResult1 * ^TResult2> = - this.Run( - this.Bind(task1, fun (result1: ^TResult1) -> - this.Bind(task2, fun (result2: ^TResult2) -> - this.Return(result1, result2) - ) - ) - ) - - member inline this.MergeSources< ^TaskLike1, ^TaskLike2, ^TResult1, ^TResult2, ^Awaiter1, ^Awaiter2 - when ^TaskLike1: (member GetAwaiter: unit -> ^Awaiter1) - and ^TaskLike2 : (member GetAwaiter: unit -> ^Awaiter2) - and ^Awaiter1 :> ICriticalNotifyCompletion - and ^Awaiter2 :> ICriticalNotifyCompletion - and ^Awaiter1: (member get_IsCompleted: unit -> bool) - and ^Awaiter1: (member GetResult: unit -> ^TResult1) - and ^Awaiter2: (member get_IsCompleted: unit -> bool) - and ^Awaiter2: (member GetResult: unit -> ^TResult2)> - (task1: ^TaskLike1, task2: ^TaskLike2) - : Task<^TResult1 * ^TResult2> = - this.Run( - this.Bind(task1, fun (result1: ^TResult1) -> - this.Bind(task2, fun (result2: ^TResult2) -> - this.Return(result1, result2) - ) - ) - ) + TaskBuilder.RunDynamic(code) type BackgroundTaskBuilder() = @@ -334,7 +272,6 @@ type BackgroundTaskBuilder() = else BackgroundTaskBuilder.RunDynamic(code) - module TaskBuilder = let task = TaskBuilder() @@ -500,3 +437,67 @@ module MediumPriority = member inline this.ReturnFrom(computation: Async<'T>) : TaskCode<'T, 'T> = this.ReturnFrom(Async.StartImmediateAsTask computation) + + type TaskBuilder with + + // This is required for type inference in tasks cases + member inline this.MergeSources(task1: Task<^TResult1>, task2: Task<^TResult2>) + : Task<^TResult1 * ^TResult2> = + this.Run( + this.Bind(task1, fun (result1: ^TResult1) -> + this.Bind(task2, fun (result2: ^TResult2) -> + this.Return(result1, result2) + ) + ) + ) + + // This is required for type inference in tasks cases + member inline this.MergeSources< ^TaskLike2, ^TResult1, ^TResult2, ^Awaiter2 + when ^TaskLike2 : (member GetAwaiter: unit -> ^Awaiter2) + and ^Awaiter2 :> ICriticalNotifyCompletion + and ^Awaiter2: (member get_IsCompleted: unit -> bool) + and ^Awaiter2: (member GetResult: unit -> 'TResult2)> + (task1: Task<^TResult1>, task2: ^TaskLike2) + : Task<^TResult1 * ^TResult2> = + this.Run( + this.Bind(task1, fun (result1: ^TResult1) -> + this.Bind(task2, fun (result2: ^TResult2) -> + this.Return(result1, result2) + ) + ) + ) + + // This is required for type inference in tasks cases + member inline this.MergeSources< ^TaskLike1, ^TResult1, ^TResult2, ^Awaiter1 + when ^TaskLike1 : (member GetAwaiter: unit -> ^Awaiter1) + and ^Awaiter1 :> ICriticalNotifyCompletion + and ^Awaiter1: (member get_IsCompleted: unit -> bool) + and ^Awaiter1: (member GetResult: unit -> 'TResult1)> + (task1: ^TaskLike1, task2: Task<^TResult2>) + : Task<^TResult1 * ^TResult2> = + this.Run( + this.Bind(task1, fun (result1: ^TResult1) -> + this.Bind(task2, fun (result2: ^TResult2) -> + this.Return(result1, result2) + ) + ) + ) + + member inline this.MergeSources< ^TaskLike1, ^TaskLike2, ^TResult1, ^TResult2, ^Awaiter1, ^Awaiter2 + when ^TaskLike1: (member GetAwaiter: unit -> ^Awaiter1) + and ^TaskLike2 : (member GetAwaiter: unit -> ^Awaiter2) + and ^Awaiter1 :> ICriticalNotifyCompletion + and ^Awaiter2 :> ICriticalNotifyCompletion + and ^Awaiter1: (member get_IsCompleted: unit -> bool) + and ^Awaiter1: (member GetResult: unit -> ^TResult1) + and ^Awaiter2: (member get_IsCompleted: unit -> bool) + and ^Awaiter2: (member GetResult: unit -> ^TResult2)> + (task1: ^TaskLike1, task2: ^TaskLike2) + : Task<^TResult1 * ^TResult2> = + this.Run( + this.Bind(task1, fun (result1: ^TResult1) -> + this.Bind(task2, fun (result2: ^TResult2) -> + this.Return(result1, result2) + ) + ) + ) From a527f884f39af0ef0b82761d44f1d2ac9df0e4b1 Mon Sep 17 00:00:00 2001 From: Vladimir Shchur Date: Mon, 7 Apr 2025 13:14:21 -0700 Subject: [PATCH 04/16] Fix build --- src/FSharp.Core/tasks.fs | 69 ++++++++++--------- src/FSharp.Core/tasks.fsi | 37 ++++++++++ .../Microsoft.FSharp.Control/Tasks.fs | 11 +++ 3 files changed, 86 insertions(+), 31 deletions(-) diff --git a/src/FSharp.Core/tasks.fs b/src/FSharp.Core/tasks.fs index 05503728d90..27178735a41 100644 --- a/src/FSharp.Core/tasks.fs +++ b/src/FSharp.Core/tasks.fs @@ -370,7 +370,28 @@ module LowPriority = = ResumableCode.Using(resource, body) + type TaskBuilder with + member inline this.MergeSources< ^TaskLike1, ^TaskLike2, ^TResult1, ^TResult2, ^Awaiter1, ^Awaiter2 + when ^TaskLike1: (member GetAwaiter: unit -> ^Awaiter1) + and ^TaskLike2 : (member GetAwaiter: unit -> ^Awaiter2) + and ^Awaiter1 :> ICriticalNotifyCompletion + and ^Awaiter2 :> ICriticalNotifyCompletion + and ^Awaiter1: (member get_IsCompleted: unit -> bool) + and ^Awaiter1: (member GetResult: unit -> ^TResult1) + and ^Awaiter2: (member get_IsCompleted: unit -> bool) + and ^Awaiter2: (member GetResult: unit -> ^TResult2)> + (task1: ^TaskLike1, task2: ^TaskLike2) + : Task<^TResult1 * ^TResult2> = + this.Run( + this.Bind(task1, fun (result1: ^TResult1) -> + this.Bind(task2, fun (result2: ^TResult2) -> + this.Return(result1, result2) + ) + ) + ) + module HighPriority = + // High priority extensions type TaskBuilderBase with @@ -424,7 +445,21 @@ module HighPriority = member inline this.ReturnFrom(task: Task<'T>) : TaskCode<'T, 'T> = this.Bind(task, this.Return) + type TaskBuilder with + + // This is required for type inference in tasks cases + member inline this.MergeSources(task1: Task<^TResult1>, task2: Task<^TResult2>) + : Task<^TResult1 * ^TResult2> = + this.Run( + this.Bind(task1, fun (result1: ^TResult1) -> + this.Bind(task2, fun (result2: ^TResult2) -> + this.Return(result1, result2) + ) + ) + ) + module MediumPriority = + open LowPriority open HighPriority // Medium priority extensions @@ -438,19 +473,9 @@ module MediumPriority = member inline this.ReturnFrom(computation: Async<'T>) : TaskCode<'T, 'T> = this.ReturnFrom(Async.StartImmediateAsTask computation) + type TaskBuilder with - - // This is required for type inference in tasks cases - member inline this.MergeSources(task1: Task<^TResult1>, task2: Task<^TResult2>) - : Task<^TResult1 * ^TResult2> = - this.Run( - this.Bind(task1, fun (result1: ^TResult1) -> - this.Bind(task2, fun (result2: ^TResult2) -> - this.Return(result1, result2) - ) - ) - ) - + // This is required for type inference in tasks cases member inline this.MergeSources< ^TaskLike2, ^TResult1, ^TResult2, ^Awaiter2 when ^TaskLike2 : (member GetAwaiter: unit -> ^Awaiter2) @@ -482,22 +507,4 @@ module MediumPriority = ) ) ) - - member inline this.MergeSources< ^TaskLike1, ^TaskLike2, ^TResult1, ^TResult2, ^Awaiter1, ^Awaiter2 - when ^TaskLike1: (member GetAwaiter: unit -> ^Awaiter1) - and ^TaskLike2 : (member GetAwaiter: unit -> ^Awaiter2) - and ^Awaiter1 :> ICriticalNotifyCompletion - and ^Awaiter2 :> ICriticalNotifyCompletion - and ^Awaiter1: (member get_IsCompleted: unit -> bool) - and ^Awaiter1: (member GetResult: unit -> ^TResult1) - and ^Awaiter2: (member get_IsCompleted: unit -> bool) - and ^Awaiter2: (member GetResult: unit -> ^TResult2)> - (task1: ^TaskLike1, task2: ^TaskLike2) - : Task<^TResult1 * ^TResult2> = - this.Run( - this.Bind(task1, fun (result1: ^TResult1) -> - this.Bind(task2, fun (result2: ^TResult2) -> - this.Return(result1, result2) - ) - ) - ) + diff --git a/src/FSharp.Core/tasks.fsi b/src/FSharp.Core/tasks.fsi index e6c801351a1..d177bd9dfaa 100644 --- a/src/FSharp.Core/tasks.fsi +++ b/src/FSharp.Core/tasks.fsi @@ -239,6 +239,19 @@ module LowPriority = resource: 'Resource * body: ('Resource -> TaskCode<'TOverall, 'T>) -> TaskCode<'TOverall, 'T> when 'Resource :> IDisposable | null + type TaskBuilder with + member inline MergeSources< ^TaskLike1, ^TaskLike2, ^TResult1, ^TResult2, ^Awaiter1, ^Awaiter2> : + task1: ^TaskLike1 * task2: ^TaskLike2 -> + Task<^TResult1 * ^TResult2> + when ^TaskLike1: (member GetAwaiter: unit -> ^Awaiter1) + and ^TaskLike2 : (member GetAwaiter: unit -> ^Awaiter2) + and ^Awaiter1 :> ICriticalNotifyCompletion + and ^Awaiter2 :> ICriticalNotifyCompletion + and ^Awaiter1: (member get_IsCompleted: unit -> bool) + and ^Awaiter1: (member GetResult: unit -> ^TResult1) + and ^Awaiter2: (member get_IsCompleted: unit -> bool) + and ^Awaiter2: (member GetResult: unit -> ^TResult2) + /// /// Contains medium-priority overloads for the `task` computation expression builder. /// @@ -258,6 +271,25 @@ module MediumPriority = /// member inline ReturnFrom: computation: Async<'T> -> TaskCode<'T, 'T> + + type TaskBuilder with + + member inline MergeSources< ^TaskLike2, ^TResult1, ^TResult2, ^Awaiter2> : + task1: Task<^TResult1> * task2: ^TaskLike2 -> + Task<^TResult1 * ^TResult2> + when ^TaskLike2 : (member GetAwaiter: unit -> ^Awaiter2) + and ^Awaiter2 :> ICriticalNotifyCompletion + and ^Awaiter2: (member get_IsCompleted: unit -> bool) + and ^Awaiter2: (member GetResult: unit -> ^TResult2) + + member inline MergeSources< ^TaskLike1, ^TResult1, ^TResult2, ^Awaiter1> : + task1: ^TaskLike1 * task2: Task<^TResult2> -> + Task<^TResult1 * ^TResult2> + when ^TaskLike1 : (member GetAwaiter: unit -> ^Awaiter1) + and ^Awaiter1 :> ICriticalNotifyCompletion + and ^Awaiter1: (member get_IsCompleted: unit -> bool) + and ^Awaiter1: (member GetResult: unit -> ^TResult1) + /// /// Contains high-priority overloads for the `task` computation expression builder. /// @@ -285,3 +317,8 @@ module HighPriority = task: Task<'TResult1> * continuation: ('TResult1 -> TaskCode<'TOverall, 'TResult2>) -> bool + + type TaskBuilder with + member inline MergeSources< ^TResult1, ^TResult2> : + task1: Task<^TResult1> * task2: Task<^TResult2> -> + Task<^TResult1 * ^TResult2> diff --git a/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/Tasks.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/Tasks.fs index cce271d58bb..d390c63f1c1 100644 --- a/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/Tasks.fs +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/Tasks.fs @@ -53,6 +53,17 @@ type SmokeTestsForCompilation() = t.Wait() if t.Result <> 1 then failwith "failed" + [] + member _.mergesrc() = + task { + let! x = Task.FromResult(1) + and! y = Task.FromResult(2) + return x + y + } + |> fun t -> + t.Wait() + if t.Result <> 3 then failwith "failed" + [] member _.tbind() = task { From a0f96313c75edbf01324574bf3f3fa78aee96fd9 Mon Sep 17 00:00:00 2001 From: Vladimir Shchur Date: Mon, 7 Apr 2025 15:16:56 -0700 Subject: [PATCH 05/16] Added more tests --- .../Microsoft.FSharp.Control/Tasks.fs | 103 ++++++++++++++++-- 1 file changed, 92 insertions(+), 11 deletions(-) diff --git a/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/Tasks.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/Tasks.fs index d390c63f1c1..7103661f7a2 100644 --- a/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/Tasks.fs +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/Tasks.fs @@ -53,17 +53,6 @@ type SmokeTestsForCompilation() = t.Wait() if t.Result <> 1 then failwith "failed" - [] - member _.mergesrc() = - task { - let! x = Task.FromResult(1) - and! y = Task.FromResult(2) - return x + y - } - |> fun t -> - t.Wait() - if t.Result <> 3 then failwith "failed" - [] member _.tbind() = task { @@ -194,6 +183,98 @@ type SmokeTestsForCompilation() = t.Wait() if t.Result <> 5 then failwith "failed" + [] + member _.merge2tasks() = + task { + let! x = Task.FromResult(1) + and! y = Task.FromResult(2) + return x + y + } + |> fun t -> + t.Wait() + if t.Result <> 3 then failwith "failed" + + [] + member _.merge3tasks() = + task { + let! x = Task.FromResult(1) + and! y = Task.FromResult(2) + and! z = Task.FromResult(3) + return x + y + z + } + |> fun t -> + t.Wait() + if t.Result <> 6 then failwith "failed" + + [] + member _.mergeYieldAndTask() = + task { + let! _ = Task.Yield() + and! y = Task.FromResult(1) + return y + } + |> fun t -> + t.Wait() + if t.Result <> 1 then failwith "failed" + + [] + member _.mergeTaskAndYield() = + task { + let! x = Task.FromResult(1) + and! _ = Task.Yield() + return x + } + |> fun t -> + t.Wait() + if t.Result <> 1 then failwith "failed" + + [] + member _.merge2valueTasks() = + task { + let! x = ValueTask(Task.FromResult(1)) + and! y = ValueTask(Task.FromResult(2)) + return x + y + } + |> fun t -> + t.Wait() + if t.Result <> 3 then failwith "failed" + + [] + member _.merge2valueTasksAndYield() = + task { + let! x = ValueTask(Task.FromResult(1)) + and! y = ValueTask(Task.FromResult(2)) + and! _ = Task.Yield() + return x + y + } + |> fun t -> + t.Wait() + if t.Result <> 3 then failwith "failed" + + [] + member _.mergeYieldAnd2tasks() = + task { + let! _ = Task.Yield() + and! x = Task.FromResult(1) + and! y = Task.FromResult(2) + return x + y + } + |> fun t -> + t.Wait() + if t.Result <> 3 then failwith "failed" + + [] + member _.merge2tasksAndValueTask() = + task { + let! x = Task.FromResult(1) + and! y = Task.FromResult(2) + and! z = ValueTask(Task.FromResult(3)) + return x + y + z + } + |> fun t -> + t.Wait() + if t.Result <> 6 then failwith "failed" + exception TestException of string [] From 5abafa2dec9deae6a8bab00eb365c7225a4c7887 Mon Sep 17 00:00:00 2001 From: Vladimir Shchur Date: Thu, 10 Apr 2025 19:00:54 -0700 Subject: [PATCH 06/16] Added try-with test and release notes. Mixed async oveloads are TODO (something is wrong) --- docs/release-notes/.FSharp.Core/8.0.300.md | 1 + src/FSharp.Core/tasks.fs | 70 +++++++++++++- src/FSharp.Core/tasks.fsi | 60 +++++++++++- .../Microsoft.FSharp.Control/Tasks.fs | 96 +++++++++++++++++++ 4 files changed, 222 insertions(+), 5 deletions(-) diff --git a/docs/release-notes/.FSharp.Core/8.0.300.md b/docs/release-notes/.FSharp.Core/8.0.300.md index be97542e410..d106c3ac4a2 100644 --- a/docs/release-notes/.FSharp.Core/8.0.300.md +++ b/docs/release-notes/.FSharp.Core/8.0.300.md @@ -3,6 +3,7 @@ * Minor tweaks to inline specifications to support Visibility PR ([PR #15484](https://github.com/dotnet/fsharp/pull/15484), [#PR 16427](https://github.com/dotnet/fsharp/pull/15484) * Optimize equality in generic contexts. ([PR #16615](https://github.com/dotnet/fsharp/pull/16615)) * Add a constructor for `MailboxProcessor` with a flag denoting that an exception will be thrown when `Post` is called after the `MailboxProcessor` has been disposed. ([PR #13036](https://github.com/dotnet/fsharp/pull/13036)) +* Support for `!and` in `TaskBuilder` ([LanguageSuggestion #1363](https://github.com/fsharp/fslang-suggestions/issues/1363), [PR #18451](https://github.com/dotnet/fsharp/pull/18451)) ### Fixed diff --git a/src/FSharp.Core/tasks.fs b/src/FSharp.Core/tasks.fs index 27178735a41..f21211ce5e5 100644 --- a/src/FSharp.Core/tasks.fs +++ b/src/FSharp.Core/tasks.fs @@ -447,7 +447,7 @@ module HighPriority = type TaskBuilder with - // This is required for type inference in tasks cases + // This overload is required for type inference in tasks cases member inline this.MergeSources(task1: Task<^TResult1>, task2: Task<^TResult2>) : Task<^TResult1 * ^TResult2> = this.Run( @@ -476,7 +476,7 @@ module MediumPriority = type TaskBuilder with - // This is required for type inference in tasks cases + // This overload is required for type inference in tasks cases member inline this.MergeSources< ^TaskLike2, ^TResult1, ^TResult2, ^Awaiter2 when ^TaskLike2 : (member GetAwaiter: unit -> ^Awaiter2) and ^Awaiter2 :> ICriticalNotifyCompletion @@ -492,7 +492,7 @@ module MediumPriority = ) ) - // This is required for type inference in tasks cases + // This overload is required for type inference in tasks cases member inline this.MergeSources< ^TaskLike1, ^TResult1, ^TResult2, ^Awaiter1 when ^TaskLike1 : (member GetAwaiter: unit -> ^Awaiter1) and ^Awaiter1 :> ICriticalNotifyCompletion @@ -508,3 +508,67 @@ module MediumPriority = ) ) + // This overload is required for type inference in async cases + member inline this.MergeSources(computation1: Async<^TResult1>, computation2: Async<^TResult2>) + : Task<^TResult1 * ^TResult2> = + this.Run( + this.Bind(computation1, fun (result1: ^TResult1) -> + this.Bind(computation2, fun (result2: ^TResult2) -> + this.Return(result1, result2) + ) + ) + ) + + // This overload is required for type inference in async cases + member inline this.MergeSources< ^TaskLike2, ^TResult1, ^TResult2, ^Awaiter2 + when ^TaskLike2 : (member GetAwaiter: unit -> ^Awaiter2) + and ^Awaiter2 :> ICriticalNotifyCompletion + and ^Awaiter2: (member get_IsCompleted: unit -> bool) + and ^Awaiter2: (member GetResult: unit -> 'TResult2)> + (computation: Async<^TResult1>, task: ^TaskLike2) + : Task<^TResult1 * ^TResult2> = + this.Run( + this.Bind(computation, fun (result1: ^TResult1) -> + this.Bind(task, fun (result2: ^TResult2) -> + this.Return(result1, result2) + ) + ) + ) + + // This overload is required for type inference in async cases + member inline this.MergeSources< ^TaskLike1, ^TResult1, ^TResult2, ^Awaiter1 + when ^TaskLike1 : (member GetAwaiter: unit -> ^Awaiter1) + and ^Awaiter1 :> ICriticalNotifyCompletion + and ^Awaiter1: (member get_IsCompleted: unit -> bool) + and ^Awaiter1: (member GetResult: unit -> 'TResult1)> + (task: ^TaskLike1, computation: Async<^TResult2>) + : Task<^TResult1 * ^TResult2> = + this.Run( + this.Bind(task, fun (result1: ^TResult1) -> + this.Bind(computation, fun (result2: ^TResult2) -> + this.Return(result1, result2) + ) + ) + ) + + // This overload is required for type inference in task + async cases + member inline this.MergeSources(task: Task<^TResult1>, computation: Async<^TResult2>) + : Task<^TResult1 * ^TResult2> = + this.Run( + this.Bind(task, fun (result1: ^TResult1) -> + this.Bind(computation, fun (result2: ^TResult2) -> + this.Return(result1, result2) + ) + ) + ) + + // This overload is required for type inference in async + task case + member inline this.MergeSources(computation: Async<^TResult1>, task: Task<^TResult2>) + : Task<^TResult1 * ^TResult2> = + this.Run( + this.Bind(computation, fun (result1: ^TResult1) -> + this.Bind(task, fun (result2: ^TResult2) -> + this.Return(result1, result2) + ) + ) + ) diff --git a/src/FSharp.Core/tasks.fsi b/src/FSharp.Core/tasks.fsi index d177bd9dfaa..82bb7ad0e7a 100644 --- a/src/FSharp.Core/tasks.fsi +++ b/src/FSharp.Core/tasks.fsi @@ -240,6 +240,10 @@ module LowPriority = when 'Resource :> IDisposable | null type TaskBuilder with + + /// + /// Implmentation of the `and!` operation for two task-like values. + /// member inline MergeSources< ^TaskLike1, ^TaskLike2, ^TResult1, ^TResult2, ^Awaiter1, ^Awaiter2> : task1: ^TaskLike1 * task2: ^TaskLike2 -> Task<^TResult1 * ^TResult2> @@ -274,6 +278,9 @@ module MediumPriority = type TaskBuilder with + /// + /// Implmentation of the `and!` operation for a a task and a task-like value. + /// member inline MergeSources< ^TaskLike2, ^TResult1, ^TResult2, ^Awaiter2> : task1: Task<^TResult1> * task2: ^TaskLike2 -> Task<^TResult1 * ^TResult2> @@ -281,7 +288,10 @@ module MediumPriority = and ^Awaiter2 :> ICriticalNotifyCompletion and ^Awaiter2: (member get_IsCompleted: unit -> bool) and ^Awaiter2: (member GetResult: unit -> ^TResult2) - + + /// + /// Implmentation of the `and!` operation for a task-like value and a task. + /// member inline MergeSources< ^TaskLike1, ^TResult1, ^TResult2, ^Awaiter1> : task1: ^TaskLike1 * task2: Task<^TResult2> -> Task<^TResult1 * ^TResult2> @@ -290,6 +300,49 @@ module MediumPriority = and ^Awaiter1: (member get_IsCompleted: unit -> bool) and ^Awaiter1: (member GetResult: unit -> ^TResult1) + /// + /// Implmentation of the `and!` operation for two asyncs. + /// + member inline MergeSources< ^TResult1, ^TResult2> : + computation1: Async<^TResult1> * computation2: Async<^TResult2> -> + Task<^TResult1 * ^TResult2> + + ///// + ///// Implmentation of the `and!` operation for an async and a task-like value. + ///// + //member inline MergeSources< ^TaskLike2, ^TResult1, ^TResult2, ^Awaiter2> : + // computation: Async<^TResult1> * task: ^TaskLike2 -> + // Task<^TResult1 * ^TResult2> + // when ^TaskLike2 : (member GetAwaiter: unit -> ^Awaiter2) + // and ^Awaiter2 :> ICriticalNotifyCompletion + // and ^Awaiter2: (member get_IsCompleted: unit -> bool) + // and ^Awaiter2: (member GetResult: unit -> ^TResult2) + + ///// + ///// Implmentation of the `and!` operation for a task-like value and an async. + ///// + //member inline MergeSources< ^TaskLike1, ^TResult1, ^TResult2, ^Awaiter1> : + // task: ^TaskLike1 * computation: Async<^TResult2> -> + // Task<^TResult1 * ^TResult2> + // when ^TaskLike1 : (member GetAwaiter: unit -> ^Awaiter1) + // and ^Awaiter1 :> ICriticalNotifyCompletion + // and ^Awaiter1: (member get_IsCompleted: unit -> bool) + // and ^Awaiter1: (member GetResult: unit -> ^TResult1) + + /// + /// Implmentation of the `and!` operation for a task and an async. + /// + member inline MergeSources< ^TResult1, ^TResult2> : + task: Task<^TResult1> * computation: Async<^TResult2> -> + Task<^TResult1 * ^TResult2> + + /// + /// Implmentation of the `and!` operation for an async and a task. + /// + member inline MergeSources< ^TResult1, ^TResult2> : + computation: Async<^TResult1> * task: Task<^TResult2> -> + Task<^TResult1 * ^TResult2> + /// /// Contains high-priority overloads for the `task` computation expression builder. /// @@ -318,7 +371,10 @@ module HighPriority = continuation: ('TResult1 -> TaskCode<'TOverall, 'TResult2>) -> bool - type TaskBuilder with + type TaskBuilder with + /// + /// Implmentation of the `and!` operation for two tasks. + /// member inline MergeSources< ^TResult1, ^TResult2> : task1: Task<^TResult1> * task2: Task<^TResult2> -> Task<^TResult1 * ^TResult2> diff --git a/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/Tasks.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/Tasks.fs index 7103661f7a2..daec399dcff 100644 --- a/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/Tasks.fs +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/Tasks.fs @@ -275,6 +275,75 @@ type SmokeTestsForCompilation() = t.Wait() if t.Result <> 6 then failwith "failed" + [] + member _.merge2asyncs() = + task { + let! x = async { return 1 } + and! y = async { return 2 } + return x + y + } + |> fun t -> + t.Wait() + if t.Result <> 3 then failwith "failed" + + [] + member _.merge3asyncs() = + task { + let! x = async { return 1 } + and! y = async { return 2 } + and! z = async { return 3 } + return x + y + z + } + |> fun t -> + t.Wait() + if t.Result <> 6 then failwith "failed" + + //[] + //member _.mergeYieldAndAsync() = + // task { + // let! _ = Task.Yield() + // and! y = async { return 1 } + // return y + // } + // |> fun t -> + // t.Wait() + // if t.Result <> 1 then failwith "failed" + + //[] + //member _.mergeAsyncAndYield() = + // task { + // let! x = async { return 1 } + // and! _ = Task.Yield() + // return x + // } + // |> fun t -> + // t.Wait() + // if t.Result <> 1 then failwith "failed" + + //[] + //member _.mergeYieldAnd2asyncs() = + // task { + // let! _ = Task.Yield() + // and! x = async { return 1 } + // and! y = async { return 2 } + // return x + y + // } + // |> fun t -> + // t.Wait() + // if t.Result <> 3 then failwith "failed" + + //[] + //member _.merge2asyncsAndValueTask() = + // task { + // let! x = async { return 1 } + // and! y = async { return 2 } + // and! z = ValueTask(Task.FromResult(3)) + // return x + y + z + // } + // |> fun t -> + // t.Wait() + // if t.Result <> 6 then failwith "failed" + exception TestException of string [] @@ -388,6 +457,33 @@ type Basics() = require (y = 1) "bailed after exn" require (x = 0) "ran past failure" + [] + member _.testCatchingInApplicative() = + printfn "Running testCatchingInApplicative..." + let mutable x = 0 + let mutable y = 0 + let t = + task { + try + let! _ = task { + do! Task.Delay(100) + x <- 1 + } + and! _ = task { + failtest "hello" + } + () + with + | TestException msg -> + require (msg = "hello") "message tampered" + | _ -> + require false "other exn type" + y <- 1 + } + t.Wait() + require (y = 1) "bailed after exn" + require (x = 1) "exit too early" + [] member _.testNestedCatching() = printfn "Running testNestedCatching..." From 8bab0ec9e77fa3f90607d62f8acd0acbc03f1458 Mon Sep 17 00:00:00 2001 From: Vladimir Shchur Date: Thu, 10 Apr 2025 21:31:22 -0700 Subject: [PATCH 07/16] Final version for taskbuilder --- src/FSharp.Core/fslib-extra-pervasives.fs | 1 + src/FSharp.Core/tasks.fs | 49 +++++----- src/FSharp.Core/tasks.fsi | 48 +++++----- .../Microsoft.FSharp.Control/Tasks.fs | 90 +++++++++---------- 4 files changed, 99 insertions(+), 89 deletions(-) diff --git a/src/FSharp.Core/fslib-extra-pervasives.fs b/src/FSharp.Core/fslib-extra-pervasives.fs index 07a03675937..08d4ee2308b 100644 --- a/src/FSharp.Core/fslib-extra-pervasives.fs +++ b/src/FSharp.Core/fslib-extra-pervasives.fs @@ -325,6 +325,7 @@ module ExtraTopLevelOperators = [] [] [] + [] [] [] [] diff --git a/src/FSharp.Core/tasks.fs b/src/FSharp.Core/tasks.fs index f21211ce5e5..2bd26729968 100644 --- a/src/FSharp.Core/tasks.fs +++ b/src/FSharp.Core/tasks.fs @@ -519,6 +519,33 @@ module MediumPriority = ) ) + // This overload is required for type inference in task + async cases + member inline this.MergeSources(task: Task<^TResult1>, computation: Async<^TResult2>) + : Task<^TResult1 * ^TResult2> = + this.Run( + this.Bind(task, fun (result1: ^TResult1) -> + this.Bind(computation, fun (result2: ^TResult2) -> + this.Return(result1, result2) + ) + ) + ) + + // This overload is required for type inference in async + task case + member inline this.MergeSources(computation: Async<^TResult1>, task: Task<^TResult2>) + : Task<^TResult1 * ^TResult2> = + this.Run( + this.Bind(computation, fun (result1: ^TResult1) -> + this.Bind(task, fun (result2: ^TResult2) -> + this.Return(result1, result2) + ) + ) + ) + +module LowPlusPriority = + open LowPriority + open MediumPriority + + type TaskBuilder with // This overload is required for type inference in async cases member inline this.MergeSources< ^TaskLike2, ^TResult1, ^TResult2, ^Awaiter2 when ^TaskLike2 : (member GetAwaiter: unit -> ^Awaiter2) @@ -550,25 +577,3 @@ module MediumPriority = ) ) ) - - // This overload is required for type inference in task + async cases - member inline this.MergeSources(task: Task<^TResult1>, computation: Async<^TResult2>) - : Task<^TResult1 * ^TResult2> = - this.Run( - this.Bind(task, fun (result1: ^TResult1) -> - this.Bind(computation, fun (result2: ^TResult2) -> - this.Return(result1, result2) - ) - ) - ) - - // This overload is required for type inference in async + task case - member inline this.MergeSources(computation: Async<^TResult1>, task: Task<^TResult2>) - : Task<^TResult1 * ^TResult2> = - this.Run( - this.Bind(computation, fun (result1: ^TResult1) -> - this.Bind(task, fun (result2: ^TResult2) -> - this.Return(result1, result2) - ) - ) - ) diff --git a/src/FSharp.Core/tasks.fsi b/src/FSharp.Core/tasks.fsi index 82bb7ad0e7a..10fc9610ba1 100644 --- a/src/FSharp.Core/tasks.fsi +++ b/src/FSharp.Core/tasks.fsi @@ -307,28 +307,6 @@ module MediumPriority = computation1: Async<^TResult1> * computation2: Async<^TResult2> -> Task<^TResult1 * ^TResult2> - ///// - ///// Implmentation of the `and!` operation for an async and a task-like value. - ///// - //member inline MergeSources< ^TaskLike2, ^TResult1, ^TResult2, ^Awaiter2> : - // computation: Async<^TResult1> * task: ^TaskLike2 -> - // Task<^TResult1 * ^TResult2> - // when ^TaskLike2 : (member GetAwaiter: unit -> ^Awaiter2) - // and ^Awaiter2 :> ICriticalNotifyCompletion - // and ^Awaiter2: (member get_IsCompleted: unit -> bool) - // and ^Awaiter2: (member GetResult: unit -> ^TResult2) - - ///// - ///// Implmentation of the `and!` operation for a task-like value and an async. - ///// - //member inline MergeSources< ^TaskLike1, ^TResult1, ^TResult2, ^Awaiter1> : - // task: ^TaskLike1 * computation: Async<^TResult2> -> - // Task<^TResult1 * ^TResult2> - // when ^TaskLike1 : (member GetAwaiter: unit -> ^Awaiter1) - // and ^Awaiter1 :> ICriticalNotifyCompletion - // and ^Awaiter1: (member get_IsCompleted: unit -> bool) - // and ^Awaiter1: (member GetResult: unit -> ^TResult1) - /// /// Implmentation of the `and!` operation for a task and an async. /// @@ -343,6 +321,32 @@ module MediumPriority = computation: Async<^TResult1> * task: Task<^TResult2> -> Task<^TResult1 * ^TResult2> +module LowPlusPriority = + + type TaskBuilder with + + /// + /// Implmentation of the `and!` operation for an async and a task-like value. + /// + member inline MergeSources< ^TaskLike2, ^TResult1, ^TResult2, ^Awaiter2> : + computation: Async<^TResult1> * task: ^TaskLike2 -> + Task<^TResult1 * ^TResult2> + when ^TaskLike2 : (member GetAwaiter: unit -> ^Awaiter2) + and ^Awaiter2 :> ICriticalNotifyCompletion + and ^Awaiter2: (member get_IsCompleted: unit -> bool) + and ^Awaiter2: (member GetResult: unit -> ^TResult2) + + /// + /// Implmentation of the `and!` operation for a task-like value and an async. + /// + member inline MergeSources< ^TaskLike1, ^TResult1, ^TResult2, ^Awaiter1> : + task: ^TaskLike1 * computation: Async<^TResult2> -> + Task<^TResult1 * ^TResult2> + when ^TaskLike1 : (member GetAwaiter: unit -> ^Awaiter1) + and ^Awaiter1 :> ICriticalNotifyCompletion + and ^Awaiter1: (member get_IsCompleted: unit -> bool) + and ^Awaiter1: (member GetResult: unit -> ^TResult1) + /// /// Contains high-priority overloads for the `task` computation expression builder. /// diff --git a/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/Tasks.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/Tasks.fs index daec399dcff..82d00c8e52d 100644 --- a/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/Tasks.fs +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/Tasks.fs @@ -298,51 +298,51 @@ type SmokeTestsForCompilation() = t.Wait() if t.Result <> 6 then failwith "failed" - //[] - //member _.mergeYieldAndAsync() = - // task { - // let! _ = Task.Yield() - // and! y = async { return 1 } - // return y - // } - // |> fun t -> - // t.Wait() - // if t.Result <> 1 then failwith "failed" - - //[] - //member _.mergeAsyncAndYield() = - // task { - // let! x = async { return 1 } - // and! _ = Task.Yield() - // return x - // } - // |> fun t -> - // t.Wait() - // if t.Result <> 1 then failwith "failed" - - //[] - //member _.mergeYieldAnd2asyncs() = - // task { - // let! _ = Task.Yield() - // and! x = async { return 1 } - // and! y = async { return 2 } - // return x + y - // } - // |> fun t -> - // t.Wait() - // if t.Result <> 3 then failwith "failed" - - //[] - //member _.merge2asyncsAndValueTask() = - // task { - // let! x = async { return 1 } - // and! y = async { return 2 } - // and! z = ValueTask(Task.FromResult(3)) - // return x + y + z - // } - // |> fun t -> - // t.Wait() - // if t.Result <> 6 then failwith "failed" + [] + member _.mergeYieldAndAsync() = + task { + let! _ = Task.Yield() + and! y = async { return 1 } + return y + } + |> fun t -> + t.Wait() + if t.Result <> 1 then failwith "failed" + + [] + member _.mergeAsyncAndYield() = + task { + let! x = async { return 1 } + and! _ = Task.Yield() + return x + } + |> fun t -> + t.Wait() + if t.Result <> 1 then failwith "failed" + + [] + member _.mergeYieldAnd2asyncs() = + task { + let! _ = Task.Yield() + and! x = async { return 1 } + and! y = async { return 2 } + return x + y + } + |> fun t -> + t.Wait() + if t.Result <> 3 then failwith "failed" + + [] + member _.merge2asyncsAndValueTask() = + task { + let! x = async { return 1 } + and! y = async { return 2 } + and! z = ValueTask(Task.FromResult(3)) + return x + y + z + } + |> fun t -> + t.Wait() + if t.Result <> 6 then failwith "failed" exception TestException of string From 0237e63ffc18f0af5bdc3b310606d1ebaa9a2dd0 Mon Sep 17 00:00:00 2001 From: Vladimir Shchur Date: Thu, 10 Apr 2025 21:52:51 -0700 Subject: [PATCH 08/16] Added BackgroundTaskBuilder and tests --- src/FSharp.Core/tasks.fs | 138 +++++++++++++++++- src/FSharp.Core/tasks.fsi | 115 +++++++++++++-- .../Microsoft.FSharp.Control/Tasks.fs | 12 ++ 3 files changed, 251 insertions(+), 14 deletions(-) diff --git a/src/FSharp.Core/tasks.fs b/src/FSharp.Core/tasks.fs index 2bd26729968..a232263a5c9 100644 --- a/src/FSharp.Core/tasks.fs +++ b/src/FSharp.Core/tasks.fs @@ -390,6 +390,26 @@ module LowPriority = ) ) + type BackgroundTaskBuilder with + member inline this.MergeSources< ^TaskLike1, ^TaskLike2, ^TResult1, ^TResult2, ^Awaiter1, ^Awaiter2 + when ^TaskLike1: (member GetAwaiter: unit -> ^Awaiter1) + and ^TaskLike2 : (member GetAwaiter: unit -> ^Awaiter2) + and ^Awaiter1 :> ICriticalNotifyCompletion + and ^Awaiter2 :> ICriticalNotifyCompletion + and ^Awaiter1: (member get_IsCompleted: unit -> bool) + and ^Awaiter1: (member GetResult: unit -> ^TResult1) + and ^Awaiter2: (member get_IsCompleted: unit -> bool) + and ^Awaiter2: (member GetResult: unit -> ^TResult2)> + (task1: ^TaskLike1, task2: ^TaskLike2) + : Task<^TResult1 * ^TResult2> = + this.Run( + this.Bind(task1, fun (result1: ^TResult1) -> + this.Bind(task2, fun (result2: ^TResult2) -> + this.Return(result1, result2) + ) + ) + ) + module HighPriority = // High priority extensions @@ -446,7 +466,20 @@ module HighPriority = this.Bind(task, this.Return) type TaskBuilder with - + + // This overload is required for type inference in tasks cases + member inline this.MergeSources(task1: Task<^TResult1>, task2: Task<^TResult2>) + : Task<^TResult1 * ^TResult2> = + this.Run( + this.Bind(task1, fun (result1: ^TResult1) -> + this.Bind(task2, fun (result2: ^TResult2) -> + this.Return(result1, result2) + ) + ) + ) + + type BackgroundTaskBuilder with + // This overload is required for type inference in tasks cases member inline this.MergeSources(task1: Task<^TResult1>, task2: Task<^TResult2>) : Task<^TResult1 * ^TResult2> = @@ -473,8 +506,74 @@ module MediumPriority = member inline this.ReturnFrom(computation: Async<'T>) : TaskCode<'T, 'T> = this.ReturnFrom(Async.StartImmediateAsTask computation) - type TaskBuilder with + + // This overload is required for type inference in tasks cases + member inline this.MergeSources< ^TaskLike2, ^TResult1, ^TResult2, ^Awaiter2 + when ^TaskLike2 : (member GetAwaiter: unit -> ^Awaiter2) + and ^Awaiter2 :> ICriticalNotifyCompletion + and ^Awaiter2: (member get_IsCompleted: unit -> bool) + and ^Awaiter2: (member GetResult: unit -> 'TResult2)> + (task1: Task<^TResult1>, task2: ^TaskLike2) + : Task<^TResult1 * ^TResult2> = + this.Run( + this.Bind(task1, fun (result1: ^TResult1) -> + this.Bind(task2, fun (result2: ^TResult2) -> + this.Return(result1, result2) + ) + ) + ) + + // This overload is required for type inference in tasks cases + member inline this.MergeSources< ^TaskLike1, ^TResult1, ^TResult2, ^Awaiter1 + when ^TaskLike1 : (member GetAwaiter: unit -> ^Awaiter1) + and ^Awaiter1 :> ICriticalNotifyCompletion + and ^Awaiter1: (member get_IsCompleted: unit -> bool) + and ^Awaiter1: (member GetResult: unit -> 'TResult1)> + (task1: ^TaskLike1, task2: Task<^TResult2>) + : Task<^TResult1 * ^TResult2> = + this.Run( + this.Bind(task1, fun (result1: ^TResult1) -> + this.Bind(task2, fun (result2: ^TResult2) -> + this.Return(result1, result2) + ) + ) + ) + + // This overload is required for type inference in async cases + member inline this.MergeSources(computation1: Async<^TResult1>, computation2: Async<^TResult2>) + : Task<^TResult1 * ^TResult2> = + this.Run( + this.Bind(computation1, fun (result1: ^TResult1) -> + this.Bind(computation2, fun (result2: ^TResult2) -> + this.Return(result1, result2) + ) + ) + ) + + // This overload is required for type inference in task + async cases + member inline this.MergeSources(task: Task<^TResult1>, computation: Async<^TResult2>) + : Task<^TResult1 * ^TResult2> = + this.Run( + this.Bind(task, fun (result1: ^TResult1) -> + this.Bind(computation, fun (result2: ^TResult2) -> + this.Return(result1, result2) + ) + ) + ) + + // This overload is required for type inference in async + task case + member inline this.MergeSources(computation: Async<^TResult1>, task: Task<^TResult2>) + : Task<^TResult1 * ^TResult2> = + this.Run( + this.Bind(computation, fun (result1: ^TResult1) -> + this.Bind(task, fun (result2: ^TResult2) -> + this.Return(result1, result2) + ) + ) + ) + + type BackgroundTaskBuilder with // This overload is required for type inference in tasks cases member inline this.MergeSources< ^TaskLike2, ^TResult1, ^TResult2, ^Awaiter2 @@ -491,7 +590,7 @@ module MediumPriority = ) ) ) - + // This overload is required for type inference in tasks cases member inline this.MergeSources< ^TaskLike1, ^TResult1, ^TResult2, ^Awaiter1 when ^TaskLike1 : (member GetAwaiter: unit -> ^Awaiter1) @@ -577,3 +676,36 @@ module LowPlusPriority = ) ) ) + + type BackgroundTaskBuilder with + // This overload is required for type inference in async cases + member inline this.MergeSources< ^TaskLike2, ^TResult1, ^TResult2, ^Awaiter2 + when ^TaskLike2 : (member GetAwaiter: unit -> ^Awaiter2) + and ^Awaiter2 :> ICriticalNotifyCompletion + and ^Awaiter2: (member get_IsCompleted: unit -> bool) + and ^Awaiter2: (member GetResult: unit -> 'TResult2)> + (computation: Async<^TResult1>, task: ^TaskLike2) + : Task<^TResult1 * ^TResult2> = + this.Run( + this.Bind(computation, fun (result1: ^TResult1) -> + this.Bind(task, fun (result2: ^TResult2) -> + this.Return(result1, result2) + ) + ) + ) + + // This overload is required for type inference in async cases + member inline this.MergeSources< ^TaskLike1, ^TResult1, ^TResult2, ^Awaiter1 + when ^TaskLike1 : (member GetAwaiter: unit -> ^Awaiter1) + and ^Awaiter1 :> ICriticalNotifyCompletion + and ^Awaiter1: (member get_IsCompleted: unit -> bool) + and ^Awaiter1: (member GetResult: unit -> 'TResult1)> + (task: ^TaskLike1, computation: Async<^TResult2>) + : Task<^TResult1 * ^TResult2> = + this.Run( + this.Bind(task, fun (result1: ^TResult1) -> + this.Bind(computation, fun (result2: ^TResult2) -> + this.Return(result1, result2) + ) + ) + ) diff --git a/src/FSharp.Core/tasks.fsi b/src/FSharp.Core/tasks.fsi index 10fc9610ba1..6bb50459ec8 100644 --- a/src/FSharp.Core/tasks.fsi +++ b/src/FSharp.Core/tasks.fsi @@ -256,6 +256,73 @@ module LowPriority = and ^Awaiter2: (member get_IsCompleted: unit -> bool) and ^Awaiter2: (member GetResult: unit -> ^TResult2) + type BackgroundTaskBuilder with + + /// + /// Implmentation of the `and!` operation for two task-like values. + /// + member inline MergeSources< ^TaskLike1, ^TaskLike2, ^TResult1, ^TResult2, ^Awaiter1, ^Awaiter2> : + task1: ^TaskLike1 * task2: ^TaskLike2 -> + Task<^TResult1 * ^TResult2> + when ^TaskLike1: (member GetAwaiter: unit -> ^Awaiter1) + and ^TaskLike2 : (member GetAwaiter: unit -> ^Awaiter2) + and ^Awaiter1 :> ICriticalNotifyCompletion + and ^Awaiter2 :> ICriticalNotifyCompletion + and ^Awaiter1: (member get_IsCompleted: unit -> bool) + and ^Awaiter1: (member GetResult: unit -> ^TResult1) + and ^Awaiter2: (member get_IsCompleted: unit -> bool) + and ^Awaiter2: (member GetResult: unit -> ^TResult2) + +module LowPlusPriority = + + type TaskBuilder with + + /// + /// Implmentation of the `and!` operation for an async and a task-like value. + /// + member inline MergeSources< ^TaskLike2, ^TResult1, ^TResult2, ^Awaiter2> : + computation: Async<^TResult1> * task: ^TaskLike2 -> + Task<^TResult1 * ^TResult2> + when ^TaskLike2 : (member GetAwaiter: unit -> ^Awaiter2) + and ^Awaiter2 :> ICriticalNotifyCompletion + and ^Awaiter2: (member get_IsCompleted: unit -> bool) + and ^Awaiter2: (member GetResult: unit -> ^TResult2) + + /// + /// Implmentation of the `and!` operation for a task-like value and an async. + /// + member inline MergeSources< ^TaskLike1, ^TResult1, ^TResult2, ^Awaiter1> : + task: ^TaskLike1 * computation: Async<^TResult2> -> + Task<^TResult1 * ^TResult2> + when ^TaskLike1 : (member GetAwaiter: unit -> ^Awaiter1) + and ^Awaiter1 :> ICriticalNotifyCompletion + and ^Awaiter1: (member get_IsCompleted: unit -> bool) + and ^Awaiter1: (member GetResult: unit -> ^TResult1) + + type BackgroundTaskBuilder with + + /// + /// Implmentation of the `and!` operation for an async and a task-like value. + /// + member inline MergeSources< ^TaskLike2, ^TResult1, ^TResult2, ^Awaiter2> : + computation: Async<^TResult1> * task: ^TaskLike2 -> + Task<^TResult1 * ^TResult2> + when ^TaskLike2 : (member GetAwaiter: unit -> ^Awaiter2) + and ^Awaiter2 :> ICriticalNotifyCompletion + and ^Awaiter2: (member get_IsCompleted: unit -> bool) + and ^Awaiter2: (member GetResult: unit -> ^TResult2) + + /// + /// Implmentation of the `and!` operation for a task-like value and an async. + /// + member inline MergeSources< ^TaskLike1, ^TResult1, ^TResult2, ^Awaiter1> : + task: ^TaskLike1 * computation: Async<^TResult2> -> + Task<^TResult1 * ^TResult2> + when ^TaskLike1 : (member GetAwaiter: unit -> ^Awaiter1) + and ^Awaiter1 :> ICriticalNotifyCompletion + and ^Awaiter1: (member get_IsCompleted: unit -> bool) + and ^Awaiter1: (member GetResult: unit -> ^TResult1) + /// /// Contains medium-priority overloads for the `task` computation expression builder. /// @@ -275,7 +342,6 @@ module MediumPriority = /// member inline ReturnFrom: computation: Async<'T> -> TaskCode<'T, 'T> - type TaskBuilder with /// @@ -288,7 +354,7 @@ module MediumPriority = and ^Awaiter2 :> ICriticalNotifyCompletion and ^Awaiter2: (member get_IsCompleted: unit -> bool) and ^Awaiter2: (member GetResult: unit -> ^TResult2) - + /// /// Implmentation of the `and!` operation for a task-like value and a task. /// @@ -321,32 +387,51 @@ module MediumPriority = computation: Async<^TResult1> * task: Task<^TResult2> -> Task<^TResult1 * ^TResult2> -module LowPlusPriority = - - type TaskBuilder with - + type BackgroundTaskBuilder with + /// - /// Implmentation of the `and!` operation for an async and a task-like value. + /// Implmentation of the `and!` operation for a a task and a task-like value. /// member inline MergeSources< ^TaskLike2, ^TResult1, ^TResult2, ^Awaiter2> : - computation: Async<^TResult1> * task: ^TaskLike2 -> + task1: Task<^TResult1> * task2: ^TaskLike2 -> Task<^TResult1 * ^TResult2> when ^TaskLike2 : (member GetAwaiter: unit -> ^Awaiter2) and ^Awaiter2 :> ICriticalNotifyCompletion and ^Awaiter2: (member get_IsCompleted: unit -> bool) and ^Awaiter2: (member GetResult: unit -> ^TResult2) - + /// - /// Implmentation of the `and!` operation for a task-like value and an async. + /// Implmentation of the `and!` operation for a task-like value and a task. /// member inline MergeSources< ^TaskLike1, ^TResult1, ^TResult2, ^Awaiter1> : - task: ^TaskLike1 * computation: Async<^TResult2> -> + task1: ^TaskLike1 * task2: Task<^TResult2> -> Task<^TResult1 * ^TResult2> when ^TaskLike1 : (member GetAwaiter: unit -> ^Awaiter1) and ^Awaiter1 :> ICriticalNotifyCompletion and ^Awaiter1: (member get_IsCompleted: unit -> bool) and ^Awaiter1: (member GetResult: unit -> ^TResult1) + /// + /// Implmentation of the `and!` operation for two asyncs. + /// + member inline MergeSources< ^TResult1, ^TResult2> : + computation1: Async<^TResult1> * computation2: Async<^TResult2> -> + Task<^TResult1 * ^TResult2> + + /// + /// Implmentation of the `and!` operation for a task and an async. + /// + member inline MergeSources< ^TResult1, ^TResult2> : + task: Task<^TResult1> * computation: Async<^TResult2> -> + Task<^TResult1 * ^TResult2> + + /// + /// Implmentation of the `and!` operation for an async and a task. + /// + member inline MergeSources< ^TResult1, ^TResult2> : + computation: Async<^TResult1> * task: Task<^TResult2> -> + Task<^TResult1 * ^TResult2> + /// /// Contains high-priority overloads for the `task` computation expression builder. /// @@ -382,3 +467,11 @@ module HighPriority = member inline MergeSources< ^TResult1, ^TResult2> : task1: Task<^TResult1> * task2: Task<^TResult2> -> Task<^TResult1 * ^TResult2> + + type BackgroundTaskBuilder with + /// + /// Implmentation of the `and!` operation for two tasks. + /// + member inline MergeSources< ^TResult1, ^TResult2> : + task1: Task<^TResult1> * task2: Task<^TResult2> -> + Task<^TResult1 * ^TResult2> diff --git a/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/Tasks.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/Tasks.fs index 82d00c8e52d..f60a3562f75 100644 --- a/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/Tasks.fs +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/Tasks.fs @@ -344,6 +344,18 @@ type SmokeTestsForCompilation() = t.Wait() if t.Result <> 6 then failwith "failed" + [] + member _.mergeBackgroundTask() = + backgroundTask { + let! x = async { return 1 } + and! y = task { return 2 } + and! z = ValueTask(Task.FromResult(3)) + return x + y + z + } + |> fun t -> + t.Wait() + if t.Result <> 6 then failwith "failed" + exception TestException of string [] From 870afc4c5167ba269907fda32b4a912c9858aa5a Mon Sep 17 00:00:00 2001 From: Vladimir Shchur Date: Thu, 10 Apr 2025 22:01:11 -0700 Subject: [PATCH 09/16] Fantomas formatting --- src/FSharp.Core/tasks.fs | 294 ++++++++++++++++++++------------------ src/FSharp.Core/tasks.fsi | 78 ++++------ 2 files changed, 181 insertions(+), 191 deletions(-) diff --git a/src/FSharp.Core/tasks.fs b/src/FSharp.Core/tasks.fs index a232263a5c9..94081c7fb90 100644 --- a/src/FSharp.Core/tasks.fs +++ b/src/FSharp.Core/tasks.fs @@ -370,10 +370,10 @@ module LowPriority = = ResumableCode.Using(resource, body) - type TaskBuilder with + type TaskBuilder with member inline this.MergeSources< ^TaskLike1, ^TaskLike2, ^TResult1, ^TResult2, ^Awaiter1, ^Awaiter2 when ^TaskLike1: (member GetAwaiter: unit -> ^Awaiter1) - and ^TaskLike2 : (member GetAwaiter: unit -> ^Awaiter2) + and ^TaskLike2: (member GetAwaiter: unit -> ^Awaiter2) and ^Awaiter1 :> ICriticalNotifyCompletion and ^Awaiter2 :> ICriticalNotifyCompletion and ^Awaiter1: (member get_IsCompleted: unit -> bool) @@ -383,17 +383,17 @@ module LowPriority = (task1: ^TaskLike1, task2: ^TaskLike2) : Task<^TResult1 * ^TResult2> = this.Run( - this.Bind(task1, fun (result1: ^TResult1) -> - this.Bind(task2, fun (result2: ^TResult2) -> - this.Return(result1, result2) - ) + this.Bind( + task1, + fun (result1: ^TResult1) -> + this.Bind(task2, fun (result2: ^TResult2) -> this.Return(result1, result2)) ) ) - type BackgroundTaskBuilder with + type BackgroundTaskBuilder with member inline this.MergeSources< ^TaskLike1, ^TaskLike2, ^TResult1, ^TResult2, ^Awaiter1, ^Awaiter2 when ^TaskLike1: (member GetAwaiter: unit -> ^Awaiter1) - and ^TaskLike2 : (member GetAwaiter: unit -> ^Awaiter2) + and ^TaskLike2: (member GetAwaiter: unit -> ^Awaiter2) and ^Awaiter1 :> ICriticalNotifyCompletion and ^Awaiter2 :> ICriticalNotifyCompletion and ^Awaiter1: (member get_IsCompleted: unit -> bool) @@ -403,10 +403,10 @@ module LowPriority = (task1: ^TaskLike1, task2: ^TaskLike2) : Task<^TResult1 * ^TResult2> = this.Run( - this.Bind(task1, fun (result1: ^TResult1) -> - this.Bind(task2, fun (result2: ^TResult2) -> - this.Return(result1, result2) - ) + this.Bind( + task1, + fun (result1: ^TResult1) -> + this.Bind(task2, fun (result2: ^TResult2) -> this.Return(result1, result2)) ) ) @@ -468,26 +468,28 @@ module HighPriority = type TaskBuilder with // This overload is required for type inference in tasks cases - member inline this.MergeSources(task1: Task<^TResult1>, task2: Task<^TResult2>) - : Task<^TResult1 * ^TResult2> = + member inline this.MergeSources + (task1: Task< ^TResult1 >, task2: Task< ^TResult2 >) + : Task<^TResult1 * ^TResult2> = this.Run( - this.Bind(task1, fun (result1: ^TResult1) -> - this.Bind(task2, fun (result2: ^TResult2) -> - this.Return(result1, result2) - ) + this.Bind( + task1, + fun (result1: ^TResult1) -> + this.Bind(task2, fun (result2: ^TResult2) -> this.Return(result1, result2)) ) ) type BackgroundTaskBuilder with // This overload is required for type inference in tasks cases - member inline this.MergeSources(task1: Task<^TResult1>, task2: Task<^TResult2>) - : Task<^TResult1 * ^TResult2> = + member inline this.MergeSources + (task1: Task< ^TResult1 >, task2: Task< ^TResult2 >) + : Task<^TResult1 * ^TResult2> = this.Run( - this.Bind(task1, fun (result1: ^TResult1) -> - this.Bind(task2, fun (result2: ^TResult2) -> - this.Return(result1, result2) - ) + this.Bind( + task1, + fun (result1: ^TResult1) -> + this.Bind(task2, fun (result2: ^TResult2) -> this.Return(result1, result2)) ) ) @@ -510,202 +512,208 @@ module MediumPriority = // This overload is required for type inference in tasks cases member inline this.MergeSources< ^TaskLike2, ^TResult1, ^TResult2, ^Awaiter2 - when ^TaskLike2 : (member GetAwaiter: unit -> ^Awaiter2) - and ^Awaiter2 :> ICriticalNotifyCompletion - and ^Awaiter2: (member get_IsCompleted: unit -> bool) - and ^Awaiter2: (member GetResult: unit -> 'TResult2)> - (task1: Task<^TResult1>, task2: ^TaskLike2) - : Task<^TResult1 * ^TResult2> = + when ^TaskLike2: (member GetAwaiter: unit -> ^Awaiter2) + and ^Awaiter2 :> ICriticalNotifyCompletion + and ^Awaiter2: (member get_IsCompleted: unit -> bool) + and ^Awaiter2: (member GetResult: unit -> 'TResult2)> + (task1: Task< ^TResult1 >, task2: ^TaskLike2) + : Task<^TResult1 * ^TResult2> = this.Run( - this.Bind(task1, fun (result1: ^TResult1) -> - this.Bind(task2, fun (result2: ^TResult2) -> - this.Return(result1, result2) - ) + this.Bind( + task1, + fun (result1: ^TResult1) -> + this.Bind(task2, fun (result2: ^TResult2) -> this.Return(result1, result2)) ) ) // This overload is required for type inference in tasks cases member inline this.MergeSources< ^TaskLike1, ^TResult1, ^TResult2, ^Awaiter1 - when ^TaskLike1 : (member GetAwaiter: unit -> ^Awaiter1) - and ^Awaiter1 :> ICriticalNotifyCompletion - and ^Awaiter1: (member get_IsCompleted: unit -> bool) - and ^Awaiter1: (member GetResult: unit -> 'TResult1)> - (task1: ^TaskLike1, task2: Task<^TResult2>) - : Task<^TResult1 * ^TResult2> = + when ^TaskLike1: (member GetAwaiter: unit -> ^Awaiter1) + and ^Awaiter1 :> ICriticalNotifyCompletion + and ^Awaiter1: (member get_IsCompleted: unit -> bool) + and ^Awaiter1: (member GetResult: unit -> 'TResult1)> + (task1: ^TaskLike1, task2: Task< ^TResult2 >) + : Task<^TResult1 * ^TResult2> = this.Run( - this.Bind(task1, fun (result1: ^TResult1) -> - this.Bind(task2, fun (result2: ^TResult2) -> - this.Return(result1, result2) - ) + this.Bind( + task1, + fun (result1: ^TResult1) -> + this.Bind(task2, fun (result2: ^TResult2) -> this.Return(result1, result2)) ) ) // This overload is required for type inference in async cases - member inline this.MergeSources(computation1: Async<^TResult1>, computation2: Async<^TResult2>) - : Task<^TResult1 * ^TResult2> = + member inline this.MergeSources + (computation1: Async< ^TResult1 >, computation2: Async< ^TResult2 >) + : Task<^TResult1 * ^TResult2> = this.Run( - this.Bind(computation1, fun (result1: ^TResult1) -> - this.Bind(computation2, fun (result2: ^TResult2) -> - this.Return(result1, result2) - ) + this.Bind( + computation1, + fun (result1: ^TResult1) -> + this.Bind(computation2, fun (result2: ^TResult2) -> this.Return(result1, result2)) ) ) // This overload is required for type inference in task + async cases - member inline this.MergeSources(task: Task<^TResult1>, computation: Async<^TResult2>) - : Task<^TResult1 * ^TResult2> = + member inline this.MergeSources + (task: Task< ^TResult1 >, computation: Async< ^TResult2 >) + : Task<^TResult1 * ^TResult2> = this.Run( - this.Bind(task, fun (result1: ^TResult1) -> - this.Bind(computation, fun (result2: ^TResult2) -> - this.Return(result1, result2) - ) + this.Bind( + task, + fun (result1: ^TResult1) -> + this.Bind(computation, fun (result2: ^TResult2) -> this.Return(result1, result2)) ) ) // This overload is required for type inference in async + task case - member inline this.MergeSources(computation: Async<^TResult1>, task: Task<^TResult2>) - : Task<^TResult1 * ^TResult2> = + member inline this.MergeSources + (computation: Async< ^TResult1 >, task: Task< ^TResult2 >) + : Task<^TResult1 * ^TResult2> = this.Run( - this.Bind(computation, fun (result1: ^TResult1) -> - this.Bind(task, fun (result2: ^TResult2) -> - this.Return(result1, result2) - ) + this.Bind( + computation, + fun (result1: ^TResult1) -> + this.Bind(task, fun (result2: ^TResult2) -> this.Return(result1, result2)) ) ) type BackgroundTaskBuilder with - + // This overload is required for type inference in tasks cases member inline this.MergeSources< ^TaskLike2, ^TResult1, ^TResult2, ^Awaiter2 - when ^TaskLike2 : (member GetAwaiter: unit -> ^Awaiter2) - and ^Awaiter2 :> ICriticalNotifyCompletion - and ^Awaiter2: (member get_IsCompleted: unit -> bool) - and ^Awaiter2: (member GetResult: unit -> 'TResult2)> - (task1: Task<^TResult1>, task2: ^TaskLike2) - : Task<^TResult1 * ^TResult2> = + when ^TaskLike2: (member GetAwaiter: unit -> ^Awaiter2) + and ^Awaiter2 :> ICriticalNotifyCompletion + and ^Awaiter2: (member get_IsCompleted: unit -> bool) + and ^Awaiter2: (member GetResult: unit -> 'TResult2)> + (task1: Task< ^TResult1 >, task2: ^TaskLike2) + : Task<^TResult1 * ^TResult2> = this.Run( - this.Bind(task1, fun (result1: ^TResult1) -> - this.Bind(task2, fun (result2: ^TResult2) -> - this.Return(result1, result2) - ) + this.Bind( + task1, + fun (result1: ^TResult1) -> + this.Bind(task2, fun (result2: ^TResult2) -> this.Return(result1, result2)) ) ) // This overload is required for type inference in tasks cases member inline this.MergeSources< ^TaskLike1, ^TResult1, ^TResult2, ^Awaiter1 - when ^TaskLike1 : (member GetAwaiter: unit -> ^Awaiter1) - and ^Awaiter1 :> ICriticalNotifyCompletion - and ^Awaiter1: (member get_IsCompleted: unit -> bool) - and ^Awaiter1: (member GetResult: unit -> 'TResult1)> - (task1: ^TaskLike1, task2: Task<^TResult2>) - : Task<^TResult1 * ^TResult2> = + when ^TaskLike1: (member GetAwaiter: unit -> ^Awaiter1) + and ^Awaiter1 :> ICriticalNotifyCompletion + and ^Awaiter1: (member get_IsCompleted: unit -> bool) + and ^Awaiter1: (member GetResult: unit -> 'TResult1)> + (task1: ^TaskLike1, task2: Task< ^TResult2 >) + : Task<^TResult1 * ^TResult2> = this.Run( - this.Bind(task1, fun (result1: ^TResult1) -> - this.Bind(task2, fun (result2: ^TResult2) -> - this.Return(result1, result2) - ) + this.Bind( + task1, + fun (result1: ^TResult1) -> + this.Bind(task2, fun (result2: ^TResult2) -> this.Return(result1, result2)) ) ) // This overload is required for type inference in async cases - member inline this.MergeSources(computation1: Async<^TResult1>, computation2: Async<^TResult2>) - : Task<^TResult1 * ^TResult2> = + member inline this.MergeSources + (computation1: Async< ^TResult1 >, computation2: Async< ^TResult2 >) + : Task<^TResult1 * ^TResult2> = this.Run( - this.Bind(computation1, fun (result1: ^TResult1) -> - this.Bind(computation2, fun (result2: ^TResult2) -> - this.Return(result1, result2) - ) + this.Bind( + computation1, + fun (result1: ^TResult1) -> + this.Bind(computation2, fun (result2: ^TResult2) -> this.Return(result1, result2)) ) ) // This overload is required for type inference in task + async cases - member inline this.MergeSources(task: Task<^TResult1>, computation: Async<^TResult2>) - : Task<^TResult1 * ^TResult2> = + member inline this.MergeSources + (task: Task< ^TResult1 >, computation: Async< ^TResult2 >) + : Task<^TResult1 * ^TResult2> = this.Run( - this.Bind(task, fun (result1: ^TResult1) -> - this.Bind(computation, fun (result2: ^TResult2) -> - this.Return(result1, result2) - ) + this.Bind( + task, + fun (result1: ^TResult1) -> + this.Bind(computation, fun (result2: ^TResult2) -> this.Return(result1, result2)) ) ) // This overload is required for type inference in async + task case - member inline this.MergeSources(computation: Async<^TResult1>, task: Task<^TResult2>) - : Task<^TResult1 * ^TResult2> = + member inline this.MergeSources + (computation: Async< ^TResult1 >, task: Task< ^TResult2 >) + : Task<^TResult1 * ^TResult2> = this.Run( - this.Bind(computation, fun (result1: ^TResult1) -> - this.Bind(task, fun (result2: ^TResult2) -> - this.Return(result1, result2) - ) + this.Bind( + computation, + fun (result1: ^TResult1) -> + this.Bind(task, fun (result2: ^TResult2) -> this.Return(result1, result2)) ) ) module LowPlusPriority = open LowPriority open MediumPriority - + type TaskBuilder with // This overload is required for type inference in async cases member inline this.MergeSources< ^TaskLike2, ^TResult1, ^TResult2, ^Awaiter2 - when ^TaskLike2 : (member GetAwaiter: unit -> ^Awaiter2) - and ^Awaiter2 :> ICriticalNotifyCompletion - and ^Awaiter2: (member get_IsCompleted: unit -> bool) - and ^Awaiter2: (member GetResult: unit -> 'TResult2)> - (computation: Async<^TResult1>, task: ^TaskLike2) - : Task<^TResult1 * ^TResult2> = + when ^TaskLike2: (member GetAwaiter: unit -> ^Awaiter2) + and ^Awaiter2 :> ICriticalNotifyCompletion + and ^Awaiter2: (member get_IsCompleted: unit -> bool) + and ^Awaiter2: (member GetResult: unit -> 'TResult2)> + (computation: Async< ^TResult1 >, task: ^TaskLike2) + : Task<^TResult1 * ^TResult2> = this.Run( - this.Bind(computation, fun (result1: ^TResult1) -> - this.Bind(task, fun (result2: ^TResult2) -> - this.Return(result1, result2) - ) + this.Bind( + computation, + fun (result1: ^TResult1) -> + this.Bind(task, fun (result2: ^TResult2) -> this.Return(result1, result2)) ) ) - + // This overload is required for type inference in async cases member inline this.MergeSources< ^TaskLike1, ^TResult1, ^TResult2, ^Awaiter1 - when ^TaskLike1 : (member GetAwaiter: unit -> ^Awaiter1) - and ^Awaiter1 :> ICriticalNotifyCompletion - and ^Awaiter1: (member get_IsCompleted: unit -> bool) - and ^Awaiter1: (member GetResult: unit -> 'TResult1)> - (task: ^TaskLike1, computation: Async<^TResult2>) - : Task<^TResult1 * ^TResult2> = + when ^TaskLike1: (member GetAwaiter: unit -> ^Awaiter1) + and ^Awaiter1 :> ICriticalNotifyCompletion + and ^Awaiter1: (member get_IsCompleted: unit -> bool) + and ^Awaiter1: (member GetResult: unit -> 'TResult1)> + (task: ^TaskLike1, computation: Async< ^TResult2 >) + : Task<^TResult1 * ^TResult2> = this.Run( - this.Bind(task, fun (result1: ^TResult1) -> - this.Bind(computation, fun (result2: ^TResult2) -> - this.Return(result1, result2) - ) + this.Bind( + task, + fun (result1: ^TResult1) -> + this.Bind(computation, fun (result2: ^TResult2) -> this.Return(result1, result2)) ) ) type BackgroundTaskBuilder with // This overload is required for type inference in async cases member inline this.MergeSources< ^TaskLike2, ^TResult1, ^TResult2, ^Awaiter2 - when ^TaskLike2 : (member GetAwaiter: unit -> ^Awaiter2) - and ^Awaiter2 :> ICriticalNotifyCompletion - and ^Awaiter2: (member get_IsCompleted: unit -> bool) - and ^Awaiter2: (member GetResult: unit -> 'TResult2)> - (computation: Async<^TResult1>, task: ^TaskLike2) - : Task<^TResult1 * ^TResult2> = + when ^TaskLike2: (member GetAwaiter: unit -> ^Awaiter2) + and ^Awaiter2 :> ICriticalNotifyCompletion + and ^Awaiter2: (member get_IsCompleted: unit -> bool) + and ^Awaiter2: (member GetResult: unit -> 'TResult2)> + (computation: Async< ^TResult1 >, task: ^TaskLike2) + : Task<^TResult1 * ^TResult2> = this.Run( - this.Bind(computation, fun (result1: ^TResult1) -> - this.Bind(task, fun (result2: ^TResult2) -> - this.Return(result1, result2) - ) + this.Bind( + computation, + fun (result1: ^TResult1) -> + this.Bind(task, fun (result2: ^TResult2) -> this.Return(result1, result2)) ) ) // This overload is required for type inference in async cases member inline this.MergeSources< ^TaskLike1, ^TResult1, ^TResult2, ^Awaiter1 - when ^TaskLike1 : (member GetAwaiter: unit -> ^Awaiter1) - and ^Awaiter1 :> ICriticalNotifyCompletion - and ^Awaiter1: (member get_IsCompleted: unit -> bool) - and ^Awaiter1: (member GetResult: unit -> 'TResult1)> - (task: ^TaskLike1, computation: Async<^TResult2>) - : Task<^TResult1 * ^TResult2> = + when ^TaskLike1: (member GetAwaiter: unit -> ^Awaiter1) + and ^Awaiter1 :> ICriticalNotifyCompletion + and ^Awaiter1: (member get_IsCompleted: unit -> bool) + and ^Awaiter1: (member GetResult: unit -> 'TResult1)> + (task: ^TaskLike1, computation: Async< ^TResult2 >) + : Task<^TResult1 * ^TResult2> = this.Run( - this.Bind(task, fun (result1: ^TResult1) -> - this.Bind(computation, fun (result2: ^TResult2) -> - this.Return(result1, result2) - ) + this.Bind( + task, + fun (result1: ^TResult1) -> + this.Bind(computation, fun (result2: ^TResult2) -> this.Return(result1, result2)) ) ) diff --git a/src/FSharp.Core/tasks.fsi b/src/FSharp.Core/tasks.fsi index 6bb50459ec8..1c32994523c 100644 --- a/src/FSharp.Core/tasks.fsi +++ b/src/FSharp.Core/tasks.fsi @@ -239,16 +239,15 @@ module LowPriority = resource: 'Resource * body: ('Resource -> TaskCode<'TOverall, 'T>) -> TaskCode<'TOverall, 'T> when 'Resource :> IDisposable | null - type TaskBuilder with + type TaskBuilder with /// /// Implmentation of the `and!` operation for two task-like values. /// member inline MergeSources< ^TaskLike1, ^TaskLike2, ^TResult1, ^TResult2, ^Awaiter1, ^Awaiter2> : - task1: ^TaskLike1 * task2: ^TaskLike2 -> - Task<^TResult1 * ^TResult2> + task1: ^TaskLike1 * task2: ^TaskLike2 -> Task<^TResult1 * ^TResult2> when ^TaskLike1: (member GetAwaiter: unit -> ^Awaiter1) - and ^TaskLike2 : (member GetAwaiter: unit -> ^Awaiter2) + and ^TaskLike2: (member GetAwaiter: unit -> ^Awaiter2) and ^Awaiter1 :> ICriticalNotifyCompletion and ^Awaiter2 :> ICriticalNotifyCompletion and ^Awaiter1: (member get_IsCompleted: unit -> bool) @@ -256,16 +255,15 @@ module LowPriority = and ^Awaiter2: (member get_IsCompleted: unit -> bool) and ^Awaiter2: (member GetResult: unit -> ^TResult2) - type BackgroundTaskBuilder with + type BackgroundTaskBuilder with /// /// Implmentation of the `and!` operation for two task-like values. /// member inline MergeSources< ^TaskLike1, ^TaskLike2, ^TResult1, ^TResult2, ^Awaiter1, ^Awaiter2> : - task1: ^TaskLike1 * task2: ^TaskLike2 -> - Task<^TResult1 * ^TResult2> + task1: ^TaskLike1 * task2: ^TaskLike2 -> Task<^TResult1 * ^TResult2> when ^TaskLike1: (member GetAwaiter: unit -> ^Awaiter1) - and ^TaskLike2 : (member GetAwaiter: unit -> ^Awaiter2) + and ^TaskLike2: (member GetAwaiter: unit -> ^Awaiter2) and ^Awaiter1 :> ICriticalNotifyCompletion and ^Awaiter2 :> ICriticalNotifyCompletion and ^Awaiter1: (member get_IsCompleted: unit -> bool) @@ -281,9 +279,8 @@ module LowPlusPriority = /// Implmentation of the `and!` operation for an async and a task-like value. /// member inline MergeSources< ^TaskLike2, ^TResult1, ^TResult2, ^Awaiter2> : - computation: Async<^TResult1> * task: ^TaskLike2 -> - Task<^TResult1 * ^TResult2> - when ^TaskLike2 : (member GetAwaiter: unit -> ^Awaiter2) + computation: Async< ^TResult1 > * task: ^TaskLike2 -> Task<^TResult1 * ^TResult2> + when ^TaskLike2: (member GetAwaiter: unit -> ^Awaiter2) and ^Awaiter2 :> ICriticalNotifyCompletion and ^Awaiter2: (member get_IsCompleted: unit -> bool) and ^Awaiter2: (member GetResult: unit -> ^TResult2) @@ -292,9 +289,8 @@ module LowPlusPriority = /// Implmentation of the `and!` operation for a task-like value and an async. /// member inline MergeSources< ^TaskLike1, ^TResult1, ^TResult2, ^Awaiter1> : - task: ^TaskLike1 * computation: Async<^TResult2> -> - Task<^TResult1 * ^TResult2> - when ^TaskLike1 : (member GetAwaiter: unit -> ^Awaiter1) + task: ^TaskLike1 * computation: Async< ^TResult2 > -> Task<^TResult1 * ^TResult2> + when ^TaskLike1: (member GetAwaiter: unit -> ^Awaiter1) and ^Awaiter1 :> ICriticalNotifyCompletion and ^Awaiter1: (member get_IsCompleted: unit -> bool) and ^Awaiter1: (member GetResult: unit -> ^TResult1) @@ -305,9 +301,8 @@ module LowPlusPriority = /// Implmentation of the `and!` operation for an async and a task-like value. /// member inline MergeSources< ^TaskLike2, ^TResult1, ^TResult2, ^Awaiter2> : - computation: Async<^TResult1> * task: ^TaskLike2 -> - Task<^TResult1 * ^TResult2> - when ^TaskLike2 : (member GetAwaiter: unit -> ^Awaiter2) + computation: Async< ^TResult1 > * task: ^TaskLike2 -> Task<^TResult1 * ^TResult2> + when ^TaskLike2: (member GetAwaiter: unit -> ^Awaiter2) and ^Awaiter2 :> ICriticalNotifyCompletion and ^Awaiter2: (member get_IsCompleted: unit -> bool) and ^Awaiter2: (member GetResult: unit -> ^TResult2) @@ -316,9 +311,8 @@ module LowPlusPriority = /// Implmentation of the `and!` operation for a task-like value and an async. /// member inline MergeSources< ^TaskLike1, ^TResult1, ^TResult2, ^Awaiter1> : - task: ^TaskLike1 * computation: Async<^TResult2> -> - Task<^TResult1 * ^TResult2> - when ^TaskLike1 : (member GetAwaiter: unit -> ^Awaiter1) + task: ^TaskLike1 * computation: Async< ^TResult2 > -> Task<^TResult1 * ^TResult2> + when ^TaskLike1: (member GetAwaiter: unit -> ^Awaiter1) and ^Awaiter1 :> ICriticalNotifyCompletion and ^Awaiter1: (member get_IsCompleted: unit -> bool) and ^Awaiter1: (member GetResult: unit -> ^TResult1) @@ -348,9 +342,8 @@ module MediumPriority = /// Implmentation of the `and!` operation for a a task and a task-like value. /// member inline MergeSources< ^TaskLike2, ^TResult1, ^TResult2, ^Awaiter2> : - task1: Task<^TResult1> * task2: ^TaskLike2 -> - Task<^TResult1 * ^TResult2> - when ^TaskLike2 : (member GetAwaiter: unit -> ^Awaiter2) + task1: Task< ^TResult1 > * task2: ^TaskLike2 -> Task<^TResult1 * ^TResult2> + when ^TaskLike2: (member GetAwaiter: unit -> ^Awaiter2) and ^Awaiter2 :> ICriticalNotifyCompletion and ^Awaiter2: (member get_IsCompleted: unit -> bool) and ^Awaiter2: (member GetResult: unit -> ^TResult2) @@ -359,9 +352,8 @@ module MediumPriority = /// Implmentation of the `and!` operation for a task-like value and a task. /// member inline MergeSources< ^TaskLike1, ^TResult1, ^TResult2, ^Awaiter1> : - task1: ^TaskLike1 * task2: Task<^TResult2> -> - Task<^TResult1 * ^TResult2> - when ^TaskLike1 : (member GetAwaiter: unit -> ^Awaiter1) + task1: ^TaskLike1 * task2: Task< ^TResult2 > -> Task<^TResult1 * ^TResult2> + when ^TaskLike1: (member GetAwaiter: unit -> ^Awaiter1) and ^Awaiter1 :> ICriticalNotifyCompletion and ^Awaiter1: (member get_IsCompleted: unit -> bool) and ^Awaiter1: (member GetResult: unit -> ^TResult1) @@ -370,22 +362,19 @@ module MediumPriority = /// Implmentation of the `and!` operation for two asyncs. /// member inline MergeSources< ^TResult1, ^TResult2> : - computation1: Async<^TResult1> * computation2: Async<^TResult2> -> - Task<^TResult1 * ^TResult2> + computation1: Async< ^TResult1 > * computation2: Async< ^TResult2 > -> Task<^TResult1 * ^TResult2> /// /// Implmentation of the `and!` operation for a task and an async. /// member inline MergeSources< ^TResult1, ^TResult2> : - task: Task<^TResult1> * computation: Async<^TResult2> -> - Task<^TResult1 * ^TResult2> + task: Task< ^TResult1 > * computation: Async< ^TResult2 > -> Task<^TResult1 * ^TResult2> /// /// Implmentation of the `and!` operation for an async and a task. /// member inline MergeSources< ^TResult1, ^TResult2> : - computation: Async<^TResult1> * task: Task<^TResult2> -> - Task<^TResult1 * ^TResult2> + computation: Async< ^TResult1 > * task: Task< ^TResult2 > -> Task<^TResult1 * ^TResult2> type BackgroundTaskBuilder with @@ -393,9 +382,8 @@ module MediumPriority = /// Implmentation of the `and!` operation for a a task and a task-like value. /// member inline MergeSources< ^TaskLike2, ^TResult1, ^TResult2, ^Awaiter2> : - task1: Task<^TResult1> * task2: ^TaskLike2 -> - Task<^TResult1 * ^TResult2> - when ^TaskLike2 : (member GetAwaiter: unit -> ^Awaiter2) + task1: Task< ^TResult1 > * task2: ^TaskLike2 -> Task<^TResult1 * ^TResult2> + when ^TaskLike2: (member GetAwaiter: unit -> ^Awaiter2) and ^Awaiter2 :> ICriticalNotifyCompletion and ^Awaiter2: (member get_IsCompleted: unit -> bool) and ^Awaiter2: (member GetResult: unit -> ^TResult2) @@ -404,9 +392,8 @@ module MediumPriority = /// Implmentation of the `and!` operation for a task-like value and a task. /// member inline MergeSources< ^TaskLike1, ^TResult1, ^TResult2, ^Awaiter1> : - task1: ^TaskLike1 * task2: Task<^TResult2> -> - Task<^TResult1 * ^TResult2> - when ^TaskLike1 : (member GetAwaiter: unit -> ^Awaiter1) + task1: ^TaskLike1 * task2: Task< ^TResult2 > -> Task<^TResult1 * ^TResult2> + when ^TaskLike1: (member GetAwaiter: unit -> ^Awaiter1) and ^Awaiter1 :> ICriticalNotifyCompletion and ^Awaiter1: (member get_IsCompleted: unit -> bool) and ^Awaiter1: (member GetResult: unit -> ^TResult1) @@ -415,22 +402,19 @@ module MediumPriority = /// Implmentation of the `and!` operation for two asyncs. /// member inline MergeSources< ^TResult1, ^TResult2> : - computation1: Async<^TResult1> * computation2: Async<^TResult2> -> - Task<^TResult1 * ^TResult2> + computation1: Async< ^TResult1 > * computation2: Async< ^TResult2 > -> Task<^TResult1 * ^TResult2> /// /// Implmentation of the `and!` operation for a task and an async. /// member inline MergeSources< ^TResult1, ^TResult2> : - task: Task<^TResult1> * computation: Async<^TResult2> -> - Task<^TResult1 * ^TResult2> + task: Task< ^TResult1 > * computation: Async< ^TResult2 > -> Task<^TResult1 * ^TResult2> /// /// Implmentation of the `and!` operation for an async and a task. /// member inline MergeSources< ^TResult1, ^TResult2> : - computation: Async<^TResult1> * task: Task<^TResult2> -> - Task<^TResult1 * ^TResult2> + computation: Async< ^TResult1 > * task: Task< ^TResult2 > -> Task<^TResult1 * ^TResult2> /// /// Contains high-priority overloads for the `task` computation expression builder. @@ -465,13 +449,11 @@ module HighPriority = /// Implmentation of the `and!` operation for two tasks. /// member inline MergeSources< ^TResult1, ^TResult2> : - task1: Task<^TResult1> * task2: Task<^TResult2> -> - Task<^TResult1 * ^TResult2> + task1: Task< ^TResult1 > * task2: Task< ^TResult2 > -> Task<^TResult1 * ^TResult2> type BackgroundTaskBuilder with /// /// Implmentation of the `and!` operation for two tasks. /// member inline MergeSources< ^TResult1, ^TResult2> : - task1: Task<^TResult1> * task2: Task<^TResult2> -> - Task<^TResult1 * ^TResult2> + task1: Task< ^TResult1 > * task2: Task< ^TResult2 > -> Task<^TResult1 * ^TResult2> From 8ab0379aeb00f7965cf6adf16bae88dc987d0321 Mon Sep 17 00:00:00 2001 From: Vladimir Shchur Date: Thu, 10 Apr 2025 22:06:18 -0700 Subject: [PATCH 10/16] Fixed release notes location --- docs/release-notes/.FSharp.Core/8.0.300.md | 1 - docs/release-notes/.FSharp.Core/9.0.300.md | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/release-notes/.FSharp.Core/8.0.300.md b/docs/release-notes/.FSharp.Core/8.0.300.md index d106c3ac4a2..be97542e410 100644 --- a/docs/release-notes/.FSharp.Core/8.0.300.md +++ b/docs/release-notes/.FSharp.Core/8.0.300.md @@ -3,7 +3,6 @@ * Minor tweaks to inline specifications to support Visibility PR ([PR #15484](https://github.com/dotnet/fsharp/pull/15484), [#PR 16427](https://github.com/dotnet/fsharp/pull/15484) * Optimize equality in generic contexts. ([PR #16615](https://github.com/dotnet/fsharp/pull/16615)) * Add a constructor for `MailboxProcessor` with a flag denoting that an exception will be thrown when `Post` is called after the `MailboxProcessor` has been disposed. ([PR #13036](https://github.com/dotnet/fsharp/pull/13036)) -* Support for `!and` in `TaskBuilder` ([LanguageSuggestion #1363](https://github.com/fsharp/fslang-suggestions/issues/1363), [PR #18451](https://github.com/dotnet/fsharp/pull/18451)) ### Fixed diff --git a/docs/release-notes/.FSharp.Core/9.0.300.md b/docs/release-notes/.FSharp.Core/9.0.300.md index 3b2fdab5cfe..831ce57eec0 100644 --- a/docs/release-notes/.FSharp.Core/9.0.300.md +++ b/docs/release-notes/.FSharp.Core/9.0.300.md @@ -3,6 +3,7 @@ ### Added * Added nullability annotations to `.Using` builder method for `async` and `task` builders ([PR #18292](https://github.com/dotnet/fsharp/pull/18292)) +* Support for `!and` in `TaskBuilder` ([LanguageSuggestion #1363](https://github.com/fsharp/fslang-suggestions/issues/1363), [PR #18451](https://github.com/dotnet/fsharp/pull/18451)) ### Changed From a385fac3d50c03e66ec917293879fc17d3ac1463 Mon Sep 17 00:00:00 2001 From: Vladimir Shchur Date: Fri, 11 Apr 2025 10:38:26 -0700 Subject: [PATCH 11/16] Updated tuples to struct tuples to reduce allocations a little bit --- src/FSharp.Core/tasks.fs | 72 +++++++++++++++++++-------------------- src/FSharp.Core/tasks.fsi | 36 ++++++++++---------- 2 files changed, 54 insertions(+), 54 deletions(-) diff --git a/src/FSharp.Core/tasks.fs b/src/FSharp.Core/tasks.fs index 94081c7fb90..a4ba6b2dbd7 100644 --- a/src/FSharp.Core/tasks.fs +++ b/src/FSharp.Core/tasks.fs @@ -381,12 +381,12 @@ module LowPriority = and ^Awaiter2: (member get_IsCompleted: unit -> bool) and ^Awaiter2: (member GetResult: unit -> ^TResult2)> (task1: ^TaskLike1, task2: ^TaskLike2) - : Task<^TResult1 * ^TResult2> = + : Task = this.Run( this.Bind( task1, fun (result1: ^TResult1) -> - this.Bind(task2, fun (result2: ^TResult2) -> this.Return(result1, result2)) + this.Bind(task2, fun (result2: ^TResult2) -> this.Return struct (result1, result2)) ) ) @@ -401,12 +401,12 @@ module LowPriority = and ^Awaiter2: (member get_IsCompleted: unit -> bool) and ^Awaiter2: (member GetResult: unit -> ^TResult2)> (task1: ^TaskLike1, task2: ^TaskLike2) - : Task<^TResult1 * ^TResult2> = + : Task = this.Run( this.Bind( task1, fun (result1: ^TResult1) -> - this.Bind(task2, fun (result2: ^TResult2) -> this.Return(result1, result2)) + this.Bind(task2, fun (result2: ^TResult2) -> this.Return struct (result1, result2)) ) ) @@ -470,12 +470,12 @@ module HighPriority = // This overload is required for type inference in tasks cases member inline this.MergeSources (task1: Task< ^TResult1 >, task2: Task< ^TResult2 >) - : Task<^TResult1 * ^TResult2> = + : Task = this.Run( this.Bind( task1, fun (result1: ^TResult1) -> - this.Bind(task2, fun (result2: ^TResult2) -> this.Return(result1, result2)) + this.Bind(task2, fun (result2: ^TResult2) -> this.Return struct (result1, result2)) ) ) @@ -484,12 +484,12 @@ module HighPriority = // This overload is required for type inference in tasks cases member inline this.MergeSources (task1: Task< ^TResult1 >, task2: Task< ^TResult2 >) - : Task<^TResult1 * ^TResult2> = + : Task = this.Run( this.Bind( task1, fun (result1: ^TResult1) -> - this.Bind(task2, fun (result2: ^TResult2) -> this.Return(result1, result2)) + this.Bind(task2, fun (result2: ^TResult2) -> this.Return struct (result1, result2)) ) ) @@ -517,12 +517,12 @@ module MediumPriority = and ^Awaiter2: (member get_IsCompleted: unit -> bool) and ^Awaiter2: (member GetResult: unit -> 'TResult2)> (task1: Task< ^TResult1 >, task2: ^TaskLike2) - : Task<^TResult1 * ^TResult2> = + : Task = this.Run( this.Bind( task1, fun (result1: ^TResult1) -> - this.Bind(task2, fun (result2: ^TResult2) -> this.Return(result1, result2)) + this.Bind(task2, fun (result2: ^TResult2) -> this.Return struct (result1, result2)) ) ) @@ -533,48 +533,48 @@ module MediumPriority = and ^Awaiter1: (member get_IsCompleted: unit -> bool) and ^Awaiter1: (member GetResult: unit -> 'TResult1)> (task1: ^TaskLike1, task2: Task< ^TResult2 >) - : Task<^TResult1 * ^TResult2> = + : Task = this.Run( this.Bind( task1, fun (result1: ^TResult1) -> - this.Bind(task2, fun (result2: ^TResult2) -> this.Return(result1, result2)) + this.Bind(task2, fun (result2: ^TResult2) -> this.Return struct (result1, result2)) ) ) // This overload is required for type inference in async cases member inline this.MergeSources (computation1: Async< ^TResult1 >, computation2: Async< ^TResult2 >) - : Task<^TResult1 * ^TResult2> = + : Task = this.Run( this.Bind( computation1, fun (result1: ^TResult1) -> - this.Bind(computation2, fun (result2: ^TResult2) -> this.Return(result1, result2)) + this.Bind(computation2, fun (result2: ^TResult2) -> this.Return struct (result1, result2)) ) ) // This overload is required for type inference in task + async cases member inline this.MergeSources (task: Task< ^TResult1 >, computation: Async< ^TResult2 >) - : Task<^TResult1 * ^TResult2> = + : Task = this.Run( this.Bind( task, fun (result1: ^TResult1) -> - this.Bind(computation, fun (result2: ^TResult2) -> this.Return(result1, result2)) + this.Bind(computation, fun (result2: ^TResult2) -> this.Return struct (result1, result2)) ) ) // This overload is required for type inference in async + task case member inline this.MergeSources (computation: Async< ^TResult1 >, task: Task< ^TResult2 >) - : Task<^TResult1 * ^TResult2> = + : Task = this.Run( this.Bind( computation, fun (result1: ^TResult1) -> - this.Bind(task, fun (result2: ^TResult2) -> this.Return(result1, result2)) + this.Bind(task, fun (result2: ^TResult2) -> this.Return struct (result1, result2)) ) ) @@ -587,12 +587,12 @@ module MediumPriority = and ^Awaiter2: (member get_IsCompleted: unit -> bool) and ^Awaiter2: (member GetResult: unit -> 'TResult2)> (task1: Task< ^TResult1 >, task2: ^TaskLike2) - : Task<^TResult1 * ^TResult2> = + : Task = this.Run( this.Bind( task1, fun (result1: ^TResult1) -> - this.Bind(task2, fun (result2: ^TResult2) -> this.Return(result1, result2)) + this.Bind(task2, fun (result2: ^TResult2) -> this.Return struct (result1, result2)) ) ) @@ -603,48 +603,48 @@ module MediumPriority = and ^Awaiter1: (member get_IsCompleted: unit -> bool) and ^Awaiter1: (member GetResult: unit -> 'TResult1)> (task1: ^TaskLike1, task2: Task< ^TResult2 >) - : Task<^TResult1 * ^TResult2> = + : Task = this.Run( this.Bind( task1, fun (result1: ^TResult1) -> - this.Bind(task2, fun (result2: ^TResult2) -> this.Return(result1, result2)) + this.Bind(task2, fun (result2: ^TResult2) -> this.Return struct (result1, result2)) ) ) // This overload is required for type inference in async cases member inline this.MergeSources (computation1: Async< ^TResult1 >, computation2: Async< ^TResult2 >) - : Task<^TResult1 * ^TResult2> = + : Task = this.Run( this.Bind( computation1, fun (result1: ^TResult1) -> - this.Bind(computation2, fun (result2: ^TResult2) -> this.Return(result1, result2)) + this.Bind(computation2, fun (result2: ^TResult2) -> this.Return struct (result1, result2)) ) ) // This overload is required for type inference in task + async cases member inline this.MergeSources (task: Task< ^TResult1 >, computation: Async< ^TResult2 >) - : Task<^TResult1 * ^TResult2> = + : Task = this.Run( this.Bind( task, fun (result1: ^TResult1) -> - this.Bind(computation, fun (result2: ^TResult2) -> this.Return(result1, result2)) + this.Bind(computation, fun (result2: ^TResult2) -> this.Return struct (result1, result2)) ) ) // This overload is required for type inference in async + task case member inline this.MergeSources (computation: Async< ^TResult1 >, task: Task< ^TResult2 >) - : Task<^TResult1 * ^TResult2> = + : Task = this.Run( this.Bind( computation, fun (result1: ^TResult1) -> - this.Bind(task, fun (result2: ^TResult2) -> this.Return(result1, result2)) + this.Bind(task, fun (result2: ^TResult2) -> this.Return struct (result1, result2)) ) ) @@ -660,12 +660,12 @@ module LowPlusPriority = and ^Awaiter2: (member get_IsCompleted: unit -> bool) and ^Awaiter2: (member GetResult: unit -> 'TResult2)> (computation: Async< ^TResult1 >, task: ^TaskLike2) - : Task<^TResult1 * ^TResult2> = + : Task = this.Run( this.Bind( computation, fun (result1: ^TResult1) -> - this.Bind(task, fun (result2: ^TResult2) -> this.Return(result1, result2)) + this.Bind(task, fun (result2: ^TResult2) -> this.Return struct (result1, result2)) ) ) @@ -676,12 +676,12 @@ module LowPlusPriority = and ^Awaiter1: (member get_IsCompleted: unit -> bool) and ^Awaiter1: (member GetResult: unit -> 'TResult1)> (task: ^TaskLike1, computation: Async< ^TResult2 >) - : Task<^TResult1 * ^TResult2> = + : Task = this.Run( this.Bind( task, fun (result1: ^TResult1) -> - this.Bind(computation, fun (result2: ^TResult2) -> this.Return(result1, result2)) + this.Bind(computation, fun (result2: ^TResult2) -> this.Return struct (result1, result2)) ) ) @@ -693,12 +693,12 @@ module LowPlusPriority = and ^Awaiter2: (member get_IsCompleted: unit -> bool) and ^Awaiter2: (member GetResult: unit -> 'TResult2)> (computation: Async< ^TResult1 >, task: ^TaskLike2) - : Task<^TResult1 * ^TResult2> = + : Task = this.Run( this.Bind( computation, fun (result1: ^TResult1) -> - this.Bind(task, fun (result2: ^TResult2) -> this.Return(result1, result2)) + this.Bind(task, fun (result2: ^TResult2) -> this.Return struct (result1, result2)) ) ) @@ -709,11 +709,11 @@ module LowPlusPriority = and ^Awaiter1: (member get_IsCompleted: unit -> bool) and ^Awaiter1: (member GetResult: unit -> 'TResult1)> (task: ^TaskLike1, computation: Async< ^TResult2 >) - : Task<^TResult1 * ^TResult2> = + : Task = this.Run( this.Bind( task, fun (result1: ^TResult1) -> - this.Bind(computation, fun (result2: ^TResult2) -> this.Return(result1, result2)) + this.Bind(computation, fun (result2: ^TResult2) -> this.Return struct (result1, result2)) ) ) diff --git a/src/FSharp.Core/tasks.fsi b/src/FSharp.Core/tasks.fsi index 1c32994523c..2f70b659c95 100644 --- a/src/FSharp.Core/tasks.fsi +++ b/src/FSharp.Core/tasks.fsi @@ -245,7 +245,7 @@ module LowPriority = /// Implmentation of the `and!` operation for two task-like values. /// member inline MergeSources< ^TaskLike1, ^TaskLike2, ^TResult1, ^TResult2, ^Awaiter1, ^Awaiter2> : - task1: ^TaskLike1 * task2: ^TaskLike2 -> Task<^TResult1 * ^TResult2> + task1: ^TaskLike1 * task2: ^TaskLike2 -> Task when ^TaskLike1: (member GetAwaiter: unit -> ^Awaiter1) and ^TaskLike2: (member GetAwaiter: unit -> ^Awaiter2) and ^Awaiter1 :> ICriticalNotifyCompletion @@ -261,7 +261,7 @@ module LowPriority = /// Implmentation of the `and!` operation for two task-like values. /// member inline MergeSources< ^TaskLike1, ^TaskLike2, ^TResult1, ^TResult2, ^Awaiter1, ^Awaiter2> : - task1: ^TaskLike1 * task2: ^TaskLike2 -> Task<^TResult1 * ^TResult2> + task1: ^TaskLike1 * task2: ^TaskLike2 -> Task when ^TaskLike1: (member GetAwaiter: unit -> ^Awaiter1) and ^TaskLike2: (member GetAwaiter: unit -> ^Awaiter2) and ^Awaiter1 :> ICriticalNotifyCompletion @@ -279,7 +279,7 @@ module LowPlusPriority = /// Implmentation of the `and!` operation for an async and a task-like value. /// member inline MergeSources< ^TaskLike2, ^TResult1, ^TResult2, ^Awaiter2> : - computation: Async< ^TResult1 > * task: ^TaskLike2 -> Task<^TResult1 * ^TResult2> + computation: Async< ^TResult1 > * task: ^TaskLike2 -> Task when ^TaskLike2: (member GetAwaiter: unit -> ^Awaiter2) and ^Awaiter2 :> ICriticalNotifyCompletion and ^Awaiter2: (member get_IsCompleted: unit -> bool) @@ -289,7 +289,7 @@ module LowPlusPriority = /// Implmentation of the `and!` operation for a task-like value and an async. /// member inline MergeSources< ^TaskLike1, ^TResult1, ^TResult2, ^Awaiter1> : - task: ^TaskLike1 * computation: Async< ^TResult2 > -> Task<^TResult1 * ^TResult2> + task: ^TaskLike1 * computation: Async< ^TResult2 > -> Task when ^TaskLike1: (member GetAwaiter: unit -> ^Awaiter1) and ^Awaiter1 :> ICriticalNotifyCompletion and ^Awaiter1: (member get_IsCompleted: unit -> bool) @@ -301,7 +301,7 @@ module LowPlusPriority = /// Implmentation of the `and!` operation for an async and a task-like value. /// member inline MergeSources< ^TaskLike2, ^TResult1, ^TResult2, ^Awaiter2> : - computation: Async< ^TResult1 > * task: ^TaskLike2 -> Task<^TResult1 * ^TResult2> + computation: Async< ^TResult1 > * task: ^TaskLike2 -> Task when ^TaskLike2: (member GetAwaiter: unit -> ^Awaiter2) and ^Awaiter2 :> ICriticalNotifyCompletion and ^Awaiter2: (member get_IsCompleted: unit -> bool) @@ -311,7 +311,7 @@ module LowPlusPriority = /// Implmentation of the `and!` operation for a task-like value and an async. /// member inline MergeSources< ^TaskLike1, ^TResult1, ^TResult2, ^Awaiter1> : - task: ^TaskLike1 * computation: Async< ^TResult2 > -> Task<^TResult1 * ^TResult2> + task: ^TaskLike1 * computation: Async< ^TResult2 > -> Task when ^TaskLike1: (member GetAwaiter: unit -> ^Awaiter1) and ^Awaiter1 :> ICriticalNotifyCompletion and ^Awaiter1: (member get_IsCompleted: unit -> bool) @@ -342,7 +342,7 @@ module MediumPriority = /// Implmentation of the `and!` operation for a a task and a task-like value. /// member inline MergeSources< ^TaskLike2, ^TResult1, ^TResult2, ^Awaiter2> : - task1: Task< ^TResult1 > * task2: ^TaskLike2 -> Task<^TResult1 * ^TResult2> + task1: Task< ^TResult1 > * task2: ^TaskLike2 -> Task when ^TaskLike2: (member GetAwaiter: unit -> ^Awaiter2) and ^Awaiter2 :> ICriticalNotifyCompletion and ^Awaiter2: (member get_IsCompleted: unit -> bool) @@ -352,7 +352,7 @@ module MediumPriority = /// Implmentation of the `and!` operation for a task-like value and a task. /// member inline MergeSources< ^TaskLike1, ^TResult1, ^TResult2, ^Awaiter1> : - task1: ^TaskLike1 * task2: Task< ^TResult2 > -> Task<^TResult1 * ^TResult2> + task1: ^TaskLike1 * task2: Task< ^TResult2 > -> Task when ^TaskLike1: (member GetAwaiter: unit -> ^Awaiter1) and ^Awaiter1 :> ICriticalNotifyCompletion and ^Awaiter1: (member get_IsCompleted: unit -> bool) @@ -362,19 +362,19 @@ module MediumPriority = /// Implmentation of the `and!` operation for two asyncs. /// member inline MergeSources< ^TResult1, ^TResult2> : - computation1: Async< ^TResult1 > * computation2: Async< ^TResult2 > -> Task<^TResult1 * ^TResult2> + computation1: Async< ^TResult1 > * computation2: Async< ^TResult2 > -> Task /// /// Implmentation of the `and!` operation for a task and an async. /// member inline MergeSources< ^TResult1, ^TResult2> : - task: Task< ^TResult1 > * computation: Async< ^TResult2 > -> Task<^TResult1 * ^TResult2> + task: Task< ^TResult1 > * computation: Async< ^TResult2 > -> Task /// /// Implmentation of the `and!` operation for an async and a task. /// member inline MergeSources< ^TResult1, ^TResult2> : - computation: Async< ^TResult1 > * task: Task< ^TResult2 > -> Task<^TResult1 * ^TResult2> + computation: Async< ^TResult1 > * task: Task< ^TResult2 > -> Task type BackgroundTaskBuilder with @@ -382,7 +382,7 @@ module MediumPriority = /// Implmentation of the `and!` operation for a a task and a task-like value. /// member inline MergeSources< ^TaskLike2, ^TResult1, ^TResult2, ^Awaiter2> : - task1: Task< ^TResult1 > * task2: ^TaskLike2 -> Task<^TResult1 * ^TResult2> + task1: Task< ^TResult1 > * task2: ^TaskLike2 -> Task when ^TaskLike2: (member GetAwaiter: unit -> ^Awaiter2) and ^Awaiter2 :> ICriticalNotifyCompletion and ^Awaiter2: (member get_IsCompleted: unit -> bool) @@ -392,7 +392,7 @@ module MediumPriority = /// Implmentation of the `and!` operation for a task-like value and a task. /// member inline MergeSources< ^TaskLike1, ^TResult1, ^TResult2, ^Awaiter1> : - task1: ^TaskLike1 * task2: Task< ^TResult2 > -> Task<^TResult1 * ^TResult2> + task1: ^TaskLike1 * task2: Task< ^TResult2 > -> Task when ^TaskLike1: (member GetAwaiter: unit -> ^Awaiter1) and ^Awaiter1 :> ICriticalNotifyCompletion and ^Awaiter1: (member get_IsCompleted: unit -> bool) @@ -402,19 +402,19 @@ module MediumPriority = /// Implmentation of the `and!` operation for two asyncs. /// member inline MergeSources< ^TResult1, ^TResult2> : - computation1: Async< ^TResult1 > * computation2: Async< ^TResult2 > -> Task<^TResult1 * ^TResult2> + computation1: Async< ^TResult1 > * computation2: Async< ^TResult2 > -> Task /// /// Implmentation of the `and!` operation for a task and an async. /// member inline MergeSources< ^TResult1, ^TResult2> : - task: Task< ^TResult1 > * computation: Async< ^TResult2 > -> Task<^TResult1 * ^TResult2> + task: Task< ^TResult1 > * computation: Async< ^TResult2 > -> Task /// /// Implmentation of the `and!` operation for an async and a task. /// member inline MergeSources< ^TResult1, ^TResult2> : - computation: Async< ^TResult1 > * task: Task< ^TResult2 > -> Task<^TResult1 * ^TResult2> + computation: Async< ^TResult1 > * task: Task< ^TResult2 > -> Task /// /// Contains high-priority overloads for the `task` computation expression builder. @@ -449,11 +449,11 @@ module HighPriority = /// Implmentation of the `and!` operation for two tasks. /// member inline MergeSources< ^TResult1, ^TResult2> : - task1: Task< ^TResult1 > * task2: Task< ^TResult2 > -> Task<^TResult1 * ^TResult2> + task1: Task< ^TResult1 > * task2: Task< ^TResult2 > -> Task type BackgroundTaskBuilder with /// /// Implmentation of the `and!` operation for two tasks. /// member inline MergeSources< ^TResult1, ^TResult2> : - task1: Task< ^TResult1 > * task2: Task< ^TResult2 > -> Task<^TResult1 * ^TResult2> + task1: Task< ^TResult1 > * task2: Task< ^TResult2 > -> Task From 2bbfc08416a843213c0c1b40d11ea721af11e27c Mon Sep 17 00:00:00 2001 From: Vladimir Shchur Date: Fri, 11 Apr 2025 11:31:12 -0700 Subject: [PATCH 12/16] Updated surface area --- ...p.Core.SurfaceArea.netstandard21.debug.bsl | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard21.debug.bsl b/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard21.debug.bsl index a49aac19aaa..95ebeea8a37 100644 --- a/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard21.debug.bsl +++ b/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard21.debug.bsl @@ -757,6 +757,16 @@ Microsoft.FSharp.Control.TaskBuilderBase: Microsoft.FSharp.Core.CompilerServices Microsoft.FSharp.Control.TaskBuilderExtensions.HighPriority: Boolean TaskBuilderBase.BindDynamic.Static[TOverall,TResult1,TResult2](Microsoft.FSharp.Core.CompilerServices.ResumableStateMachine`1[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall]] ByRef, System.Threading.Tasks.Task`1[TResult1], Microsoft.FSharp.Core.FSharpFunc`2[TResult1,Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall],TResult2]]) Microsoft.FSharp.Control.TaskBuilderExtensions.HighPriority: Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall],TResult2] TaskBuilderBase.Bind[TResult1,TOverall,TResult2](Microsoft.FSharp.Control.TaskBuilderBase, System.Threading.Tasks.Task`1[TResult1], Microsoft.FSharp.Core.FSharpFunc`2[TResult1,Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall],TResult2]]) Microsoft.FSharp.Control.TaskBuilderExtensions.HighPriority: Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[T],T] TaskBuilderBase.ReturnFrom[T](Microsoft.FSharp.Control.TaskBuilderBase, System.Threading.Tasks.Task`1[T]) +Microsoft.FSharp.Control.TaskBuilderExtensions.HighPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] BackgroundTaskBuilder.MergeSources[TResult1,TResult2](Microsoft.FSharp.Control.BackgroundTaskBuilder, System.Threading.Tasks.Task`1[TResult1], System.Threading.Tasks.Task`1[TResult2]) +Microsoft.FSharp.Control.TaskBuilderExtensions.HighPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] TaskBuilder.MergeSources[TResult1,TResult2](Microsoft.FSharp.Control.TaskBuilder, System.Threading.Tasks.Task`1[TResult1], System.Threading.Tasks.Task`1[TResult2]) +Microsoft.FSharp.Control.TaskBuilderExtensions.LowPlusPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] BackgroundTaskBuilder.MergeSources$W[TTaskLike1,TResult1,TResult2,TAwaiter1](Microsoft.FSharp.Core.FSharpFunc`2[TTaskLike1,TAwaiter1], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter1,TResult1], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter1,System.Boolean], Microsoft.FSharp.Control.BackgroundTaskBuilder, TTaskLike1, Microsoft.FSharp.Control.FSharpAsync`1[TResult2]) +Microsoft.FSharp.Control.TaskBuilderExtensions.LowPlusPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] BackgroundTaskBuilder.MergeSources$W[TTaskLike2,TResult1,TResult2,TAwaiter2](Microsoft.FSharp.Core.FSharpFunc`2[TTaskLike2,TAwaiter2], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter2,TResult2], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter2,System.Boolean], Microsoft.FSharp.Control.BackgroundTaskBuilder, Microsoft.FSharp.Control.FSharpAsync`1[TResult1], TTaskLike2) +Microsoft.FSharp.Control.TaskBuilderExtensions.LowPlusPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] BackgroundTaskBuilder.MergeSources[TTaskLike1,TResult1,TResult2,TAwaiter1](Microsoft.FSharp.Control.BackgroundTaskBuilder, TTaskLike1, Microsoft.FSharp.Control.FSharpAsync`1[TResult2]) +Microsoft.FSharp.Control.TaskBuilderExtensions.LowPlusPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] BackgroundTaskBuilder.MergeSources[TTaskLike2,TResult1,TResult2,TAwaiter2](Microsoft.FSharp.Control.BackgroundTaskBuilder, Microsoft.FSharp.Control.FSharpAsync`1[TResult1], TTaskLike2) +Microsoft.FSharp.Control.TaskBuilderExtensions.LowPlusPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] TaskBuilder.MergeSources$W[TTaskLike1,TResult1,TResult2,TAwaiter1](Microsoft.FSharp.Core.FSharpFunc`2[TTaskLike1,TAwaiter1], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter1,TResult1], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter1,System.Boolean], Microsoft.FSharp.Control.TaskBuilder, TTaskLike1, Microsoft.FSharp.Control.FSharpAsync`1[TResult2]) +Microsoft.FSharp.Control.TaskBuilderExtensions.LowPlusPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] TaskBuilder.MergeSources$W[TTaskLike2,TResult1,TResult2,TAwaiter2](Microsoft.FSharp.Core.FSharpFunc`2[TTaskLike2,TAwaiter2], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter2,TResult2], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter2,System.Boolean], Microsoft.FSharp.Control.TaskBuilder, Microsoft.FSharp.Control.FSharpAsync`1[TResult1], TTaskLike2) +Microsoft.FSharp.Control.TaskBuilderExtensions.LowPlusPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] TaskBuilder.MergeSources[TTaskLike1,TResult1,TResult2,TAwaiter1](Microsoft.FSharp.Control.TaskBuilder, TTaskLike1, Microsoft.FSharp.Control.FSharpAsync`1[TResult2]) +Microsoft.FSharp.Control.TaskBuilderExtensions.LowPlusPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] TaskBuilder.MergeSources[TTaskLike2,TResult1,TResult2,TAwaiter2](Microsoft.FSharp.Control.TaskBuilder, Microsoft.FSharp.Control.FSharpAsync`1[TResult1], TTaskLike2) Microsoft.FSharp.Control.TaskBuilderExtensions.LowPriority: Boolean TaskBuilderBase.BindDynamic.Static$W[TTaskLike,TResult1,TResult2,TAwaiter,TOverall](Microsoft.FSharp.Core.FSharpFunc`2[TTaskLike,TAwaiter], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter,TResult1], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter,System.Boolean], Microsoft.FSharp.Core.CompilerServices.ResumableStateMachine`1[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall]] ByRef, TTaskLike, Microsoft.FSharp.Core.FSharpFunc`2[TResult1,Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall],TResult2]]) Microsoft.FSharp.Control.TaskBuilderExtensions.LowPriority: Boolean TaskBuilderBase.BindDynamic.Static[TTaskLike,TResult1,TResult2,TAwaiter,TOverall](Microsoft.FSharp.Core.CompilerServices.ResumableStateMachine`1[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall]] ByRef, TTaskLike, Microsoft.FSharp.Core.FSharpFunc`2[TResult1,Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall],TResult2]]) Microsoft.FSharp.Control.TaskBuilderExtensions.LowPriority: Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall],TResult2] TaskBuilderBase.Bind$W[TTaskLike,TResult1,TResult2,TAwaiter,TOverall](Microsoft.FSharp.Core.FSharpFunc`2[TTaskLike,TAwaiter], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter,TResult1], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter,System.Boolean], Microsoft.FSharp.Control.TaskBuilderBase, TTaskLike, Microsoft.FSharp.Core.FSharpFunc`2[TResult1,Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall],TResult2]]) @@ -764,8 +774,26 @@ Microsoft.FSharp.Control.TaskBuilderExtensions.LowPriority: Microsoft.FSharp.Cor Microsoft.FSharp.Control.TaskBuilderExtensions.LowPriority: Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall],T] TaskBuilderBase.Using[TResource,TOverall,T](Microsoft.FSharp.Control.TaskBuilderBase, TResource, Microsoft.FSharp.Core.FSharpFunc`2[TResource,Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall],T]]) Microsoft.FSharp.Control.TaskBuilderExtensions.LowPriority: Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[T],T] TaskBuilderBase.ReturnFrom$W[TTaskLike,TAwaiter,T](Microsoft.FSharp.Core.FSharpFunc`2[TTaskLike,TAwaiter], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter,T], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter,System.Boolean], Microsoft.FSharp.Control.TaskBuilderBase, TTaskLike) Microsoft.FSharp.Control.TaskBuilderExtensions.LowPriority: Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[T],T] TaskBuilderBase.ReturnFrom[TTaskLike,TAwaiter,T](Microsoft.FSharp.Control.TaskBuilderBase, TTaskLike) +Microsoft.FSharp.Control.TaskBuilderExtensions.LowPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] BackgroundTaskBuilder.MergeSources$W[TTaskLike1,TTaskLike2,TResult1,TResult2,TAwaiter1,TAwaiter2](Microsoft.FSharp.Core.FSharpFunc`2[TTaskLike1,TAwaiter1], Microsoft.FSharp.Core.FSharpFunc`2[TTaskLike2,TAwaiter2], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter1,TResult1], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter2,TResult2], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter1,System.Boolean], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter2,System.Boolean], Microsoft.FSharp.Control.BackgroundTaskBuilder, TTaskLike1, TTaskLike2) +Microsoft.FSharp.Control.TaskBuilderExtensions.LowPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] BackgroundTaskBuilder.MergeSources[TTaskLike1,TTaskLike2,TResult1,TResult2,TAwaiter1,TAwaiter2](Microsoft.FSharp.Control.BackgroundTaskBuilder, TTaskLike1, TTaskLike2) +Microsoft.FSharp.Control.TaskBuilderExtensions.LowPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] TaskBuilder.MergeSources$W[TTaskLike1,TTaskLike2,TResult1,TResult2,TAwaiter1,TAwaiter2](Microsoft.FSharp.Core.FSharpFunc`2[TTaskLike1,TAwaiter1], Microsoft.FSharp.Core.FSharpFunc`2[TTaskLike2,TAwaiter2], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter1,TResult1], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter2,TResult2], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter1,System.Boolean], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter2,System.Boolean], Microsoft.FSharp.Control.TaskBuilder, TTaskLike1, TTaskLike2) +Microsoft.FSharp.Control.TaskBuilderExtensions.LowPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] TaskBuilder.MergeSources[TTaskLike1,TTaskLike2,TResult1,TResult2,TAwaiter1,TAwaiter2](Microsoft.FSharp.Control.TaskBuilder, TTaskLike1, TTaskLike2) Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority: Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall],TResult2] TaskBuilderBase.Bind[TResult1,TOverall,TResult2](Microsoft.FSharp.Control.TaskBuilderBase, Microsoft.FSharp.Control.FSharpAsync`1[TResult1], Microsoft.FSharp.Core.FSharpFunc`2[TResult1,Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall],TResult2]]) Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority: Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[T],T] TaskBuilderBase.ReturnFrom[T](Microsoft.FSharp.Control.TaskBuilderBase, Microsoft.FSharp.Control.FSharpAsync`1[T]) +Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] BackgroundTaskBuilder.MergeSources$W[TTaskLike1,TResult1,TResult2,TAwaiter1](Microsoft.FSharp.Core.FSharpFunc`2[TTaskLike1,TAwaiter1], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter1,TResult1], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter1,System.Boolean], Microsoft.FSharp.Control.BackgroundTaskBuilder, TTaskLike1, System.Threading.Tasks.Task`1[TResult2]) +Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] BackgroundTaskBuilder.MergeSources$W[TTaskLike2,TResult1,TResult2,TAwaiter2](Microsoft.FSharp.Core.FSharpFunc`2[TTaskLike2,TAwaiter2], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter2,TResult2], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter2,System.Boolean], Microsoft.FSharp.Control.BackgroundTaskBuilder, System.Threading.Tasks.Task`1[TResult1], TTaskLike2) +Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] BackgroundTaskBuilder.MergeSources[TResult1,TResult2](Microsoft.FSharp.Control.BackgroundTaskBuilder, Microsoft.FSharp.Control.FSharpAsync`1[TResult1], Microsoft.FSharp.Control.FSharpAsync`1[TResult2]) +Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] BackgroundTaskBuilder.MergeSources[TResult1,TResult2](Microsoft.FSharp.Control.BackgroundTaskBuilder, Microsoft.FSharp.Control.FSharpAsync`1[TResult1], System.Threading.Tasks.Task`1[TResult2]) +Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] BackgroundTaskBuilder.MergeSources[TResult1,TResult2](Microsoft.FSharp.Control.BackgroundTaskBuilder, System.Threading.Tasks.Task`1[TResult1], Microsoft.FSharp.Control.FSharpAsync`1[TResult2]) +Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] BackgroundTaskBuilder.MergeSources[TTaskLike1,TResult1,TResult2,TAwaiter1](Microsoft.FSharp.Control.BackgroundTaskBuilder, TTaskLike1, System.Threading.Tasks.Task`1[TResult2]) +Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] BackgroundTaskBuilder.MergeSources[TTaskLike2,TResult1,TResult2,TAwaiter2](Microsoft.FSharp.Control.BackgroundTaskBuilder, System.Threading.Tasks.Task`1[TResult1], TTaskLike2) +Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] TaskBuilder.MergeSources$W[TTaskLike1,TResult1,TResult2,TAwaiter1](Microsoft.FSharp.Core.FSharpFunc`2[TTaskLike1,TAwaiter1], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter1,TResult1], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter1,System.Boolean], Microsoft.FSharp.Control.TaskBuilder, TTaskLike1, System.Threading.Tasks.Task`1[TResult2]) +Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] TaskBuilder.MergeSources$W[TTaskLike2,TResult1,TResult2,TAwaiter2](Microsoft.FSharp.Core.FSharpFunc`2[TTaskLike2,TAwaiter2], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter2,TResult2], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter2,System.Boolean], Microsoft.FSharp.Control.TaskBuilder, System.Threading.Tasks.Task`1[TResult1], TTaskLike2) +Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] TaskBuilder.MergeSources[TResult1,TResult2](Microsoft.FSharp.Control.TaskBuilder, Microsoft.FSharp.Control.FSharpAsync`1[TResult1], Microsoft.FSharp.Control.FSharpAsync`1[TResult2]) +Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] TaskBuilder.MergeSources[TResult1,TResult2](Microsoft.FSharp.Control.TaskBuilder, Microsoft.FSharp.Control.FSharpAsync`1[TResult1], System.Threading.Tasks.Task`1[TResult2]) +Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] TaskBuilder.MergeSources[TResult1,TResult2](Microsoft.FSharp.Control.TaskBuilder, System.Threading.Tasks.Task`1[TResult1], Microsoft.FSharp.Control.FSharpAsync`1[TResult2]) +Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] TaskBuilder.MergeSources[TTaskLike1,TResult1,TResult2,TAwaiter1](Microsoft.FSharp.Control.TaskBuilder, TTaskLike1, System.Threading.Tasks.Task`1[TResult2]) +Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] TaskBuilder.MergeSources[TTaskLike2,TResult1,TResult2,TAwaiter2](Microsoft.FSharp.Control.TaskBuilder, System.Threading.Tasks.Task`1[TResult1], TTaskLike2) Microsoft.FSharp.Control.TaskBuilderModule: Microsoft.FSharp.Control.BackgroundTaskBuilder backgroundTask Microsoft.FSharp.Control.TaskBuilderModule: Microsoft.FSharp.Control.BackgroundTaskBuilder get_backgroundTask() Microsoft.FSharp.Control.TaskBuilderModule: Microsoft.FSharp.Control.TaskBuilder get_task() From ecd0a736c61fd61505ade542d4f3ebc19d5f5dec Mon Sep 17 00:00:00 2001 From: Vladimir Shchur Date: Fri, 11 Apr 2025 11:39:56 -0700 Subject: [PATCH 13/16] Fixed typo --- src/FSharp.Core/tasks.fsi | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/FSharp.Core/tasks.fsi b/src/FSharp.Core/tasks.fsi index 2f70b659c95..2db377cb2a1 100644 --- a/src/FSharp.Core/tasks.fsi +++ b/src/FSharp.Core/tasks.fsi @@ -242,7 +242,7 @@ module LowPriority = type TaskBuilder with /// - /// Implmentation of the `and!` operation for two task-like values. + /// Implementation of the `and!` operation for two task-like values. /// member inline MergeSources< ^TaskLike1, ^TaskLike2, ^TResult1, ^TResult2, ^Awaiter1, ^Awaiter2> : task1: ^TaskLike1 * task2: ^TaskLike2 -> Task @@ -258,7 +258,7 @@ module LowPriority = type BackgroundTaskBuilder with /// - /// Implmentation of the `and!` operation for two task-like values. + /// Implementation of the `and!` operation for two task-like values. /// member inline MergeSources< ^TaskLike1, ^TaskLike2, ^TResult1, ^TResult2, ^Awaiter1, ^Awaiter2> : task1: ^TaskLike1 * task2: ^TaskLike2 -> Task @@ -276,7 +276,7 @@ module LowPlusPriority = type TaskBuilder with /// - /// Implmentation of the `and!` operation for an async and a task-like value. + /// Implementation of the `and!` operation for an async and a task-like value. /// member inline MergeSources< ^TaskLike2, ^TResult1, ^TResult2, ^Awaiter2> : computation: Async< ^TResult1 > * task: ^TaskLike2 -> Task @@ -286,7 +286,7 @@ module LowPlusPriority = and ^Awaiter2: (member GetResult: unit -> ^TResult2) /// - /// Implmentation of the `and!` operation for a task-like value and an async. + /// Implementation of the `and!` operation for a task-like value and an async. /// member inline MergeSources< ^TaskLike1, ^TResult1, ^TResult2, ^Awaiter1> : task: ^TaskLike1 * computation: Async< ^TResult2 > -> Task @@ -298,7 +298,7 @@ module LowPlusPriority = type BackgroundTaskBuilder with /// - /// Implmentation of the `and!` operation for an async and a task-like value. + /// Implementation of the `and!` operation for an async and a task-like value. /// member inline MergeSources< ^TaskLike2, ^TResult1, ^TResult2, ^Awaiter2> : computation: Async< ^TResult1 > * task: ^TaskLike2 -> Task @@ -308,7 +308,7 @@ module LowPlusPriority = and ^Awaiter2: (member GetResult: unit -> ^TResult2) /// - /// Implmentation of the `and!` operation for a task-like value and an async. + /// Implementation of the `and!` operation for a task-like value and an async. /// member inline MergeSources< ^TaskLike1, ^TResult1, ^TResult2, ^Awaiter1> : task: ^TaskLike1 * computation: Async< ^TResult2 > -> Task @@ -339,7 +339,7 @@ module MediumPriority = type TaskBuilder with /// - /// Implmentation of the `and!` operation for a a task and a task-like value. + /// Implementation of the `and!` operation for a a task and a task-like value. /// member inline MergeSources< ^TaskLike2, ^TResult1, ^TResult2, ^Awaiter2> : task1: Task< ^TResult1 > * task2: ^TaskLike2 -> Task @@ -349,7 +349,7 @@ module MediumPriority = and ^Awaiter2: (member GetResult: unit -> ^TResult2) /// - /// Implmentation of the `and!` operation for a task-like value and a task. + /// Implementation of the `and!` operation for a task-like value and a task. /// member inline MergeSources< ^TaskLike1, ^TResult1, ^TResult2, ^Awaiter1> : task1: ^TaskLike1 * task2: Task< ^TResult2 > -> Task @@ -359,19 +359,19 @@ module MediumPriority = and ^Awaiter1: (member GetResult: unit -> ^TResult1) /// - /// Implmentation of the `and!` operation for two asyncs. + /// Implementation of the `and!` operation for two asyncs. /// member inline MergeSources< ^TResult1, ^TResult2> : computation1: Async< ^TResult1 > * computation2: Async< ^TResult2 > -> Task /// - /// Implmentation of the `and!` operation for a task and an async. + /// Implementation of the `and!` operation for a task and an async. /// member inline MergeSources< ^TResult1, ^TResult2> : task: Task< ^TResult1 > * computation: Async< ^TResult2 > -> Task /// - /// Implmentation of the `and!` operation for an async and a task. + /// Implementation of the `and!` operation for an async and a task. /// member inline MergeSources< ^TResult1, ^TResult2> : computation: Async< ^TResult1 > * task: Task< ^TResult2 > -> Task @@ -379,7 +379,7 @@ module MediumPriority = type BackgroundTaskBuilder with /// - /// Implmentation of the `and!` operation for a a task and a task-like value. + /// Implementation of the `and!` operation for a a task and a task-like value. /// member inline MergeSources< ^TaskLike2, ^TResult1, ^TResult2, ^Awaiter2> : task1: Task< ^TResult1 > * task2: ^TaskLike2 -> Task @@ -389,7 +389,7 @@ module MediumPriority = and ^Awaiter2: (member GetResult: unit -> ^TResult2) /// - /// Implmentation of the `and!` operation for a task-like value and a task. + /// Implementation of the `and!` operation for a task-like value and a task. /// member inline MergeSources< ^TaskLike1, ^TResult1, ^TResult2, ^Awaiter1> : task1: ^TaskLike1 * task2: Task< ^TResult2 > -> Task @@ -399,19 +399,19 @@ module MediumPriority = and ^Awaiter1: (member GetResult: unit -> ^TResult1) /// - /// Implmentation of the `and!` operation for two asyncs. + /// Implementation of the `and!` operation for two asyncs. /// member inline MergeSources< ^TResult1, ^TResult2> : computation1: Async< ^TResult1 > * computation2: Async< ^TResult2 > -> Task /// - /// Implmentation of the `and!` operation for a task and an async. + /// Implementation of the `and!` operation for a task and an async. /// member inline MergeSources< ^TResult1, ^TResult2> : task: Task< ^TResult1 > * computation: Async< ^TResult2 > -> Task /// - /// Implmentation of the `and!` operation for an async and a task. + /// Implementation of the `and!` operation for an async and a task. /// member inline MergeSources< ^TResult1, ^TResult2> : computation: Async< ^TResult1 > * task: Task< ^TResult2 > -> Task @@ -446,14 +446,14 @@ module HighPriority = type TaskBuilder with /// - /// Implmentation of the `and!` operation for two tasks. + /// Implementation of the `and!` operation for two tasks. /// member inline MergeSources< ^TResult1, ^TResult2> : task1: Task< ^TResult1 > * task2: Task< ^TResult2 > -> Task type BackgroundTaskBuilder with /// - /// Implmentation of the `and!` operation for two tasks. + /// Implementation of the `and!` operation for two tasks. /// member inline MergeSources< ^TResult1, ^TResult2> : task1: Task< ^TResult1 > * task2: Task< ^TResult2 > -> Task From d6d8ba7aa9af2565fcf897cb9eb04f337a267440 Mon Sep 17 00:00:00 2001 From: Vladimir Shchur Date: Fri, 11 Apr 2025 12:17:12 -0700 Subject: [PATCH 14/16] Updated surface area --- ...p.Core.SurfaceArea.netstandard20.debug.bsl | 28 +++++++++++++++++++ ...Core.SurfaceArea.netstandard20.release.bsl | 28 +++++++++++++++++++ ...Core.SurfaceArea.netstandard21.release.bsl | 28 +++++++++++++++++++ 3 files changed, 84 insertions(+) diff --git a/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard20.debug.bsl b/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard20.debug.bsl index 8b927e77440..5bd39b09a39 100644 --- a/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard20.debug.bsl +++ b/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard20.debug.bsl @@ -754,6 +754,16 @@ Microsoft.FSharp.Control.TaskBuilderBase: Microsoft.FSharp.Core.CompilerServices Microsoft.FSharp.Control.TaskBuilderExtensions.HighPriority: Boolean TaskBuilderBase.BindDynamic.Static[TOverall,TResult1,TResult2](Microsoft.FSharp.Core.CompilerServices.ResumableStateMachine`1[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall]] ByRef, System.Threading.Tasks.Task`1[TResult1], Microsoft.FSharp.Core.FSharpFunc`2[TResult1,Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall],TResult2]]) Microsoft.FSharp.Control.TaskBuilderExtensions.HighPriority: Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall],TResult2] TaskBuilderBase.Bind[TResult1,TOverall,TResult2](Microsoft.FSharp.Control.TaskBuilderBase, System.Threading.Tasks.Task`1[TResult1], Microsoft.FSharp.Core.FSharpFunc`2[TResult1,Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall],TResult2]]) Microsoft.FSharp.Control.TaskBuilderExtensions.HighPriority: Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[T],T] TaskBuilderBase.ReturnFrom[T](Microsoft.FSharp.Control.TaskBuilderBase, System.Threading.Tasks.Task`1[T]) +Microsoft.FSharp.Control.TaskBuilderExtensions.HighPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] BackgroundTaskBuilder.MergeSources[TResult1,TResult2](Microsoft.FSharp.Control.BackgroundTaskBuilder, System.Threading.Tasks.Task`1[TResult1], System.Threading.Tasks.Task`1[TResult2]) +Microsoft.FSharp.Control.TaskBuilderExtensions.HighPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] TaskBuilder.MergeSources[TResult1,TResult2](Microsoft.FSharp.Control.TaskBuilder, System.Threading.Tasks.Task`1[TResult1], System.Threading.Tasks.Task`1[TResult2]) +Microsoft.FSharp.Control.TaskBuilderExtensions.LowPlusPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] BackgroundTaskBuilder.MergeSources$W[TTaskLike1,TResult1,TResult2,TAwaiter1](Microsoft.FSharp.Core.FSharpFunc`2[TTaskLike1,TAwaiter1], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter1,TResult1], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter1,System.Boolean], Microsoft.FSharp.Control.BackgroundTaskBuilder, TTaskLike1, Microsoft.FSharp.Control.FSharpAsync`1[TResult2]) +Microsoft.FSharp.Control.TaskBuilderExtensions.LowPlusPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] BackgroundTaskBuilder.MergeSources$W[TTaskLike2,TResult1,TResult2,TAwaiter2](Microsoft.FSharp.Core.FSharpFunc`2[TTaskLike2,TAwaiter2], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter2,TResult2], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter2,System.Boolean], Microsoft.FSharp.Control.BackgroundTaskBuilder, Microsoft.FSharp.Control.FSharpAsync`1[TResult1], TTaskLike2) +Microsoft.FSharp.Control.TaskBuilderExtensions.LowPlusPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] BackgroundTaskBuilder.MergeSources[TTaskLike1,TResult1,TResult2,TAwaiter1](Microsoft.FSharp.Control.BackgroundTaskBuilder, TTaskLike1, Microsoft.FSharp.Control.FSharpAsync`1[TResult2]) +Microsoft.FSharp.Control.TaskBuilderExtensions.LowPlusPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] BackgroundTaskBuilder.MergeSources[TTaskLike2,TResult1,TResult2,TAwaiter2](Microsoft.FSharp.Control.BackgroundTaskBuilder, Microsoft.FSharp.Control.FSharpAsync`1[TResult1], TTaskLike2) +Microsoft.FSharp.Control.TaskBuilderExtensions.LowPlusPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] TaskBuilder.MergeSources$W[TTaskLike1,TResult1,TResult2,TAwaiter1](Microsoft.FSharp.Core.FSharpFunc`2[TTaskLike1,TAwaiter1], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter1,TResult1], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter1,System.Boolean], Microsoft.FSharp.Control.TaskBuilder, TTaskLike1, Microsoft.FSharp.Control.FSharpAsync`1[TResult2]) +Microsoft.FSharp.Control.TaskBuilderExtensions.LowPlusPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] TaskBuilder.MergeSources$W[TTaskLike2,TResult1,TResult2,TAwaiter2](Microsoft.FSharp.Core.FSharpFunc`2[TTaskLike2,TAwaiter2], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter2,TResult2], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter2,System.Boolean], Microsoft.FSharp.Control.TaskBuilder, Microsoft.FSharp.Control.FSharpAsync`1[TResult1], TTaskLike2) +Microsoft.FSharp.Control.TaskBuilderExtensions.LowPlusPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] TaskBuilder.MergeSources[TTaskLike1,TResult1,TResult2,TAwaiter1](Microsoft.FSharp.Control.TaskBuilder, TTaskLike1, Microsoft.FSharp.Control.FSharpAsync`1[TResult2]) +Microsoft.FSharp.Control.TaskBuilderExtensions.LowPlusPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] TaskBuilder.MergeSources[TTaskLike2,TResult1,TResult2,TAwaiter2](Microsoft.FSharp.Control.TaskBuilder, Microsoft.FSharp.Control.FSharpAsync`1[TResult1], TTaskLike2) Microsoft.FSharp.Control.TaskBuilderExtensions.LowPriority: Boolean TaskBuilderBase.BindDynamic.Static$W[TTaskLike,TResult1,TResult2,TAwaiter,TOverall](Microsoft.FSharp.Core.FSharpFunc`2[TTaskLike,TAwaiter], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter,TResult1], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter,System.Boolean], Microsoft.FSharp.Core.CompilerServices.ResumableStateMachine`1[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall]] ByRef, TTaskLike, Microsoft.FSharp.Core.FSharpFunc`2[TResult1,Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall],TResult2]]) Microsoft.FSharp.Control.TaskBuilderExtensions.LowPriority: Boolean TaskBuilderBase.BindDynamic.Static[TTaskLike,TResult1,TResult2,TAwaiter,TOverall](Microsoft.FSharp.Core.CompilerServices.ResumableStateMachine`1[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall]] ByRef, TTaskLike, Microsoft.FSharp.Core.FSharpFunc`2[TResult1,Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall],TResult2]]) Microsoft.FSharp.Control.TaskBuilderExtensions.LowPriority: Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall],TResult2] TaskBuilderBase.Bind$W[TTaskLike,TResult1,TResult2,TAwaiter,TOverall](Microsoft.FSharp.Core.FSharpFunc`2[TTaskLike,TAwaiter], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter,TResult1], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter,System.Boolean], Microsoft.FSharp.Control.TaskBuilderBase, TTaskLike, Microsoft.FSharp.Core.FSharpFunc`2[TResult1,Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall],TResult2]]) @@ -761,8 +771,26 @@ Microsoft.FSharp.Control.TaskBuilderExtensions.LowPriority: Microsoft.FSharp.Cor Microsoft.FSharp.Control.TaskBuilderExtensions.LowPriority: Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall],T] TaskBuilderBase.Using[TResource,TOverall,T](Microsoft.FSharp.Control.TaskBuilderBase, TResource, Microsoft.FSharp.Core.FSharpFunc`2[TResource,Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall],T]]) Microsoft.FSharp.Control.TaskBuilderExtensions.LowPriority: Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[T],T] TaskBuilderBase.ReturnFrom$W[TTaskLike,TAwaiter,T](Microsoft.FSharp.Core.FSharpFunc`2[TTaskLike,TAwaiter], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter,T], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter,System.Boolean], Microsoft.FSharp.Control.TaskBuilderBase, TTaskLike) Microsoft.FSharp.Control.TaskBuilderExtensions.LowPriority: Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[T],T] TaskBuilderBase.ReturnFrom[TTaskLike,TAwaiter,T](Microsoft.FSharp.Control.TaskBuilderBase, TTaskLike) +Microsoft.FSharp.Control.TaskBuilderExtensions.LowPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] BackgroundTaskBuilder.MergeSources$W[TTaskLike1,TTaskLike2,TResult1,TResult2,TAwaiter1,TAwaiter2](Microsoft.FSharp.Core.FSharpFunc`2[TTaskLike1,TAwaiter1], Microsoft.FSharp.Core.FSharpFunc`2[TTaskLike2,TAwaiter2], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter1,TResult1], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter2,TResult2], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter1,System.Boolean], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter2,System.Boolean], Microsoft.FSharp.Control.BackgroundTaskBuilder, TTaskLike1, TTaskLike2) +Microsoft.FSharp.Control.TaskBuilderExtensions.LowPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] BackgroundTaskBuilder.MergeSources[TTaskLike1,TTaskLike2,TResult1,TResult2,TAwaiter1,TAwaiter2](Microsoft.FSharp.Control.BackgroundTaskBuilder, TTaskLike1, TTaskLike2) +Microsoft.FSharp.Control.TaskBuilderExtensions.LowPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] TaskBuilder.MergeSources$W[TTaskLike1,TTaskLike2,TResult1,TResult2,TAwaiter1,TAwaiter2](Microsoft.FSharp.Core.FSharpFunc`2[TTaskLike1,TAwaiter1], Microsoft.FSharp.Core.FSharpFunc`2[TTaskLike2,TAwaiter2], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter1,TResult1], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter2,TResult2], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter1,System.Boolean], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter2,System.Boolean], Microsoft.FSharp.Control.TaskBuilder, TTaskLike1, TTaskLike2) +Microsoft.FSharp.Control.TaskBuilderExtensions.LowPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] TaskBuilder.MergeSources[TTaskLike1,TTaskLike2,TResult1,TResult2,TAwaiter1,TAwaiter2](Microsoft.FSharp.Control.TaskBuilder, TTaskLike1, TTaskLike2) Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority: Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall],TResult2] TaskBuilderBase.Bind[TResult1,TOverall,TResult2](Microsoft.FSharp.Control.TaskBuilderBase, Microsoft.FSharp.Control.FSharpAsync`1[TResult1], Microsoft.FSharp.Core.FSharpFunc`2[TResult1,Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall],TResult2]]) Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority: Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[T],T] TaskBuilderBase.ReturnFrom[T](Microsoft.FSharp.Control.TaskBuilderBase, Microsoft.FSharp.Control.FSharpAsync`1[T]) +Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] BackgroundTaskBuilder.MergeSources$W[TTaskLike1,TResult1,TResult2,TAwaiter1](Microsoft.FSharp.Core.FSharpFunc`2[TTaskLike1,TAwaiter1], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter1,TResult1], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter1,System.Boolean], Microsoft.FSharp.Control.BackgroundTaskBuilder, TTaskLike1, System.Threading.Tasks.Task`1[TResult2]) +Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] BackgroundTaskBuilder.MergeSources$W[TTaskLike2,TResult1,TResult2,TAwaiter2](Microsoft.FSharp.Core.FSharpFunc`2[TTaskLike2,TAwaiter2], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter2,TResult2], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter2,System.Boolean], Microsoft.FSharp.Control.BackgroundTaskBuilder, System.Threading.Tasks.Task`1[TResult1], TTaskLike2) +Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] BackgroundTaskBuilder.MergeSources[TResult1,TResult2](Microsoft.FSharp.Control.BackgroundTaskBuilder, Microsoft.FSharp.Control.FSharpAsync`1[TResult1], Microsoft.FSharp.Control.FSharpAsync`1[TResult2]) +Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] BackgroundTaskBuilder.MergeSources[TResult1,TResult2](Microsoft.FSharp.Control.BackgroundTaskBuilder, Microsoft.FSharp.Control.FSharpAsync`1[TResult1], System.Threading.Tasks.Task`1[TResult2]) +Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] BackgroundTaskBuilder.MergeSources[TResult1,TResult2](Microsoft.FSharp.Control.BackgroundTaskBuilder, System.Threading.Tasks.Task`1[TResult1], Microsoft.FSharp.Control.FSharpAsync`1[TResult2]) +Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] BackgroundTaskBuilder.MergeSources[TTaskLike1,TResult1,TResult2,TAwaiter1](Microsoft.FSharp.Control.BackgroundTaskBuilder, TTaskLike1, System.Threading.Tasks.Task`1[TResult2]) +Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] BackgroundTaskBuilder.MergeSources[TTaskLike2,TResult1,TResult2,TAwaiter2](Microsoft.FSharp.Control.BackgroundTaskBuilder, System.Threading.Tasks.Task`1[TResult1], TTaskLike2) +Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] TaskBuilder.MergeSources$W[TTaskLike1,TResult1,TResult2,TAwaiter1](Microsoft.FSharp.Core.FSharpFunc`2[TTaskLike1,TAwaiter1], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter1,TResult1], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter1,System.Boolean], Microsoft.FSharp.Control.TaskBuilder, TTaskLike1, System.Threading.Tasks.Task`1[TResult2]) +Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] TaskBuilder.MergeSources$W[TTaskLike2,TResult1,TResult2,TAwaiter2](Microsoft.FSharp.Core.FSharpFunc`2[TTaskLike2,TAwaiter2], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter2,TResult2], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter2,System.Boolean], Microsoft.FSharp.Control.TaskBuilder, System.Threading.Tasks.Task`1[TResult1], TTaskLike2) +Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] TaskBuilder.MergeSources[TResult1,TResult2](Microsoft.FSharp.Control.TaskBuilder, Microsoft.FSharp.Control.FSharpAsync`1[TResult1], Microsoft.FSharp.Control.FSharpAsync`1[TResult2]) +Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] TaskBuilder.MergeSources[TResult1,TResult2](Microsoft.FSharp.Control.TaskBuilder, Microsoft.FSharp.Control.FSharpAsync`1[TResult1], System.Threading.Tasks.Task`1[TResult2]) +Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] TaskBuilder.MergeSources[TResult1,TResult2](Microsoft.FSharp.Control.TaskBuilder, System.Threading.Tasks.Task`1[TResult1], Microsoft.FSharp.Control.FSharpAsync`1[TResult2]) +Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] TaskBuilder.MergeSources[TTaskLike1,TResult1,TResult2,TAwaiter1](Microsoft.FSharp.Control.TaskBuilder, TTaskLike1, System.Threading.Tasks.Task`1[TResult2]) +Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] TaskBuilder.MergeSources[TTaskLike2,TResult1,TResult2,TAwaiter2](Microsoft.FSharp.Control.TaskBuilder, System.Threading.Tasks.Task`1[TResult1], TTaskLike2) Microsoft.FSharp.Control.TaskBuilderModule: Microsoft.FSharp.Control.BackgroundTaskBuilder backgroundTask Microsoft.FSharp.Control.TaskBuilderModule: Microsoft.FSharp.Control.BackgroundTaskBuilder get_backgroundTask() Microsoft.FSharp.Control.TaskBuilderModule: Microsoft.FSharp.Control.TaskBuilder get_task() diff --git a/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard20.release.bsl b/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard20.release.bsl index cac2ceae8ed..8096acb15a1 100644 --- a/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard20.release.bsl +++ b/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard20.release.bsl @@ -754,6 +754,16 @@ Microsoft.FSharp.Control.TaskBuilderBase: Microsoft.FSharp.Core.CompilerServices Microsoft.FSharp.Control.TaskBuilderExtensions.HighPriority: Boolean TaskBuilderBase.BindDynamic.Static[TOverall,TResult1,TResult2](Microsoft.FSharp.Core.CompilerServices.ResumableStateMachine`1[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall]] ByRef, System.Threading.Tasks.Task`1[TResult1], Microsoft.FSharp.Core.FSharpFunc`2[TResult1,Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall],TResult2]]) Microsoft.FSharp.Control.TaskBuilderExtensions.HighPriority: Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall],TResult2] TaskBuilderBase.Bind[TResult1,TOverall,TResult2](Microsoft.FSharp.Control.TaskBuilderBase, System.Threading.Tasks.Task`1[TResult1], Microsoft.FSharp.Core.FSharpFunc`2[TResult1,Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall],TResult2]]) Microsoft.FSharp.Control.TaskBuilderExtensions.HighPriority: Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[T],T] TaskBuilderBase.ReturnFrom[T](Microsoft.FSharp.Control.TaskBuilderBase, System.Threading.Tasks.Task`1[T]) +Microsoft.FSharp.Control.TaskBuilderExtensions.HighPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] BackgroundTaskBuilder.MergeSources[TResult1,TResult2](Microsoft.FSharp.Control.BackgroundTaskBuilder, System.Threading.Tasks.Task`1[TResult1], System.Threading.Tasks.Task`1[TResult2]) +Microsoft.FSharp.Control.TaskBuilderExtensions.HighPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] TaskBuilder.MergeSources[TResult1,TResult2](Microsoft.FSharp.Control.TaskBuilder, System.Threading.Tasks.Task`1[TResult1], System.Threading.Tasks.Task`1[TResult2]) +Microsoft.FSharp.Control.TaskBuilderExtensions.LowPlusPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] BackgroundTaskBuilder.MergeSources$W[TTaskLike1,TResult1,TResult2,TAwaiter1](Microsoft.FSharp.Core.FSharpFunc`2[TTaskLike1,TAwaiter1], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter1,TResult1], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter1,System.Boolean], Microsoft.FSharp.Control.BackgroundTaskBuilder, TTaskLike1, Microsoft.FSharp.Control.FSharpAsync`1[TResult2]) +Microsoft.FSharp.Control.TaskBuilderExtensions.LowPlusPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] BackgroundTaskBuilder.MergeSources$W[TTaskLike2,TResult1,TResult2,TAwaiter2](Microsoft.FSharp.Core.FSharpFunc`2[TTaskLike2,TAwaiter2], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter2,TResult2], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter2,System.Boolean], Microsoft.FSharp.Control.BackgroundTaskBuilder, Microsoft.FSharp.Control.FSharpAsync`1[TResult1], TTaskLike2) +Microsoft.FSharp.Control.TaskBuilderExtensions.LowPlusPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] BackgroundTaskBuilder.MergeSources[TTaskLike1,TResult1,TResult2,TAwaiter1](Microsoft.FSharp.Control.BackgroundTaskBuilder, TTaskLike1, Microsoft.FSharp.Control.FSharpAsync`1[TResult2]) +Microsoft.FSharp.Control.TaskBuilderExtensions.LowPlusPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] BackgroundTaskBuilder.MergeSources[TTaskLike2,TResult1,TResult2,TAwaiter2](Microsoft.FSharp.Control.BackgroundTaskBuilder, Microsoft.FSharp.Control.FSharpAsync`1[TResult1], TTaskLike2) +Microsoft.FSharp.Control.TaskBuilderExtensions.LowPlusPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] TaskBuilder.MergeSources$W[TTaskLike1,TResult1,TResult2,TAwaiter1](Microsoft.FSharp.Core.FSharpFunc`2[TTaskLike1,TAwaiter1], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter1,TResult1], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter1,System.Boolean], Microsoft.FSharp.Control.TaskBuilder, TTaskLike1, Microsoft.FSharp.Control.FSharpAsync`1[TResult2]) +Microsoft.FSharp.Control.TaskBuilderExtensions.LowPlusPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] TaskBuilder.MergeSources$W[TTaskLike2,TResult1,TResult2,TAwaiter2](Microsoft.FSharp.Core.FSharpFunc`2[TTaskLike2,TAwaiter2], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter2,TResult2], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter2,System.Boolean], Microsoft.FSharp.Control.TaskBuilder, Microsoft.FSharp.Control.FSharpAsync`1[TResult1], TTaskLike2) +Microsoft.FSharp.Control.TaskBuilderExtensions.LowPlusPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] TaskBuilder.MergeSources[TTaskLike1,TResult1,TResult2,TAwaiter1](Microsoft.FSharp.Control.TaskBuilder, TTaskLike1, Microsoft.FSharp.Control.FSharpAsync`1[TResult2]) +Microsoft.FSharp.Control.TaskBuilderExtensions.LowPlusPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] TaskBuilder.MergeSources[TTaskLike2,TResult1,TResult2,TAwaiter2](Microsoft.FSharp.Control.TaskBuilder, Microsoft.FSharp.Control.FSharpAsync`1[TResult1], TTaskLike2) Microsoft.FSharp.Control.TaskBuilderExtensions.LowPriority: Boolean TaskBuilderBase.BindDynamic.Static$W[TTaskLike,TResult1,TResult2,TAwaiter,TOverall](Microsoft.FSharp.Core.FSharpFunc`2[TTaskLike,TAwaiter], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter,TResult1], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter,System.Boolean], Microsoft.FSharp.Core.CompilerServices.ResumableStateMachine`1[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall]] ByRef, TTaskLike, Microsoft.FSharp.Core.FSharpFunc`2[TResult1,Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall],TResult2]]) Microsoft.FSharp.Control.TaskBuilderExtensions.LowPriority: Boolean TaskBuilderBase.BindDynamic.Static[TTaskLike,TResult1,TResult2,TAwaiter,TOverall](Microsoft.FSharp.Core.CompilerServices.ResumableStateMachine`1[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall]] ByRef, TTaskLike, Microsoft.FSharp.Core.FSharpFunc`2[TResult1,Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall],TResult2]]) Microsoft.FSharp.Control.TaskBuilderExtensions.LowPriority: Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall],TResult2] TaskBuilderBase.Bind$W[TTaskLike,TResult1,TResult2,TAwaiter,TOverall](Microsoft.FSharp.Core.FSharpFunc`2[TTaskLike,TAwaiter], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter,TResult1], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter,System.Boolean], Microsoft.FSharp.Control.TaskBuilderBase, TTaskLike, Microsoft.FSharp.Core.FSharpFunc`2[TResult1,Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall],TResult2]]) @@ -761,8 +771,26 @@ Microsoft.FSharp.Control.TaskBuilderExtensions.LowPriority: Microsoft.FSharp.Cor Microsoft.FSharp.Control.TaskBuilderExtensions.LowPriority: Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall],T] TaskBuilderBase.Using[TResource,TOverall,T](Microsoft.FSharp.Control.TaskBuilderBase, TResource, Microsoft.FSharp.Core.FSharpFunc`2[TResource,Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall],T]]) Microsoft.FSharp.Control.TaskBuilderExtensions.LowPriority: Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[T],T] TaskBuilderBase.ReturnFrom$W[TTaskLike,TAwaiter,T](Microsoft.FSharp.Core.FSharpFunc`2[TTaskLike,TAwaiter], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter,T], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter,System.Boolean], Microsoft.FSharp.Control.TaskBuilderBase, TTaskLike) Microsoft.FSharp.Control.TaskBuilderExtensions.LowPriority: Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[T],T] TaskBuilderBase.ReturnFrom[TTaskLike,TAwaiter,T](Microsoft.FSharp.Control.TaskBuilderBase, TTaskLike) +Microsoft.FSharp.Control.TaskBuilderExtensions.LowPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] BackgroundTaskBuilder.MergeSources$W[TTaskLike1,TTaskLike2,TResult1,TResult2,TAwaiter1,TAwaiter2](Microsoft.FSharp.Core.FSharpFunc`2[TTaskLike1,TAwaiter1], Microsoft.FSharp.Core.FSharpFunc`2[TTaskLike2,TAwaiter2], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter1,TResult1], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter2,TResult2], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter1,System.Boolean], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter2,System.Boolean], Microsoft.FSharp.Control.BackgroundTaskBuilder, TTaskLike1, TTaskLike2) +Microsoft.FSharp.Control.TaskBuilderExtensions.LowPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] BackgroundTaskBuilder.MergeSources[TTaskLike1,TTaskLike2,TResult1,TResult2,TAwaiter1,TAwaiter2](Microsoft.FSharp.Control.BackgroundTaskBuilder, TTaskLike1, TTaskLike2) +Microsoft.FSharp.Control.TaskBuilderExtensions.LowPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] TaskBuilder.MergeSources$W[TTaskLike1,TTaskLike2,TResult1,TResult2,TAwaiter1,TAwaiter2](Microsoft.FSharp.Core.FSharpFunc`2[TTaskLike1,TAwaiter1], Microsoft.FSharp.Core.FSharpFunc`2[TTaskLike2,TAwaiter2], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter1,TResult1], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter2,TResult2], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter1,System.Boolean], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter2,System.Boolean], Microsoft.FSharp.Control.TaskBuilder, TTaskLike1, TTaskLike2) +Microsoft.FSharp.Control.TaskBuilderExtensions.LowPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] TaskBuilder.MergeSources[TTaskLike1,TTaskLike2,TResult1,TResult2,TAwaiter1,TAwaiter2](Microsoft.FSharp.Control.TaskBuilder, TTaskLike1, TTaskLike2) Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority: Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall],TResult2] TaskBuilderBase.Bind[TResult1,TOverall,TResult2](Microsoft.FSharp.Control.TaskBuilderBase, Microsoft.FSharp.Control.FSharpAsync`1[TResult1], Microsoft.FSharp.Core.FSharpFunc`2[TResult1,Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall],TResult2]]) Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority: Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[T],T] TaskBuilderBase.ReturnFrom[T](Microsoft.FSharp.Control.TaskBuilderBase, Microsoft.FSharp.Control.FSharpAsync`1[T]) +Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] BackgroundTaskBuilder.MergeSources$W[TTaskLike1,TResult1,TResult2,TAwaiter1](Microsoft.FSharp.Core.FSharpFunc`2[TTaskLike1,TAwaiter1], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter1,TResult1], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter1,System.Boolean], Microsoft.FSharp.Control.BackgroundTaskBuilder, TTaskLike1, System.Threading.Tasks.Task`1[TResult2]) +Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] BackgroundTaskBuilder.MergeSources$W[TTaskLike2,TResult1,TResult2,TAwaiter2](Microsoft.FSharp.Core.FSharpFunc`2[TTaskLike2,TAwaiter2], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter2,TResult2], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter2,System.Boolean], Microsoft.FSharp.Control.BackgroundTaskBuilder, System.Threading.Tasks.Task`1[TResult1], TTaskLike2) +Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] BackgroundTaskBuilder.MergeSources[TResult1,TResult2](Microsoft.FSharp.Control.BackgroundTaskBuilder, Microsoft.FSharp.Control.FSharpAsync`1[TResult1], Microsoft.FSharp.Control.FSharpAsync`1[TResult2]) +Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] BackgroundTaskBuilder.MergeSources[TResult1,TResult2](Microsoft.FSharp.Control.BackgroundTaskBuilder, Microsoft.FSharp.Control.FSharpAsync`1[TResult1], System.Threading.Tasks.Task`1[TResult2]) +Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] BackgroundTaskBuilder.MergeSources[TResult1,TResult2](Microsoft.FSharp.Control.BackgroundTaskBuilder, System.Threading.Tasks.Task`1[TResult1], Microsoft.FSharp.Control.FSharpAsync`1[TResult2]) +Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] BackgroundTaskBuilder.MergeSources[TTaskLike1,TResult1,TResult2,TAwaiter1](Microsoft.FSharp.Control.BackgroundTaskBuilder, TTaskLike1, System.Threading.Tasks.Task`1[TResult2]) +Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] BackgroundTaskBuilder.MergeSources[TTaskLike2,TResult1,TResult2,TAwaiter2](Microsoft.FSharp.Control.BackgroundTaskBuilder, System.Threading.Tasks.Task`1[TResult1], TTaskLike2) +Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] TaskBuilder.MergeSources$W[TTaskLike1,TResult1,TResult2,TAwaiter1](Microsoft.FSharp.Core.FSharpFunc`2[TTaskLike1,TAwaiter1], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter1,TResult1], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter1,System.Boolean], Microsoft.FSharp.Control.TaskBuilder, TTaskLike1, System.Threading.Tasks.Task`1[TResult2]) +Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] TaskBuilder.MergeSources$W[TTaskLike2,TResult1,TResult2,TAwaiter2](Microsoft.FSharp.Core.FSharpFunc`2[TTaskLike2,TAwaiter2], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter2,TResult2], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter2,System.Boolean], Microsoft.FSharp.Control.TaskBuilder, System.Threading.Tasks.Task`1[TResult1], TTaskLike2) +Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] TaskBuilder.MergeSources[TResult1,TResult2](Microsoft.FSharp.Control.TaskBuilder, Microsoft.FSharp.Control.FSharpAsync`1[TResult1], Microsoft.FSharp.Control.FSharpAsync`1[TResult2]) +Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] TaskBuilder.MergeSources[TResult1,TResult2](Microsoft.FSharp.Control.TaskBuilder, Microsoft.FSharp.Control.FSharpAsync`1[TResult1], System.Threading.Tasks.Task`1[TResult2]) +Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] TaskBuilder.MergeSources[TResult1,TResult2](Microsoft.FSharp.Control.TaskBuilder, System.Threading.Tasks.Task`1[TResult1], Microsoft.FSharp.Control.FSharpAsync`1[TResult2]) +Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] TaskBuilder.MergeSources[TTaskLike1,TResult1,TResult2,TAwaiter1](Microsoft.FSharp.Control.TaskBuilder, TTaskLike1, System.Threading.Tasks.Task`1[TResult2]) +Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] TaskBuilder.MergeSources[TTaskLike2,TResult1,TResult2,TAwaiter2](Microsoft.FSharp.Control.TaskBuilder, System.Threading.Tasks.Task`1[TResult1], TTaskLike2) Microsoft.FSharp.Control.TaskBuilderModule: Microsoft.FSharp.Control.BackgroundTaskBuilder backgroundTask Microsoft.FSharp.Control.TaskBuilderModule: Microsoft.FSharp.Control.BackgroundTaskBuilder get_backgroundTask() Microsoft.FSharp.Control.TaskBuilderModule: Microsoft.FSharp.Control.TaskBuilder get_task() diff --git a/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard21.release.bsl b/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard21.release.bsl index b17d1201a5a..c4106d360c4 100644 --- a/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard21.release.bsl +++ b/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard21.release.bsl @@ -757,6 +757,16 @@ Microsoft.FSharp.Control.TaskBuilderBase: Microsoft.FSharp.Core.CompilerServices Microsoft.FSharp.Control.TaskBuilderExtensions.HighPriority: Boolean TaskBuilderBase.BindDynamic.Static[TOverall,TResult1,TResult2](Microsoft.FSharp.Core.CompilerServices.ResumableStateMachine`1[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall]] ByRef, System.Threading.Tasks.Task`1[TResult1], Microsoft.FSharp.Core.FSharpFunc`2[TResult1,Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall],TResult2]]) Microsoft.FSharp.Control.TaskBuilderExtensions.HighPriority: Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall],TResult2] TaskBuilderBase.Bind[TResult1,TOverall,TResult2](Microsoft.FSharp.Control.TaskBuilderBase, System.Threading.Tasks.Task`1[TResult1], Microsoft.FSharp.Core.FSharpFunc`2[TResult1,Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall],TResult2]]) Microsoft.FSharp.Control.TaskBuilderExtensions.HighPriority: Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[T],T] TaskBuilderBase.ReturnFrom[T](Microsoft.FSharp.Control.TaskBuilderBase, System.Threading.Tasks.Task`1[T]) +Microsoft.FSharp.Control.TaskBuilderExtensions.HighPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] BackgroundTaskBuilder.MergeSources[TResult1,TResult2](Microsoft.FSharp.Control.BackgroundTaskBuilder, System.Threading.Tasks.Task`1[TResult1], System.Threading.Tasks.Task`1[TResult2]) +Microsoft.FSharp.Control.TaskBuilderExtensions.HighPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] TaskBuilder.MergeSources[TResult1,TResult2](Microsoft.FSharp.Control.TaskBuilder, System.Threading.Tasks.Task`1[TResult1], System.Threading.Tasks.Task`1[TResult2]) +Microsoft.FSharp.Control.TaskBuilderExtensions.LowPlusPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] BackgroundTaskBuilder.MergeSources$W[TTaskLike1,TResult1,TResult2,TAwaiter1](Microsoft.FSharp.Core.FSharpFunc`2[TTaskLike1,TAwaiter1], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter1,TResult1], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter1,System.Boolean], Microsoft.FSharp.Control.BackgroundTaskBuilder, TTaskLike1, Microsoft.FSharp.Control.FSharpAsync`1[TResult2]) +Microsoft.FSharp.Control.TaskBuilderExtensions.LowPlusPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] BackgroundTaskBuilder.MergeSources$W[TTaskLike2,TResult1,TResult2,TAwaiter2](Microsoft.FSharp.Core.FSharpFunc`2[TTaskLike2,TAwaiter2], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter2,TResult2], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter2,System.Boolean], Microsoft.FSharp.Control.BackgroundTaskBuilder, Microsoft.FSharp.Control.FSharpAsync`1[TResult1], TTaskLike2) +Microsoft.FSharp.Control.TaskBuilderExtensions.LowPlusPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] BackgroundTaskBuilder.MergeSources[TTaskLike1,TResult1,TResult2,TAwaiter1](Microsoft.FSharp.Control.BackgroundTaskBuilder, TTaskLike1, Microsoft.FSharp.Control.FSharpAsync`1[TResult2]) +Microsoft.FSharp.Control.TaskBuilderExtensions.LowPlusPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] BackgroundTaskBuilder.MergeSources[TTaskLike2,TResult1,TResult2,TAwaiter2](Microsoft.FSharp.Control.BackgroundTaskBuilder, Microsoft.FSharp.Control.FSharpAsync`1[TResult1], TTaskLike2) +Microsoft.FSharp.Control.TaskBuilderExtensions.LowPlusPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] TaskBuilder.MergeSources$W[TTaskLike1,TResult1,TResult2,TAwaiter1](Microsoft.FSharp.Core.FSharpFunc`2[TTaskLike1,TAwaiter1], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter1,TResult1], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter1,System.Boolean], Microsoft.FSharp.Control.TaskBuilder, TTaskLike1, Microsoft.FSharp.Control.FSharpAsync`1[TResult2]) +Microsoft.FSharp.Control.TaskBuilderExtensions.LowPlusPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] TaskBuilder.MergeSources$W[TTaskLike2,TResult1,TResult2,TAwaiter2](Microsoft.FSharp.Core.FSharpFunc`2[TTaskLike2,TAwaiter2], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter2,TResult2], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter2,System.Boolean], Microsoft.FSharp.Control.TaskBuilder, Microsoft.FSharp.Control.FSharpAsync`1[TResult1], TTaskLike2) +Microsoft.FSharp.Control.TaskBuilderExtensions.LowPlusPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] TaskBuilder.MergeSources[TTaskLike1,TResult1,TResult2,TAwaiter1](Microsoft.FSharp.Control.TaskBuilder, TTaskLike1, Microsoft.FSharp.Control.FSharpAsync`1[TResult2]) +Microsoft.FSharp.Control.TaskBuilderExtensions.LowPlusPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] TaskBuilder.MergeSources[TTaskLike2,TResult1,TResult2,TAwaiter2](Microsoft.FSharp.Control.TaskBuilder, Microsoft.FSharp.Control.FSharpAsync`1[TResult1], TTaskLike2) Microsoft.FSharp.Control.TaskBuilderExtensions.LowPriority: Boolean TaskBuilderBase.BindDynamic.Static$W[TTaskLike,TResult1,TResult2,TAwaiter,TOverall](Microsoft.FSharp.Core.FSharpFunc`2[TTaskLike,TAwaiter], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter,TResult1], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter,System.Boolean], Microsoft.FSharp.Core.CompilerServices.ResumableStateMachine`1[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall]] ByRef, TTaskLike, Microsoft.FSharp.Core.FSharpFunc`2[TResult1,Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall],TResult2]]) Microsoft.FSharp.Control.TaskBuilderExtensions.LowPriority: Boolean TaskBuilderBase.BindDynamic.Static[TTaskLike,TResult1,TResult2,TAwaiter,TOverall](Microsoft.FSharp.Core.CompilerServices.ResumableStateMachine`1[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall]] ByRef, TTaskLike, Microsoft.FSharp.Core.FSharpFunc`2[TResult1,Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall],TResult2]]) Microsoft.FSharp.Control.TaskBuilderExtensions.LowPriority: Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall],TResult2] TaskBuilderBase.Bind$W[TTaskLike,TResult1,TResult2,TAwaiter,TOverall](Microsoft.FSharp.Core.FSharpFunc`2[TTaskLike,TAwaiter], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter,TResult1], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter,System.Boolean], Microsoft.FSharp.Control.TaskBuilderBase, TTaskLike, Microsoft.FSharp.Core.FSharpFunc`2[TResult1,Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall],TResult2]]) @@ -764,8 +774,26 @@ Microsoft.FSharp.Control.TaskBuilderExtensions.LowPriority: Microsoft.FSharp.Cor Microsoft.FSharp.Control.TaskBuilderExtensions.LowPriority: Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall],T] TaskBuilderBase.Using[TResource,TOverall,T](Microsoft.FSharp.Control.TaskBuilderBase, TResource, Microsoft.FSharp.Core.FSharpFunc`2[TResource,Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall],T]]) Microsoft.FSharp.Control.TaskBuilderExtensions.LowPriority: Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[T],T] TaskBuilderBase.ReturnFrom$W[TTaskLike,TAwaiter,T](Microsoft.FSharp.Core.FSharpFunc`2[TTaskLike,TAwaiter], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter,T], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter,System.Boolean], Microsoft.FSharp.Control.TaskBuilderBase, TTaskLike) Microsoft.FSharp.Control.TaskBuilderExtensions.LowPriority: Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[T],T] TaskBuilderBase.ReturnFrom[TTaskLike,TAwaiter,T](Microsoft.FSharp.Control.TaskBuilderBase, TTaskLike) +Microsoft.FSharp.Control.TaskBuilderExtensions.LowPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] BackgroundTaskBuilder.MergeSources$W[TTaskLike1,TTaskLike2,TResult1,TResult2,TAwaiter1,TAwaiter2](Microsoft.FSharp.Core.FSharpFunc`2[TTaskLike1,TAwaiter1], Microsoft.FSharp.Core.FSharpFunc`2[TTaskLike2,TAwaiter2], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter1,TResult1], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter2,TResult2], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter1,System.Boolean], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter2,System.Boolean], Microsoft.FSharp.Control.BackgroundTaskBuilder, TTaskLike1, TTaskLike2) +Microsoft.FSharp.Control.TaskBuilderExtensions.LowPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] BackgroundTaskBuilder.MergeSources[TTaskLike1,TTaskLike2,TResult1,TResult2,TAwaiter1,TAwaiter2](Microsoft.FSharp.Control.BackgroundTaskBuilder, TTaskLike1, TTaskLike2) +Microsoft.FSharp.Control.TaskBuilderExtensions.LowPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] TaskBuilder.MergeSources$W[TTaskLike1,TTaskLike2,TResult1,TResult2,TAwaiter1,TAwaiter2](Microsoft.FSharp.Core.FSharpFunc`2[TTaskLike1,TAwaiter1], Microsoft.FSharp.Core.FSharpFunc`2[TTaskLike2,TAwaiter2], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter1,TResult1], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter2,TResult2], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter1,System.Boolean], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter2,System.Boolean], Microsoft.FSharp.Control.TaskBuilder, TTaskLike1, TTaskLike2) +Microsoft.FSharp.Control.TaskBuilderExtensions.LowPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] TaskBuilder.MergeSources[TTaskLike1,TTaskLike2,TResult1,TResult2,TAwaiter1,TAwaiter2](Microsoft.FSharp.Control.TaskBuilder, TTaskLike1, TTaskLike2) Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority: Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall],TResult2] TaskBuilderBase.Bind[TResult1,TOverall,TResult2](Microsoft.FSharp.Control.TaskBuilderBase, Microsoft.FSharp.Control.FSharpAsync`1[TResult1], Microsoft.FSharp.Core.FSharpFunc`2[TResult1,Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall],TResult2]]) Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority: Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[T],T] TaskBuilderBase.ReturnFrom[T](Microsoft.FSharp.Control.TaskBuilderBase, Microsoft.FSharp.Control.FSharpAsync`1[T]) +Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] BackgroundTaskBuilder.MergeSources$W[TTaskLike1,TResult1,TResult2,TAwaiter1](Microsoft.FSharp.Core.FSharpFunc`2[TTaskLike1,TAwaiter1], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter1,TResult1], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter1,System.Boolean], Microsoft.FSharp.Control.BackgroundTaskBuilder, TTaskLike1, System.Threading.Tasks.Task`1[TResult2]) +Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] BackgroundTaskBuilder.MergeSources$W[TTaskLike2,TResult1,TResult2,TAwaiter2](Microsoft.FSharp.Core.FSharpFunc`2[TTaskLike2,TAwaiter2], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter2,TResult2], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter2,System.Boolean], Microsoft.FSharp.Control.BackgroundTaskBuilder, System.Threading.Tasks.Task`1[TResult1], TTaskLike2) +Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] BackgroundTaskBuilder.MergeSources[TResult1,TResult2](Microsoft.FSharp.Control.BackgroundTaskBuilder, Microsoft.FSharp.Control.FSharpAsync`1[TResult1], Microsoft.FSharp.Control.FSharpAsync`1[TResult2]) +Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] BackgroundTaskBuilder.MergeSources[TResult1,TResult2](Microsoft.FSharp.Control.BackgroundTaskBuilder, Microsoft.FSharp.Control.FSharpAsync`1[TResult1], System.Threading.Tasks.Task`1[TResult2]) +Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] BackgroundTaskBuilder.MergeSources[TResult1,TResult2](Microsoft.FSharp.Control.BackgroundTaskBuilder, System.Threading.Tasks.Task`1[TResult1], Microsoft.FSharp.Control.FSharpAsync`1[TResult2]) +Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] BackgroundTaskBuilder.MergeSources[TTaskLike1,TResult1,TResult2,TAwaiter1](Microsoft.FSharp.Control.BackgroundTaskBuilder, TTaskLike1, System.Threading.Tasks.Task`1[TResult2]) +Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] BackgroundTaskBuilder.MergeSources[TTaskLike2,TResult1,TResult2,TAwaiter2](Microsoft.FSharp.Control.BackgroundTaskBuilder, System.Threading.Tasks.Task`1[TResult1], TTaskLike2) +Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] TaskBuilder.MergeSources$W[TTaskLike1,TResult1,TResult2,TAwaiter1](Microsoft.FSharp.Core.FSharpFunc`2[TTaskLike1,TAwaiter1], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter1,TResult1], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter1,System.Boolean], Microsoft.FSharp.Control.TaskBuilder, TTaskLike1, System.Threading.Tasks.Task`1[TResult2]) +Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] TaskBuilder.MergeSources$W[TTaskLike2,TResult1,TResult2,TAwaiter2](Microsoft.FSharp.Core.FSharpFunc`2[TTaskLike2,TAwaiter2], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter2,TResult2], Microsoft.FSharp.Core.FSharpFunc`2[TAwaiter2,System.Boolean], Microsoft.FSharp.Control.TaskBuilder, System.Threading.Tasks.Task`1[TResult1], TTaskLike2) +Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] TaskBuilder.MergeSources[TResult1,TResult2](Microsoft.FSharp.Control.TaskBuilder, Microsoft.FSharp.Control.FSharpAsync`1[TResult1], Microsoft.FSharp.Control.FSharpAsync`1[TResult2]) +Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] TaskBuilder.MergeSources[TResult1,TResult2](Microsoft.FSharp.Control.TaskBuilder, Microsoft.FSharp.Control.FSharpAsync`1[TResult1], System.Threading.Tasks.Task`1[TResult2]) +Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] TaskBuilder.MergeSources[TResult1,TResult2](Microsoft.FSharp.Control.TaskBuilder, System.Threading.Tasks.Task`1[TResult1], Microsoft.FSharp.Control.FSharpAsync`1[TResult2]) +Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] TaskBuilder.MergeSources[TTaskLike1,TResult1,TResult2,TAwaiter1](Microsoft.FSharp.Control.TaskBuilder, TTaskLike1, System.Threading.Tasks.Task`1[TResult2]) +Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority: System.Threading.Tasks.Task`1[System.ValueTuple`2[TResult1,TResult2]] TaskBuilder.MergeSources[TTaskLike2,TResult1,TResult2,TAwaiter2](Microsoft.FSharp.Control.TaskBuilder, System.Threading.Tasks.Task`1[TResult1], TTaskLike2) Microsoft.FSharp.Control.TaskBuilderModule: Microsoft.FSharp.Control.BackgroundTaskBuilder backgroundTask Microsoft.FSharp.Control.TaskBuilderModule: Microsoft.FSharp.Control.BackgroundTaskBuilder get_backgroundTask() Microsoft.FSharp.Control.TaskBuilderModule: Microsoft.FSharp.Control.TaskBuilder get_task() From 28d1ae3c86a72b346352db53c4d5a56d95e0c9aa Mon Sep 17 00:00:00 2001 From: Vladimir Shchur Date: Fri, 11 Apr 2025 13:16:11 -0700 Subject: [PATCH 15/16] Try updating ILVerify files for Fshap.Core only --- ...erify_FSharp.Core_Debug_netstandard2.0.bsl | 20 +++++++++++++++++++ ...erify_FSharp.Core_Debug_netstandard2.1.bsl | 20 +++++++++++++++++++ ...ify_FSharp.Core_Release_netstandard2.0.bsl | 20 +++++++++++++++++++ ...ify_FSharp.Core_Release_netstandard2.1.bsl | 20 +++++++++++++++++++ 4 files changed, 80 insertions(+) diff --git a/tests/ILVerify/ilverify_FSharp.Core_Debug_netstandard2.0.bsl b/tests/ILVerify/ilverify_FSharp.Core_Debug_netstandard2.0.bsl index 4e6bca186fd..7f00cdfe046 100644 --- a/tests/ILVerify/ilverify_FSharp.Core_Debug_netstandard2.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Core_Debug_netstandard2.0.bsl @@ -1,3 +1,23 @@ +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.LowPlusPriority::TaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder, [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, !!0)][offset 0x0000000E][found ref '[FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.LowPlusPriority::TaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder, [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, !!0)][offset 0x00000016][found value 'TTaskLike2'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.LowPlusPriority::TaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder, !!0, [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1)][offset 0x0000000E][found value 'TTaskLike1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.LowPlusPriority::TaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder, !!0, [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1)][offset 0x00000016][found ref '[FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.LowPlusPriority::BackgroundTaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.BackgroundTaskBuilder, [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, !!0)][offset 0x0000000E][found ref '[FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.LowPlusPriority::BackgroundTaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.BackgroundTaskBuilder, [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, !!0)][offset 0x00000016][found value 'TTaskLike2'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.LowPlusPriority::BackgroundTaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.BackgroundTaskBuilder, !!0, [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1)][offset 0x0000000E][found value 'TTaskLike1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.LowPlusPriority::BackgroundTaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.BackgroundTaskBuilder, !!0, [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1)][offset 0x00000016][found ref '[FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority::TaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder, [S.P.CoreLib]System.Threading.Tasks.Task`1, !!0)][offset 0x0000000E][found ref '[S.P.CoreLib]System.Threading.Tasks.Task`1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority::TaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder, [S.P.CoreLib]System.Threading.Tasks.Task`1, !!0)][offset 0x00000016][found value 'TTaskLike2'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority::TaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder, !!0, [S.P.CoreLib]System.Threading.Tasks.Task`1)][offset 0x0000000E][found value 'TTaskLike1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority::TaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder, !!0, [S.P.CoreLib]System.Threading.Tasks.Task`1)][offset 0x00000016][found ref '[S.P.CoreLib]System.Threading.Tasks.Task`1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority::BackgroundTaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.BackgroundTaskBuilder, [S.P.CoreLib]System.Threading.Tasks.Task`1, !!0)][offset 0x0000000E][found ref '[S.P.CoreLib]System.Threading.Tasks.Task`1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority::BackgroundTaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.BackgroundTaskBuilder, [S.P.CoreLib]System.Threading.Tasks.Task`1, !!0)][offset 0x00000016][found value 'TTaskLike2'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority::BackgroundTaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.BackgroundTaskBuilder, !!0, [S.P.CoreLib]System.Threading.Tasks.Task`1)][offset 0x0000000E][found value 'TTaskLike1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority::BackgroundTaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.BackgroundTaskBuilder, !!0, [S.P.CoreLib]System.Threading.Tasks.Task`1)][offset 0x00000016][found ref '[S.P.CoreLib]System.Threading.Tasks.Task`1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.LowPriority::TaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder, !!0, !!1)][offset 0x0000000E][found value 'TTaskLike2'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.LowPriority::TaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder, !!0, !!1)][offset 0x00000016][found value 'TTaskLike1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.LowPriority::BackgroundTaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.BackgroundTaskBuilder, !!0, !!1)][offset 0x0000000E][found value 'TTaskLike2'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.LowPriority::BackgroundTaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.BackgroundTaskBuilder, !!0, !!1)][offset 0x00000016][found value 'TTaskLike1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Microsoft.FSharp.Collections.ArrayModule+Parallel::Choose([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, !!0[])][offset 0x000000A0][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Microsoft.FSharp.Collections.ArrayModule+Parallel::Filter([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, !!0[])][offset 0x00000029][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Microsoft.FSharp.Collections.ArrayModule+Parallel::Partition([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, !!0[])][offset 0x00000038][found Byte] Unexpected type on the stack. diff --git a/tests/ILVerify/ilverify_FSharp.Core_Debug_netstandard2.1.bsl b/tests/ILVerify/ilverify_FSharp.Core_Debug_netstandard2.1.bsl index 4e6bca186fd..7f00cdfe046 100644 --- a/tests/ILVerify/ilverify_FSharp.Core_Debug_netstandard2.1.bsl +++ b/tests/ILVerify/ilverify_FSharp.Core_Debug_netstandard2.1.bsl @@ -1,3 +1,23 @@ +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.LowPlusPriority::TaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder, [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, !!0)][offset 0x0000000E][found ref '[FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.LowPlusPriority::TaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder, [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, !!0)][offset 0x00000016][found value 'TTaskLike2'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.LowPlusPriority::TaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder, !!0, [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1)][offset 0x0000000E][found value 'TTaskLike1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.LowPlusPriority::TaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder, !!0, [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1)][offset 0x00000016][found ref '[FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.LowPlusPriority::BackgroundTaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.BackgroundTaskBuilder, [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, !!0)][offset 0x0000000E][found ref '[FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.LowPlusPriority::BackgroundTaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.BackgroundTaskBuilder, [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, !!0)][offset 0x00000016][found value 'TTaskLike2'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.LowPlusPriority::BackgroundTaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.BackgroundTaskBuilder, !!0, [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1)][offset 0x0000000E][found value 'TTaskLike1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.LowPlusPriority::BackgroundTaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.BackgroundTaskBuilder, !!0, [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1)][offset 0x00000016][found ref '[FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority::TaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder, [S.P.CoreLib]System.Threading.Tasks.Task`1, !!0)][offset 0x0000000E][found ref '[S.P.CoreLib]System.Threading.Tasks.Task`1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority::TaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder, [S.P.CoreLib]System.Threading.Tasks.Task`1, !!0)][offset 0x00000016][found value 'TTaskLike2'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority::TaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder, !!0, [S.P.CoreLib]System.Threading.Tasks.Task`1)][offset 0x0000000E][found value 'TTaskLike1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority::TaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder, !!0, [S.P.CoreLib]System.Threading.Tasks.Task`1)][offset 0x00000016][found ref '[S.P.CoreLib]System.Threading.Tasks.Task`1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority::BackgroundTaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.BackgroundTaskBuilder, [S.P.CoreLib]System.Threading.Tasks.Task`1, !!0)][offset 0x0000000E][found ref '[S.P.CoreLib]System.Threading.Tasks.Task`1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority::BackgroundTaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.BackgroundTaskBuilder, [S.P.CoreLib]System.Threading.Tasks.Task`1, !!0)][offset 0x00000016][found value 'TTaskLike2'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority::BackgroundTaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.BackgroundTaskBuilder, !!0, [S.P.CoreLib]System.Threading.Tasks.Task`1)][offset 0x0000000E][found value 'TTaskLike1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority::BackgroundTaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.BackgroundTaskBuilder, !!0, [S.P.CoreLib]System.Threading.Tasks.Task`1)][offset 0x00000016][found ref '[S.P.CoreLib]System.Threading.Tasks.Task`1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.LowPriority::TaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder, !!0, !!1)][offset 0x0000000E][found value 'TTaskLike2'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.LowPriority::TaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder, !!0, !!1)][offset 0x00000016][found value 'TTaskLike1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.LowPriority::BackgroundTaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.BackgroundTaskBuilder, !!0, !!1)][offset 0x0000000E][found value 'TTaskLike2'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.LowPriority::BackgroundTaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.BackgroundTaskBuilder, !!0, !!1)][offset 0x00000016][found value 'TTaskLike1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Microsoft.FSharp.Collections.ArrayModule+Parallel::Choose([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, !!0[])][offset 0x000000A0][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Microsoft.FSharp.Collections.ArrayModule+Parallel::Filter([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, !!0[])][offset 0x00000029][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Microsoft.FSharp.Collections.ArrayModule+Parallel::Partition([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, !!0[])][offset 0x00000038][found Byte] Unexpected type on the stack. diff --git a/tests/ILVerify/ilverify_FSharp.Core_Release_netstandard2.0.bsl b/tests/ILVerify/ilverify_FSharp.Core_Release_netstandard2.0.bsl index 6ab50914fdd..05a10ae7797 100644 --- a/tests/ILVerify/ilverify_FSharp.Core_Release_netstandard2.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Core_Release_netstandard2.0.bsl @@ -1,3 +1,23 @@ +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.LowPlusPriority::TaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder, [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, !!0)][offset 0x0000000E][found ref '[FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.LowPlusPriority::TaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder, [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, !!0)][offset 0x00000016][found value 'TTaskLike2'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.LowPlusPriority::TaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder, !!0, [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1)][offset 0x0000000E][found value 'TTaskLike1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.LowPlusPriority::TaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder, !!0, [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1)][offset 0x00000016][found ref '[FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.LowPlusPriority::BackgroundTaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.BackgroundTaskBuilder, [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, !!0)][offset 0x0000000E][found ref '[FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.LowPlusPriority::BackgroundTaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.BackgroundTaskBuilder, [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, !!0)][offset 0x00000016][found value 'TTaskLike2'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.LowPlusPriority::BackgroundTaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.BackgroundTaskBuilder, !!0, [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1)][offset 0x0000000E][found value 'TTaskLike1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.LowPlusPriority::BackgroundTaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.BackgroundTaskBuilder, !!0, [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1)][offset 0x00000016][found ref '[FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority::TaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder, [S.P.CoreLib]System.Threading.Tasks.Task`1, !!0)][offset 0x0000000E][found ref '[S.P.CoreLib]System.Threading.Tasks.Task`1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority::TaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder, [S.P.CoreLib]System.Threading.Tasks.Task`1, !!0)][offset 0x00000016][found value 'TTaskLike2'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority::TaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder, !!0, [S.P.CoreLib]System.Threading.Tasks.Task`1)][offset 0x0000000E][found value 'TTaskLike1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority::TaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder, !!0, [S.P.CoreLib]System.Threading.Tasks.Task`1)][offset 0x00000016][found ref '[S.P.CoreLib]System.Threading.Tasks.Task`1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority::BackgroundTaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.BackgroundTaskBuilder, [S.P.CoreLib]System.Threading.Tasks.Task`1, !!0)][offset 0x0000000E][found ref '[S.P.CoreLib]System.Threading.Tasks.Task`1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority::BackgroundTaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.BackgroundTaskBuilder, [S.P.CoreLib]System.Threading.Tasks.Task`1, !!0)][offset 0x00000016][found value 'TTaskLike2'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority::BackgroundTaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.BackgroundTaskBuilder, !!0, [S.P.CoreLib]System.Threading.Tasks.Task`1)][offset 0x0000000E][found value 'TTaskLike1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority::BackgroundTaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.BackgroundTaskBuilder, !!0, [S.P.CoreLib]System.Threading.Tasks.Task`1)][offset 0x00000016][found ref '[S.P.CoreLib]System.Threading.Tasks.Task`1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.LowPriority::TaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder, !!0, !!1)][offset 0x0000000E][found value 'TTaskLike1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.LowPriority::TaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder, !!0, !!1)][offset 0x00000016][found value 'TTaskLike2'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.LowPriority::BackgroundTaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.BackgroundTaskBuilder, !!0, !!1)][offset 0x0000000E][found value 'TTaskLike1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.LowPriority::BackgroundTaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.BackgroundTaskBuilder, !!0, !!1)][offset 0x00000016][found value 'TTaskLike2'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Microsoft.FSharp.Collections.ArrayModule+Parallel::Choose([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, !!0[])][offset 0x00000081][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Microsoft.FSharp.Collections.ArrayModule+Parallel::Filter([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, !!0[])][offset 0x00000029][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Microsoft.FSharp.Collections.ArrayModule+Parallel::Partition([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, !!0[])][offset 0x00000038][found Byte] Unexpected type on the stack. diff --git a/tests/ILVerify/ilverify_FSharp.Core_Release_netstandard2.1.bsl b/tests/ILVerify/ilverify_FSharp.Core_Release_netstandard2.1.bsl index 6ab50914fdd..05a10ae7797 100644 --- a/tests/ILVerify/ilverify_FSharp.Core_Release_netstandard2.1.bsl +++ b/tests/ILVerify/ilverify_FSharp.Core_Release_netstandard2.1.bsl @@ -1,3 +1,23 @@ +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.LowPlusPriority::TaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder, [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, !!0)][offset 0x0000000E][found ref '[FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.LowPlusPriority::TaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder, [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, !!0)][offset 0x00000016][found value 'TTaskLike2'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.LowPlusPriority::TaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder, !!0, [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1)][offset 0x0000000E][found value 'TTaskLike1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.LowPlusPriority::TaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder, !!0, [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1)][offset 0x00000016][found ref '[FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.LowPlusPriority::BackgroundTaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.BackgroundTaskBuilder, [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, !!0)][offset 0x0000000E][found ref '[FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.LowPlusPriority::BackgroundTaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.BackgroundTaskBuilder, [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, !!0)][offset 0x00000016][found value 'TTaskLike2'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.LowPlusPriority::BackgroundTaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.BackgroundTaskBuilder, !!0, [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1)][offset 0x0000000E][found value 'TTaskLike1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.LowPlusPriority::BackgroundTaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.BackgroundTaskBuilder, !!0, [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1)][offset 0x00000016][found ref '[FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority::TaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder, [S.P.CoreLib]System.Threading.Tasks.Task`1, !!0)][offset 0x0000000E][found ref '[S.P.CoreLib]System.Threading.Tasks.Task`1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority::TaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder, [S.P.CoreLib]System.Threading.Tasks.Task`1, !!0)][offset 0x00000016][found value 'TTaskLike2'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority::TaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder, !!0, [S.P.CoreLib]System.Threading.Tasks.Task`1)][offset 0x0000000E][found value 'TTaskLike1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority::TaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder, !!0, [S.P.CoreLib]System.Threading.Tasks.Task`1)][offset 0x00000016][found ref '[S.P.CoreLib]System.Threading.Tasks.Task`1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority::BackgroundTaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.BackgroundTaskBuilder, [S.P.CoreLib]System.Threading.Tasks.Task`1, !!0)][offset 0x0000000E][found ref '[S.P.CoreLib]System.Threading.Tasks.Task`1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority::BackgroundTaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.BackgroundTaskBuilder, [S.P.CoreLib]System.Threading.Tasks.Task`1, !!0)][offset 0x00000016][found value 'TTaskLike2'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority::BackgroundTaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.BackgroundTaskBuilder, !!0, [S.P.CoreLib]System.Threading.Tasks.Task`1)][offset 0x0000000E][found value 'TTaskLike1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.MediumPriority::BackgroundTaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.BackgroundTaskBuilder, !!0, [S.P.CoreLib]System.Threading.Tasks.Task`1)][offset 0x00000016][found ref '[S.P.CoreLib]System.Threading.Tasks.Task`1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.LowPriority::TaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder, !!0, !!1)][offset 0x0000000E][found value 'TTaskLike1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.LowPriority::TaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder, !!0, !!1)][offset 0x00000016][found value 'TTaskLike2'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.LowPriority::BackgroundTaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.BackgroundTaskBuilder, !!0, !!1)][offset 0x0000000E][found value 'TTaskLike1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Control.TaskBuilderExtensions.LowPriority::BackgroundTaskBuilder.MergeSources$W([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Control.BackgroundTaskBuilder, !!0, !!1)][offset 0x00000016][found value 'TTaskLike2'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2'] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Microsoft.FSharp.Collections.ArrayModule+Parallel::Choose([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, !!0[])][offset 0x00000081][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Microsoft.FSharp.Collections.ArrayModule+Parallel::Filter([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, !!0[])][offset 0x00000029][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Microsoft.FSharp.Collections.ArrayModule+Parallel::Partition([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, !!0[])][offset 0x00000038][found Byte] Unexpected type on the stack. From 7837cc38c986c4ec35626b24ef91bde1758fd6d8 Mon Sep 17 00:00:00 2001 From: Tomas Grosup Date: Wed, 16 Apr 2025 23:42:43 +0200 Subject: [PATCH 16/16] Update docs/release-notes/.FSharp.Core/9.0.300.md Co-authored-by: Jimmy Byrd --- docs/release-notes/.FSharp.Core/9.0.300.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/release-notes/.FSharp.Core/9.0.300.md b/docs/release-notes/.FSharp.Core/9.0.300.md index 831ce57eec0..d730ff12486 100644 --- a/docs/release-notes/.FSharp.Core/9.0.300.md +++ b/docs/release-notes/.FSharp.Core/9.0.300.md @@ -3,7 +3,7 @@ ### Added * Added nullability annotations to `.Using` builder method for `async` and `task` builders ([PR #18292](https://github.com/dotnet/fsharp/pull/18292)) -* Support for `!and` in `TaskBuilder` ([LanguageSuggestion #1363](https://github.com/fsharp/fslang-suggestions/issues/1363), [PR #18451](https://github.com/dotnet/fsharp/pull/18451)) +* Support for `and!` in `TaskBuilder` ([LanguageSuggestion #1363](https://github.com/fsharp/fslang-suggestions/issues/1363), [PR #18451](https://github.com/dotnet/fsharp/pull/18451)) ### Changed