
On Thu, Oct 7, 2010 at 10:00 AM, Simon Peyton-Jones
| > 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. | > | > See ticket 4314 [1] for the patch.
The design, of having two classes, seems nearly right. The nit is that surely RandomGen should be a superclass of SplittableGen? I don't want to bloat my contexts too much.
+1 I did an analysys of the 254 direct reverse dependencies on random: http://bifunctor.homelinux.net/~roel/cgi-bin/hackage-scripts/revdeps/random-... 7 of those 254 packages use 'split' in test code only. 27 of those 254 packages use 'split' in production code. 11 of those 27 packages use 'split' polymorphically and have explicit type signatures which need to change when 'split' is separated from RandomGen. Attached is the detailed analysis. Regards, Bas P.S. I'm thinking about creating a tool at the upcoming Hackaton that lists the reverse dependencies of symbols. Because it's tedious and error-prone to do this manually.