
15 Sep
2010
15 Sep
'10
11:27 a.m.
On Wed, Sep 15, 2010 at 12:20 PM, Henning Thielemann
I assume that there is more code that uses RandomGen in constraints than code that defines instances, thus the split of the split class might look like:
class StraightRandomGen g where System.Random.next :: g -> (Int, g) System.Random.genRange :: g -> (Int, Int)
class StraightRandomGen g => RandomGen g where System.Random.split :: g -> (g, g)
All existing code that uses RandomGen in constraints would remain valid this way.
+1 ...although I don't like the name 'Straight'. =) -- Felipe.