[Haskell-beginners] What to use when you need random values?

Silent Leaf silent.leaf0 at gmail.com
Fri Jun 23 14:24:07 UTC 2017


Hi,
I've had trouble finding the best way(s) to use random values in haskell,
as it seems like there are several modules that either do the same thing or
reuse one another i'm not sure.

There is System.Random
- is it better to use the streams random(R)s or a more imperative randomRIO?
- is it better to use mkStdGen or newStdGen or getStdGen?
There is Test.QuickCheck and its type(class?) Gen
There is a module in Control.Monad (i think) which exports the type Rnd

What about performances, and all those options? What do you like to use
with random numbers?

I know that's a lot of questions. feel free to only answer to a few of
them. :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20170623/8fdc7829/attachment.html>


More information about the Beginners mailing list