From e82cbda1b902d11905aa218563a0fadddf280dd0 Mon Sep 17 00:00:00 2001 From: fxdmhtt <48937737+fxdmhtt@users.noreply.github.com> Date: Thu, 5 Jun 2025 17:25:09 +0800 Subject: [PATCH 1/3] Update Collection.fs Careless? --- src/FSharpPlus/Control/Collection.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/FSharpPlus/Control/Collection.fs b/src/FSharpPlus/Control/Collection.fs index b541125b7..ca5e9abdd 100644 --- a/src/FSharpPlus/Control/Collection.fs +++ b/src/FSharpPlus/Control/Collection.fs @@ -305,7 +305,7 @@ type GroupBy = static member GroupBy (x: list<'T>, f: 'T->'Key, _: list<'Key*list<'T>>, []_impl: GroupBy) = Seq.groupBy f x |> Seq.map (fun (x, y) -> x, Seq.toList y) |> Seq.toList static member GroupBy (x: 'T [] , f: 'T->'Key, _: ('Key*('T [])) [] , []_impl: GroupBy) = Seq.groupBy f x |> Seq.map (fun (x, y) -> x, Seq.toArray y) |> Seq.toArray - static member inline Invoke (projection: 'T->'Key) (source: '``C<'T>``) : '``C<'Key * 'C<'T>>`` = + static member inline Invoke (projection: 'T->'Key) (source: '``Collection<'T>``) : '``Collection<'Key * 'Collection<'T>>`` = let inline call_3 (a: ^a, b: ^b, c: ^c, p) = ((^a or ^b or ^c) : (static member GroupBy : _*_*_*_ -> _) b, p, c, a) let inline call (a: 'a, b: 'b, p) = call_3 (a, b, Unchecked.defaultof<'r>, p) : 'r call (Unchecked.defaultof, source, projection) From b824878eb3dcbf4357e496825d1cfa71507ebc63 Mon Sep 17 00:00:00 2001 From: junkang Date: Wed, 11 Jun 2025 13:42:52 +0800 Subject: [PATCH 2/3] Replaces `'C<'T>` with `'Collection<'T>` in multiple methods to improve clarity and consistency in type references for collection operations. Enhances readability and aligns with naming conventions. --- src/FSharpPlus/Control/Collection.fs | 24 ++++++++++++------------ src/FSharpPlus/Control/Indexable.fs | 12 ++++++------ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/FSharpPlus/Control/Collection.fs b/src/FSharpPlus/Control/Collection.fs index ca5e9abdd..86f365d86 100644 --- a/src/FSharpPlus/Control/Collection.fs +++ b/src/FSharpPlus/Control/Collection.fs @@ -270,11 +270,11 @@ type Distinct = static member Distinct (x: list<'a>, []_impl: Distinct) = List.distinct x static member Distinct (x: 'a [] , []_impl: Distinct) = Array.distinct x - static member inline Invoke (source: '``C<'T>``) : '``C<'T>`` = + static member inline Invoke (source: '``Collection<'T>``) : '``Collection<'T>`` = let inline call_2 (a: ^a, b: ^b) = ((^a or ^b) : (static member Distinct : _*_ -> _) b, a) let inline call (a: 'a, b: 'b) = call_2 (a, b) call (Unchecked.defaultof, source) - static member inline InvokeOnInstance (source: '``C<'T>``) : '``C<'T>`` = (^``C<'T>`` : (static member Distinct : _->_) source) : ^``C<'T>`` + static member inline InvokeOnInstance (source: '``Collection<'T>``) : '``Collection<'T>`` = (^``Collection<'T>`` : (static member Distinct : _->_) source) : ^``Collection<'T>`` static member inline Distinct (x: '``Collection<'T>`` , []_impl: Default2) = x |> ToSeq.Invoke |> Seq.distinct |> OfSeq.Invoke : '``Collection<'T>`` @@ -288,11 +288,11 @@ type DistinctBy = static member DistinctBy (x: list<'a> , f, []_impl: DistinctBy) = List.distinctBy f x static member DistinctBy (x: 'a [] , f, []_impl: DistinctBy) = Array.distinctBy f x - static member inline Invoke (projection: 'T->'Key) (source: '``C<'T>``) : '``C<'T>`` = + static member inline Invoke (projection: 'T->'Key) (source: '``Collection<'T>``) : '``Collection<'T>`` = let inline call_2 (a: ^a, b: ^b, f) = ((^a or ^b) : (static member DistinctBy : _*_*_ -> _) b, f, a) let inline call (a: 'a, b: 'b, f) = call_2 (a, b, f) call (Unchecked.defaultof, source, projection) - static member inline InvokeOnInstance (projection: 'T->'Key) (source: '``C<'T>``) : '``C<'T>`` = (^``C<'T>`` : (static member DistinctBy : _*_->_) source, projection) : ^``C<'T>`` + static member inline InvokeOnInstance (projection: 'T->'Key) (source: '``Collection<'T>``) : '``Collection<'T>`` = (^``Collection<'T>`` : (static member DistinctBy : _*_->_) source, projection) : ^``Collection<'T>`` static member inline DistinctBy (x: '``Collection<'T>``, f , []_impl: Default2) = x |> ToSeq.Invoke |> Seq.distinctBy f |> OfSeq.Invoke : '``Collection<'T>`` static member inline DistinctBy (x: ^``Collection<'T>``, f , []_impl: Default1) = (^``Collection<'T>`` : (static member DistinctBy : _*_->_) f, x) : '``Collection<'T>`` @@ -348,11 +348,11 @@ type Rev = static member Rev (x: list<'a> , []_impl: Rev ) = List.rev x static member Rev (x: 'a [] , []_impl: Rev ) = Array.rev x - static member inline Invoke (source: '``C<'T>``) : '``C<'T>`` = + static member inline Invoke (source: '``Collection<'T>``) : '``Collection<'T>`` = let inline call_2 (a: ^a, b: ^b) = ((^a or ^b) : (static member Rev : _*_ -> _) b, a) let inline call (a: 'a, b: 'b) = call_2 (a, b) call (Unchecked.defaultof, source) - static member inline InvokeOnInstance (source: '``C<'T>``) : '``C<'T>`` = (^``C<'T>`` : (static member Rev : _->_) source) : ^``C<'T>`` + static member inline InvokeOnInstance (source: '``Collection<'T>``) : '``Collection<'T>`` = (^``Collection<'T>`` : (static member Rev : _->_) source) : ^``Collection<'T>`` static member inline Rev (x: '``Collection<'T>``, []_impl: Default2) = x |> ToSeq.Invoke |> Seq.rev |> OfSeq.Invoke : '``Collection<'T>`` @@ -378,11 +378,11 @@ type Sort = static member Sort (x: list<'a>, []_impl: Sort) = List.sort x static member Sort (x: 'a [] , []_impl: Sort) = Array.sort x - static member inline Invoke (source: '``C<'T>``) : '``C<'T>`` = + static member inline Invoke (source: '``Collection<'T>``) : '``Collection<'T>`` = let inline call_2 (a: ^a, b: ^b) = ((^a or ^b) : (static member Sort : _*_ -> _) b, a) let inline call (a: 'a, b: 'b) = call_2 (a, b) call (Unchecked.defaultof, source) - static member inline InvokeOnInstance (source: '``C<'T>``) : '``C<'T>`` = (^``C<'T>`` : (static member Sort : _->_) source) : ^``C<'T>`` + static member inline InvokeOnInstance (source: '``Collection<'T>``) : '``Collection<'T>`` = (^``Collection<'T>`` : (static member Sort : _->_) source) : ^``Collection<'T>`` static member inline Sort (x: '``Collection<'T>``, []_impl: Default2) = x |> ToSeq.Invoke |> Seq.sort |> OfSeq.Invoke : '``Collection<'T>`` @@ -396,11 +396,11 @@ type SortBy = static member SortBy (x: list<'a>, f, []_impl: SortBy) = List.sortBy f x static member SortBy (x: 'a [] , f, []_impl: SortBy) = Array.sortBy f x - static member inline Invoke (projection: 'T->'Key) (source: '``C<'T>``) : '``C<'T>`` = + static member inline Invoke (projection: 'T->'Key) (source: '``Collection<'T>``) : '``Collection<'T>`` = let inline call_2 (a: ^a, b: ^b, f) = ((^a or ^b) : (static member SortBy : _*_*_ -> _) b, f, a) let inline call (a: 'a, b: 'b, f) = call_2 (a, b, f) call (Unchecked.defaultof, source, projection) - static member inline InvokeOnInstance (projection: 'T->'Key) (source: '``C<'T>``) : '``C<'T>`` = (^``C<'T>`` : (static member SortBy : _*_->_) source, projection) : ^``C<'T>`` + static member inline InvokeOnInstance (projection: 'T->'Key) (source: '``Collection<'T>``) : '``Collection<'T>`` = (^``Collection<'T>`` : (static member SortBy : _*_->_) source, projection) : ^``Collection<'T>`` static member inline SortBy (x: '``Collection<'T>``, f , []_impl: Default2) = x |> ToSeq.Invoke |> Seq.sortBy f |> OfSeq.Invoke : '``Collection<'T>`` static member inline SortBy (x: ^``Collection<'T>``, f , []_impl: Default1) = (^``Collection<'T>`` : (static member SortBy : _*_->_) f, x) : '``Collection<'T>`` @@ -412,11 +412,11 @@ type SortByDescending = static member SortByDescending (x: list<'a>, f, []_impl: SortBy) = List.sortByDescending f x static member SortByDescending (x: 'a [] , f, []_impl: SortBy) = Array.sortByDescending f x - static member inline Invoke (projection: 'T->'Key) (source: '``C<'T>``) : '``C<'T>`` = + static member inline Invoke (projection: 'T->'Key) (source: '``Collection<'T>``) : '``Collection<'T>`` = let inline call_2 (a: ^a, b: ^b, f) = ((^a or ^b) : (static member SortByDescending : _*_*_ -> _) b, f, a) let inline call (a: 'a, b: 'b, f) = call_2 (a, b, f) call (Unchecked.defaultof, source, projection) - static member inline InvokeOnInstance (projection: 'T->'Key) (source: '``C<'T>``) : '``C<'T>`` = (^``C<'T>`` : (static member SortByDescending : _*_->_) source, projection) : ^``C<'T>`` + static member inline InvokeOnInstance (projection: 'T->'Key) (source: '``Collection<'T>``) : '``Collection<'T>`` = (^``Collection<'T>`` : (static member SortByDescending : _*_->_) source, projection) : ^``Collection<'T>`` static member inline SortByDescending (x: '``Collection<'T>``, f , []_impl: Default2) = x |> ToSeq.Invoke |> Seq.sortByDescending f |> OfSeq.Invoke : '``Collection<'T>`` static member inline SortByDescending (x: ^``Collection<'T>``, f , []_impl: Default1) = (^``Collection<'T>`` : (static member SortByDescending : _*_->_) f, x) : '``Collection<'T>`` diff --git a/src/FSharpPlus/Control/Indexable.fs b/src/FSharpPlus/Control/Indexable.fs index d1ab2d4d0..cf19c9a2c 100644 --- a/src/FSharpPlus/Control/Indexable.fs +++ b/src/FSharpPlus/Control/Indexable.fs @@ -189,7 +189,7 @@ type FindIndex = static member inline InvokeOnInstance (p: 'T -> bool) (source: '``Collection<'T>``) : 'Index = (^``Collection<'T>``: (static member FindIndex: _*_->_) source,p) static member FindIndex (x: seq<'a> , p , []_impl: Default2) = Seq.findIndex p x - static member inline FindIndex (x: '``C``, p: 'T -> bool, _impl: Default1) : 'Index = FindIndex.InvokeOnInstance p x + static member inline FindIndex (x: '``Collection<'T>``, p: 'T -> bool, _impl: Default1) : 'Index = FindIndex.InvokeOnInstance p x static member inline FindIndex (_: ^t when ^t: null and ^t: struct, _: 'T -> 'bool, _impl: Default1) = () static member inline Invoke (p: 'T -> bool) (source: '``Collection<'T>``) : 'Index = @@ -208,7 +208,7 @@ type TryFindIndex = static member inline InvokeOnInstance (p: 'T -> bool) (source: '``Collection<'T>``) : 'Index option = (^``Collection<'T>``: (static member TryFindIndex: _*_->_) source,p) static member TryFindIndex (x: seq<'a> , p , []_impl: Default2) = Seq.tryFindIndex p x - static member inline TryFindIndex (x: '``C``, p: 'T -> bool, _impl: Default1) : 'Index option = TryFindIndex.InvokeOnInstance p x + static member inline TryFindIndex (x: '``Collection<'T>``, p: 'T -> bool, _impl: Default1) : 'Index option = TryFindIndex.InvokeOnInstance p x static member inline TryFindIndex (_: ^t when ^t: null and ^t: struct, _: 'T -> bool, _impl: Default1) = () static member inline Invoke (p: 'T -> bool) (source: '``Collection<'T>``) : 'Index option = @@ -230,7 +230,7 @@ type FindSliceIndex = static member inline InvokeOnInstance (slice: '``Collection<'T>``) (source: '``Collection<'T>``) : 'Index = (^``Collection<'T>``: (static member FindSliceIndex: _*_->_) source, slice) static member FindSliceIndex (x: seq<'a> , e , []_impl: Default2) = Seq.findSliceIndex e x - static member inline FindSliceIndex (x: '``C<'T>``, e: '``C<'T>``, _impl: Default1) : 'Index = FindSliceIndex.InvokeOnInstance e x + static member inline FindSliceIndex (x: '``Collection<'T>``, e: '``Collection<'T>``, _impl: Default1) : 'Index = FindSliceIndex.InvokeOnInstance e x static member inline FindSliceIndex (_: ^t when ^t: null and ^t: struct, _, _impl: Default1) = () static member inline Invoke (slice: '``Collection<'T>``) (source: '``Collection<'T>``) : 'Index = @@ -249,7 +249,7 @@ type TryFindSliceIndex = static member inline InvokeOnInstance (slice: '``Collection<'T>``) (source: '``Collection<'T>``) : 'Index option = (^``Collection<'T>``: (static member TryFindSliceIndex: _*_->_) source, slice) static member TryFindSliceIndex (x: seq<'a> , e , []_impl: Default2) = Seq.tryFindSliceIndex e x - static member inline TryFindSliceIndex (x: '``C<'T>``, e: '``C<'T>``, _impl: Default1) : 'Index option = TryFindSliceIndex.InvokeOnInstance e x + static member inline TryFindSliceIndex (x: '``Collection<'T>``, e: '``Collection<'T>``, _impl: Default1) : 'Index option = TryFindSliceIndex.InvokeOnInstance e x static member inline TryFindSliceIndex (_: ^t when ^t: null and ^t: struct, _, _impl: Default1) = () static member inline Invoke (slice: '``Collection<'T>``) (source: '``Collection<'T>``) : 'Index option = @@ -270,7 +270,7 @@ type FindLastSliceIndex = static member inline InvokeOnInstance (slice: '``Collection<'T>``) (source: '``Collection<'T>``) : 'Index = (^``Collection<'T>``: (static member FindLastSliceIndex: _*_->_) source, slice) static member FindLastSliceIndex (x: seq<'a> , e , []_impl: Default2) = Seq.findLastSliceIndex e x - static member inline FindLastSliceIndex (x: '``C<'T>``, e: '``C<'T>``, _impl: Default1) : 'Index = FindLastSliceIndex.InvokeOnInstance e x + static member inline FindLastSliceIndex (x: '``Collection<'T>``, e: '``Collection<'T>``, _impl: Default1) : 'Index = FindLastSliceIndex.InvokeOnInstance e x static member inline FindLastSliceIndex (_: ^t when ^t: null and ^t: struct, _, _impl: Default1) = () static member inline Invoke (slice: '``Collection<'T>``) (source: '``Collection<'T>``) : 'Index = @@ -289,7 +289,7 @@ type TryFindLastSliceIndex = static member inline InvokeOnInstance (slice: '``Collection<'T>``) (source: '``Collection<'T>``) : 'Index option = (^``Collection<'T>``: (static member TryFindLastSliceIndex: _*_->_) source, slice) static member TryFindLastSliceIndex (x: seq<'a> , e , []_impl: Default2) = Seq.tryFindLastSliceIndex e x - static member inline TryFindLastSliceIndex (x: '``C<'T>``, e: '``C<'T>``, _impl: Default1) : 'Index option = TryFindLastSliceIndex.InvokeOnInstance e x + static member inline TryFindLastSliceIndex (x: '``Collection<'T>``, e: '``Collection<'T>``, _impl: Default1) : 'Index option = TryFindLastSliceIndex.InvokeOnInstance e x static member inline TryFindLastSliceIndex (_: ^t when ^t: null and ^t: struct, _, _impl: Default1) = () static member inline Invoke (slice: '``Collection<'T>``) (source: '``Collection<'T>``) : 'Index option = From bdebb30c26051e00d3493dce44d423e15d67ef88 Mon Sep 17 00:00:00 2001 From: gusty <1261319+gusty@users.noreply.github.com> Date: Thu, 12 Jun 2025 19:59:38 +0200 Subject: [PATCH 3/3] Use lowercase for internal overloads --- src/FSharpPlus/Control/Collection.fs | 28 ++++++++++++++-------------- src/FSharpPlus/Control/Indexable.fs | 12 ++++++------ 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/FSharpPlus/Control/Collection.fs b/src/FSharpPlus/Control/Collection.fs index 86f365d86..c91e7834c 100644 --- a/src/FSharpPlus/Control/Collection.fs +++ b/src/FSharpPlus/Control/Collection.fs @@ -276,9 +276,9 @@ type Distinct = call (Unchecked.defaultof, source) static member inline InvokeOnInstance (source: '``Collection<'T>``) : '``Collection<'T>`` = (^``Collection<'T>`` : (static member Distinct : _->_) source) : ^``Collection<'T>`` - static member inline Distinct (x: '``Collection<'T>`` , []_impl: Default2) = x |> ToSeq.Invoke |> Seq.distinct |> OfSeq.Invoke : '``Collection<'T>`` + static member inline Distinct (x: '``collection<'T>`` , []_impl: Default2) = x |> ToSeq.Invoke |> Seq.distinct |> OfSeq.Invoke : '``collection<'T>`` - static member inline Distinct (x: ^``Collection<'T>`` , []_impl: Default1) = (^``Collection<'T>`` : (static member Distinct : _->_) x) : '``Collection<'T>`` + static member inline Distinct (x: ^``collection<'T>`` , []_impl: Default1) = (^``collection<'T>`` : (static member Distinct : _->_) x) : '``collection<'T>`` static member inline Distinct (_: ^t when ^t : null and ^t : struct, _mthd: Default1) = id @@ -294,8 +294,8 @@ type DistinctBy = call (Unchecked.defaultof, source, projection) static member inline InvokeOnInstance (projection: 'T->'Key) (source: '``Collection<'T>``) : '``Collection<'T>`` = (^``Collection<'T>`` : (static member DistinctBy : _*_->_) source, projection) : ^``Collection<'T>`` - static member inline DistinctBy (x: '``Collection<'T>``, f , []_impl: Default2) = x |> ToSeq.Invoke |> Seq.distinctBy f |> OfSeq.Invoke : '``Collection<'T>`` - static member inline DistinctBy (x: ^``Collection<'T>``, f , []_impl: Default1) = (^``Collection<'T>`` : (static member DistinctBy : _*_->_) f, x) : '``Collection<'T>`` + static member inline DistinctBy (x: '``collection<'T>``, f , []_impl: Default2) = x |> ToSeq.Invoke |> Seq.distinctBy f |> OfSeq.Invoke : '``collection<'T>`` + static member inline DistinctBy (x: ^``collection<'T>``, f , []_impl: Default1) = (^``collection<'T>`` : (static member DistinctBy : _*_->_) f, x) : '``collection<'T>`` static member inline DistinctBy (_: ^t when ^t : null and ^t : struct, _ : 'T -> 'U, _mthd: Default1) = id @@ -348,15 +348,15 @@ type Rev = static member Rev (x: list<'a> , []_impl: Rev ) = List.rev x static member Rev (x: 'a [] , []_impl: Rev ) = Array.rev x - static member inline Invoke (source: '``Collection<'T>``) : '``Collection<'T>`` = + static member inline Invoke (source: 'Collection) : 'Collection = let inline call_2 (a: ^a, b: ^b) = ((^a or ^b) : (static member Rev : _*_ -> _) b, a) let inline call (a: 'a, b: 'b) = call_2 (a, b) call (Unchecked.defaultof, source) - static member inline InvokeOnInstance (source: '``Collection<'T>``) : '``Collection<'T>`` = (^``Collection<'T>`` : (static member Rev : _->_) source) : ^``Collection<'T>`` + static member inline InvokeOnInstance (source: 'Collection) : 'Collection = (^Collection : (static member Rev : _->_) source) : ^Collection - static member inline Rev (x: '``Collection<'T>``, []_impl: Default2) = x |> ToSeq.Invoke |> Seq.rev |> OfSeq.Invoke : '``Collection<'T>`` + static member inline Rev (x: 'collection, []_impl: Default2) = x |> ToSeq.Invoke |> Seq.rev |> OfSeq.Invoke : 'collection - static member inline Rev (x: ^``Collection<'T>``, []_impl: Default1) = (^``Collection<'T>`` : (static member Rev : _->_) x) : '``Collection<'T>`` + static member inline Rev (x: ^collection, []_impl: Default1) = (^collection : (static member Rev : _->_) x) : 'collection static member inline Rev (_: ^t when ^t: null and ^t: struct, _mthd: Default1) = id @@ -384,9 +384,9 @@ type Sort = call (Unchecked.defaultof, source) static member inline InvokeOnInstance (source: '``Collection<'T>``) : '``Collection<'T>`` = (^``Collection<'T>`` : (static member Sort : _->_) source) : ^``Collection<'T>`` - static member inline Sort (x: '``Collection<'T>``, []_impl: Default2) = x |> ToSeq.Invoke |> Seq.sort |> OfSeq.Invoke : '``Collection<'T>`` + static member inline Sort (x: '``collection<'T>``, []_impl: Default2) = x |> ToSeq.Invoke |> Seq.sort |> OfSeq.Invoke : '``collection<'T>`` - static member inline Sort (x: ^``Collection<'T>``, []_impl: Default1) = (^``Collection<'T>`` : (static member Sort : _->_) x) : '``Collection<'T>`` + static member inline Sort (x: ^``collection<'T>``, []_impl: Default1) = (^``collection<'T>`` : (static member Sort : _->_) x) : '``collection<'T>`` static member inline Sort (_: ^t when ^t: null and ^t: struct, _mthd: Default1) = id @@ -402,8 +402,8 @@ type SortBy = call (Unchecked.defaultof, source, projection) static member inline InvokeOnInstance (projection: 'T->'Key) (source: '``Collection<'T>``) : '``Collection<'T>`` = (^``Collection<'T>`` : (static member SortBy : _*_->_) source, projection) : ^``Collection<'T>`` - static member inline SortBy (x: '``Collection<'T>``, f , []_impl: Default2) = x |> ToSeq.Invoke |> Seq.sortBy f |> OfSeq.Invoke : '``Collection<'T>`` - static member inline SortBy (x: ^``Collection<'T>``, f , []_impl: Default1) = (^``Collection<'T>`` : (static member SortBy : _*_->_) f, x) : '``Collection<'T>`` + static member inline SortBy (x: '``collection<'T>``, f , []_impl: Default2) = x |> ToSeq.Invoke |> Seq.sortBy f |> OfSeq.Invoke : '``collection<'T>`` + static member inline SortBy (x: ^``collection<'T>``, f , []_impl: Default1) = (^``collection<'T>`` : (static member SortBy : _*_->_) f, x) : '``collection<'T>`` static member inline SortBy (_: ^t when ^t: null and ^t: struct, _: 'T->'U, _mthd: Default1) = id type SortByDescending = @@ -418,8 +418,8 @@ type SortByDescending = call (Unchecked.defaultof, source, projection) static member inline InvokeOnInstance (projection: 'T->'Key) (source: '``Collection<'T>``) : '``Collection<'T>`` = (^``Collection<'T>`` : (static member SortByDescending : _*_->_) source, projection) : ^``Collection<'T>`` - static member inline SortByDescending (x: '``Collection<'T>``, f , []_impl: Default2) = x |> ToSeq.Invoke |> Seq.sortByDescending f |> OfSeq.Invoke : '``Collection<'T>`` - static member inline SortByDescending (x: ^``Collection<'T>``, f , []_impl: Default1) = (^``Collection<'T>`` : (static member SortByDescending : _*_->_) f, x) : '``Collection<'T>`` + static member inline SortByDescending (x: '``collection<'T>``, f , []_impl: Default2) = x |> ToSeq.Invoke |> Seq.sortByDescending f |> OfSeq.Invoke : '``collection<'T>`` + static member inline SortByDescending (x: ^``collection<'T>``, f , []_impl: Default1) = (^``collection<'T>`` : (static member SortByDescending : _*_->_) f, x) : '``collection<'T>`` static member inline SortByDescending (_: ^t when ^t: null and ^t: struct, _: 'T->'U, _mthd: Default1) = id type Split = diff --git a/src/FSharpPlus/Control/Indexable.fs b/src/FSharpPlus/Control/Indexable.fs index cf19c9a2c..bfe0f887a 100644 --- a/src/FSharpPlus/Control/Indexable.fs +++ b/src/FSharpPlus/Control/Indexable.fs @@ -189,7 +189,7 @@ type FindIndex = static member inline InvokeOnInstance (p: 'T -> bool) (source: '``Collection<'T>``) : 'Index = (^``Collection<'T>``: (static member FindIndex: _*_->_) source,p) static member FindIndex (x: seq<'a> , p , []_impl: Default2) = Seq.findIndex p x - static member inline FindIndex (x: '``Collection<'T>``, p: 'T -> bool, _impl: Default1) : 'Index = FindIndex.InvokeOnInstance p x + static member inline FindIndex (x: '``C``, p: 'T -> bool, _impl: Default1) : 'Index = FindIndex.InvokeOnInstance p x static member inline FindIndex (_: ^t when ^t: null and ^t: struct, _: 'T -> 'bool, _impl: Default1) = () static member inline Invoke (p: 'T -> bool) (source: '``Collection<'T>``) : 'Index = @@ -208,7 +208,7 @@ type TryFindIndex = static member inline InvokeOnInstance (p: 'T -> bool) (source: '``Collection<'T>``) : 'Index option = (^``Collection<'T>``: (static member TryFindIndex: _*_->_) source,p) static member TryFindIndex (x: seq<'a> , p , []_impl: Default2) = Seq.tryFindIndex p x - static member inline TryFindIndex (x: '``Collection<'T>``, p: 'T -> bool, _impl: Default1) : 'Index option = TryFindIndex.InvokeOnInstance p x + static member inline TryFindIndex (x: '``C``, p: 'T -> bool, _impl: Default1) : 'Index option = TryFindIndex.InvokeOnInstance p x static member inline TryFindIndex (_: ^t when ^t: null and ^t: struct, _: 'T -> bool, _impl: Default1) = () static member inline Invoke (p: 'T -> bool) (source: '``Collection<'T>``) : 'Index option = @@ -230,7 +230,7 @@ type FindSliceIndex = static member inline InvokeOnInstance (slice: '``Collection<'T>``) (source: '``Collection<'T>``) : 'Index = (^``Collection<'T>``: (static member FindSliceIndex: _*_->_) source, slice) static member FindSliceIndex (x: seq<'a> , e , []_impl: Default2) = Seq.findSliceIndex e x - static member inline FindSliceIndex (x: '``Collection<'T>``, e: '``Collection<'T>``, _impl: Default1) : 'Index = FindSliceIndex.InvokeOnInstance e x + static member inline FindSliceIndex (x: '``collection<'T>``, e: '``collection<'T>``, _impl: Default1) : 'Index = FindSliceIndex.InvokeOnInstance e x static member inline FindSliceIndex (_: ^t when ^t: null and ^t: struct, _, _impl: Default1) = () static member inline Invoke (slice: '``Collection<'T>``) (source: '``Collection<'T>``) : 'Index = @@ -249,7 +249,7 @@ type TryFindSliceIndex = static member inline InvokeOnInstance (slice: '``Collection<'T>``) (source: '``Collection<'T>``) : 'Index option = (^``Collection<'T>``: (static member TryFindSliceIndex: _*_->_) source, slice) static member TryFindSliceIndex (x: seq<'a> , e , []_impl: Default2) = Seq.tryFindSliceIndex e x - static member inline TryFindSliceIndex (x: '``Collection<'T>``, e: '``Collection<'T>``, _impl: Default1) : 'Index option = TryFindSliceIndex.InvokeOnInstance e x + static member inline TryFindSliceIndex (x: '``collection<'T>``, e: '``collection<'T>``, _impl: Default1) : 'Index option = TryFindSliceIndex.InvokeOnInstance e x static member inline TryFindSliceIndex (_: ^t when ^t: null and ^t: struct, _, _impl: Default1) = () static member inline Invoke (slice: '``Collection<'T>``) (source: '``Collection<'T>``) : 'Index option = @@ -270,7 +270,7 @@ type FindLastSliceIndex = static member inline InvokeOnInstance (slice: '``Collection<'T>``) (source: '``Collection<'T>``) : 'Index = (^``Collection<'T>``: (static member FindLastSliceIndex: _*_->_) source, slice) static member FindLastSliceIndex (x: seq<'a> , e , []_impl: Default2) = Seq.findLastSliceIndex e x - static member inline FindLastSliceIndex (x: '``Collection<'T>``, e: '``Collection<'T>``, _impl: Default1) : 'Index = FindLastSliceIndex.InvokeOnInstance e x + static member inline FindLastSliceIndex (x: '``collection<'T>``, e: '``collection<'T>``, _impl: Default1) : 'Index = FindLastSliceIndex.InvokeOnInstance e x static member inline FindLastSliceIndex (_: ^t when ^t: null and ^t: struct, _, _impl: Default1) = () static member inline Invoke (slice: '``Collection<'T>``) (source: '``Collection<'T>``) : 'Index = @@ -289,7 +289,7 @@ type TryFindLastSliceIndex = static member inline InvokeOnInstance (slice: '``Collection<'T>``) (source: '``Collection<'T>``) : 'Index option = (^``Collection<'T>``: (static member TryFindLastSliceIndex: _*_->_) source, slice) static member TryFindLastSliceIndex (x: seq<'a> , e , []_impl: Default2) = Seq.tryFindLastSliceIndex e x - static member inline TryFindLastSliceIndex (x: '``Collection<'T>``, e: '``Collection<'T>``, _impl: Default1) : 'Index option = TryFindLastSliceIndex.InvokeOnInstance e x + static member inline TryFindLastSliceIndex (x: '``collection<'T>``, e: '``collection<'T>``, _impl: Default1) : 'Index option = TryFindLastSliceIndex.InvokeOnInstance e x static member inline TryFindLastSliceIndex (_: ^t when ^t: null and ^t: struct, _, _impl: Default1) = () static member inline Invoke (slice: '``Collection<'T>``) (source: '``Collection<'T>``) : 'Index option =