diff --git a/docs/blog/_posts/2019-08-30-18th-dotty-milestone-release.md b/docs/blog/_posts/2019-08-30-18th-dotty-milestone-release.md index 103aee123f70..420b9103d3b7 100644 --- a/docs/blog/_posts/2019-08-30-18th-dotty-milestone-release.md +++ b/docs/blog/_posts/2019-08-30-18th-dotty-milestone-release.md @@ -264,7 +264,7 @@ We are making steady progress with the language metaprogramming features. The me - Runtime staging `run` moved to `scala.quoted.staging` in [#7077](https://github.com/lampepfl/dotty/pull/7077). - Runtime staging factored out to a separate library in [#7080](https://github.com/lampepfl/dotty/pull/7080). -## Type class Derivation +## Type Class Derivation Type class derivation has received a major rework and an [updated documentation](https://dotty.epfl.ch/docs/reference/contextual/derivation.html). We have dropped the usage of the `Shape` type to describe the shape of a type. Instead, all the relevant information is now encoded in the `Mirror` type and its subtypes as tuples. For more information, see the [documentation](https://dotty.epfl.ch/docs/reference/contextual/derivation.html). diff --git a/docs/blog/_posts/2020-06-22-25th-dotty-milestone-release.md b/docs/blog/_posts/2020-06-22-25th-dotty-milestone-release.md index e80e42bd6a6b..8989a2f7b410 100644 --- a/docs/blog/_posts/2020-06-22-25th-dotty-milestone-release.md +++ b/docs/blog/_posts/2020-06-22-25th-dotty-milestone-release.md @@ -24,7 +24,7 @@ Product -- Tuple -+- EmptyTuple +- NonEmptyTuple -- *:[Head, Tail <: Tuple] ``` -This change impacts existing typeclass derivation codebases in that they now should use `EmptyTuple` instead of `Unit` in the tuple context. +This change impacts existing type class derivation codebases in that they now should use `EmptyTuple` instead of `Unit` in the tuple context. # Avoid excessive slowdowns when suggesting missing imports in error messages Dotty brings to the user an enhanced error reporting when it comes to programming with givens. This better error reporting, however, proved to be a trade-off. Sometimes it takes an unreasonable amount of time and space to compute a quality suggestion to the end user. diff --git a/docs/docs/reference/changed-features/structural-types.md b/docs/docs/reference/changed-features/structural-types.md index 088297615059..e840b6df4ea2 100644 --- a/docs/docs/reference/changed-features/structural-types.md +++ b/docs/docs/reference/changed-features/structural-types.md @@ -115,7 +115,7 @@ Structural calls like this tend to be much slower than normal method calls. The `reflectiveSelectable` conversion. However, to warn against inefficient dispatch, Scala 2 requires a language import `import scala.language.reflectiveCalls`. -Before resorting to structural calls with Java reflection one should consider alternatives. For instance, sometimes a more a modular _and_ efficient architecture can be obtained using typeclasses. +Before resorting to structural calls with Java reflection one should consider alternatives. For instance, sometimes a more a modular _and_ efficient architecture can be obtained using type classes. ## Extensibility diff --git a/docs/docs/reference/contextual/motivation.md b/docs/docs/reference/contextual/motivation.md index 2dc2781fdcec..22da4305ac42 100644 --- a/docs/docs/reference/contextual/motivation.md +++ b/docs/docs/reference/contextual/motivation.md @@ -60,8 +60,8 @@ This section also contains pages describing other language features that are rel - [Context Bounds](./context-bounds.md), which carry over unchanged. - [Extension Methods](./extension-methods.md) replace implicit classes in a way that integrates better with type classes. - - [Implementing Type classes](type-classes.md) demonstrates how some common type classes can be implemented using the new constructs. - - [Type class Derivation](./derivation.md) introduces constructs to automatically derive type class instances for ADTs. + - [Implementing Type Classes](type-classes.md) demonstrates how some common type classes can be implemented using the new constructs. + - [Type Class Derivation](./derivation.md) introduces constructs to automatically derive type class instances for ADTs. - [Multiversal Equality](./multiversal-equality.md) introduces a special type class to support type safe equality. - [Context Functions](./context-functions.md) provide a way to abstract over context parameters. - [By-Name Context Parameters](./by-name-context-parameters.md) are an essential tool to define recursive synthesized values without looping. diff --git a/docs/docs/reference/contextual/relationship-implicits.md b/docs/docs/reference/contextual/relationship-implicits.md index b0a7295e74e5..53e28165a10f 100644 --- a/docs/docs/reference/contextual/relationship-implicits.md +++ b/docs/docs/reference/contextual/relationship-implicits.md @@ -125,7 +125,7 @@ implicit class CircleDecorator(c: Circle) extends AnyVal { Abstract extension methods in traits that are implemented in given instances have no direct counterpart in Scala-2. The only way to simulate these is to make implicit classes available through imports. The Simulacrum macro library can automate this process in some cases. -### Type class Derivation +### Type Class Derivation Type class derivation has no direct counterpart in the Scala 2 language. Comparable functionality can be achieved by macro-based libraries such as Shapeless, Magnolia, or scalaz-deriving. diff --git a/docs/sidebar.yml b/docs/sidebar.yml index bcb662ad97fe..31018958f2fd 100644 --- a/docs/sidebar.yml +++ b/docs/sidebar.yml @@ -57,7 +57,7 @@ sidebar: url: docs/reference/contextual/extension-methods.html - title: Implementing Type classes url: docs/reference/contextual/type-classes.html - - title: Type class Derivation + - title: Type Class Derivation url: docs/reference/contextual/derivation.html - title: Multiversal Equality url: docs/reference/contextual/multiversal-equality.html diff --git a/tests/patmat/i6088.scala b/tests/patmat/i6088.scala index 0c6b3733e41d..9c532a608bb4 100644 --- a/tests/patmat/i6088.scala +++ b/tests/patmat/i6088.scala @@ -3,7 +3,7 @@ trait ~>[F[_], G[_]] { def apply[A](fa: F[A]): G[A] } -/** Higher-kinded pattern functor typeclass. */ +/** Higher-kinded pattern functor type class. */ trait HFunctor[H[f[_], i]] { def hmap[A[_], B[_]](nt: A ~> B): ([x] =>> H[A,x]) ~> ([x] =>> H[B,x]) }