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

Ian Lynagh igloo at
Wed Sep 15 10:57:25 EDT 2010

On Tue, Sep 14, 2010 at 04:44:34PM -0700, Thomas DuBuisson wrote:
> The "split" routine in the RandomGen seems to be a sore spot for some
> people and is perceived to have few users (even as a percentage of
> RandomGen users).  I propose:
> 1) Making a class "SplittableGen":
> class SplittableGen g where
>   split :: g -> (g, g)
> 2) (re)moving the "split" routine from the RandomGen class.

I approve, but what do you propose to do for haskell98:Random?

Currently it just reexports System.Random. Would it:
(a) continue to reexport System.Random (not including split)
(b) continue to reexport System.Random (including split)
(c) continue to reexport System.Random (including split and SplittableGen)
(d) have its own copy of the current Random library

Note that option (d) means that we would have 2 incompatible definitions
of the class.


More information about the Libraries mailing list