@@ -55,6 +55,7 @@ Therefore `TC` is defined as `TC[F[A_1, ..., A_K]]` (`TC[F]` if `K == 0`) for so
55
55
There are two further cases depending on the kinds of arguments:
56
56
57
57
#### ` F ` and all arguments of ` DerivingType ` have kind ` * `
58
+ ** Note:** ` K == 0 ` in this case.
58
59
59
60
The generated instance is then:
60
61
``` scala
@@ -105,7 +106,7 @@ given TC[ [A_1, ..., A_K] =>> DerivingType[A_(K-N+1), ..., A_K] ] = TC.derived
105
106
given TC [ [A_1 , ..., A_K ] =>> DerivingType ] = TC .derived
106
107
```
107
108
108
- If ` F ` takes less arguments than ` DerivingType ` (` K < N ` ), we fill in the leftmost slots with type parameters:
109
+ If ` F ` takes less arguments than ` DerivingType ` (` K < N ` ), we fill in the remaining leftmost slots with type parameters of the given :
109
110
``` scala
110
111
given [T_1 , ... T_ (N - K )]: TC [[A_1 , ..., A_K ] =>> DerivingType [T_1 , ... T_ (N - K ), A_1 , ..., A_K ]] = TC .derived
111
112
```
@@ -134,7 +135,7 @@ generates the following given instance:
134
135
``` scala
135
136
object MyClass :
136
137
...
137
- given [A_L , A_R , G_L [_], G_R [_]](using CanEqual [A_L , B_L ]): CanEqual [MyClass [A_L , G_L ], MyClass [A_R , G_R ]] = CanEqual .derived
138
+ given [A_L , A_R , G_L [_], G_R [_]](using CanEqual [A_L , A_R ]): CanEqual [MyClass [A_L , G_L ], MyClass [A_R , G_R ]] = CanEqual .derived
138
139
```
139
140
140
141
### ` TC ` is not valid for automatic derivation
0 commit comments