Skip to content

Commit d2de7fc

Browse files
committed
Fix a typo in derivation.md
1 parent c207fa8 commit d2de7fc

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

docs/docs/reference/contextual/derivation.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ Note the following properties of `Mirror` types,
123123
+ Properties are encoded using types rather than terms. This means that they have no runtime footprint unless used and
124124
also that they are a compile time feature for use with Scala 3's metaprogramming facilities.
125125
+ The kinds of `MirroredType` and `MirroredElemTypes` match the kind of the data type the mirror is an instance for.
126-
This allows `Mirrors` to support ADTs of all kinds.
126+
This allows `Mirror`s to support ADTs of all kinds.
127127
+ There is no distinct representation type for sums or products (ie. there is no `HList` or `Coproduct` type as in
128128
Scala 2 versions of Shapeless). Instead the collection of child types of a data type is represented by an ordinary,
129129
possibly parameterized, tuple type. Scala 3's metaprogramming facilities can be used to work with these tuple types
@@ -167,7 +167,6 @@ The low-level method we will use to implement a type class `derived` method in t
167167
type-level constructs in Scala 3: inline methods, inline matches, and implicit searches via `summonInline` or `summonFrom`. Given this definition of the
168168
`Eq` type class,
169169

170-
171170
```scala
172171
trait Eq[T]:
173172
def eqv(x: T, y: T): Boolean
@@ -194,7 +193,6 @@ implementation of `summonAll` is `inline` and uses Scala 3's `summonInline` cons
194193
`List`,
195194

196195
```scala
197-
198196
inline def summonAll[T <: Tuple]: List[Eq[_]] =
199197
inline erasedValue[T] match
200198
case _: EmptyTuple => Nil
@@ -357,10 +355,13 @@ ConstrApps ::= ConstrApp {‘with’ ConstrApp}
357355

358356
Note: To align `extends` clauses and `derives` clauses, Scala 3 also allows multiple
359357
extended types to be separated by commas. So the following is now legal:
358+
360359
```scala
361360
class A extends B, C { ... }
362361
```
362+
363363
It is equivalent to the old form
364+
364365
```scala
365366
class A extends B with C { ... }
366367
```

0 commit comments

Comments
 (0)