| class RandomGen g v | g -> v where | next :: g -> (v, g) | genRange :: g-> (v,v) Or, perhaps nicer, class RandomGen g where type RandomVal g next :: g -> (RandomVal g, g) genRange :: g -> (RandomVal g, RandomVal g) where "RandomVal g" means "the type of values produced by generator g". Simon