You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/FSharpPlus/Control/Monad.fs
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -216,7 +216,7 @@ type TryWith =
216
216
static memberTryWith(computation:unit ->'R ->_ ,catchHandler:exn ->'R ->_ ,_:Default2,_)=(fun s ->try(computation ()) s with e -> catchHandler e s): 'R ->_
/// Workaround to fix signatures without breaking binary compatibility.
462
+
[<AutoOpen>]
463
+
moduleTask_v2 =
464
+
openSystem.Threading.Tasks
465
+
moduleTask =
466
+
467
+
/// <summary>Runs a if the body throws an exception, if the returned task faults or if the returned task is canceled.</summary>
468
+
/// <param name="compensation">The compensation function to run on exception.</param>
469
+
/// <param name="body">The body function to run.</param>
470
+
/// <returns>The resulting task.</returns>
471
+
/// <remarks>This function is used to de-sugar try .. with .. blocks in Computation Expressions.</remarks>
472
+
let inlinetryWith([<InlineIfLambda>]compensation:exn ->Task<'T>)([<InlineIfLambda>]body:unit ->Task<'T>)= Task.tryWith body compensation
473
+
474
+
/// <summary>Runs a compensation function after the body completes, regardless of whether the body completed successfully, faulted, or was canceled.</summary>
475
+
/// <param name="compensation">The compensation function to run after the body completes.</param>
476
+
/// <param name="body">The body function to run.</param>
477
+
/// <returns>The resulting task.</returns>
478
+
/// <remarks>This function is used to de-sugar try .. finally .. blocks in Computation Expressions.</remarks>
479
+
let inlinetryFinally([<InlineIfLambda>]compensation:unit ->unit)([<InlineIfLambda>]body:unit ->Task<'T>)= Task.tryFinally body compensation
0 commit comments