global random number generator initialisation
Ian Lynagh
igloo at earth.li
Thu Jul 4 17:10:43 EDT 2002
The library report, in "17.3 The global random number generator", says
It is initialised automatically in some system-dependent fashion,
for example, by using the time of day, or Linux's kernel random
number generator.
However, under Linux "randomIO :: IO Int" seems to generate the same
values on each run.
The IO versions, randomRIO and randomIO, use the global random
number generator (see Section 17.3).
While the report doesn't require it to be set to something pseudo random
it would be nice if it was. Is there an obvious way to set it to
something pseudo random in Haskell? The Time module isn't as well
equiped as it could be for the task.
Thanks
Ian
More information about the Glasgow-haskell-bugs
mailing list