Skip to content

Commit 007b8cc

Browse files
authored
Improve internal type signature (#623)
1 parent b237216 commit 007b8cc

File tree

2 files changed

+29
-29
lines changed

2 files changed

+29
-29
lines changed

src/FSharpPlus/Control/Collection.fs

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -270,15 +270,15 @@ type Distinct =
270270
static member Distinct (x: list<'a>, [<Optional>]_impl: Distinct) = List.distinct x
271271
static member Distinct (x: 'a [] , [<Optional>]_impl: Distinct) = Array.distinct x
272272

273-
static member inline Invoke (source: '``C<'T>``) : '``C<'T>`` =
273+
static member inline Invoke (source: '``Collection<'T>``) : '``Collection<'T>`` =
274274
let inline call_2 (a: ^a, b: ^b) = ((^a or ^b) : (static member Distinct : _*_ -> _) b, a)
275275
let inline call (a: 'a, b: 'b) = call_2 (a, b)
276276
call (Unchecked.defaultof<Distinct>, source)
277-
static member inline InvokeOnInstance (source: '``C<'T>``) : '``C<'T>`` = (^``C<'T>`` : (static member Distinct : _->_) source) : ^``C<'T>``
277+
static member inline InvokeOnInstance (source: '``Collection<'T>``) : '``Collection<'T>`` = (^``Collection<'T>`` : (static member Distinct : _->_) source) : ^``Collection<'T>``
278278

279-
static member inline Distinct (x: '``Collection<'T>`` , [<Optional>]_impl: Default2) = x |> ToSeq.Invoke |> Seq.distinct |> OfSeq.Invoke : '``Collection<'T>``
279+
static member inline Distinct (x: '``collection<'T>`` , [<Optional>]_impl: Default2) = x |> ToSeq.Invoke |> Seq.distinct |> OfSeq.Invoke : '``collection<'T>``
280280

281-
static member inline Distinct (x: ^``Collection<'T>`` , [<Optional>]_impl: Default1) = (^``Collection<'T>`` : (static member Distinct : _->_) x) : '``Collection<'T>``
281+
static member inline Distinct (x: ^``collection<'T>`` , [<Optional>]_impl: Default1) = (^``collection<'T>`` : (static member Distinct : _->_) x) : '``collection<'T>``
282282
static member inline Distinct (_: ^t when ^t : null and ^t : struct, _mthd: Default1) = id
283283

284284

@@ -288,14 +288,14 @@ type DistinctBy =
288288
static member DistinctBy (x: list<'a> , f, [<Optional>]_impl: DistinctBy) = List.distinctBy f x
289289
static member DistinctBy (x: 'a [] , f, [<Optional>]_impl: DistinctBy) = Array.distinctBy f x
290290

291-
static member inline Invoke (projection: 'T->'Key) (source: '``C<'T>``) : '``C<'T>`` =
291+
static member inline Invoke (projection: 'T->'Key) (source: '``Collection<'T>``) : '``Collection<'T>`` =
292292
let inline call_2 (a: ^a, b: ^b, f) = ((^a or ^b) : (static member DistinctBy : _*_*_ -> _) b, f, a)
293293
let inline call (a: 'a, b: 'b, f) = call_2 (a, b, f)
294294
call (Unchecked.defaultof<DistinctBy>, source, projection)
295-
static member inline InvokeOnInstance (projection: 'T->'Key) (source: '``C<'T>``) : '``C<'T>`` = (^``C<'T>`` : (static member DistinctBy : _*_->_) source, projection) : ^``C<'T>``
295+
static member inline InvokeOnInstance (projection: 'T->'Key) (source: '``Collection<'T>``) : '``Collection<'T>`` = (^``Collection<'T>`` : (static member DistinctBy : _*_->_) source, projection) : ^``Collection<'T>``
296296

297-
static member inline DistinctBy (x: '``Collection<'T>``, f , [<Optional>]_impl: Default2) = x |> ToSeq.Invoke |> Seq.distinctBy f |> OfSeq.Invoke : '``Collection<'T>``
298-
static member inline DistinctBy (x: ^``Collection<'T>``, f , [<Optional>]_impl: Default1) = (^``Collection<'T>`` : (static member DistinctBy : _*_->_) f, x) : '``Collection<'T>``
297+
static member inline DistinctBy (x: '``collection<'T>``, f , [<Optional>]_impl: Default2) = x |> ToSeq.Invoke |> Seq.distinctBy f |> OfSeq.Invoke : '``collection<'T>``
298+
static member inline DistinctBy (x: ^``collection<'T>``, f , [<Optional>]_impl: Default1) = (^``collection<'T>`` : (static member DistinctBy : _*_->_) f, x) : '``collection<'T>``
299299
static member inline DistinctBy (_: ^t when ^t : null and ^t : struct, _ : 'T -> 'U, _mthd: Default1) = id
300300

301301

@@ -306,7 +306,7 @@ type GroupBy =
306306
static member GroupBy (x: list<'T>, f: 'T->'Key, _: list<'Key*list<'T>>, [<Optional>]_impl: GroupBy) = Seq.groupBy f x |> Seq.map (fun (x, y) -> x, Seq.toList y) |> Seq.toList
307307
static member GroupBy (x: 'T [] , f: 'T->'Key, _: ('Key*('T [])) [] , [<Optional>]_impl: GroupBy) = Seq.groupBy f x |> Seq.map (fun (x, y) -> x, Seq.toArray y) |> Seq.toArray
308308

309-
static member inline Invoke (projection: 'T->'Key) (source: '``C<'T>``) : '``C<'Key * 'C<'T>>`` =
309+
static member inline Invoke (projection: 'T->'Key) (source: '``Collection<'T>``) : '``Collection<'Key * 'Collection<'T>>`` =
310310
let inline call_3 (a: ^a, b: ^b, c: ^c, p) = ((^a or ^b or ^c) : (static member GroupBy : _*_*_*_ -> _) b, p, c, a)
311311
let inline call (a: 'a, b: 'b, p) = call_3 (a, b, Unchecked.defaultof<'r>, p) : 'r
312312
call (Unchecked.defaultof<GroupBy>, source, projection)
@@ -349,15 +349,15 @@ type Rev =
349349
static member Rev (x: list<'a> , [<Optional>]_impl: Rev ) = List.rev x
350350
static member Rev (x: 'a [] , [<Optional>]_impl: Rev ) = Array.rev x
351351

352-
static member inline Invoke (source: '``C<'T>``) : '``C<'T>`` =
352+
static member inline Invoke (source: 'Collection) : 'Collection =
353353
let inline call_2 (a: ^a, b: ^b) = ((^a or ^b) : (static member Rev : _*_ -> _) b, a)
354354
let inline call (a: 'a, b: 'b) = call_2 (a, b)
355355
call (Unchecked.defaultof<Rev>, source)
356-
static member inline InvokeOnInstance (source: '``C<'T>``) : '``C<'T>`` = (^``C<'T>`` : (static member Rev : _->_) source) : ^``C<'T>``
356+
static member inline InvokeOnInstance (source: 'Collection) : 'Collection = (^Collection : (static member Rev : _->_) source) : ^Collection
357357

358-
static member inline Rev (x: '``Collection<'T>``, [<Optional>]_impl: Default2) = x |> ToSeq.Invoke |> Seq.rev |> OfSeq.Invoke : '``Collection<'T>``
358+
static member inline Rev (x: 'collection, [<Optional>]_impl: Default2) = x |> ToSeq.Invoke |> Seq.rev |> OfSeq.Invoke : 'collection
359359

360-
static member inline Rev (x: ^``Collection<'T>``, [<Optional>]_impl: Default1) = (^``Collection<'T>`` : (static member Rev : _->_) x) : '``Collection<'T>``
360+
static member inline Rev (x: ^collection, [<Optional>]_impl: Default1) = (^collection : (static member Rev : _->_) x) : 'collection
361361
static member inline Rev (_: ^t when ^t: null and ^t: struct, _mthd: Default1) = id
362362

363363

@@ -379,15 +379,15 @@ type Sort =
379379
static member Sort (x: list<'a>, [<Optional>]_impl: Sort) = List.sort x
380380
static member Sort (x: 'a [] , [<Optional>]_impl: Sort) = Array.sort x
381381

382-
static member inline Invoke (source: '``C<'T>``) : '``C<'T>`` =
382+
static member inline Invoke (source: '``Collection<'T>``) : '``Collection<'T>`` =
383383
let inline call_2 (a: ^a, b: ^b) = ((^a or ^b) : (static member Sort : _*_ -> _) b, a)
384384
let inline call (a: 'a, b: 'b) = call_2 (a, b)
385385
call (Unchecked.defaultof<Sort>, source)
386-
static member inline InvokeOnInstance (source: '``C<'T>``) : '``C<'T>`` = (^``C<'T>`` : (static member Sort : _->_) source) : ^``C<'T>``
386+
static member inline InvokeOnInstance (source: '``Collection<'T>``) : '``Collection<'T>`` = (^``Collection<'T>`` : (static member Sort : _->_) source) : ^``Collection<'T>``
387387

388-
static member inline Sort (x: '``Collection<'T>``, [<Optional>]_impl: Default2) = x |> ToSeq.Invoke |> Seq.sort |> OfSeq.Invoke : '``Collection<'T>``
388+
static member inline Sort (x: '``collection<'T>``, [<Optional>]_impl: Default2) = x |> ToSeq.Invoke |> Seq.sort |> OfSeq.Invoke : '``collection<'T>``
389389

390-
static member inline Sort (x: ^``Collection<'T>``, [<Optional>]_impl: Default1) = (^``Collection<'T>`` : (static member Sort : _->_) x) : '``Collection<'T>``
390+
static member inline Sort (x: ^``collection<'T>``, [<Optional>]_impl: Default1) = (^``collection<'T>`` : (static member Sort : _->_) x) : '``collection<'T>``
391391
static member inline Sort (_: ^t when ^t: null and ^t: struct, _mthd: Default1) = id
392392

393393

@@ -397,14 +397,14 @@ type SortBy =
397397
static member SortBy (x: list<'a>, f, [<Optional>]_impl: SortBy) = List.sortBy f x
398398
static member SortBy (x: 'a [] , f, [<Optional>]_impl: SortBy) = Array.sortBy f x
399399

400-
static member inline Invoke (projection: 'T->'Key) (source: '``C<'T>``) : '``C<'T>`` =
400+
static member inline Invoke (projection: 'T->'Key) (source: '``Collection<'T>``) : '``Collection<'T>`` =
401401
let inline call_2 (a: ^a, b: ^b, f) = ((^a or ^b) : (static member SortBy : _*_*_ -> _) b, f, a)
402402
let inline call (a: 'a, b: 'b, f) = call_2 (a, b, f)
403403
call (Unchecked.defaultof<SortBy>, source, projection)
404-
static member inline InvokeOnInstance (projection: 'T->'Key) (source: '``C<'T>``) : '``C<'T>`` = (^``C<'T>`` : (static member SortBy : _*_->_) source, projection) : ^``C<'T>``
404+
static member inline InvokeOnInstance (projection: 'T->'Key) (source: '``Collection<'T>``) : '``Collection<'T>`` = (^``Collection<'T>`` : (static member SortBy : _*_->_) source, projection) : ^``Collection<'T>``
405405

406-
static member inline SortBy (x: '``Collection<'T>``, f , [<Optional>]_impl: Default2) = x |> ToSeq.Invoke |> Seq.sortBy f |> OfSeq.Invoke : '``Collection<'T>``
407-
static member inline SortBy (x: ^``Collection<'T>``, f , [<Optional>]_impl: Default1) = (^``Collection<'T>`` : (static member SortBy : _*_->_) f, x) : '``Collection<'T>``
406+
static member inline SortBy (x: '``collection<'T>``, f , [<Optional>]_impl: Default2) = x |> ToSeq.Invoke |> Seq.sortBy f |> OfSeq.Invoke : '``collection<'T>``
407+
static member inline SortBy (x: ^``collection<'T>``, f , [<Optional>]_impl: Default1) = (^``collection<'T>`` : (static member SortBy : _*_->_) f, x) : '``collection<'T>``
408408
static member inline SortBy (_: ^t when ^t: null and ^t: struct, _: 'T->'U, _mthd: Default1) = id
409409

410410
type SortByDescending =
@@ -413,14 +413,14 @@ type SortByDescending =
413413
static member SortByDescending (x: list<'a>, f, [<Optional>]_impl: SortBy) = List.sortByDescending f x
414414
static member SortByDescending (x: 'a [] , f, [<Optional>]_impl: SortBy) = Array.sortByDescending f x
415415

416-
static member inline Invoke (projection: 'T->'Key) (source: '``C<'T>``) : '``C<'T>`` =
416+
static member inline Invoke (projection: 'T->'Key) (source: '``Collection<'T>``) : '``Collection<'T>`` =
417417
let inline call_2 (a: ^a, b: ^b, f) = ((^a or ^b) : (static member SortByDescending : _*_*_ -> _) b, f, a)
418418
let inline call (a: 'a, b: 'b, f) = call_2 (a, b, f)
419419
call (Unchecked.defaultof<SortByDescending>, source, projection)
420-
static member inline InvokeOnInstance (projection: 'T->'Key) (source: '``C<'T>``) : '``C<'T>`` = (^``C<'T>`` : (static member SortByDescending : _*_->_) source, projection) : ^``C<'T>``
420+
static member inline InvokeOnInstance (projection: 'T->'Key) (source: '``Collection<'T>``) : '``Collection<'T>`` = (^``Collection<'T>`` : (static member SortByDescending : _*_->_) source, projection) : ^``Collection<'T>``
421421

422-
static member inline SortByDescending (x: '``Collection<'T>``, f , [<Optional>]_impl: Default2) = x |> ToSeq.Invoke |> Seq.sortByDescending f |> OfSeq.Invoke : '``Collection<'T>``
423-
static member inline SortByDescending (x: ^``Collection<'T>``, f , [<Optional>]_impl: Default1) = (^``Collection<'T>`` : (static member SortByDescending : _*_->_) f, x) : '``Collection<'T>``
422+
static member inline SortByDescending (x: '``collection<'T>``, f , [<Optional>]_impl: Default2) = x |> ToSeq.Invoke |> Seq.sortByDescending f |> OfSeq.Invoke : '``collection<'T>``
423+
static member inline SortByDescending (x: ^``collection<'T>``, f , [<Optional>]_impl: Default1) = (^``collection<'T>`` : (static member SortByDescending : _*_->_) f, x) : '``collection<'T>``
424424
static member inline SortByDescending (_: ^t when ^t: null and ^t: struct, _: 'T->'U, _mthd: Default1) = id
425425

426426
type Split =

src/FSharpPlus/Control/Indexable.fs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ type FindSliceIndex =
230230
static member inline InvokeOnInstance (slice: '``Collection<'T>``) (source: '``Collection<'T>``) : 'Index =
231231
(^``Collection<'T>``: (static member FindSliceIndex: _*_->_) source, slice)
232232
static member FindSliceIndex (x: seq<'a> , e , [<Optional>]_impl: Default2) = Seq.findSliceIndex e x
233-
static member inline FindSliceIndex (x: '``C<'T>``, e: '``C<'T>``, _impl: Default1) : 'Index = FindSliceIndex.InvokeOnInstance e x
233+
static member inline FindSliceIndex (x: '``collection<'T>``, e: '``collection<'T>``, _impl: Default1) : 'Index = FindSliceIndex.InvokeOnInstance e x
234234
static member inline FindSliceIndex (_: ^t when ^t: null and ^t: struct, _, _impl: Default1) = ()
235235

236236
static member inline Invoke (slice: '``Collection<'T>``) (source: '``Collection<'T>``) : 'Index =
@@ -249,7 +249,7 @@ type TryFindSliceIndex =
249249
static member inline InvokeOnInstance (slice: '``Collection<'T>``) (source: '``Collection<'T>``) : 'Index option =
250250
(^``Collection<'T>``: (static member TryFindSliceIndex: _*_->_) source, slice)
251251
static member TryFindSliceIndex (x: seq<'a> , e , [<Optional>]_impl: Default2) = Seq.tryFindSliceIndex e x
252-
static member inline TryFindSliceIndex (x: '``C<'T>``, e: '``C<'T>``, _impl: Default1) : 'Index option = TryFindSliceIndex.InvokeOnInstance e x
252+
static member inline TryFindSliceIndex (x: '``collection<'T>``, e: '``collection<'T>``, _impl: Default1) : 'Index option = TryFindSliceIndex.InvokeOnInstance e x
253253
static member inline TryFindSliceIndex (_: ^t when ^t: null and ^t: struct, _, _impl: Default1) = ()
254254

255255
static member inline Invoke (slice: '``Collection<'T>``) (source: '``Collection<'T>``) : 'Index option =
@@ -270,7 +270,7 @@ type FindLastSliceIndex =
270270
static member inline InvokeOnInstance (slice: '``Collection<'T>``) (source: '``Collection<'T>``) : 'Index =
271271
(^``Collection<'T>``: (static member FindLastSliceIndex: _*_->_) source, slice)
272272
static member FindLastSliceIndex (x: seq<'a> , e , [<Optional>]_impl: Default2) = Seq.findLastSliceIndex e x
273-
static member inline FindLastSliceIndex (x: '``C<'T>``, e: '``C<'T>``, _impl: Default1) : 'Index = FindLastSliceIndex.InvokeOnInstance e x
273+
static member inline FindLastSliceIndex (x: '``collection<'T>``, e: '``collection<'T>``, _impl: Default1) : 'Index = FindLastSliceIndex.InvokeOnInstance e x
274274
static member inline FindLastSliceIndex (_: ^t when ^t: null and ^t: struct, _, _impl: Default1) = ()
275275

276276
static member inline Invoke (slice: '``Collection<'T>``) (source: '``Collection<'T>``) : 'Index =
@@ -289,7 +289,7 @@ type TryFindLastSliceIndex =
289289
static member inline InvokeOnInstance (slice: '``Collection<'T>``) (source: '``Collection<'T>``) : 'Index option =
290290
(^``Collection<'T>``: (static member TryFindLastSliceIndex: _*_->_) source, slice)
291291
static member TryFindLastSliceIndex (x: seq<'a> , e , [<Optional>]_impl: Default2) = Seq.tryFindLastSliceIndex e x
292-
static member inline TryFindLastSliceIndex (x: '``C<'T>``, e: '``C<'T>``, _impl: Default1) : 'Index option = TryFindLastSliceIndex.InvokeOnInstance e x
292+
static member inline TryFindLastSliceIndex (x: '``collection<'T>``, e: '``collection<'T>``, _impl: Default1) : 'Index option = TryFindLastSliceIndex.InvokeOnInstance e x
293293
static member inline TryFindLastSliceIndex (_: ^t when ^t: null and ^t: struct, _, _impl: Default1) = ()
294294

295295
static member inline Invoke (slice: '``Collection<'T>``) (source: '``Collection<'T>``) : 'Index option =

0 commit comments

Comments
 (0)