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