Skip to content

Commit 062eb42

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

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/_docs/reference/contextual/derivation.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,21 +91,21 @@ Where of course `TC` and `DerivingType` are applied to types of the correct kind
9191

9292
To make this work, we split it into 3 cases:
9393

94-
If `TC` and `DerivingType` take the same number of arguments (`N == K`):
94+
If `F` and `DerivingType` take the same number of arguments (`N == K`):
9595
```scala
9696
given TC[DerivingType] = TC.derived
9797
// simplified form of:
9898
given TC[ [A_1, ..., A_K] => DerivingType[A_1, ..., A_K] ] = TC.derived
9999
```
100-
If `DerivingType` takes less arguments than `TC` (`N < K`), we throw away the leftmost ones:
100+
If `DerivingType` takes less arguments than `F` (`N < K`), we use only the rightmost parameters from the type lambda:
101101
```scala
102102
given TC[ [A_1, ..., A_K] =>> DerivingType[A_(K-N+1), ..., A_K] ] = TC.derived
103103

104104
// if DerivingType takes no arguments (N == 0), the above simplifies to:
105105
given TC[ [A_1, ..., A_K] =>> DerivingType ] = TC.derived
106106
```
107107

108-
If `TC` takes less arguments than `DerivingType` (`K < N`), we fill in the leftmost slots with type parameters:
108+
If `F` takes less arguments than `DerivingType` (`K < N`), we fill in the leftmost slots with type parameters:
109109
```scala
110110
given [T_1, ... T_(N-K)]: TC[[A_1, ..., A_K] =>> DerivingType[T_1, ... T_(N-K), A_1, ..., A_K]] = TC.derived
111111
```

0 commit comments

Comments
 (0)