Simon Peyton-Jones wrote:
>
> | That wording is a little unclear, so I suggest clarifying
> | it as follows:
> |
> | * The next operation allows one to extract a pseudo-random Int
> | from the generator, returning a new generator as well.
> | The integer returned may be positive or negative.
> | Over a sufficiently large sequence of calls to next,
> | the integers returned should be uniformly distributed
> | over the whole range of Int (from minBound to maxBound,
> | inclusive).
> |
> | If that clarification were made, there would be no need to
> | introduce the `genRange' method that Simon P-J suggested.
>
> Yes, that's a possible alternative. The current story says
> "at least 30 bits"; you are suggesting [minBound..maxBound].
> In effect, you would mandate that every generator must have
> genRange g = (minBound,msxBound).
>
> Seems like a reasonable alternative. Comments?
I think it's OK, with reservations. I would still like to see more
flexibility, perhaps in Haskell 2.
Matt Harden