
9 Oct
2010
9 Oct
'10
10:17 a.m.
All, In summary to this proposal, I think the community agrees it is too "cludgy". Perhaps people would have agreed on one of SPJs suggested designs [1], so I might make another proposal when I again have time. I'll mark the associated bug as closed, or whatever seems closest to 'reject'. Cheers, Thomas [1]
class RandomGen g where type GenVal g :: * next :: g -> (GenVal g, g)
class Random a v where randoms :: forall g. (RandomGen g, v ~ GenVal g) => g -> [a]
or
class RandomGen g where nextInt :: g -> (Int, g) nextByteString :: g -> (ByteString, g)