[ANN] type-level-prng: Type level PRNGs

A handful of PRNGs defined on GHC’s type-level Naturals.

While writing a type-level program, I found myself wanting random selection. This is in support of that. It’s unergonomic (you must keep track of PRNG state manually) and non-trivial PRNGs will likely have poor performance. But it works, and is highly pluggable. You can parameterise type families over a PRNG, and decide which one to use at call time.

16 Likes