Hoogle Search
Within LTS Haskell 24.38 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
-
HUnit Test.HUnit.Base Performs a test run with the specified report generators. This handles the actual running of the tests. Most developers will want to use HUnit.Text.runTestTT instead. A developer could use this function to execute tests via another IO system, such as a GUI, or to output the results in a different manner (e.g., upload XML-formatted results to a webservice). Note that the counts in a start report do not include the test case being started, whereas the counts in a problem report do include the test case just finished. The principle is that the counts are sampled only between test case executions. As a result, the number of test case successes always equals the difference of test cases tried and the sum of test case errors and failures.
performTestCase :: Assertion -> IO ResultHUnit Test.HUnit.Lang Performs a single test case.
-
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.