Skip to content

Commit

Permalink
Merge pull request scala#2696 from egaga/patch-3
Browse files Browse the repository at this point in the history
Fix typos
  • Loading branch information
felixmulder authored Jun 7, 2017
2 parents 21f6fa2 + 258775e commit 36298e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/docs/reference/phantom-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ These are useful to prove static properties of the code using type evidences.
As they have no effect on the runtime they can be erased from the resulting code by
the compiler once it has shown the constraints hold.

When saying that a they have no effect on the runtime we do not only mean side effects
When saying that they have no effect on the runtime we do not only mean side effects
like IO, field mutation, exceptions and so on. We also imply that if a function receives
a phantom its result will not be affected by this argument.

Expand Down Expand Up @@ -79,7 +79,7 @@ from outside `MyPhantoms` unless an alias is defined for them.

New phantom types can be defined using `type XYZ <: OtherPhantom` (where `>: MyPhantom.Nothing`
will be inferred), this would be the equivalent of `class XYZ extends OtherClass` on a types
only (no runtime definitions). Or aliased with `type MyAny = OtherPhantom`. Whitin `MyPhantoms`
only (no runtime definitions). Or aliased with `type MyAny = OtherPhantom`. Within `MyPhantoms`
it is possible to refer to `MyPhantoms.Any` and `MyPhantoms.Nothing` with `this.Any` and
`this.Nothing` (or just `Any` and `Nothing` but not recommended). Using this we will define
four the four phantoms: `Inky`, `Blinky`, `Pinky` and `Clyde`.
Expand Down

0 comments on commit 36298e7

Please sign in to comment.