@@ -419,7 +419,7 @@ The possible variations are presented in the following.
419
419
420
420
// Alias with using clause
421
421
given [A ](using Ord [A ]): Ord [List [A ]] =
422
- ListOrd [A ]
422
+ ListOrd [A ]()
423
423
424
424
// Concrete class instance
425
425
given Context with {}
@@ -462,7 +462,7 @@ The possible variations are presented in the following.
462
462
463
463
// Alias with using clause
464
464
given [A ](using Ord [A ]) => Ord [List [A ]] =
465
- ListOrd [A ]
465
+ ListOrd [A ]()
466
466
467
467
// Concrete class instance
468
468
given Context
@@ -491,11 +491,11 @@ one would have to put the function in parentheses, in both current and proposed
491
491
def compare (x : Int , y : Int ) = ...
492
492
493
493
// Parameterized typeclass
494
- given listOrd : [A : Ord ]: Ord [List [A ]] with
494
+ given listOrd [A : Ord ]: Ord [List [A ]] with
495
495
def compare (x : List [A ], y : List [A ]) = ...
496
496
497
497
// Typeclass with using clause
498
- given [A ](using Ord [A ]): Ord [List [A ]] with
498
+ given listOrd [A ](using Ord [A ]): Ord [List [A ]] with
499
499
def compare (x : List [A ], y : List [A ]) = ...
500
500
501
501
// Simple alias
@@ -507,7 +507,7 @@ one would have to put the function in parentheses, in both current and proposed
507
507
508
508
// Alias with using clause
509
509
given listOrd [A ](using Ord [A ]): Ord [List [A ]] =
510
- ListOrd [A ]
510
+ ListOrd [A ]()
511
511
512
512
// Concrete class instance
513
513
given context : Context with {}
@@ -546,7 +546,7 @@ one would have to put the function in parentheses, in both current and proposed
546
546
547
547
// Alias with using clause
548
548
given [A ](using Ord [A ]) => Ord [List [A ]] as listOrd =
549
- ListOrd [A ]
549
+ ListOrd [A ]()
550
550
551
551
// Concrete class instance
552
552
given Context as context
@@ -588,7 +588,7 @@ As an alternative, here is a version of new style given, but using the current `
588
588
589
589
// Alias with using clause
590
590
given listOrd : [A ](using Ord [A ]) => Ord [List [A ]] =
591
- ListOrd [A ]
591
+ ListOrd [A ]()
592
592
593
593
// Concrete class instance
594
594
given context : Context // this would be a change of meaning from abstract given
0 commit comments