Skip to content
Merged
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
4 changes: 2 additions & 2 deletions docs/docs/reference/erased-terms.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ State machine with erased evidence example
The following example is an extended implementation of a simple state machine which can be in a state `On` or `Off`.
The machine can change state from `Off` to `On` with `turnedOn` only if it is currently `Off`,
conversely from `On` to `Off` with `turnedOff` only if it is currently `On`. These last constraint are
captured with the `IsOff[S]` and `IsOn[S]` implicit evidence only exist for `IsOff[Off]` and `InOn[On]`.
captured with the `IsOff[S]` and `IsOn[S]` implicit evidence only exist for `IsOff[Off]` and `IsOn[On]`.
For example, not allowing calling `turnedOff` on in an `Off` state as we would require an evidence `IsOn[Off]`
that will not be found.

Expand All @@ -112,7 +112,7 @@ object IsOff {
@implicitNotFound("State is must be On")
class IsOn[S <: State]
object IsOn {
// def isOn will not exist at runtime, the compiler will only require that this evidence exists at compile time
// erased val isOn will not exist at runtime, the compiler will only require that this evidence exists at compile time
erased implicit val isOn: IsOn[On] = new IsOn[On]
}

Expand Down