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

Ivan Lazar Miljenovic ivan.miljenovic at
Tue Sep 14 23:26:46 EDT 2010

On 15 September 2010 13:15, Milan Straka <fox at> wrote:
>  * I see no motivation why to do it,

I think the motivation is that this lets other PRNG's share the same
typeclass to improve compatability, but most of them don't support
split and thus can't use the current class as-is.

>  * and personally I find the `split' method very useful.

Note that the proposal isn't to do away with split, but to shift it
into its own dedicated type class.  This will hopefully (if
implemented) result in mersenne-random-pure64, mwc-random, etc. having
RandomGen instances rather than having to learn their specific API,
whilst leaving split there for use with StdGen.

I'm still of two minds about this proposal: I think the idea is great,
but that aspects of the Random class would then require SplittableGen
rather than RandomGen for "sanity" (i.e. randoms and randomRs).

Ivan Lazar Miljenovic
Ivan.Miljenovic at

More information about the Libraries mailing list