Creating unique labels in Haskell

You need a “unique supply”. The usual way to do this in Haskell is by threading a counter through the State monad, which automates the plumbing problem you describe.

Leave a Comment