File tree 1 file changed +2
-2
lines changed 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ State machine with erased evidence example
85
85
The following example is an extended implementation of a simple state machine which can be in a state ` On ` or ` Off ` .
86
86
The machine can change state from ` Off ` to ` On ` with ` turnedOn ` only if it is currently ` Off ` ,
87
87
conversely from ` On ` to ` Off ` with ` turnedOff ` only if it is currently ` On ` . These last constraint are
88
- captured with the ` IsOff[S] ` and ` IsOn[S] ` implicit evidence only exist for ` IsOff[Off] ` and ` InOn [On]` .
88
+ captured with the ` IsOff[S] ` and ` IsOn[S] ` implicit evidence only exist for ` IsOff[Off] ` and ` IsOn [On]` .
89
89
For example, not allowing calling ` turnedOff ` on in an ` Off ` state as we would require an evidence ` IsOn[Off] `
90
90
that will not be found.
91
91
@@ -112,7 +112,7 @@ object IsOff {
112
112
@ implicitNotFound(" State is must be On" )
113
113
class IsOn [S <: State ]
114
114
object IsOn {
115
- // def isOn will not exist at runtime, the compiler will only require that this evidence exists at compile time
115
+ // erased val isOn will not exist at runtime, the compiler will only require that this evidence exists at compile time
116
116
erased implicit val isOn : IsOn [On ] = new IsOn [On ]
117
117
}
118
118
You can’t perform that action at this time.
0 commit comments