Hoogle Search

Within LTS Haskell 24.63 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. genByteString :: RandomGen g => Int -> g -> (ByteString, g)

    random System.Random

    Generates a ByteString of the specified size using a pure pseudo-random number generator. See uniformByteStringM for the monadic version.

    Examples

    >>> import System.Random
    
    >>> import Data.ByteString
    
    >>> let pureGen = mkStdGen 137
    
    >>> unpack . fst . genByteString 10 $ pureGen
    [51,123,251,37,49,167,90,109,1,4]
    

  2. genShortByteString :: RandomGen g => Int -> g -> (ShortByteString, g)

    random System.Random

    genShortByteString n g returns a ShortByteString of length n filled with pseudo-random bytes.

  3. genShortByteStringIO :: MonadIO m => Int -> m Word64 -> m ShortByteString

    random System.Random.Stateful

    Efficiently generates a sequence of pseudo-random bytes in a platform independent manner.

  4. genShortByteStringST :: Int -> ST s Word64 -> ST s ShortByteString

    random System.Random.Stateful

    Same as genShortByteStringIO, but runs in ST.

  5. uniformByteStringM :: StatefulGen g m => Int -> g -> m ByteString

    random System.Random.Stateful

    Generates a pseudo-random ByteString of the specified size.

  6. uniformShortByteString :: StatefulGen g m => Int -> g -> m ShortByteString

    random System.Random.Stateful

    uniformShortByteString n g generates a ShortByteString of length n filled with pseudo-random bytes.

  7. fromByteString :: ByteString -> Builder

    binary Data.Binary.Builder

    O(1). A Builder taking a ByteString, satisfying

  8. fromLazyByteString :: ByteString -> Builder

    binary Data.Binary.Builder

    O(1). A Builder taking a lazy ByteString, satisfying

  9. fromShortByteString :: ShortByteString -> Builder

    binary Data.Binary.Builder

    O(n). A builder taking ShortByteString and copy it to a Builder, satisfying

  10. toLazyByteString :: Builder -> LazyByteString

    binary Data.Binary.Builder

    Execute a Builder and return the generated chunks as a LazyByteString. The work is performed lazy, i.e., only when a chunk of the LazyByteString is forced.

Page 31 of many | Previous | Next