@@ -206,7 +206,7 @@ type TryWith =
206
206
static member inline TryWith ( _ : unit -> ^t when ^t : null and ^t : struct , _ : exn -> 't , _ : Default1 , _ ) = ()
207
207
208
208
static member TryWith ( computation : unit -> seq < _ > , catchHandler : exn -> seq < _ > , _ : Default2 , _ ) = seq ( try ( Seq.toArray ( computation ())) with e -> Seq.toArray ( catchHandler e))
209
- static member TryWith ( computation : unit -> FSharpPlus.Data. NonEmptySeq< _ >, catchHandler : exn -> FSharpPlus.Data. NonEmptySeq< _ >, _ : Default2 , _ ) = seq ( try ( Seq.toArray ( computation ())) with e -> Seq.toArray ( catchHandler e)) |> FSharpPlus.Data. NonEmptySeq.unsafeOfSeq
209
+ static member TryWith ( computation : unit -> NonEmptySeq < _ >, catchHandler : exn -> NonEmptySeq < _ >, _ : Default2 , _ ) = seq ( try ( Seq.toArray ( computation ())) with e -> Seq.toArray ( catchHandler e)) |> NonEmptySeq.unsafeOfSeq
210
210
static member TryWith ( computation : unit -> 'R -> _ , catchHandler : exn -> 'R -> _ , _ : Default2 , _ ) = ( fun s -> try ( computation ()) s with e -> catchHandler e s) : 'R -> _
211
211
static member TryWith ( computation : unit -> Async < _ > , catchHandler : exn -> Async < _ > , _ : TryWith , _ ) = async.TryWith (( computation ()), catchHandler)
212
212
#if ! FABLE_ COMPILER
@@ -218,6 +218,10 @@ type TryWith =
218
218
let inline call ( mthd : 'M , input : unit -> 'I , _output : 'R , h : exn -> 'I ) = (( ^M or ^I ) : ( static member TryWith : _*_*_*_ -> _) input, h, mthd, False)
219
219
call ( Unchecked.defaultof< TryWith>, ( fun () -> source), Unchecked.defaultof< '`` Monad<'T> `` >, f)
220
220
221
+ static member inline InvokeFromOtherMonad ( source : unit -> '``Monad < 'T > ``) ( f : exn -> '``Monad < 'T > ``) : '``Monad < 'T > `` =
222
+ let inline call ( mthd : 'M , input : unit -> 'I , _output : 'R , h : exn -> 'I ) = (( ^M or ^I ) : ( static member TryWith : _*_*_*_ -> _) input, h, mthd, True)
223
+ call ( Unchecked.defaultof< TryWith>, source, Unchecked.defaultof< '`` Monad<'T> `` >, f)
224
+
221
225
static member inline InvokeForWhile ( source : '``Monad < 'T > ``) ( f : exn -> '``Monad < 'T > ``) : '``Monad < 'T > `` =
222
226
let inline call ( mthd : 'M , input : unit -> 'I , _output : 'R , h : exn -> 'I ) = (( ^M or ^I ) : ( static member TryWith : _*_*_*_ -> _) input, h, mthd, While)
223
227
call ( Unchecked.defaultof< TryWith>, ( fun () -> source), Unchecked.defaultof< '`` Monad<'T> `` >, f)
@@ -237,7 +241,7 @@ type TryWithS =
237
241
static member inline TryWith ( _ : unit -> ^t when ^t : null and ^t : struct , _ : exn -> 't , _ : Default1 , _ ) = ()
238
242
239
243
static member TryWith ( computation : unit -> seq < _ > , catchHandler : exn -> seq < _ > , _ : Default2 , _ ) = seq ( try ( Seq.toArray ( computation ())) with e -> Seq.toArray ( catchHandler e))
240
- static member TryWith ( computation : unit -> FSharpPlus.Data. NonEmptySeq< _ >, catchHandler : exn -> FSharpPlus.Data. NonEmptySeq< _ >, _ : Default2 , _ ) = seq ( try ( Seq.toArray ( computation ())) with e -> Seq.toArray ( catchHandler e)) |> FSharpPlus.Data. NonEmptySeq.unsafeOfSeq
244
+ static member TryWith ( computation : unit -> NonEmptySeq < _ >, catchHandler : exn -> NonEmptySeq < _ >, _ : Default2 , _ ) = seq ( try ( Seq.toArray ( computation ())) with e -> Seq.toArray ( catchHandler e)) |> NonEmptySeq.unsafeOfSeq
241
245
static member TryWith ( computation : unit -> 'R -> _ , catchHandler : exn -> 'R -> _ , _ : Default2 , _ ) = ( fun s -> try ( computation ()) s with e -> catchHandler e s) : 'R -> _
242
246
static member TryWith ( computation : unit -> Async < _ > , catchHandler : exn -> Async < _ > , _ : TryWithS , _ ) = async.TryWith (( computation ()), catchHandler)
243
247
#if ! FABLE_ COMPILER
0 commit comments