HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulerandom-fu-0.3.0.1Haskell2010

Data.Random.Distribution.Uniform

  • 2 types
  • 22 values
  • Packagerandom-fu-0.3.0.1
  • Exports24
  • LanguageHaskell2010
  • LicenceLicenseRef-PublicDomain
  • SourceUniform.hs
datadata Uniform t
#

A definition of a uniform distribution over the type t. See also uniform.

Constructors

  • Uniform !t !t

    A uniform distribution defined by a lower and upper range bound. For Integral and Enum types, the range is inclusive. For Fractional types the range includes the lower bound but not the upper.

Instances36CDF, Distribution, …
datadata StdUniform t
#

A name for the "standard" uniform distribution over the type t, if one exists. See also stdUniform.

For Integral and Enum types that are also Bounded, this is the uniform distribution over the full range of the type. For un-Bounded Integral types this is not defined. For Fractional types this is a random variable in the range [0,1) (that is, 0 to 1 including 0 but not including 1).

Instances36PDF, CDF, Distribution, …

Get a "standard" uniformly distributed variable. For integral types, this means uniformly distributed over the full range of the type (there is no support for Integer). For fractional types, this means uniformly distributed on the interval [0,1).

Get a "standard" uniformly distributed process. For integral types, this means uniformly distributed over the full range of the type (there is no support for Integer). For fractional types, this means uniformly distributed on the interval [0,1).

valueenumUniform :: Enum a => a -> a -> RVarT m a
#

realFloatUniform a b computes a uniform random value in the range [a,b) for any Enum type