[Haskell-cafe] System.Random.Mersenne - no randomR variants

Paul Moore p.f.moore at gmail.com
Mon Oct 5 16:20:05 EDT 2009

I notice that System.Random.Mersenne has no randomR variants. Is there
a reason for this, or is it just an oversight? It makes porting code
from System.Random a little more complicated than it needs to be. I
know it's possible to write a function mapping a Double (or other
value, as appropriate) to a range, effectively replacing randomR, but
it's fiddly to get the edge cases right. A standard implementation
would be helpful.


More information about the Haskell-Cafe mailing list