Some experiments with automata in Haskell