HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Modulerandom-bytestring-0.1.4Haskell2010

Data.ByteString.Random.PCG

  • 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