[Haskell-cafe] DFAs and self-referential data

oleg at okmij.org oleg at okmij.org
Tue Dec 28 12:09:39 CET 2010

Maxime Henrion wrote:
> I've been playing with some code to work with DFAs, but I'm now faced
> with an implementation problem.  In order to have states that can
> transition to themselves, it seems I would need self-referential data;
> otherwise I would need to separate those transitions from the rest and
> handle them specially in the code.

Perhaps an old article

might be of some help. The article describes not only running a finite
automaton (represented as a cyclic graph) on given input but also
printing the automaton out and determinizing it: converting NFA to an
equivalent DFA. The latter operation converts one cyclic graph to

More information about the Haskell-Cafe mailing list