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

GHC 9.14.1 · lts/ghc-9.14.x · 3e2d568 · 2026-10-11

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