From dea9cd2c5b0817cf75f893e0b505e5ba40534d9e Mon Sep 17 00:00:00 2001 From: Joseph Price Date: Tue, 7 Jan 2025 13:03:45 -0500 Subject: [PATCH 1/2] add explicit type param to ignore --- src/FsToolkit.ErrorHandling/Task.fs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/FsToolkit.ErrorHandling/Task.fs b/src/FsToolkit.ErrorHandling/Task.fs index fb5dfb07..4aa0091a 100644 --- a/src/FsToolkit.ErrorHandling/Task.fs +++ b/src/FsToolkit.ErrorHandling/Task.fs @@ -44,10 +44,11 @@ module Task = let inline map3 ([] f) x y z = apply (map2 f x y) z /// Allows us to call `do!` syntax inside a computation expression - let inline ignore (x: Task<'a>) = + let inline ignore<'a> (x: Task<'a>) = x |> map ignore + /// Takes two tasks and returns a tuple of the pair let zip (a1: Task<_>) (a2: Task<_>) = task { From 88717b7ec25e31e75d5f55bfd9dd630aa61a0995 Mon Sep 17 00:00:00 2001 From: Joseph Price Date: Tue, 7 Jan 2025 16:33:03 -0500 Subject: [PATCH 2/2] add explicit type param to Option.ignore --- src/FsToolkit.ErrorHandling/Option.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/FsToolkit.ErrorHandling/Option.fs b/src/FsToolkit.ErrorHandling/Option.fs index 32a8066a..50495d26 100644 --- a/src/FsToolkit.ErrorHandling/Option.fs +++ b/src/FsToolkit.ErrorHandling/Option.fs @@ -83,7 +83,7 @@ module Option = /// /// The option to ignore. /// A unit option. - let inline ignore (opt: 'T option) : unit option = + let inline ignore<'T> (opt: 'T option) : unit option = match opt with | Some _ -> Some() | None -> None