sdzx-1 / typed-fsm

typed finite-state machine
https://hackage.haskell.org/package/typed-fsm
MIT License
12 stars 1 forks source link
fsm haskell typed

typed-fsm

typed finite-state machine

Advantages of type-fsm

  1. Focus on the right message

  2. Top-to-bottom design for easy refactoring

  3. Conducive to building complex state machine systems

    • Type guarantees will not produce incorrect function calls when written
    • With the help of the type system, we can define many state processing functions and then call each other recursively with confidence.
  4. There is a sanity check. If you miss some items for pattern matching, the compiler will issue a warning, and there will also be a warning for invalid items.