X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=System%2FRandom.hs;h=c0633aa94cf5fc0ec73a06a9637e97953ce50518;hb=260e7f2ed9a43c6ecf5a556d77817f39ed2893ab;hp=aa3ddf60056a2c1522ce62a825685c546e39a012;hpb=f61a5cd4c1f13a44c212fce464e35d1796fe9110;p=ghc-base.git diff --git a/System/Random.hs b/System/Random.hs index aa3ddf6..c0633aa 100644 --- a/System/Random.hs +++ b/System/Random.hs @@ -8,7 +8,7 @@ -- Stability : provisional -- Portability : portable -- --- $Id: Random.hs,v 1.1 2001/06/28 14:15:04 simonmar Exp $ +-- $Id: Random.hs,v 1.2 2001/12/21 15:07:26 simonmar Exp $ -- -- Random numbers. -- @@ -16,7 +16,7 @@ module System.Random ( - RandomGen(next, split) + RandomGen(next, split, genRange) , StdGen , mkStdGen , Random ( random, randomR, @@ -53,8 +53,12 @@ import System.Time ( getClockTime, ClockTime(..) ) #endif class RandomGen g where - next :: g -> (Int, g) - split :: g -> (g, g) + next :: g -> (Int, g) + split :: g -> (g, g) + genRange :: g -> (Int,Int) + + -- default mathod + genRange g = (minBound,maxBound) data StdGen