Finite State Automata in Haskell.