Skip to content

Commit

Permalink
Fix typos in new docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Blaisorblade authored and allanrenucci committed Mar 23, 2018
1 parent 05162fe commit e51db1c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/docs/reference/kind-polymorphism.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ layout: doc-page
title: "Kind Polymorphism"
---

Normally type parameters in Scala are partitioned into _kinds_. First-level types are types of values. Higher-kinded types are type constructurs
Normally type parameters in Scala are partitioned into _kinds_. First-level types are types of values. Higher-kinded types are type constructors
such as `List` or `Map`. The kind of a type is indicated by the top type of which it is a subtype. Normal types are subtypes of `Any`,
covariant single argument type constructors such as `List` are subtypes of `[+X] => Any`, and the `Map` type constructor is
a subtype of `[X, +Y] => Any`.
Expand Down Expand Up @@ -32,12 +32,12 @@ We call type parameters and abstract types with an `AnyKind` upper bound _any-ki
Since the actual kind of an any-kinded type is unknown, its usage must be heavily restricted: An any-kinded type
can be neither the type of a value, nor can it be instantiated with type parameters. So about the only
thing one can do with an any-kinded type is to pass it to another any-kinded type argument.
Nevertheless, this is enough to achieve some interesting generalizations that work across kinds, typicially
Nevertheless, this is enough to achieve some interesting generalizations that work across kinds, typically
through advanced uses of implicits.

(todo: insert good concise example)

Some technical details: `AnyKind` is a synthesized class just like `Any`, but without any members. It extends no other class.
It is declared `abstract` and `final`, so it can be neither instantiated nor extended.

`AnyKind` plays a special role in Scala's subtype system: It is a supertype of all other types no matter what their kind is. It is also assumed to be kind-compatible with all other types. Furthermore, `AnyKind` is treated as a higher-kinded type (so it cannot be used as a type of values), but at the same time it has no type parameters (so it cannot be instantiated).
`AnyKind` plays a special role in Scala's subtype system: It is a supertype of all other types no matter what their kind is. It is also assumed to be kind-compatible with all other types. Furthermore, `AnyKind` is treated as a higher-kinded type (so it cannot be used as a type of values), but at the same time it has no type parameters (so it cannot be instantiated).

0 comments on commit e51db1c

Please sign in to comment.