HORIZON HASKELLDocslts/ghc-10.0.xfc4e5982026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · fc4e598 · 2026-10-11

Modulerandom-bytestring-0.1.4Haskell2010

Data.ByteString.Random.MWC

  • 2 values
valuerandom
  1. :: Natural

    Length of the result bytestring in bytes

  2. -> IO ByteString
#

Generate a random bytestring of length n. The PRNG is seeded from the system randomness source.

Property
ioProperty $ ((fromIntegral n ===) . B.length) <$> random n
Property
n > 4 ==> ioProperty $ (/=) <$> random n <*> random n

Orphan instances

1 instance