Hoogle Search
Within LTS Haskell 23.21 (ghc-9.8.4)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
randomRIO :: (Random a, MonadIO m) => (a, a) -> m arandom System.Random A variant of randomRM that uses the global pseudo-random number generator globalStdGen
>>> randomRIO (2020, 2100) :: IO Int 2040
Similar to randomIO, this function is equivalent to getStdRandom randomR and is included in this interface for historical reasons and backwards compatibility. It is recommended to use uniformRM instead, possibly with the globalStdGen if relying on the global state is acceptable.>>> import System.Random.Stateful >>> uniformRM (2020, 2100) globalStdGen :: IO Int 2079
gRandomRIO :: (ADTRecord a, Constraints a Random) => (a, a) -> IO aone-liner-instances System.Random.OneLiner randomRIO implemented by calling gRandomR on the global seed.
gRandomRIOSum :: (ADT a, Constraints a Random) => (a, a) -> IO aone-liner-instances System.Random.OneLiner randomRIO implemented by calling gRandomRSum on the global seed. If given a range of items made with different constructors, will be error!
Page 1 of 1