Skip to content

Commit c632d53

Browse files
Sporarumbishabosha
andauthored
Apply suggestions from code review
Co-authored-by: Jamie Thompson <[email protected]>
1 parent 062eb42 commit c632d53

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

docs/_docs/reference/contextual/derivation.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ Therefore `TC` is defined as `TC[F[A_1, ..., A_K]]` (`TC[F]` if `K == 0`) for so
5555
There are two further cases depending on the kinds of arguments:
5656

5757
#### `F` and all arguments of `DerivingType` have kind `*`
58+
**Note:** `K == 0` in this case.
5859

5960
The generated instance is then:
6061
```scala
@@ -105,7 +106,7 @@ given TC[ [A_1, ..., A_K] =>> DerivingType[A_(K-N+1), ..., A_K] ] = TC.derived
105106
given TC[ [A_1, ..., A_K] =>> DerivingType ] = TC.derived
106107
```
107108

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:
109110
```scala
110111
given [T_1, ... T_(N-K)]: TC[[A_1, ..., A_K] =>> DerivingType[T_1, ... T_(N-K), A_1, ..., A_K]] = TC.derived
111112
```
@@ -134,7 +135,7 @@ generates the following given instance:
134135
```scala
135136
object MyClass:
136137
...
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
138139
```
139140

140141
### `TC` is not valid for automatic derivation

0 commit comments

Comments
 (0)