Re: suggestion for Random.randomR

2000-01-12 Thread Matt Harden
George Russell wrote: Matt Harden wrote: I don't think that's really true. If I understand it correctly, the state can be any type; it doesn't have to fit in, say, an Int or other small type. I think the Mersenne Twister could be implemented as an instance of Random.RandomGen. The

Re: suggestion for Random.randomR

2000-01-07 Thread George Russell
Matt Harden wrote: I don't think that's really true. If I understand it correctly, the state can be any type; it doesn't have to fit in, say, an Int or other small type. I think the Mersenne Twister could be implemented as an instance of Random.RandomGen. The only thing is I don't really

RE: suggestion for Random.randomR

1999-12-23 Thread Simon Peyton-Jones
Sergey The essence of your message is that the H98 Random library defn of randomR doesn't really make sense if the type does not belong to Ord. I don't want to specify that | It is required randomR (lo,hi) g == randomR (hi,lo) g as you suggest. That would be counter-intuitive for

Re: suggestion for Random.randomR

1999-12-23 Thread George Russell
Personally I have only one gripe with the Random class in Standard Haskell; this is that it provides too much functionality. In general I think you can only have two of the following 3: (1) good random numbers (2) speed (3) small state For example the Mersenne Twister is very very good and

Re: suggestion for Random.randomR

1999-12-23 Thread Matt Harden
George Russell wrote: Personally I have only one gripe with the Random class in Standard Haskell; this is that it provides too much functionality. In general I think you can only have two of the following 3: (1) good random numbers (2) speed (3) small state For example the Mersenne