@@ -4,10 +4,10 @@ object Test extends App {
4
4
{
5
5
trait Show [T ]
6
6
object Show {
7
- given Show [Int ] with {}
8
- given [T ](using st : Show [T ]): Show [Tuple1 [T ]] with {}
9
- given t2 [T , U ](using st : Show [T ], su : Show [U ]): Show [(T , U )] with {}
10
- given t3 [T , U , V ](using st : Show [T ], su : Show [U ], sv : Show [V ]): Show [(T , U , V )] with {}
7
+ given Show [Int ]()
8
+ given [T ](using st : Show [T ]): Show [Tuple1 [T ]]()
9
+ given t2 [T , U ](using st : Show [T ], su : Show [U ]): Show [(T , U )]()
10
+ given t3 [T , U , V ](using st : Show [T ], su : Show [U ], sv : Show [V ]): Show [(T , U , V )]()
11
11
12
12
def derived [T ](using m : Mirror .Of [T ], r : Show [m.MirroredElemTypes ]): Show [T ] = new Show [T ] {}
13
13
}
@@ -22,10 +22,10 @@ object Test extends App {
22
22
{
23
23
trait Functor [F [_]]
24
24
object Functor {
25
- given [C ]: Functor [[T ] =>> C ] with {}
26
- given Functor [[T ] =>> Tuple1 [T ]] with {}
27
- given t2 [T ]: Functor [[U ] =>> (T , U )] with {}
28
- given t3 [T , U ]: Functor [[V ] =>> (T , U , V )] with {}
25
+ given [C ]: Functor [[T ] =>> C ]()
26
+ given Functor [[T ] =>> Tuple1 [T ]]()
27
+ given t2 [T ]: Functor [[U ] =>> (T , U )]()
28
+ given t3 [T , U ]: Functor [[V ] =>> (T , U , V )]()
29
29
30
30
def derived [F [_]](using m : Mirror { type MirroredType [X ] = F [X ] ; type MirroredElemTypes [_] }, r : Functor [m.MirroredElemTypes ]): Functor [F ] = new Functor [F ] {}
31
31
}
@@ -40,8 +40,8 @@ object Test extends App {
40
40
{
41
41
trait FunctorK [F [_[_]]]
42
42
object FunctorK {
43
- given [C ]: FunctorK [[F [_]] =>> C ] with {}
44
- given [T ]: FunctorK [[F [_]] =>> Tuple1 [F [T ]]] with {}
43
+ given [C ]: FunctorK [[F [_]] =>> C ]()
44
+ given [T ]: FunctorK [[F [_]] =>> Tuple1 [F [T ]]]()
45
45
46
46
def derived [F [_[_]]](using m : Mirror { type MirroredType [X [_]] = F [X ] ; type MirroredElemTypes [_[_]] }, r : FunctorK [m.MirroredElemTypes ]): FunctorK [F ] = new FunctorK [F ] {}
47
47
}
@@ -56,10 +56,10 @@ object Test extends App {
56
56
{
57
57
trait Bifunctor [F [_, _]]
58
58
object Bifunctor {
59
- given [C ]: Bifunctor [[T , U ] =>> C ] with {}
60
- given Bifunctor [[T , U ] =>> Tuple1 [U ]] with {}
61
- given t2 : Bifunctor [[T , U ] =>> (T , U )] with {}
62
- given t3 [T ]: Bifunctor [[U , V ] =>> (T , U , V )] with {}
59
+ given [C ]: Bifunctor [[T , U ] =>> C ]()
60
+ given Bifunctor [[T , U ] =>> Tuple1 [U ]]()
61
+ given t2 : Bifunctor [[T , U ] =>> (T , U )]()
62
+ given t3 [T ]: Bifunctor [[U , V ] =>> (T , U , V )]()
63
63
64
64
def derived [F [_, _]](using m : Mirror { type MirroredType [X , Y ] = F [X , Y ] ; type MirroredElemTypes [_, _] }, r : Bifunctor [m.MirroredElemTypes ]): Bifunctor [F ] = ???
65
65
}
0 commit comments