Computations involving the generation of fresh symbols.
Symbols are generated deterministically, but also without reference to any other sources of symbols, such as the programmer's algorithms, user input or other SymbolGen monads. Therefore, make sure the symbols you generate are trivially distinct from all other sources of symbols.
Class for types that can provide an infinite supply of distinct values.
The initial symbol generated.
Given the last symbol generated, generate the next. Must be distinct from all other symbols generated.
Generate a fresh symbol. Of course, this monad does not know
what other sources of symbols there are, so make sure your
instance generates symbols distinct from all others.
Symbol Generator Monad
Symbol Generator Monad Transformer
Monad transformer adding the capability of generating fresh symbols.