A similar Haskell module [2] was written by Brent Yorgey.
The multinomialRanking function in my module generalizes the binomial rankings considered in the article, as well as permutations. By composing all kinds of rankings together, some very interesting classes of objects can be enumerated.
Even very densely coded chess positions; by nesting 14 different rankings, I obtained a ranking of size ~ 8.7x10^45 that includes all legal chess positions. Sampling millions of random chess positions [3] and determining their legality [4] allowed us to estimate the number of legal chess positions as ~ 4.8 * 10^44.
[1] https://github.com/tromp/ChessPositionRanking/blob/main/src/...
[2] https://hackage.haskell.org/package/simple-enumeration-0.2/d...
[3] https://github.com/tromp/ChessPositionRanking
[4] https://github.com/peterosterlund2/texel/blob/master/doc/pro...