Skip to content

Fix type class spelling #10454

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/reference/changed-features/structural-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions docs/docs/reference/contextual/motivation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/reference/contextual/relationship-implicits.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion docs/sidebar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/patmat/i6088.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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])
}
Expand Down