-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer : libraries@haskell.org
--- Stability : provisional
+-- Stability : stable
-- Portability : portable
--
-- Random numbers.
import Data.IORef
import Numeric ( readDec )
-#ifdef __GLASGOW_HASKELL__
-import GHC.IOBase ( stToIO )
-#endif
-
-- The standard nhc98 implementation of Time.ClockTime does not match
-- the extended one expected in this module, so we lash-up a quick
-- replacement here.
{- |'getStdRandom' uses the supplied function to get a value from the current
global random generator, and updates the global generator with the new generator
-returned by the function. For example, 'rollDice' gets a random integer between 1 and 6:
+returned by the function. For example, @rollDice@ gets a random integer between 1 and 6:
> rollDice :: IO Int
> rollDice = getStdRandom (randomR (1,6))