Hoogle Search
Within LTS Haskell 24.51 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
performTestCase :: Assertion -> IO ResultHUnit Test.HUnit.Lang Performs a single test case.
-
tasty-quickcheck Test.Tasty.QuickCheck Optional; used internally in order to improve shrinking. Tests a property but also quantifies over an extra value (with a custom shrink and show function). The Testable instance for functions defines propertyForAllShrinkShow in a way that improves shrinking.
-
random System.Random The class of types for which a uniformly distributed value can be drawn from all possible values of the type.
-
random System.Random The class of types for which a uniformly distributed value can be drawn from a range.
uniform :: (RandomGen g, Uniform a) => g -> (a, g)random System.Random Generates a value uniformly distributed over all possible values of that type. This is a pure version of uniformM.
Examples
>>> import System.Random >>> let pureGen = mkStdGen 137 >>> uniform pureGen :: (Bool, StdGen) (True,StdGen {unStdGen = SMGen 11285859549637045894 7641485672361121627})uniformR :: (RandomGen g, UniformRange a) => (a, a) -> g -> (a, g)random System.Random Generates a value uniformly distributed over the provided range, which is interpreted as inclusive in the lower and upper bound.
- uniformR (1 :: Int, 4 :: Int) generates values uniformly from the set <math>
- uniformR (1 :: Float, 4 :: Float) generates values uniformly from the set <math>
uniformR (a, b) = uniformR (b, a)
This is a pure version of uniformRM.Examples
>>> import System.Random >>> let pureGen = mkStdGen 137 >>> uniformR (1 :: Int, 4 :: Int) pureGen (4,StdGen {unStdGen = SMGen 11285859549637045894 7641485672361121627})-
random System.Random.Stateful The class of types for which a uniformly distributed value can be drawn from all possible values of the type.
-
random System.Random.Stateful The class of types for which a uniformly distributed value can be drawn from a range.
uniformByteStringM :: StatefulGen g m => Int -> g -> m ByteStringrandom System.Random.Stateful Generates a pseudo-random ByteString of the specified size.
uniformDouble01M :: StatefulGen g m => g -> m Doublerandom System.Random.Stateful Generates uniformly distributed Double in the range <math>. Numbers are generated by generating uniform Word64 and dividing it by <math>. It's used to implement UniformRange instance for Double.