On Tue, Aug 16, 2011 at 17:07, James Cook <mokus@deepbondi.net> wrote:
On Aug 16, 2011, at 4:04 PM, Evan Laforge wrote:
> I've noticed there's a convention to put modules having to deal with
> randomness into System.Random.  I thought System was for OS
> interaction?  Granted getting a random seed usually means going to the
> OS, but isn't the rest of it, like generating random sequences,
> distributions, selecting based on probability, shuffling, etc. all
> non-OS related algorithms?

System definitely does seem like an odd choice.  In most cases the only interaction any PRNG, even when accessed via the FFI, has with the "system" is - as you say - to get an initial seed value for a global instance.

I'd be tempted to guess that the whole reason it's under System is the IO component.

--
brandon s allbery                                      allbery.b@gmail.com
wandering unix systems administrator (available)     (412) 475-9364 vm/sms