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.

  1. performTest :: ReportStart us -> ReportProblem us -> ReportProblem us -> us -> Test -> IO (Counts, us)

    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.

  2. performTestCase :: Assertion -> IO Result

    HUnit Test.HUnit.Lang

    Performs a single test case.

  3. class Uniform a

    random System.Random

    The class of types for which a uniformly distributed value can be drawn from all possible values of the type.

  4. class UniformRange a

    random System.Random

    The class of types for which a uniformly distributed value can be drawn from a range.

  5. 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})
    

  6. 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>
    The following law should hold to make the function always defined:
    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})
    

  7. class Uniform a

    random System.Random.Stateful

    The class of types for which a uniformly distributed value can be drawn from all possible values of the type.

  8. class UniformRange a

    random System.Random.Stateful

    The class of types for which a uniformly distributed value can be drawn from a range.

  9. uniformByteStringM :: StatefulGen g m => Int -> g -> m ByteString

    random System.Random.Stateful

    Generates a pseudo-random ByteString of the specified size.

  10. uniformDouble01M :: StatefulGen g m => g -> m Double

    random 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.

Page 411 of many | Previous | Next