The Counter module implements a thread-safe integer counter. It can be used to generate unique ids in a multi-threaded system.
Documentation
Returns a global counter.
getAndIncr :: Counter -> IO IntSource
Increments the counter and returns the previous version.