1 patch for repository /home/tommd/dev/Haskell/HaskellCommunity/random:

Tue Sep 14 16:29:45 PDT 2010  thomas.dubuisson@gmail.com
  * Move "split" into its own class

New patches:

[Move "split" into its own class
thomas.dubuisson@gmail.com**20100914232945
 Ignore-this: 588e2a321823c206962b77c12cdb652a
] {
hunk ./System/Random.hs 43
 
 	-- * Random number generators
 
-	  RandomGen(next, split, genRange)
+	  RandomGen(next, genRange)
+	, SplittableGen(split)
 
 	-- ** Standard random number generators
 	, StdGen
hunk ./System/Random.hs 105
 -- | The class 'RandomGen' provides a common interface to random number
 -- generators.
 --
--- Minimal complete definition: 'next' and 'split'.
+-- Minimal complete definition: 'next'.
 
 class RandomGen g where
 
hunk ./System/Random.hs 114
    -- and a new generator.
    next     :: g -> (Int, g)
 
-   -- |The 'split' operation allows one to obtain two distinct random number
-   -- generators. This is very useful in functional programs (for example, when
-   -- passing a random number generator down to recursive calls), but very
-   -- little work has been done on statistically robust implementations of
-   -- 'split' (["System.Random\#Burton", "System.Random\#Hellekalek"]
-   -- are the only examples we know of).
-   split    :: g -> (g, g)
-
    -- |The 'genRange' operation yields the range of values returned by
    -- the generator.
    --
hunk ./System/Random.hs 136
    -- default method
    genRange _ = (minBound, maxBound)
 
+-- | The class 'SplittableGen' proivides a way to specify a random number
+-- generator that can be split into two new generators.
+class SplittableGen g where
+   -- |The 'split' operation allows one to obtain two distinct random number
+   -- generators. This is very useful in functional programs (for example, when
+   -- passing a random number generator down to recursive calls), but very
+   -- little work has been done on statistically robust implementations of
+   -- 'split' (["System.Random\#Burton", "System.Random\#Hellekalek"]
+   -- are the only examples we know of).
+   split    :: g -> (g, g)
+
 {- |
 The 'StdGen' instance of 'RandomGen' has a 'genRange' of at least 30 bits.
 
hunk ./System/Random.hs 178
 
 instance RandomGen StdGen where
   next  = stdNext
-  split = stdSplit
   genRange _ = stdRange
 
hunk ./System/Random.hs 180
+instance SplittableGen StdGen where
+  split = stdSplit
+
 instance Show StdGen where
   showsPrec p (StdGen s1 s2) = 
      showsPrec p s1 . 
}

Context:

[Fix randomIvalDouble so that it will not produce values more than a few ULPs below the requested lower bound
James Cook <james.cook@usma.edu>**20100412132638
 Ignore-this: 35a65dae123bbf5f812ebd0aac7aa3b1
] 
[Bump version to 1.0.0.2
Ian Lynagh <igloo@earth.li>**20090920141953] 
[use explicit import list for Data.Sequence, in preparation for an expanded interface
Ross Paterson <ross@soi.city.ac.uk>**20090913230910
 Ignore-this: d6f37ea56cff7c7f4edcafb89b2a9f
] 
[Fix "Cabal check" warnings
Ian Lynagh <igloo@earth.li>**20090811215920] 
[change dependency from old-time to time
Laszlo Nagy <rizsotto@gmail.com>**20090709091417
 Ignore-this: de203b243bd2f4035661c91971bd49cc
] 
[TAG 2009-06-25
Ian Lynagh <igloo@earth.li>**20090625160406] 
Patch bundle hash:
aec6bb01fa1395034c0bf0c74b6bb8806922e3de
