add an overload for uniform!enum that takes a generator