Skip to content

Commit 3a22dd8

Browse files
committed
fix
1 parent 5b8192d commit 3a22dd8

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/FSharpPlus/Control/Functor.fs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ open Microsoft.FSharp.Quotations
1111
open FSharpPlus.Internals
1212
open FSharpPlus.Internals.Prelude
1313
open FSharpPlus
14+
open FSharpPlus.Extensions
1415

1516
#if !FABLE_COMPILER
1617

src/FSharpPlus/Data/NonEmptySeq.fs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ type NonEmptySeq<'t> =
9292

9393
static member inline Traverse (t: NonEmptySeq<'T>, f: 'T->'``Functor<'U>``) =
9494
let mapped = NonEmptySeq<_>.map f t
95-
Sequence.ForInfiniteSequences (mapped, IsLeftZero.Invoke, NonEmptySeq<_>.ofList) : '``Functor<NonEmptySeq<'U>>``
95+
Sequence.ForInfiniteSequences (mapped, IsLeftZero.Invoke, NonEmptySeq<_>.ofList, Return.Invoke) : '``Functor<NonEmptySeq<'U>>``
9696

9797
#if !FABLE_COMPILER
9898
static member Traverse (t: 'T NonEmptySeq, f: 'T->Async<'u>) : Async<NonEmptySeq<_>> = async {
@@ -103,13 +103,13 @@ type NonEmptySeq<'t> =
103103
yield Async.RunSynchronously (f enum.Current, cancellationToken = ct) } |> NonEmptySeq<_>.unsafeOfSeq }
104104
#endif
105105

106-
static member inline SequenceImpl (t, _, _:obj) = printfn "Using default4"; Sequence.ForInfiniteSequences (t, IsLeftZero.Invoke, NonEmptySeq<_>.ofList)
106+
static member inline SequenceImpl (t, _, _:obj) = printfn "Using default4"; Sequence.ForInfiniteSequences (t, IsLeftZero.Invoke, NonEmptySeq<_>.ofList , Return.Invoke)
107107
static member SequenceImpl (t: NonEmptySeq<option<'T>>, _: option<NonEmptySeq<'T>>, _:Sequence) : option<NonEmptySeq<'T>> = printfn "Not using default4"; Option.Sequence t |> Option.map NonEmptySeq<_>.unsafeOfSeq
108108

109109
static member SequenceImpl (t: NonEmptySeq<Result<'T, 'E>>) : Result<NonEmptySeq<'T>, 'E> = Result.Sequence t |> Result.map NonEmptySeq<_>.unsafeOfSeq
110110
static member SequenceImpl (t: NonEmptySeq<Choice<'T, 'E>>) : Choice<NonEmptySeq<'T>, 'E> = Choice.Sequence t |> Choice.map NonEmptySeq<_>.unsafeOfSeq
111-
static member SequenceImpl (t: NonEmptySeq<list<'T>> , _: list<NonEmptySeq<'T>> , _:Sequence) : list<NonEmptySeq<'T>> = printfn "Not using default4"; Sequence.ForInfiniteSequences (t, List.isEmpty , NonEmptySeq<_>.ofList)
112-
static member SequenceImpl (t: NonEmptySeq<'T []> ) : NonEmptySeq<'T> [] = Sequence.ForInfiniteSequences (t, Array.isEmpty, NonEmptySeq<_>.ofList)
111+
static member SequenceImpl (t: NonEmptySeq<list<'T>> , _: list<NonEmptySeq<'T>> , _:Sequence) : list<NonEmptySeq<'T>> = printfn "Not using default4"; Sequence.ForInfiniteSequences (t, List.isEmpty , NonEmptySeq<_>.ofList, List.singleton)
112+
static member SequenceImpl (t: NonEmptySeq<'T []> ) : NonEmptySeq<'T> [] = Sequence.ForInfiniteSequences (t, Array.isEmpty, NonEmptySeq<_>.ofList, Array.singleton)
113113
#if !FABLE_COMPILER
114114
static member SequenceImpl (t: NonEmptySeq<Async<'T>> ) : Async<NonEmptySeq<'T>> = Async.Sequence t |> Async.map NonEmptySeq<_>.unsafeOfSeq
115115
#endif

0 commit comments

Comments
 (0)