boltzmann-samplers (hackage): Random generators with a uniform distribution conditioned to a given size. See also testing-feat, which is currently a faster method with similar results.
Keywords: data|generic|library|mit|random