-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How do I use Data.Random.Source.IO to generate random numbers in Windows AND Unix? #9
Comments
Data.Random.Source.IO declares a "MonadRandom" instance for IO, which means that random variables can be sampled using the "sample" function. For example:
Should "just work". If you need to reference it as a concrete "source", you can use the special value
StdRandom is a pseudo-source that refers to the default source of randomness for the monad in which it is used. Sorry to take so long to reply. I've been mostly offline for a few months. |
I want my code to be platform-agnostic, but I can't find example code using Data.Random.Source.IO anywhere in the documentation.
The text was updated successfully, but these errors were encountered: