Proposal: Move 'split' into a separate class in System.Random

Thomas DuBuisson thomas.dubuisson at gmail.com
Wed Sep 15 12:08:58 EDT 2010


On Wed, Sep 15, 2010 at 7:57 AM, Ian Lynagh <igloo at earth.li> wrote:
> I approve, but what do you propose to do for haskell98:Random?

Someone (me?) should make a matching proposal to Haskell' once we have
decided on a reasonable way forward.  WRT H98, modifying the Haskell98
library to have an upper bound on random 1.0.x would make sense.
Having two incompatible classes is rather inescapable when one is in a
standard and the other is its replacement.

Henning said:

> class StraightRandomGen g where
>  System.Random.next :: g -> (Int, g)
>  System.Random.genRange :: g -> (Int, Int)
>
> class StraightRandomGen g => RandomGen g where

I favor a clean break with the past and small flurry of fixing
activity. The more concessions made in the base libraries the odder
all libraries will feel.  If, despite me, we do decide on these
classes could the new one at least be called "BasicRandomGen" or
"FundamentalRandomGen"?


Cheers,
Thomas


More information about the Libraries mailing list