I recently started an implementation of (finite) automata in Haskell and it turned out to have fundamental similarities with this library (but that of course is much better developed.
I tried to treat deterministic and non-deterministic automata similarly without creating a typeclass, this lead to using Monads and Foldables. The goal would be to be able to freely convert
- NFA to DFA
- RegExp to NFA
- DFA, NFA to Graphs (using GraphViz)
Nothing really works at the moment, most functions were written with DFAs in mind, and I’m not sure how to realise
ε-transitions…
Stay tuned!