Posted on June 29, 2020 by Evgeny Poberezkin Tags: haskell, executable, coding This post is “literate” haskell (thanks to markdown-unlit), it can be run using GHC 8.8.3 with stack run elevator. Why? The reason to use types to model state transitions is to guarantee the correctness of state machine implementation by the way it is constructed, so that invalid implementations fail to compile. When we model a state machine we usually create some diagram or use some meta-language to show allow...