Skip to content

Commit 3d80a3a

Browse files
fxdmhttwallymathieu
authored andcommitted
Improve internal type signature (#623)
1 parent 8154374 commit 3d80a3a

2 files changed

Lines changed: 29 additions & 29 deletions

File tree

src/FSharpPlus/Control/Collection.fs

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

300-
static member inline Invoke (source: '``C<'T>``) : '``C<'T>`` =
300+
static member inline Invoke (source: '``Collection<'T>``) : '``Collection<'T>`` =
301301
let inline call_2 (a: ^a, b: ^b) = ((^a or ^b) : (static member Distinct : _*_ -> _) b, a)
302302
let inline call (a: 'a, b: 'b) = call_2 (a, b)
303303
call (Unchecked.defaultof<Distinct>, source)
304-
static member inline InvokeOnInstance (source: '``C<'T>``) : '``C<'T>`` = (^``C<'T>`` : (static member Distinct : _->_) source) : ^``C<'T>``
304+
static member inline InvokeOnInstance (source: '``Collection<'T>``) : '``Collection<'T>`` = (^``Collection<'T>`` : (static member Distinct : _->_) source) : ^``Collection<'T>``
305305

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

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

311311

@@ -315,14 +315,14 @@ type DistinctBy =
315315
static member DistinctBy (x: list<'a> , f, [<Optional>]_impl: DistinctBy) = List.distinctBy f x
316316
static member DistinctBy (x: 'a [] , f, [<Optional>]_impl: DistinctBy) = Array.distinctBy f x
317317

318-
static member inline Invoke (projection: 'T->'Key) (source: '``C<'T>``) : '``C<'T>`` =
318+
static member inline Invoke (projection: 'T->'Key) (source: '``Collection<'T>``) : '``Collection<'T>`` =
319319
let inline call_2 (a: ^a, b: ^b, f) = ((^a or ^b) : (static member DistinctBy : _*_*_ -> _) b, f, a)
320320
let inline call (a: 'a, b: 'b, f) = call_2 (a, b, f)
321321
call (Unchecked.defaultof<DistinctBy>, source, projection)
322-
static member inline InvokeOnInstance (projection: 'T->'Key) (source: '``C<'T>``) : '``C<'T>`` = (^``C<'T>`` : (static member DistinctBy : _*_->_) source, projection) : ^``C<'T>``
322+
static member inline InvokeOnInstance (projection: 'T->'Key) (source: '``Collection<'T>``) : '``Collection<'T>`` = (^``Collection<'T>`` : (static member DistinctBy : _*_->_) source, projection) : ^``Collection<'T>``
323323

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

328328

@@ -333,7 +333,7 @@ type GroupBy =
333333
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
334334
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
335335

336-
static member inline Invoke (projection: 'T->'Key) (source: '``C<'T>``) : '``C<'Key * 'C<'T>>`` =
336+
static member inline Invoke (projection: 'T->'Key) (source: '``Collection<'T>``) : '``Collection<'Key * 'Collection<'T>>`` =
337337
let inline call_3 (a: ^a, b: ^b, c: ^c, p) = ((^a or ^b or ^c) : (static member GroupBy : _*_*_*_ -> _) b, p, c, a)
338338
let inline call (a: 'a, b: 'b, p) = call_3 (a, b, Unchecked.defaultof<'r>, p) : 'r
339339
call (Unchecked.defaultof<GroupBy>, source, projection)
@@ -376,15 +376,15 @@ type Rev =
376376
static member Rev (x: list<'a> , [<Optional>]_impl: Rev ) = List.rev x
377377
static member Rev (x: 'a [] , [<Optional>]_impl: Rev ) = Array.rev x
378378

379-
static member inline Invoke (source: '``C<'T>``) : '``C<'T>`` =
379+
static member inline Invoke (source: 'Collection) : 'Collection =
380380
let inline call_2 (a: ^a, b: ^b) = ((^a or ^b) : (static member Rev : _*_ -> _) b, a)
381381
let inline call (a: 'a, b: 'b) = call_2 (a, b)
382382
call (Unchecked.defaultof<Rev>, source)
383-
static member inline InvokeOnInstance (source: '``C<'T>``) : '``C<'T>`` = (^``C<'T>`` : (static member Rev : _->_) source) : ^``C<'T>``
383+
static member inline InvokeOnInstance (source: 'Collection) : 'Collection = (^Collection : (static member Rev : _->_) source) : ^Collection
384384

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

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

390390

@@ -406,15 +406,15 @@ type Sort =
406406
static member Sort (x: list<'a>, [<Optional>]_impl: Sort) = List.sort x
407407
static member Sort (x: 'a [] , [<Optional>]_impl: Sort) = Array.sort x
408408

409-
static member inline Invoke (source: '``C<'T>``) : '``C<'T>`` =
409+
static member inline Invoke (source: '``Collection<'T>``) : '``Collection<'T>`` =
410410
let inline call_2 (a: ^a, b: ^b) = ((^a or ^b) : (static member Sort : _*_ -> _) b, a)
411411
let inline call (a: 'a, b: 'b) = call_2 (a, b)
412412
call (Unchecked.defaultof<Sort>, source)
413-
static member inline InvokeOnInstance (source: '``C<'T>``) : '``C<'T>`` = (^``C<'T>`` : (static member Sort : _->_) source) : ^``C<'T>``
413+
static member inline InvokeOnInstance (source: '``Collection<'T>``) : '``Collection<'T>`` = (^``Collection<'T>`` : (static member Sort : _->_) source) : ^``Collection<'T>``
414414

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

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

420420

@@ -424,14 +424,14 @@ type SortBy =
424424
static member SortBy (x: list<'a>, f, [<Optional>]_impl: SortBy) = List.sortBy f x
425425
static member SortBy (x: 'a [] , f, [<Optional>]_impl: SortBy) = Array.sortBy f x
426426

427-
static member inline Invoke (projection: 'T->'Key) (source: '``C<'T>``) : '``C<'T>`` =
427+
static member inline Invoke (projection: 'T->'Key) (source: '``Collection<'T>``) : '``Collection<'T>`` =
428428
let inline call_2 (a: ^a, b: ^b, f) = ((^a or ^b) : (static member SortBy : _*_*_ -> _) b, f, a)
429429
let inline call (a: 'a, b: 'b, f) = call_2 (a, b, f)
430430
call (Unchecked.defaultof<SortBy>, source, projection)
431-
static member inline InvokeOnInstance (projection: 'T->'Key) (source: '``C<'T>``) : '``C<'T>`` = (^``C<'T>`` : (static member SortBy : _*_->_) source, projection) : ^``C<'T>``
431+
static member inline InvokeOnInstance (projection: 'T->'Key) (source: '``Collection<'T>``) : '``Collection<'T>`` = (^``Collection<'T>`` : (static member SortBy : _*_->_) source, projection) : ^``Collection<'T>``
432432

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

437437
type SortByDescending =
@@ -440,14 +440,14 @@ type SortByDescending =
440440
static member SortByDescending (x: list<'a>, f, [<Optional>]_impl: SortBy) = List.sortByDescending f x
441441
static member SortByDescending (x: 'a [] , f, [<Optional>]_impl: SortBy) = Array.sortByDescending f x
442442

443-
static member inline Invoke (projection: 'T->'Key) (source: '``C<'T>``) : '``C<'T>`` =
443+
static member inline Invoke (projection: 'T->'Key) (source: '``Collection<'T>``) : '``Collection<'T>`` =
444444
let inline call_2 (a: ^a, b: ^b, f) = ((^a or ^b) : (static member SortByDescending : _*_*_ -> _) b, f, a)
445445
let inline call (a: 'a, b: 'b, f) = call_2 (a, b, f)
446446
call (Unchecked.defaultof<SortByDescending>, source, projection)
447-
static member inline InvokeOnInstance (projection: 'T->'Key) (source: '``C<'T>``) : '``C<'T>`` = (^``C<'T>`` : (static member SortByDescending : _*_->_) source, projection) : ^``C<'T>``
447+
static member inline InvokeOnInstance (projection: 'T->'Key) (source: '``Collection<'T>``) : '``Collection<'T>`` = (^``Collection<'T>`` : (static member SortByDescending : _*_->_) source, projection) : ^``Collection<'T>``
448448

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

453453
type Split =

src/FSharpPlus/Control/Indexable.fs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ type FindSliceIndex =
286286
(^``Collection<'T>``: (static member FindSliceIndex: _*_->_) source, slice)
287287

288288
static member FindSliceIndex ((x: #seq<'a> , e ), [<Optional>]_impl: Default2) = Seq.findSliceIndex e x
289-
static member inline FindSliceIndex ((x: '``C<'T>``, e: '``C<'T>``), _impl: Default1) : 'Index = FindSliceIndex.InvokeOnInstance e x
289+
static member inline FindSliceIndex ((x: '``collection<'T>``, e: '``collection<'T>``), _impl: Default1) : 'Index = FindSliceIndex.InvokeOnInstance e x
290290
static member inline FindSliceIndex ((_: ^t when ^t: null and ^t: struct, _), _impl: Default1) = ()
291291

292292
static member inline Invoke (slice: '``Collection<'T>``) (source: '``Collection<'T>``) : 'Index =
@@ -315,7 +315,7 @@ type TryFindSliceIndex =
315315
(^``Collection<'T>``: (static member TryFindSliceIndex: _*_->_) source, slice)
316316

317317
static member TryFindSliceIndex ((x: #seq<'a> , e ), [<Optional>]_impl: Default2) = Seq.tryFindSliceIndex e x
318-
static member inline TryFindSliceIndex ((x: '``C<'T>``, e: '``C<'T>``), _impl: Default1) : 'Index option = TryFindSliceIndex.InvokeOnInstance e x
318+
static member inline TryFindSliceIndex ((x: '``collection<'T>``, e: '``collection<'T>``), _impl: Default1) : 'Index option = TryFindSliceIndex.InvokeOnInstance e x
319319
static member inline TryFindSliceIndex ((_: ^t when ^t: null and ^t: struct, _), _impl: Default1) = ()
320320

321321
static member inline Invoke (slice: '``Collection<'T>``) (source: '``Collection<'T>``) : 'Index option =
@@ -336,7 +336,7 @@ type FindLastSliceIndex =
336336
static member inline InvokeOnInstance (slice: '``Collection<'T>``) (source: '``Collection<'T>``) : 'Index =
337337
(^``Collection<'T>``: (static member FindLastSliceIndex: _*_->_) source, slice)
338338
static member FindLastSliceIndex (x: seq<'a> , e , [<Optional>]_impl: Default2) = Seq.findLastSliceIndex e x
339-
static member inline FindLastSliceIndex (x: '``C<'T>``, e: '``C<'T>``, _impl: Default1) : 'Index = FindLastSliceIndex.InvokeOnInstance e x
339+
static member inline FindLastSliceIndex (x: '``collection<'T>``, e: '``collection<'T>``, _impl: Default1) : 'Index = FindLastSliceIndex.InvokeOnInstance e x
340340
static member inline FindLastSliceIndex (_: ^t when ^t: null and ^t: struct, _, _impl: Default1) = ()
341341

342342
static member inline Invoke (slice: '``Collection<'T>``) (source: '``Collection<'T>``) : 'Index =
@@ -355,7 +355,7 @@ type TryFindLastSliceIndex =
355355
static member inline InvokeOnInstance (slice: '``Collection<'T>``) (source: '``Collection<'T>``) : 'Index option =
356356
(^``Collection<'T>``: (static member TryFindLastSliceIndex: _*_->_) source, slice)
357357
static member TryFindLastSliceIndex (x: seq<'a> , e , [<Optional>]_impl: Default2) = Seq.tryFindLastSliceIndex e x
358-
static member inline TryFindLastSliceIndex (x: '``C<'T>``, e: '``C<'T>``, _impl: Default1) : 'Index option = TryFindLastSliceIndex.InvokeOnInstance e x
358+
static member inline TryFindLastSliceIndex (x: '``collection<'T>``, e: '``collection<'T>``, _impl: Default1) : 'Index option = TryFindLastSliceIndex.InvokeOnInstance e x
359359
static member inline TryFindLastSliceIndex (_: ^t when ^t: null and ^t: struct, _, _impl: Default1) = ()
360360

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

0 commit comments

Comments
 (0)