Hoogle Search

Within LTS Haskell 22.18 (ghc-9.6.4)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. randomRIO :: (Random a, MonadIO m) => (a, a) -> m a

    random 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
    

  2. gRandomRIO :: forall a . (ADTRecord a, Constraints a Random) => (a, a) -> IO a

    one-liner-instances System.Random.OneLiner

    randomRIO implemented by calling gRandomR on the global seed.

  3. gRandomRIOSum :: forall a . (ADT a, Constraints a Random) => (a, a) -> IO a

    one-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