https://blog.cofree.coffee/2025-03-05-chat-bots-revisited/ https://github.com/cofree-coffee/cofree-bot
Also using the lens library to encode moore machines as polynomial functors: https://blog.cofree.coffee/2024-07-02-lensy-moore/
I have a raw haskell prototype of polystate here, maybe it will help you. https://github.com/sdzx-1/typed-gui/blob/main/examples/todoL...
https://medium.com/@paul_42036/entity-workflows-for-event-dr...
I believe that FSMs are a very powerful approach, even for building entire systems. So much so, that it forms a core part of our product.
Doing it through types is intellectually interesting and makes the result more integrated into the edit-compile loop instead of involving a step in the build process or a step of invoking an interpreter, but it might not change the practical state of the art.
It has a completely type-safe finite state machine, and it does not require additional programming conventions.
It relies on a special monad: Mcbride Indexed Monad, which can model uncertainty in terms of type.
Are you using this monad here?
Here is a concrete ATM demo https://github.com/sdzx-1/typed-fsm/tree/main/examples/ATM
A short blurb on the github explaining what applications this may have and how you would use it to solve problems would be very helpful.
Since I only have experience in haskell and zig, I'm curious if there are other languages or libraries with similar implementations?