Why erased terms? The following examples shows an 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. This last constraint is captured with the IsOff[S] implicit evidence which only exists for IsOff[Off]. For example, not allowing calling turnedOn on in an On state as we would require an