
16 Sep
2010
16 Sep
'10
7:59 a.m.
On Wed, 15 Sep 2010 12:27:14 -0300, Felipe Lessa
On Wed, Sep 15, 2010 at 12:20 PM, Henning Thielemann
wrote: 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
+1 -- Nicolas Pouillard http://nicolaspouillard.fr