File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 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
8585The following example is an extended implementation of a simple state machine which can be in a state ` On ` or ` Off ` .
8686The machine can change state from ` Off ` to ` On ` with ` turnedOn ` only if it is currently ` Off ` ,
8787conversely 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]` .
8989For example, not allowing calling ` turnedOff ` on in an ` Off ` state as we would require an evidence ` IsOn[Off] `
9090that will not be found.
9191
@@ -112,7 +112,7 @@ object IsOff {
112112@ implicitNotFound(" State is must be On" )
113113class IsOn [S <: State ]
114114object 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
116116 erased implicit val isOn : IsOn [On ] = new IsOn [On ]
117117}
118118
You can’t perform that action at this time.
0 commit comments